FileDocCategorySizeDatePackage
WeblogicTOPLinkDeploymentTool.javaAPI DocApache Ant 1.704012Wed Dec 13 06:16:20 GMT 2006org.apache.tools.ant.taskdefs.optional.ejb

WeblogicTOPLinkDeploymentTool

public class WeblogicTOPLinkDeploymentTool extends WeblogicDeploymentTool
Deployment tool for Weblogic TOPLink.

Fields Summary
private static final String
TL_DTD_LOC
private String
toplinkDescriptor
private String
toplinkDTD
Constructors Summary
Methods Summary
protected voidaddVendorFiles(java.util.Hashtable ejbFiles, java.lang.String ddPrefix)
Add any vendor specific files which should be included in the EJB Jar.

param
ejbFiles the hashtable to add files to.
param
ddPrefix the prefix to use.

        super.addVendorFiles(ejbFiles, ddPrefix);
        // Then the toplink deployment descriptor

        // Setup a naming standard here?.


        File toplinkDD = new File(getConfig().descriptorDir, ddPrefix + toplinkDescriptor);

        if (toplinkDD.exists()) {
            ejbFiles.put(META_DIR + toplinkDescriptor,
                         toplinkDD);
        } else {
            log("Unable to locate toplink deployment descriptor. "
                + "It was expected to be in "
                + toplinkDD.getPath(), Project.MSG_WARN);
        }
    
protected DescriptorHandlergetDescriptorHandler(java.io.File srcDir)
Get the descriptor handler.

param
srcDir the source file.
return
the descriptor handler.

        DescriptorHandler handler = super.getDescriptorHandler(srcDir);
        if (toplinkDTD != null) {
            handler.registerDTD("-//The Object People, Inc.//"
                + "DTD TOPLink for WebLogic CMP 2.5.1//EN", toplinkDTD);
        } else {
            handler.registerDTD("-//The Object People, Inc.//"
                + "DTD TOPLink for WebLogic CMP 2.5.1//EN", TL_DTD_LOC);
        }
        return handler;
    
public voidsetToplinkdescriptor(java.lang.String inString)
Setter used to store the name of the toplink descriptor.

param
inString the string to use as the descriptor name.


                             
        
        this.toplinkDescriptor = inString;
    
public voidsetToplinkdtd(java.lang.String inString)
Setter used to store the location of the toplink DTD file. This is expected to be an URL (file or otherwise). If running this on NT using a file URL, the safest thing would be to not use a drive spec in the URL and make sure the file resides on the drive that ANT is running from. This will keep the setting in the build XML platform independent.

param
inString the string to use as the DTD location.

        this.toplinkDTD = inString;
    
public voidvalidateConfigured()
Called to validate that the tool parameters have been configured.

throws
BuildException if there is an error.

        super.validateConfigured();
        if (toplinkDescriptor == null) {
            throw new BuildException("The toplinkdescriptor attribute must "
                + "be specified");
        }