Browse Source

javadoc

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@473820 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 19 years ago
parent
commit
b155e56ba9
3 changed files with 40 additions and 9 deletions
  1. +9
    -3
      src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java
  2. +6
    -0
      src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java
  3. +25
    -6
      src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java

+ 9
- 3
src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java View File

@@ -76,6 +76,7 @@ import org.apache.tools.ant.types.Path;
*/ */
public class BorlandDeploymentTool extends GenericDeploymentTool public class BorlandDeploymentTool extends GenericDeploymentTool
implements ExecuteStreamHandler { implements ExecuteStreamHandler {
/** Borland 1.1 ejb id */
public static final String PUBLICID_BORLAND_EJB public static final String PUBLICID_BORLAND_EJB
= "-//Inprise Corporation//DTD Enterprise JavaBeans 1.1//EN"; = "-//Inprise Corporation//DTD Enterprise JavaBeans 1.1//EN";


@@ -126,10 +127,11 @@ public class BorlandDeploymentTool extends GenericDeploymentTool
private boolean verify = true; private boolean verify = true;
private String verifyArgs = ""; private String verifyArgs = "";


private Hashtable _genfiles = new Hashtable();
private Hashtable genfiles = new Hashtable();


/** /**
* set the debug mode for java2iiop (default false) * set the debug mode for java2iiop (default false)
* @param debug the setting to use.
**/ **/
public void setDebug(boolean debug) { public void setDebug(boolean debug) {
this.java2iiopdebug = debug; this.java2iiopdebug = debug;
@@ -137,6 +139,7 @@ public class BorlandDeploymentTool extends GenericDeploymentTool


/** /**
* set the verify mode for the produced jar (default true) * set the verify mode for the produced jar (default true)
* @param verify the setting to use.
**/ **/
public void setVerify(boolean verify) { public void setVerify(boolean verify) {
this.verify = verify; this.verify = verify;
@@ -173,6 +176,7 @@ public class BorlandDeploymentTool extends GenericDeploymentTool
/** /**
* setter used to store whether the task will include the generate client task. * setter used to store whether the task will include the generate client task.
* (see : BorlandGenerateClient task) * (see : BorlandGenerateClient task)
* @param b if true generate the client task.
*/ */
public void setGenerateclient(boolean b) { public void setGenerateclient(boolean b) {
this.generateclient = b; this.generateclient = b;
@@ -226,6 +230,8 @@ public class BorlandDeploymentTool extends GenericDeploymentTool
/** /**
* Add any vendor specific files which should be included in the * Add any vendor specific files which should be included in the
* EJB Jar. * EJB Jar.
* @param ejbFiles the map to add the files to.
* @param ddPrefix the prefix to use.
*/ */
protected void addVendorFiles(Hashtable ejbFiles, String ddPrefix) { protected void addVendorFiles(Hashtable ejbFiles, String ddPrefix) {


@@ -457,7 +463,7 @@ public class BorlandDeploymentTool extends GenericDeploymentTool
buildBorlandStubs(homes.iterator()); buildBorlandStubs(homes.iterator());


//add the gen files to the collection //add the gen files to the collection
files.putAll(_genfiles);
files.putAll(genfiles);


super.writeJar(baseName, jarFile, files, publicId); super.writeJar(baseName, jarFile, files, publicId);


@@ -511,7 +517,7 @@ public class BorlandDeploymentTool extends GenericDeploymentTool
if (javafile.endsWith(".java")) { if (javafile.endsWith(".java")) {
String classfile = toClassFile(javafile); String classfile = toClassFile(javafile);
String key = classfile.substring(getConfig().srcDir.getAbsolutePath().length() + 1); String key = classfile.substring(getConfig().srcDir.getAbsolutePath().length() + 1);
_genfiles.put(key, new File(classfile));
genfiles.put(key, new File(classfile));
} }
} }
reader.close(); reader.close();


+ 6
- 0
src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java View File

@@ -356,6 +356,10 @@ public class GenericDeploymentTool implements EJBDeploymentTool {
} }
} }


/**
* Get a descriptionHandler.
* @param srcDir the source directory.
*/
protected DescriptorHandler getDescriptorHandler(File srcDir) { protected DescriptorHandler getDescriptorHandler(File srcDir) {
DescriptorHandler h = new DescriptorHandler(getTask(), srcDir); DescriptorHandler h = new DescriptorHandler(getTask(), srcDir);


@@ -643,6 +647,8 @@ public class GenericDeploymentTool implements EJBDeploymentTool {
/** /**
* Add any vendor specific files which should be included in the * Add any vendor specific files which should be included in the
* EJB Jar. * EJB Jar.
* @param ejbFiles a hashtable entryname -> file.
* @param ddPrefix a prefix to use.
*/ */
protected void addVendorFiles(Hashtable ejbFiles, String ddPrefix) { protected void addVendorFiles(Hashtable ejbFiles, String ddPrefix) {
// nothing to add for generic tool. // nothing to add for generic tool.


+ 25
- 6
src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java View File

@@ -30,7 +30,6 @@ import java.util.jar.JarOutputStream;
import org.apache.tools.ant.BuildException; import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project; import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.Java; import org.apache.tools.ant.taskdefs.Java;
import org.apache.tools.ant.types.EnumeratedAttribute;
import org.apache.tools.ant.types.Environment; import org.apache.tools.ant.types.Environment;
import org.apache.tools.ant.types.Path; import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.util.FileUtils; import org.apache.tools.ant.util.FileUtils;
@@ -60,10 +59,13 @@ import org.apache.tools.ant.util.FileUtils;
* *
*/ */
public class WebsphereDeploymentTool extends GenericDeploymentTool { public class WebsphereDeploymentTool extends GenericDeploymentTool {
/** ID for ejb 1.1 */
public static final String PUBLICID_EJB11 public static final String PUBLICID_EJB11
= "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"; = "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN";
/** ID for ejb 2.0 */
public static final String PUBLICID_EJB20 public static final String PUBLICID_EJB20
= "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"; = "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN";
/** Schema directory */
protected static final String SCHEMA_DIR = "Schema/"; protected static final String SCHEMA_DIR = "Schema/";


protected static final String WAS_EXT = "ibm-ejb-jar-ext.xmi"; protected static final String WAS_EXT = "ibm-ejb-jar-ext.xmi";
@@ -132,7 +134,10 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool {
/** the home directory for websphere */ /** the home directory for websphere */
private File websphereHome; private File websphereHome;


/** Get the classpath to the websphere classpaths */
/**
* Get the classpath to the websphere classpaths.
* @return the websphere classpath.
*/
public Path createWASClasspath() { public Path createWASClasspath() {
if (wasClasspath == null) { if (wasClasspath == null) {
wasClasspath = new Path(getTask().getProject()); wasClasspath = new Path(getTask().getProject());
@@ -141,6 +146,10 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool {
} }




/**
* Set the websphere classpath.
* @param wasClasspath the websphere classpath.
*/
public void setWASClasspath(Path wasClasspath) { public void setWASClasspath(Path wasClasspath) {
this.wasClasspath = wasClasspath; this.wasClasspath = wasClasspath;
} }
@@ -240,7 +249,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool {
/** /**
* Flag to enable internal tracing when set, optional, default false. * Flag to enable internal tracing when set, optional, default false.
* *
* @param trace
* @param trace a <code>boolean</code> vaule.
*/ */
public void setTrace(boolean trace) { public void setTrace(boolean trace) {
this.trace = trace; this.trace = trace;
@@ -249,7 +258,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool {
/** /**
* Set the rmic options. * Set the rmic options.
* *
* @param options
* @param options the options to use.
*/ */
public void setRmicoptions(String options) { public void setRmicoptions(String options) {
this.rmicOptions = options; this.rmicOptions = options;
@@ -258,7 +267,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool {
/** /**
* Flag to use the WebSphere 3.5 compatible mapping rules ; optional, default false. * Flag to use the WebSphere 3.5 compatible mapping rules ; optional, default false.
* *
* @param attr
* @param attr a <code>boolean</code> value.
*/ */
public void setUse35(boolean attr) { public void setUse35(boolean attr) {
use35MappingRules = attr; use35MappingRules = attr;
@@ -268,6 +277,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool {
/** /**
* Set the rebuild flag to false to only update changes in the jar rather * Set the rebuild flag to false to only update changes in the jar rather
* than rerunning ejbdeploy; optional, default true. * than rerunning ejbdeploy; optional, default true.
* @param rebuild a <code>boolean</code> value.
*/ */
public void setRebuild(boolean rebuild) { public void setRebuild(boolean rebuild) {
this.alwaysRebuild = rebuild; this.alwaysRebuild = rebuild;
@@ -320,6 +330,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool {
/** /**
* Set the value of the oldCMP scheme. This is an antonym for newCMP * Set the value of the oldCMP scheme. This is an antonym for newCMP
* @ant.attribute ignore="true" * @ant.attribute ignore="true"
* @param oldCMP a <code>boolean</code> value.
*/ */
public void setOldCMP(boolean oldCMP) { public void setOldCMP(boolean oldCMP) {
this.newCMP = !oldCMP; this.newCMP = !oldCMP;
@@ -333,6 +344,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool {
* prefix. Under this scheme the name of the CMP descriptor does not match * prefix. Under this scheme the name of the CMP descriptor does not match
* the name actually used in the main websphere EJB descriptor. Also, * the name actually used in the main websphere EJB descriptor. Also,
* descriptors which contain multiple CMP references could not be used. * descriptors which contain multiple CMP references could not be used.
* @param newCMP a <code>boolean</code> value.
*/ */
public void setNewCMP(boolean newCMP) { public void setNewCMP(boolean newCMP) {
this.newCMP = newCMP; this.newCMP = newCMP;
@@ -342,13 +354,14 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool {
/** /**
* The directory, where ejbdeploy will write temporary files; * The directory, where ejbdeploy will write temporary files;
* optional, defaults to '_ejbdeploy_temp'. * optional, defaults to '_ejbdeploy_temp'.
* @param tempdir the directory name to use.
*/ */

public void setTempdir(String tempdir) { public void setTempdir(String tempdir) {
this.tempdir = tempdir; this.tempdir = tempdir;
} }




/* {@inheritDoc}. */
protected DescriptorHandler getDescriptorHandler(File srcDir) { protected DescriptorHandler getDescriptorHandler(File srcDir) {
DescriptorHandler handler = new DescriptorHandler(getTask(), srcDir); DescriptorHandler handler = new DescriptorHandler(getTask(), srcDir);
// register all the DTDs, both the ones that are known and // register all the DTDs, both the ones that are known and
@@ -365,6 +378,10 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool {
} }




/**
* Get a description handler.
* @param srcDir the source directory.
*/
protected DescriptorHandler getWebsphereDescriptorHandler(final File srcDir) { protected DescriptorHandler getWebsphereDescriptorHandler(final File srcDir) {
DescriptorHandler handler = DescriptorHandler handler =
new DescriptorHandler(getTask(), srcDir) { new DescriptorHandler(getTask(), srcDir) {
@@ -383,6 +400,8 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool {


/** /**
* Add any vendor specific files which should be included in the EJB Jar. * Add any vendor specific files which should be included in the EJB Jar.
* @param ejbFiles a hashtable entryname -> file.
* @param baseName a prefix to use.
*/ */
protected void addVendorFiles(Hashtable ejbFiles, String baseName) { protected void addVendorFiles(Hashtable ejbFiles, String baseName) {




Loading…
Cancel
Save