Methods Summary |
---|
public void | addFileset(org.apache.tools.ant.types.FileSet fileset)
filesets.add(fileset);
|
protected void | checkComponentConfig(org.apache.tools.ant.taskdefs.optional.iplanet.ComponentAdmin$Component comp)
log("Checking configuration for " + comp.getName(), Project.MSG_DEBUG);
// if specified, file must exist (either directory or file)
File theFile = comp.getFile();
if ((theFile != null) && (!theFile.exists())) {
String msg = "The file specified (" + theFile + ") could not be found.";
throw new BuildException(msg, getLocation());
}
// name must be >0 characters
String theName = comp.getName();
if ((theName == null) || (theName.length() == 0)) {
String msg = "A valid name for the component could not be determined.";
throw new BuildException(msg, getLocation());
}
// type must be valid
String theType = comp.getType();
if ((theType != null) && (!TYPE_MAP.values().contains(theType))) {
String msg = "The type specified (" + theType + ") is not valid.";
throw new BuildException(msg, getLocation());
}
|
protected void | checkConfiguration()
super.checkConfiguration();
if (components.size() == 0) {
log("WARNING! No components were specified.", Project.MSG_WARN);
}
log(components.size() + " components were found.", Project.MSG_DEBUG);
Iterator iterator = components.iterator();
while (iterator.hasNext()) {
Component comp = (Component)iterator.next();
checkComponentConfig(comp);
}
|
public org.apache.tools.ant.taskdefs.optional.iplanet.ComponentAdmin$Component | createComponent()
log("createComponent", Project.MSG_DEBUG);
Component newComponent = new Component(component);
components.add(newComponent);
return newComponent;
|
protected void | execute(Server server)
Iterator iterator = components.iterator();
while (iterator.hasNext()) {
Component comp = (Component)iterator.next();
String cmdString = getCommandString(server, comp);
execIasCommand(cmdString);
}
|
protected abstract java.lang.String | getCommandString(Server server, org.apache.tools.ant.taskdefs.optional.iplanet.ComponentAdmin$Component comp)
|
private org.apache.tools.ant.taskdefs.optional.iplanet.ComponentAdmin$Component | getComponent()
if (component == null) {
component = new Component();
Iterator it = components.iterator();
while (it.hasNext()) {
Component aComponent = (Component)it.next();
aComponent.setParent(component);
}
components.add(0, component);
}
return component;
|
protected void | prepareToExecute()
super.prepareToExecute();
processFilesets();
|
private void | processFilesets()
for (int i = 0; i < filesets.size(); i++) {
FileSet fileset = (FileSet) filesets.get(i);
DirectoryScanner scanner = fileset.getDirectoryScanner(project);
File baseDir = scanner.getBasedir();
String[] files = scanner.getIncludedFiles();
for (int j = 0; j < files.length; j++) {
Component archive = new Component();
archive.setFile(new File(baseDir, files[j]));
components.add(archive);
}
String[] dirs = scanner.getIncludedDirectories();
for (int j = 0; j < dirs.length; j++) {
Component expandedArchive = new Component();
expandedArchive.setFile(new File(baseDir, dirs[j]));
components.add(expandedArchive);
}
}
|
public void | setContextroot(java.lang.String contextroot)
getComponent().setContextroot(contextroot);
|
public void | setFile(java.io.File file) // FIXME (4 or 5 elements?)
TYPE_MAP.put("ear", TYPE_APP);
TYPE_MAP.put("jar", TYPE_EJB);
TYPE_MAP.put("war", TYPE_WEB);
TYPE_MAP.put("rar", TYPE_CONN);
// TYPE_MAP.put("???", TYPE_CLIENT); // FIXME
getComponent().setFile(file);
|
public void | setForce(boolean force)
getComponent().setForce(force);
|
public void | setName(java.lang.String name)
getComponent().setName(name);
|
public void | setType(java.lang.String type)
getComponent().setType(type);
|
public void | setUpload(boolean upload)
getComponent().setUpload(upload);
|