org.netbeans.modules.j2eeserver/4 1.55.0 1

org.netbeans.modules.j2ee.deployment.devmodules.api
Class AntDeploymentHelper

java.lang.Object
  extended by org.netbeans.modules.j2ee.deployment.devmodules.api.AntDeploymentHelper

public final class AntDeploymentHelper
extends Object

Helps to generate Ant deployment build scripts.

Since:
1.18

Constructor Summary
AntDeploymentHelper()
           
 
Method Summary
static File getDeploymentPropertiesFile(String serverInstanceID)
          Returns the server instance specific deployment properties file used by the deployment build script generated by the writeDeploymentScript(File,Object,String).
static void writeDeploymentScript(File file, Object moduleType, String serverInstanceID)
          Generates the Ant deployment build script for the given module type for the specified server instance to the specified file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AntDeploymentHelper

public AntDeploymentHelper()
Method Detail

writeDeploymentScript

public static void writeDeploymentScript(File file,
                                         Object moduleType,
                                         String serverInstanceID)
                                  throws IOException
Generates the Ant deployment build script for the given module type for the specified server instance to the specified file. If the specified serverInstanceID is null or no server instance of the specified ID exists a default deployment build script will be generated.

The Ant deployment build script requires the following properties to be defined.

The Ant deployment build script is bound to provide the following targets.

Parameters:
file - the file to which the deployment build script will be generated. If the file does not exist, it will be created.
moduleType - the module type the build script should handle. Use the constants defined in the J2eeModule.
serverInstanceID - the server instance for which the build script will be generated.
Throws:
IOException - if a problem during generating the build script occurs.

getDeploymentPropertiesFile

public static File getDeploymentPropertiesFile(String serverInstanceID)
Returns the server instance specific deployment properties file used by the deployment build script generated by the writeDeploymentScript(File,Object,String).

Parameters:
serverInstanceID - specifies the server instance.
Returns:
the deployment properties file for the specified server instance, if such instance exists and supports Ant deployment, null otherwise.
Throws:
NullPointerException - if the specified serverInstanceID is null.

org.netbeans.modules.j2eeserver/4 1.55.0 1

Built on December 1 2008.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.