jst j2ee
j2ee operations api overview
WTP LogoWTP Home
Overview

This document describes the J2EE Operations API contributed to M2. This API will be growing and changing over the subsequent milestone releases.
For M2, the API allows for for simple project creation, import, and export for:

 

The WTPOperationDataModel classes mentioned below will likely become API in the future. Please note, however, that these classes will go through significant changes as they
are cleaned up for API and modified to handle the upcoming flexible project structure (i.e. feel free to look at them, but do not use them as API).

Enterprise Applications
org.eclipse.jst.j2ee.application.operations.EnterpriseApplicationCreationDataModel
 

     public static void createProject(java.lang.String projectName,
                                      org.eclipse.core.runtime.IPath projectLocation,
                                      int applicationVersion)
Creates an Enterprise Application project with the specified name and version in the specified location.


Parameters:
projectName - The name of the Enterprise Application project to create.
projectLocation - Sets the local file system location for the described project. The path must be either an absolute file system path, or a relative path whose first segment is the name of a defined workspace path variable. If null is specified, the default location is used.
applicationVersion - Sets the J2EE Version for the descibed project. The version must be one of J2EEVersionConstants.J2EE_1_2_ID, J2EEVersionConstants.J2EE_1_3_ID, or J2EEVersionConstants.J2EE_1_4_ID.
Since:
WTP 1.0

 
 
 

org.eclipse.jst.j2ee.application.operations.EnterpriseApplicationImportDataModel

 
public static void importArchive(java.lang.String earFileName,
                                 java.lang.String earProjectName)
 
Imports the specified Enterprise Application archive file into the specified Enterprise Application project.

Parameters:
earFileName - The path to the EAR file.
earProjectName - The name of the Enterprise Application project where the Enterprise Application should be imported.
Since:
WTP 1.0
 
 

org.eclipse.jst.j2ee.application.operations.EnterpriseApplicationExportDataModel

 
public static void exportProject(java.lang.String earProjectName,
                                 java.lang.String earFileName,
                                 boolean overwriteExisting,
                                 boolean exportSource)
 
Exports the specified Enterprise Appliction project to the specified EAR file.

Parameters:
earProjectName - The name of the Enterprise Application project to export.
earFileName - The fully qualified EAR file location to export the specified Enterprise Application project.
overwriteExisting - If this is true then an existing file at the location specified by earFileName will be overwritten.
exportSource - If this is true then all source files in the specified Enterprise Application Project and all its modules will be included in the resulting EAR file.
Since:
WTP 1.0
Web Modules
org.eclipse.jst.j2ee.internal.web.archive.operations.WebModuleCreationDataModel
 
public static void createProject(java.lang.String projectName,
                                 org.eclipse.core.runtime.IPath projectLocation,
                                 int webModuleVersion)
 
Creates a Web project with the specified name and version in the specified location.

Parameters:
projectName - The name of the Web project to create.
projectLocation - Sets the local file system location for the described project. The path must be either an absolute file system path, or a relative path whose first segment is the name of a defined workspace path variable. If null is specified, the default location is used.
webModuleVersion - Version for the descibed project. The version must be one of the following: J2EEVersionConstants.WEB_2_2_ID, J2EEVersionConstants.WEB_2_3_ID, or J2EEVersionConstants.WEB_2_4_ID.
Since:
WTP 1.0
 
 

org.eclipse.jst.j2ee.internal.web.archive.operations.WebModuleImportDataModel

 
public static void importArchive(java.lang.String warFileName,
                                 java.lang.String webProjectName,
                                 boolean addToEar,
                                 java.lang.String earProjectName)
 
Imports the specified WAR file into the specified Web Module project.

Parameters:
warFileName - The path to the WAR file.
webProjectName - The name of the Web project where the Web Module should be imported.
addToEar - If this is true then Web project specified by webProjectName will be added to the Enterprise Application project specified by earProjectName.
earProjectName - The name of the Enterprise Application project to add the specified Web project to. This field is only relevant if addToEar is set to true. If this is set to null then a default name computed from the webProjectName will be used.
Since:
WTP 1.0
 
 

org.eclipse.jst.j2ee.internal.web.archive.operations.WebModuleExportDataModel

 
public static void exportProject(java.lang.String webProjectName,
                                 java.lang.String warFileName,
                                 boolean overwriteExisting,
                                 boolean exportSource)
 
Exports the specified Web Module project to the specified WAR file.

Parameters:
webProjectName - The name of the Web Module project to export.
warFileName - The fully qualified WAR file location to export the specified Web Module project.
overwriteExisting - If this is true then an existing file at the location specified by earFileName will be overwritten.
exportSource - If this is true then all source files in the specified Web Module will be included in the resulting WAR file.
Since:
WTP 1.0
EJB Modules
org.eclipse.jst.j2ee.internal.ejb.project.operations.EJBModuleCreationDataModel
 
public static void createProject(java.lang.String projectName,
                                 org.eclipse.core.runtime.IPath projectLocation,
                                 int ejbModuleVersion)
             
 
Creates an EJB project with the specified name and version in the specified location.

Parameters:
projectName - The name of the EJB project to create.
projectLocation - Sets the local file system location for the described project. The path must be either an absolute file system path, or a relative path whose first segment is the name of a defined workspace path variable. If null is specified, the default location is used.
ejbModuleVersion - Sets the EJB Module Version for the descibed project. The version must be one of J2EEVersionConstants.EJB_1_1_ID, J2EEVersionConstants.EJB_2_0_ID, or J2EEVersionConstants.EJB_2_1_ID.
Since:
WTP 1.0
 
 

org.eclipse.jst.j2ee.internal.ejb.project.operations.EJBModuleImportDataModel

 
public static void importArchive(java.lang.String ejbJarFileName,
                                 java.lang.String ejbProjectName,
                                 boolean addToEar,
                                 java.lang.String earProjectName)
 
Imports the specified EJB Jar file into the specified EJB Module project.

Parameters:
ejbJarFileName - The path to the EJB Jar file.
ejbProjectName - The name of the EJB project where the EJB Module should be imported.
addToEar - If this is true then EJB project specified by ejbProjectName will be added to the Enterprise Application project specified by earProjectName.
earProjectName - The name of the Enterprise Application project to add the specified EJB project to. This field is only relevant if addToEar is set to true. If this is set to null then a default name computed from the ejbProjectName will be used.
Since:
WTP 1.0
 
 

org.eclipse.jst.j2ee.internal.ejb.project.operations.EJBModuleExportDataModel

 
public static void exportProject(java.lang.String ejbProjectName,
                                 java.lang.String ejbJarFileName,
                                 boolean overwriteExisting,
                                 boolean exportSource)
            
 
Exports the specified EJB Module project to the specified EJB JAR file.

Parameters:
ejbProjectName - The name of the EJB Module project to export.
ejbJarFileName - The fully qualified EJB JAR file location to export the specified EJB Module project.
overwriteExisting - If this is true then an existing file at the location specified by earFileName will be overwritten.
exportSource - If this is true then all source files in the specified EJB Module will be included in the resulting EJB JAR file.
Since:
WTP 1.0
Application Client Modules
org.eclipse.jst.j2ee.applicationclient.creation.AppClientModuleCreationDataModel
 
public static void createProject(java.lang.String projectName,
                                 org.eclipse.core.runtime.IPath projectLocation,
                                 int applicationClientVersion)
            
 
Creates an Application Client project with the specified name and version in the specified location.

Parameters:
projectName - The name of the Application Client project to create.
projectLocation - Sets the local file system location for the described project. The path must be either an absolute file system path, or a relative path whose first segment is the name of a defined workspace path variable. If null is specified, the default location is used.
applicationClientVersion - Sets the Application Client Module Version for the descibed project. The version must be one of J2EEVersionConstants.J2EE_1_2_ID, J2EEVersionConstants.J2EE_1_3_ID, or J2EEVersionConstants.J2EE_1_4_ID.
Since:
WTP 1.0
 
 

org.eclipse.jst.j2ee.applicationclient.creation.AppClientModuleImportDataModel

 
public static void importArchive(java.lang.String appClientJarFileName,
                                 java.lang.String appClientProjectName,
                                 boolean addToEar,
                                 java.lang.String earProjectName)
            
 
Imports the specified Application Client Jar file into the specified Application Client Module project.

Parameters:
appClientJarFileName - The path to the Application Client Jar file.
appClientProjectName - The name of the Application Client project where the Application Client Module should be imported.
addToEar - If this is true then Application Client project specified by appClientJarFileName will be added to the Enterprise Application project specified by earProjectName.
earProjectName - The name of the Enterprise Application project to add the specified Application Client project to. This field is only relevant if addToEar is set to true. If this is set to null then a default name computed from the appClientJarFileName will be used.
Since:
WTP 1.0
 
 

org.eclipse.jst.j2ee.application.operations.AppClientModuleExportDataModel

 
public static void exportProject(java.lang.String appClientProjectName,
                                 java.lang.String appClientJarFileName,
                                 boolean overwriteExisting,
                                 boolean exportSource)
             
 

Parameters:
appClientProjectName - The name of the Application Client Module project to export.
appClientJarFileName - The fully qualified Application Client Jar file location to export the specified Application Client Module project.
overwriteExisting - If this is true then an existing file at the location specified by earFileName will be overwritten.
exportSource - If this is true then all source files in the specified Application Client Module will be included in the resulting Application Client Jar file.
Since:
WTP 1.0
Connector Modules
org.eclipse.jst.j2ee.internal.jca.operations.ConnectorModuleCreationDataModel
 
public static void createProject(java.lang.String projectName,
                                 org.eclipse.core.runtime.IPath projectLocation,
                                 int connectorModuleVersion)
            
 
Creates an Connector project with the specified name and version in the specified location.

Parameters:
projectName - The name of the Connector project to create.
projectLocation - Sets the local file system location for the described project. The path must be either an absolute file system path, or a relative path whose first segment is the name of a defined workspace path variable. If null is specified, the default location is used.
connectorModuleVersion - Sets the JCA Version for the descibed project. The version must be either J2EEVersionConstants.JCA_1_0_ID or J2EEVersionConstants.JCA_1_5_ID.
Since:
WTP 1.0
 
 

org.eclipse.jst.j2ee.internal.jca.operations.ConnectorModuleImportDataModel

 
public static void importArchive(java.lang.String rarFileName,
                                 java.lang.String connectorProjectName,
                                 boolean addToEar,
                                 java.lang.String earProjectName)
             
 

Parameters:
rarFileName - The path to the RAR file.
connectorProjectName - The name of the Connector project where the Connector Module should be imported.
addToEar - If this is true then Connector project specified by connectorProjectName will be added to the Enterprise Application project specified by earProjectName.
earProjectName - The name of the Enterprise Application project to add the specified Connector project to. This field is only relevant if addToEar is set to true. If this is set to null then a default name computed from the connectorProjectName will be used.
Since:
WTP 1.0
 
 

org.eclipse.jst.j2ee.internal.jca.operations.ConnectorModuleExportDataModel

 
public static void exportProject(java.lang.String connectorProjectName,
                                 java.lang.String rarFileName,
                                 boolean overwriteExisting,
                                 boolean exportSource)
            
 
Exports the specified Connector Module project to the specified Connector RAR file.

Parameters:
connectorProjectName - The name of the Connector Module project to export.
rarFileName - The fully qualified Connector RAR file location to export the specified Connector Module project.
overwriteExisting - If this is true then an existing file at the location specified by earFileName will be overwritten.
exportSource - If this is true then all source files in the specified Connector Module will be included in the resulting Connector RAR file.
Since:
WTP 1.0