Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal')
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/DefaultJ2EEComponentCreationDataModelProvider.java423
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/EARCreationResourceHandler.java121
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/EarComponentCreationDataModelProvider.java239
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/EarComponentCreationFacetOperation.java131
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/EarFacetInstallDataModelProvider.java76
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/IDefaultJ2EEComponentCreationDataModelProperties.java75
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/IEarFacetInstallDataModelProperties.java23
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/ILooseConfigConstants.java29
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/EARProjectMap.java40
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/EARProjectMapImpl.java171
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModuleMapping.java55
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModuleMappingImpl.java194
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapAdapterFactory.java130
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapFactory.java56
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapFactoryImpl.java92
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapInit.java57
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapPackage.java181
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapPackageImpl.java238
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapSwitch.java107
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/UtilityJARMapping.java53
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/UtilityJARMappingImpl.java183
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/modulecore/util/EarEditAdapterFactory.java54
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/EarModuleExtension.java45
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/EarModuleExtensionImpl.java48
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/EarModuleExtensionRegistry.java72
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/EarModuleManager.java94
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/EjbModuleExtension.java52
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/JcaModuleExtension.java36
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/WebModuleExtension.java58
29 files changed, 0 insertions, 3133 deletions
diff --git a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/DefaultJ2EEComponentCreationDataModelProvider.java b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/DefaultJ2EEComponentCreationDataModelProvider.java
deleted file mode 100644
index f9ef5e227..000000000
--- a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/DefaultJ2EEComponentCreationDataModelProvider.java
+++ /dev/null
@@ -1,423 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.earcreation;
-
-import java.util.ArrayList;
-import java.util.Set;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jst.j2ee.application.internal.operations.DefaultJ2EEComponentCreationOperation;
-import org.eclipse.jst.j2ee.applicationclient.internal.creation.AppClientFacetProjectCreationDataModelProvider;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil;
-import org.eclipse.jst.j2ee.internal.moduleextension.EarModuleManager;
-import org.eclipse.jst.j2ee.internal.moduleextension.EjbModuleExtension;
-import org.eclipse.jst.j2ee.internal.moduleextension.JcaModuleExtension;
-import org.eclipse.jst.j2ee.internal.moduleextension.WebModuleExtension;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.project.facet.IJ2EEModuleFacetInstallDataModelProperties;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetProjectCreationDataModelProperties;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetProjectCreationDataModelProperties.FacetDataModelMap;
-import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelProvider;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-import org.eclipse.wst.common.frameworks.internal.WTPPlugin;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-
-public class DefaultJ2EEComponentCreationDataModelProvider extends AbstractDataModelProvider implements IDefaultJ2EEComponentCreationDataModelProperties {
- private static String CREATE_BASE = "DefaultJ2EEComponentCreationDataModel.CREATE_"; //$NON-NLS-1$
-
- private static final int EJB = 0;
- private static final int WEB = 1;
- private static final int RAR = 2;
- private static final int CLIENT = 3;
-
- private static final String WEB_SUFFIX = "Web"; //$NON-NLS-1$
- private static final String EJB_SUFFIX = "EJB"; //$NON-NLS-1$
- private static final String CLIENT_SUFFIX = "Client"; //$NON-NLS-1$
- private static final String CONNECTOR_SUFFIX = "Connector"; //$NON-NLS-1$
-
- private IDataModel ejbModel;
- private IDataModel ejbFacetModel;
- private IDataModel webModel;
- private IDataModel webFacetModel;
- private IDataModel jcaModel;
- private IDataModel jcaFacetModel;
- private IDataModel clientModel;
- private IDataModel clientFacetModel;
-
- public DefaultJ2EEComponentCreationDataModelProvider() {
- super();
- }
-
- public Set getPropertyNames() {
- Set propertyNames = super.getPropertyNames();
- propertyNames.add(PROJECT_NAME);
- propertyNames.add(EAR_COMPONENT_NAME);
- propertyNames.add(APPCLIENT_COMPONENT_NAME);
- propertyNames.add(WEB_COMPONENT_NAME);
- propertyNames.add(EJB_COMPONENT_NAME);
- propertyNames.add(CONNECTOR_COMPONENT_NAME);
- propertyNames.add(J2EE_VERSION);
- propertyNames.add(CREATE_EJB);
- propertyNames.add(CREATE_WEB);
- propertyNames.add(CREATE_APPCLIENT);
- propertyNames.add(CREATE_CONNECTOR);
- propertyNames.add(MODULE_NAME_COLLISIONS_VALIDATION);
- propertyNames.add(ENABLED);
- propertyNames.add(NESTED_MODEL_CLIENT);
- propertyNames.add(NESTED_MODEL_EJB);
- propertyNames.add(NESTED_MODEL_JCA);
- propertyNames.add(NESTED_MODEL_WEB);
- propertyNames.add(FACET_RUNTIME);
- return propertyNames;
- }
-
-
- public IDataModelOperation getDefaultOperation() {
- return new DefaultJ2EEComponentCreationOperation(model);
- }
-
- public void init() {
- initNestedCreationModels();
- super.init();
- }
-
- protected void initNestedCreationModels() {
- clientModel = DataModelFactory.createDataModel(new AppClientFacetProjectCreationDataModelProvider());
- model.addNestedModel(NESTED_MODEL_CLIENT, clientModel);
- clientFacetModel = ((FacetDataModelMap)clientModel.getProperty(IFacetProjectCreationDataModelProperties.FACET_DM_MAP)).getFacetDataModel(J2EEProjectUtilities.APPLICATION_CLIENT);
- clientFacetModel.setBooleanProperty(IJ2EEModuleFacetInstallDataModelProperties.ADD_TO_EAR, false);
-
- EjbModuleExtension ejbExt = EarModuleManager.getEJBModuleExtension();
- if (ejbExt != null) {
- ejbModel = ejbExt.createProjectDataModel();
- if (ejbModel != null){
- model.addNestedModel(NESTED_MODEL_EJB, ejbModel);
- ejbFacetModel = ((FacetDataModelMap)ejbModel.getProperty(IFacetProjectCreationDataModelProperties.FACET_DM_MAP)).getFacetDataModel(J2EEProjectUtilities.EJB);
- ejbFacetModel.setBooleanProperty(IJ2EEModuleFacetInstallDataModelProperties.ADD_TO_EAR, false);
- }
- }
- WebModuleExtension webExt = EarModuleManager.getWebModuleExtension();
- if (webExt != null) {
- webModel = webExt.createProjectDataModel();
- if (webModel != null){
- model.addNestedModel(NESTED_MODEL_WEB, webModel);
- webFacetModel = ((FacetDataModelMap)webModel.getProperty(IFacetProjectCreationDataModelProperties.FACET_DM_MAP)).getFacetDataModel(J2EEProjectUtilities.DYNAMIC_WEB);
- webFacetModel.setBooleanProperty(IJ2EEModuleFacetInstallDataModelProperties.ADD_TO_EAR, false);
- }
- }
- JcaModuleExtension rarExt = EarModuleManager.getJCAModuleExtension();
- if (rarExt != null) {
- jcaModel = rarExt.createProjectDataModel();
- if (jcaModel != null){
- model.addNestedModel(NESTED_MODEL_JCA, jcaModel);
- jcaFacetModel = ((FacetDataModelMap)jcaModel.getProperty(IFacetProjectCreationDataModelProperties.FACET_DM_MAP)).getFacetDataModel(J2EEProjectUtilities.JCA);
- jcaFacetModel.setBooleanProperty(IJ2EEModuleFacetInstallDataModelProperties.ADD_TO_EAR, false);
- }
- }
- }
-
- public Object getDefaultProperty(String propertyName) {
- if (propertyName.startsWith(CREATE_BASE))
- return getDefaultCreateValue(propertyName);
- if (propertyName.equals(ENABLED))
- return Boolean.TRUE;
- return super.getDefaultProperty(propertyName);
- }
-
-
- private Object getDefaultCreateValue(String propertyName) {
- if (propertyName.equals(CREATE_CONNECTOR)) {
- int version = getIntProperty(J2EE_VERSION);
- if (version < J2EEVersionConstants.J2EE_1_3_ID)
- return Boolean.FALSE;
- }
- return Boolean.TRUE;
- }
-
- private int convertPropertyNameToInt(String propertyName) {
- if (propertyName.equals(CREATE_WEB)) {
- return WEB;
- } else if (propertyName.equals(CREATE_EJB)) {
- return EJB;
- } else if (propertyName.equals(CREATE_CONNECTOR)) {
- return RAR;
- } else if (propertyName.equals(CREATE_APPCLIENT)) {
- return CLIENT;
- }
- return -1;
- }
-
- private String ensureUniqueProjectName(String projectName) {
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- String newName = projectName;
- int index = 0;
- IProject proj = root.getProject(newName);
- while (proj.exists()) {
- index++;
- newName = projectName + index;
- proj = root.getProject(newName);
- }
- return newName;
- }
-
- public boolean propertySet(String propertyName, Object propertyValue) {
- boolean notify = super.propertySet(propertyName, propertyValue);
- if (propertyName.equals(J2EE_VERSION)) {
- updatedJ2EEVersion((Integer) propertyValue);
- return true;
- }else if (propertyName.startsWith(CREATE_BASE)){
- notifyEnablement(convertPropertyNameToInt(propertyName));
- }else if (propertyName.equals(EAR_COMPONENT_NAME)) {
- setDefaultComponentNames((String) propertyValue);
- }else if(webModel != null && propertyName.equals(WEB_COMPONENT_NAME)){
- webModel.setProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME, propertyValue);
- }else if(clientModel != null && propertyName.equals(APPCLIENT_COMPONENT_NAME)){
- clientModel.setProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME, propertyValue);
- }else if(ejbModel != null && propertyName.equals(EJB_COMPONENT_NAME)){
- ejbModel.setProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME, propertyValue);
- }else if(jcaModel != null && propertyName.equals(CONNECTOR_COMPONENT_NAME)){
- jcaModel.setProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME, propertyValue);
- }
- else if(FACET_RUNTIME.equals(propertyName)){
- if(webModel != null){
- webModel.setProperty(IFacetProjectCreationDataModelProperties.FACET_RUNTIME, propertyValue);
- }
- if(clientModel != null){
- clientModel.setProperty(IFacetProjectCreationDataModelProperties.FACET_RUNTIME, propertyValue);
- }
- if(ejbModel != null){
- ejbModel.setProperty(IFacetProjectCreationDataModelProperties.FACET_RUNTIME, propertyValue);
- }
- if(jcaModel != null){
- jcaModel.setProperty(IFacetProjectCreationDataModelProperties.FACET_RUNTIME, propertyValue);
- }
- }
- return notify;
- }
-
- private void notifyEnablement(int flag) {
- String propertyName = null;
- switch (flag) {
- case EJB :
- propertyName = EJB_COMPONENT_NAME;
- break;
- case WEB :
- propertyName = WEB_COMPONENT_NAME;
- break;
- case CLIENT :
- propertyName = APPCLIENT_COMPONENT_NAME;
- break;
- case RAR :
- propertyName = CONNECTOR_COMPONENT_NAME;
- }
- if (propertyName != null)
- model.notifyPropertyChange(propertyName, IDataModel.ENABLE_CHG);
- }
-
- private void updatedJ2EEVersion(Integer version) {
- setNestedJ2EEVersion(version);
- if (version.intValue() < J2EEVersionConstants.J2EE_1_3_ID && model.isPropertySet(CREATE_CONNECTOR)) {
- model.setProperty(CREATE_CONNECTOR, Boolean.FALSE);
- }
- }
-
- public IStatus validateModuleNameCollisions() {
- if (getBooleanProperty(ENABLED)) {
- ArrayList list = new ArrayList();
- String projectName = null;
- String actualProjectName = null;
- boolean errorCollision = false;
- boolean errorNoSelection = true;
- if (getBooleanProperty(CREATE_APPCLIENT)) {
- actualProjectName = clientModel.getStringProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME);
- projectName = WTPPlugin.isPlatformCaseSensitive() ? actualProjectName : actualProjectName.toLowerCase();
- list.add(projectName);
- errorNoSelection = false;
- }
- if (getBooleanProperty(CREATE_EJB)) {
- actualProjectName = ejbModel.getStringProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME);
- projectName = WTPPlugin.isPlatformCaseSensitive() ? actualProjectName : actualProjectName.toLowerCase();
- if (!list.contains(projectName)) {
- list.add(projectName);
- } else {
- errorCollision = true;
- }
- errorNoSelection = false;
- }
- if (!errorCollision && getBooleanProperty(CREATE_WEB)) {
- actualProjectName = webModel.getStringProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME);
- projectName = WTPPlugin.isPlatformCaseSensitive() ? actualProjectName : actualProjectName.toLowerCase();
- if (!list.contains(projectName)) {
- list.add(projectName);
- } else {
- errorCollision = true;
- }
- errorNoSelection = false;
- }
- if (!errorCollision && getBooleanProperty(CREATE_CONNECTOR)) {
- actualProjectName = jcaModel.getStringProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME);
- projectName = WTPPlugin.isPlatformCaseSensitive() ? actualProjectName : actualProjectName.toLowerCase();
- if (!list.contains(projectName)) {
- list.add(projectName);
- } else {
- errorCollision = true;
- }
- errorNoSelection = false;
- }
- if (errorCollision) {
- return J2EEPlugin.newErrorStatus(EARCreationResourceHandler.getString("DuplicateModuleNames", new Object[]{actualProjectName}), null); //$NON-NLS-1$
- } else if (errorNoSelection) {
- return J2EEPlugin.newErrorStatus(EARCreationResourceHandler.NoModulesSelected, null);
- }
- }
-
- return OK_STATUS;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.operation.WTPOperationDataModel#doValidateProperty(java.lang.String)
- */
- public IStatus validate(String propertyName) {
-
- if (getBooleanProperty(CREATE_APPCLIENT) && propertyName.equals(APPCLIENT_COMPONENT_NAME)) {
- return clientModel.validateProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME);
- }
-
- if (getBooleanProperty(CREATE_WEB) && propertyName.equals(WEB_COMPONENT_NAME)) {
- return webModel.validateProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME);
- }
-
- if (getBooleanProperty(CREATE_EJB) && propertyName.equals(EJB_COMPONENT_NAME)) {
- return ejbModel.validateProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME);
- }
-
- if (getBooleanProperty(CREATE_CONNECTOR) && propertyName.equals(CONNECTOR_COMPONENT_NAME)) {
- return jcaModel.validateProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME);
- }
- return super.validate(propertyName);
- }
-
-// private IStatus validateComponentName(String componentName) {
-// IStatus status = OK_STATUS;
-// if (status.isOK()) {
-// if (componentName.indexOf("#") != -1) { //$NON-NLS-1$
-// String errorMessage = WTPCommonPlugin.getResourceString(WTPCommonMessages.ERR_INVALID_CHARS);
-// return WTPCommonPlugin.createErrorStatus(errorMessage);
-// } else if (componentName == null || componentName.equals("")) { //$NON-NLS-1$
-// String errorMessage = WTPCommonPlugin.getResourceString(WTPCommonMessages.ERR_EMPTY_MODULE_NAME);
-// return WTPCommonPlugin.createErrorStatus(errorMessage);
-// }
-// }
-// return status;
-// }
-
- private void setDefaultNestedComponentName(String name, int flag) {
- IDataModel modModule = getNestedModel(flag);
- if (modModule != null) {
- String compName = ensureUniqueProjectName(name);
- modModule.setProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME, compName);
- }
- }
-
- private void setDefaultComponentNames(String base) {
- String componentName;
- if (base.endsWith(EJB_SUFFIX))
- componentName = base;
- else
- componentName = base + EJB_SUFFIX;
- setDefaultNestedComponentName(componentName, EJB);
- setProperty(EJB_COMPONENT_NAME, componentName);
- if (base.endsWith(WEB_SUFFIX))
- componentName = base;
- else
- componentName = base + WEB_SUFFIX;
- setDefaultNestedComponentName(componentName, WEB);
- setProperty(WEB_COMPONENT_NAME, componentName);
- if (base.endsWith(CLIENT_SUFFIX))
- componentName = base;
- else
- componentName = base + CLIENT_SUFFIX;
- setDefaultNestedComponentName(componentName, CLIENT);
- setProperty(APPCLIENT_COMPONENT_NAME, componentName);
- if (base.endsWith(CONNECTOR_SUFFIX))
- componentName = base;
- else
- componentName = base + CONNECTOR_SUFFIX;
- setDefaultNestedComponentName(componentName, RAR);
- setProperty(CONNECTOR_COMPONENT_NAME, componentName);
- }
-
- private void setNestedJ2EEVersion(Object j2eeVersion) {
- int j2eeVer = ((Integer) j2eeVersion).intValue();
- if (ejbFacetModel != null) {
- String facetVersionString = J2EEVersionUtil.convertVersionIntToString(J2EEVersionUtil.convertJ2EEVersionIDToEJBVersionID(j2eeVer));
- IProjectFacetVersion facetVersion = ProjectFacetsManager.getProjectFacet(ejbFacetModel.getStringProperty(IFacetDataModelProperties.FACET_ID)).getVersion(facetVersionString);
- ejbFacetModel.setProperty(IFacetDataModelProperties.FACET_VERSION, facetVersion);
- }
- if (webFacetModel != null) {
- String facetVersionString = J2EEVersionUtil.convertVersionIntToString(J2EEVersionUtil.convertJ2EEVersionIDToWebVersionID(j2eeVer));
- IProjectFacetVersion facetVersion = ProjectFacetsManager.getProjectFacet(webFacetModel.getStringProperty(IFacetDataModelProperties.FACET_ID)).getVersion(facetVersionString);
- webFacetModel.setProperty(IFacetDataModelProperties.FACET_VERSION, facetVersion);
- }
- if (jcaFacetModel != null) {
- String facetVersionString = J2EEVersionUtil.convertVersionIntToString(J2EEVersionUtil.convertJ2EEVersionIDToConnectorVersionID(j2eeVer));
- IProjectFacetVersion facetVersion = ProjectFacetsManager.getProjectFacet(jcaFacetModel.getStringProperty(IFacetDataModelProperties.FACET_ID)).getVersion(facetVersionString);
- jcaFacetModel.setProperty(IFacetDataModelProperties.FACET_VERSION, facetVersion);
- }
- if (clientFacetModel != null){
- String facetVersionString = J2EEVersionUtil.convertVersionIntToString(j2eeVer);
- IProjectFacetVersion facetVersion = ProjectFacetsManager.getProjectFacet(clientFacetModel.getStringProperty(IFacetDataModelProperties.FACET_ID)).getVersion(facetVersionString);
- clientFacetModel.setProperty(IFacetDataModelProperties.FACET_VERSION, facetVersion);
- }
- }
-
- private IDataModel getNestedModel(int flag) {
- switch (flag) {
- case EJB :
- return ejbModel;
- case WEB :
- return webModel;
- case RAR :
- return jcaModel;
- case CLIENT :
- return clientModel;
- }
- return null;
- }
-
- public boolean isPropertyEnabled(String propertyName) {
- if (propertyName.equals(CREATE_CONNECTOR)) {
- int version = getIntProperty(J2EE_VERSION);
- return version > J2EEVersionConstants.J2EE_1_2_ID;
- }
- if( propertyName.equals(CONNECTOR_COMPONENT_NAME)){
- return getBooleanProperty(CREATE_CONNECTOR);
- }
- if (propertyName.equals(APPCLIENT_COMPONENT_NAME))
- return getBooleanProperty(CREATE_APPCLIENT);
- if (propertyName.equals(EJB_COMPONENT_NAME))
- return getBooleanProperty(CREATE_EJB);
- if (propertyName.equals(WEB_COMPONENT_NAME))
- return getBooleanProperty(CREATE_WEB);
- return super.isPropertyEnabled(propertyName);
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/EARCreationResourceHandler.java b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/EARCreationResourceHandler.java
deleted file mode 100644
index 79e50f08f..000000000
--- a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/EARCreationResourceHandler.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.earcreation;
-
-
-
-import org.eclipse.osgi.util.NLS;
-
-public class EARCreationResourceHandler extends NLS {
-
- private static final String BUNDLE_NAME = "earcreation";//$NON-NLS-1$
-
- private EARCreationResourceHandler() {
- // Do not instantiate
- }
-
- public static String Error_occured_getting_appl_ERROR_;
- public static String Error_occured_getting_appl1_ERROR_;
- public static String Creating__UI_;
- public static String Creating_EAR_Project_UI_;
- public static String The_project_already_exist_ERROR_;
- public static String EARProjectCreationOperatio_ERROR_;
- public static String ABS_PATH_CHANGED_UI_;
- public static String UNSAVED_CHANGES_WARN_;
- public static String PROJECT_MAP_PROBLEMS_ERROR_;
- public static String MODULE_PROJECTS_CLOSED_WARN_;
- public static String Add_Module_Command_Label_UI_;
- public static String Remove_Module_Command_Label_UI_;
-
- public static String Set_project_UI_;
- public static String Add_Utility_JAR_UI;
- public static String REM_UTIL_JAR_UI;
- public static String PROJ_DESC_UPDATE_ERROR_UI_;
- public static String Not_an_ear_project_UI_;
- public static String EAR_PROJECT_MUST_BE_OPEN_UI_;
- public static String Updating_absolute_paths_UI_;
- public static String DuplicateModuleNames;
- public static String NoModulesSelected;
-
- public static String KEY_1;
- public static String KEY_2;
- public static String KEY_3;
- public static String KEY_4;
- public static String KEY_5;
- public static String KEY_6;
- public static String KEY_7;
- public static String KEY_8;
- public static String KEY_9;
- public static String KEY_10;
- public static String KEY_11;
- public static String KEY_12;
- public static String KEY_13;
- public static String KEY_14;
- public static String KEY_15;
- public static String KEY_16;
-
- public static String J2EEUtilityJarListImportOperation_UI_Import_Utility_Jars;
- public static String J2EEUtilityJarListImportOperation_UI_Preparing_to_import;
- public static String J2EEUtilityJarListImportOperation_UI_2;
- public static String J2EEUtilityJarListImportDataModel_0;
- public static String J2EEUtilityJarListImportDataModel_Specify_Valid_Project;
- public static String J2EEUtilityJarListImportDataModel_Select_Jar;
- public static String J2EEUtilityJarListImportDataModel_Specify_Linked_Path;
- public static String J2EEUtilityJarListImportOperation_There_were_no_utility_jars_selected;
- public static String J2EEUtilityJarListImportDataModel_Linked_Path_Exists;
-
-
- public static String CreateProjectWithExtractedJarOperation_Create_project_with_extracted_conte_;
- public static String CopyArchiveIntoProjectOperation_Copying_archive_into_selected_proje_;
- public static String CopyArchiveIntoProjectOperation_Found_existing_file_0_;
- public static String CreateProjectWithLinkedJarOperation_Creating_project_with_linked_archiv_;
- public static String CreateProjectWithLinkedJarOperation_Cannot_link_utility_jar_into_a_clos_;
- public static String CreateProjectWithLinkedJarOperation_File_already_exists_0_;
- public static String LinkArchiveIntoProjectOperation_Linking_archive_into_selected_proje_;
-
- public static String EARImportDataModel_UI_0;
- public static String EARImportDataModel_UI_1;
- public static String EARImportDataModel_UI_1a;
- public static String EARImportDataModel_UI_2;
- public static String EARImportDataModel_UI_2a;
- public static String EARImportDataModel_UI_3;
- public static String EARImportDataModel_UI_4;
- public static String ModuleMappingImpl_UI_0;
- public static String UtilityJARMappingImpl_UI_0;
- public static String importWrongType;
- public static String importWrongVersion;
- public static String EAR_PROJECTNAME_SAMEAS_MODULE;
-
- static {
- NLS.initializeMessages(BUNDLE_NAME, EARCreationResourceHandler.class);
- }
-
- public static String getString(String key, Object[] args) {
- return NLS.bind(key, args);
- }
-
- public static final String ADD_MODULE_MODULE_TYPE = KEY_1;
- public static final String ADD_MODULE_MODULE_EXISTS = KEY_2;
- public static final String ADD_MODULE_MODULE_CLOSED = KEY_3;
- public static final String ADD_MODULE_MODULE_NULL = KEY_4;
- public static final String ADD_PROJECT_URI_EXISTS = KEY_5;
- public static final String ADD_PROJECT_NOT_JAVA = KEY_6;
- public static final String ADD_PROJECT_UTIL_URI = KEY_7;
- public static final String ADD_PROJECT_UTIL_MAPPED = KEY_8;
- public static final String ADD_PROJECT_NOT_EAR = KEY_9;
- public static final String ADD_PROJECT_URI_EMPTY = KEY_10;
- public static final String NOT_AN_APP_CLIENT = KEY_11;
- public static final String NOT_AN_EAR = KEY_12;
- public static final String NOT_AN_EJB = KEY_13;
- public static final String NOT_A_RAR = KEY_14;
- public static final String NOT_A_WAR = KEY_15;
- public static final String SERVER_TARGET_NOT_SUPPORT_EAR = KEY_16;
-}
diff --git a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/EarComponentCreationDataModelProvider.java b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/EarComponentCreationDataModelProvider.java
deleted file mode 100644
index 04fd5dcab..000000000
--- a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/EarComponentCreationDataModelProvider.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.earcreation;
-
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEComponentCreationDataModelProvider;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.impl.CommonarchiveFactoryImpl;
-import org.eclipse.jst.j2ee.datamodel.properties.IEarComponentCreationDataModelProperties;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.project.facet.EARFacetProjectCreationDataModelProvider;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelPropertyDescriptor;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-import org.eclipse.wst.common.frameworks.internal.DoNotUseMeThisWillBeDeletedPost15;
-import org.eclipse.wst.common.frameworks.internal.plugin.WTPCommonPlugin;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.IRuntimeType;
-import org.eclipse.wst.server.core.ServerCore;
-
-/**
- * This has been slated for removal post WTP 1.5. Do not use this class/interface
- *
- * @deprecated
- *
- * @see EARFacetProjectCreationDataModelProvider
- */
-public class EarComponentCreationDataModelProvider extends J2EEComponentCreationDataModelProvider implements IEarComponentCreationDataModelProperties, DoNotUseMeThisWillBeDeletedPost15 {
-
- public IDataModelOperation getDefaultOperation() {
- //return new EARComponentCreationOperation(model);
- return new EarComponentCreationFacetOperation(model);
- }
-
- /**
- * @return Returns the default J2EE spec level based on the Global J2EE
- * Preference
- */
- protected Integer getDefaultComponentVersion() {
- int highestJ2EEPref = J2EEPlugin.getDefault().getJ2EEPreferences().getHighestJ2EEVersionID();
- switch (highestJ2EEPref) {
- case (J2EEVersionConstants.J2EE_1_4_ID):
- return new Integer(J2EEVersionConstants.J2EE_1_4_ID);
- case (J2EEVersionConstants.J2EE_1_3_ID):
- return new Integer(J2EEVersionConstants.J2EE_1_3_ID);
- case (J2EEVersionConstants.J2EE_1_2_ID):
- return new Integer(J2EEVersionConstants.J2EE_1_2_ID);
- default:
- return new Integer(J2EEVersionConstants.J2EE_1_4_ID);
- }
- }
-
- public Set getPropertyNames(){
- Set propertyNames = super.getPropertyNames();
- propertyNames.add(J2EE_PROJECTS_LIST);
- propertyNames.add(JAVA_PROJECT_LIST);
- return propertyNames;
- }
-
- public Object getDefaultProperty(String propertyName) {
- if (propertyName.equals(DD_FOLDER)) {
- return IPath.SEPARATOR + "META_INF"; //$NON-NLS-1$
- } else if (propertyName.equals(UI_SHOW_EAR_SECTION)) {
- return Boolean.FALSE;
- } else if (propertyName.equals(J2EE_PROJECTS_LIST)) {
- return Collections.EMPTY_LIST;
- }else if (propertyName.equals(JAVA_PROJECT_LIST)){
- return Collections.EMPTY_LIST;
- } else if(propertyName.equals(NESTED_EAR_COMPONENT_CREATION_DM)){
- return model;
- }
- return super.getDefaultProperty(propertyName);
- }
-
- public DataModelPropertyDescriptor getPropertyDescriptor(String propertyName) {
- if (propertyName.equals(COMPONENT_VERSION)) {
- Integer propertyValue = (Integer) getProperty(propertyName);
- String description = null;
- switch (propertyValue.intValue()) {
- case J2EEVersionConstants.VERSION_1_2:
- description = J2EEVersionConstants.VERSION_1_2_TEXT;
- break;
- case J2EEVersionConstants.VERSION_1_3:
- description = J2EEVersionConstants.VERSION_1_3_TEXT;
- break;
- case J2EEVersionConstants.VERSION_1_4:
- default:
- description = J2EEVersionConstants.VERSION_1_4_TEXT;
- break;
- }
- return new DataModelPropertyDescriptor(propertyValue, description);
- }
- return super.getPropertyDescriptor(propertyName);
- }
-
- public DataModelPropertyDescriptor[] getValidComponentVersionDescriptors() {
- int highestJ2EEPref = J2EEPlugin.getDefault().getJ2EEPreferences().getHighestJ2EEVersionID();
- DataModelPropertyDescriptor[] descriptors = null;
- switch (highestJ2EEPref) {
- case J2EEVersionConstants.J2EE_1_2_ID:
- descriptors = new DataModelPropertyDescriptor[1];
- descriptors[0] = new DataModelPropertyDescriptor(new Integer(J2EEVersionConstants.J2EE_1_2_ID), J2EEVersionConstants.VERSION_1_2_TEXT);
- break;
- case J2EEVersionConstants.J2EE_1_3_ID:
- descriptors = new DataModelPropertyDescriptor[2];
- descriptors[0] = new DataModelPropertyDescriptor(new Integer(J2EEVersionConstants.J2EE_1_2_ID), J2EEVersionConstants.VERSION_1_2_TEXT);
- descriptors[1] = new DataModelPropertyDescriptor(new Integer(J2EEVersionConstants.J2EE_1_3_ID), J2EEVersionConstants.VERSION_1_3_TEXT);
- break;
- case J2EEVersionConstants.J2EE_1_4_ID:
- default:
- descriptors = new DataModelPropertyDescriptor[3];
- descriptors[0] = new DataModelPropertyDescriptor(new Integer(J2EEVersionConstants.J2EE_1_2_ID), J2EEVersionConstants.VERSION_1_2_TEXT);
- descriptors[1] = new DataModelPropertyDescriptor(new Integer(J2EEVersionConstants.J2EE_1_3_ID), J2EEVersionConstants.VERSION_1_3_TEXT);
- descriptors[2] = new DataModelPropertyDescriptor(new Integer(J2EEVersionConstants.J2EE_1_4_ID), J2EEVersionConstants.VERSION_1_4_TEXT);
- break;
- }
- return descriptors;
- }
-
- protected int convertModuleVersionToJ2EEVersion(int moduleVersion) {
- return moduleVersion;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.application.operations.J2EEModuleCreationDataModel#getModuleType()
- */
- protected EClass getComponentType() {
- return CommonarchiveFactoryImpl.getPackage().getEARFile();
- }
-
- protected String getComponentExtension() {
- return ".ear"; //$NON-NLS-1$
- }
-
- public IStatus validate(String propertyName) {
- if (propertyName.equals(PROJECT_NAME)) {
- // validate server target
- IStatus stat = super.validate(propertyName);
- if( stat.isOK()){
- String projectName = getDataModel().getStringProperty(PROJECT_NAME);
- if (projectName != null && projectName.length() != 0) {
- IProject project = ProjectUtilities.getProject(projectName);
- if (project != null) {
- IRuntime runtime = ServerCore.getProjectProperties(project).getRuntimeTarget();
- if (runtime != null) {
- IRuntimeType type = runtime.getRuntimeType();
- String typeId = type.getId();
- if (typeId.startsWith("org.eclipse.jst.server.tomcat")) { //$NON-NLS-1$
- String msg = EARCreationResourceHandler.SERVER_TARGET_NOT_SUPPORT_EAR;
- return WTPCommonPlugin.createErrorStatus(msg);
- }
- }
- }
- }
- }
- }else if(propertyName.equals(J2EE_PROJECTS_LIST)){
- return validateTargetComponentVersion((List)model.getProperty(J2EE_PROJECTS_LIST));
- }
- return super.validate(propertyName);
- }
-
- private IStatus validateTargetComponentVersion(List list) {
-
- Integer version = (Integer) model.getProperty(COMPONENT_VERSION);
- int earVersion = version.intValue();
- for (Iterator iter = list.iterator(); iter.hasNext();) {
- IProject handle = (IProject)iter.next();
- //IVirtualComponent comp = (IVirtualComponent) iter.next();
- IVirtualComponent comp = ComponentCore.createComponent(handle.getProject());
- int compVersion = J2EEVersionUtil.convertVersionStringToInt(comp);
- if (earVersion < compVersion) {
- String errorStatus = "The Module specification level of "+handle.getName()+", is incompatible with the containing EAR version"; //$NON-NLS-1$
- return J2EEPlugin.newErrorStatus(errorStatus, null);
- }
-
- }
- return OK_STATUS;
- }
-
-
- public boolean propertySet(String propertyName, Object propertyValue) {
- boolean returnValue = super.propertySet(propertyName, propertyValue);
- if (propertyName.equals(COMPONENT_NAME)) {
- setProperty(COMPONENT_DEPLOY_NAME, getDataModel().getStringProperty(COMPONENT_NAME));
- } else if(propertyName.equals(NESTED_EAR_COMPONENT_CREATION_DM)){
- throw new RuntimeException();
- }
- return returnValue;
- }
-
- public DataModelPropertyDescriptor[] getValidPropertyDescriptors(String propertyName){
- return super.getValidPropertyDescriptors(propertyName);
- }
-
- protected boolean isCreatingEarComponent() {
- return true;
- }
-
- protected IProject getEARProject(){
- String earProjname = (String) model.getProperty(COMPONENT_NAME);
-
- IDataModel earDM = (IDataModel) model.getProperty(NESTED_EAR_COMPONENT_CREATION_DM);
- earDM.setProperty(IEarComponentCreationDataModelProperties.PROJECT_NAME, earProjname);
-
- if( earProjname != null && !earProjname.equals("") && validate(COMPONENT_NAME).isOK())
- return ProjectUtilities.getProject(earProjname);
- else
- return null;
-
- }
-
- protected String getJ2EEProjectType() {
- return J2EEProjectUtilities.ENTERPRISE_APPLICATION;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/EarComponentCreationFacetOperation.java b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/EarComponentCreationFacetOperation.java
deleted file mode 100644
index c2990d517..000000000
--- a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/EarComponentCreationFacetOperation.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.earcreation;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jst.j2ee.datamodel.properties.IEarComponentCreationDataModelProperties;
-import org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentCreationDataModelProperties;
-import org.eclipse.jst.j2ee.datamodel.properties.IJavaComponentCreationDataModelProperties;
-import org.eclipse.jst.j2ee.project.facet.EARFacetProjectCreationDataModelProvider;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.datamodel.FacetProjectCreationDataModelProvider;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IComponentCreationDataModelProperties;
-import org.eclipse.wst.common.componentcore.datamodel.properties.ICreateReferenceComponentsDataModelProperties;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetProjectCreationDataModelProperties;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.DoNotUseMeThisWillBeDeletedPost15;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.runtime.IRuntime;
-import org.eclipse.wst.common.project.facet.core.runtime.RuntimeManager;
-import org.eclipse.wst.server.core.ServerCore;
-
-/**
- * This has been slated for removal post WTP 1.5. Do not use this class/interface
- *
- * @deprecated
- *
- * @see EARFacetProjectCreationDataModelProvider
- */
-public class EarComponentCreationFacetOperation extends AbstractDataModelOperation implements IFacetProjectCreationDataModelProperties, DoNotUseMeThisWillBeDeletedPost15 {
-
- public EarComponentCreationFacetOperation(IDataModel model) {
- super(model);
- }
-
- public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
-
- IDataModel dm = DataModelFactory.createDataModel(new FacetProjectCreationDataModelProvider());
- String runtime = model.getStringProperty(IJavaComponentCreationDataModelProperties.RUNTIME_TARGET_ID);
- IRuntime facetRuntime = null;
- try {
- runtime = ServerCore.findRuntime(runtime).getName();
- facetRuntime = RuntimeManager.getRuntime(runtime);
- } catch (Exception e) {
- // proceed with facetRuntime = null
- }
- dm.setProperty(FACET_RUNTIME, facetRuntime);
- String projectName = model.getStringProperty(IComponentCreationDataModelProperties.PROJECT_NAME);
- dm.setProperty(FACET_PROJECT_NAME, projectName);
-
- IDataModel newDM = setupEarInstallAction();
- FacetDataModelMap map = (FacetDataModelMap) dm.getProperty(FACET_DM_MAP);
- map.add(newDM);
-
- IStatus stat = dm.getDefaultOperation().execute(monitor, info);
- if (stat.isOK())
- addModulesToEAR(monitor);
-
- return stat;
- }
-
- protected IDataModel setupEarInstallAction() {
- String versionStr = model.getPropertyDescriptor(IJ2EEComponentCreationDataModelProperties.COMPONENT_VERSION).getPropertyDescription();
- IDataModel earFacetInstallDataModel = DataModelFactory.createDataModel(new EarFacetInstallDataModelProvider());
- earFacetInstallDataModel.setProperty(IFacetDataModelProperties.FACET_PROJECT_NAME, model.getStringProperty(IComponentCreationDataModelProperties.PROJECT_NAME));
- earFacetInstallDataModel.setProperty(IFacetDataModelProperties.FACET_VERSION_STR, versionStr);
- return earFacetInstallDataModel;
- }
-
- protected void setRuntime(IFacetedProject facetProj) throws CoreException {
- String runtimeID = model.getStringProperty(IJavaComponentCreationDataModelProperties.RUNTIME_TARGET_ID);
- String runtimeName = ServerCore.findRuntime(runtimeID).getName();
- try {
- IRuntime runtime = RuntimeManager.getRuntime(runtimeName);
- facetProj.setRuntime(runtime, null);
- } catch (IllegalArgumentException e) {
- Logger.getLogger().logError(e);
- }
- }
-
- private IStatus addModulesToEAR(IProgressMonitor monitor) {
- IStatus stat = OK_STATUS;
- try {
- IDataModel dm = (IDataModel) model.getProperty(IJ2EEComponentCreationDataModelProperties.NESTED_ADD_COMPONENT_TO_EAR_DM);
- String projectName = model.getStringProperty(IComponentCreationDataModelProperties.PROJECT_NAME);
- IProject project = ProjectUtilities.getProject(projectName);
- IVirtualComponent component = ComponentCore.createComponent(project);
-
-
- dm.setProperty(ICreateReferenceComponentsDataModelProperties.SOURCE_COMPONENT, component);
-
- List moduleProjectsList = (List) model.getProperty(IEarComponentCreationDataModelProperties.J2EE_PROJECTS_LIST);
- if (moduleProjectsList != null && !moduleProjectsList.isEmpty()) {
- List moduleComponentsList = new ArrayList(moduleProjectsList.size());
- for (int i = 0; i < moduleProjectsList.size(); i++) {
- moduleComponentsList.add(ComponentCore.createComponent((IProject) moduleProjectsList.get(i)));
- }
- dm.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST, moduleComponentsList);
- stat = dm.validateProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST);
- if (stat != OK_STATUS)
- return stat;
- dm.getDefaultOperation().execute(monitor, null);
- }
- } catch (Exception e) {
- Logger.getLogger().log(e);
- }
- return stat;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/EarFacetInstallDataModelProvider.java b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/EarFacetInstallDataModelProvider.java
deleted file mode 100644
index 7114446e7..000000000
--- a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/EarFacetInstallDataModelProvider.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.earcreation;
-
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.project.facet.J2EEFacetInstallDataModelProvider;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-import org.eclipse.wst.project.facet.IProductConstants;
-import org.eclipse.wst.project.facet.ProductManager;
-
-public class EarFacetInstallDataModelProvider extends J2EEFacetInstallDataModelProvider implements IEarFacetInstallDataModelProperties {
-
- public Set getPropertyNames() {
- Set names = super.getPropertyNames();
- names.add(CONTENT_DIR);
- names.add(J2EE_PROJECTS_LIST);
- names.add(JAVA_PROJECT_LIST);
- return names;
- }
-
- public Object getDefaultProperty(String propertyName) {
- if (propertyName.equals(FACET_ID)) {
- return J2EEProjectUtilities.ENTERPRISE_APPLICATION;
- } else if (propertyName.equals(CONTENT_DIR)) {
- return ProductManager.getProperty(IProductConstants.APPLICATION_CONTENT_FOLDER);
- } else if (propertyName.equals(J2EE_PROJECTS_LIST) || propertyName.equals(JAVA_PROJECT_LIST)) {
- return Collections.EMPTY_LIST;
- }
- return super.getDefaultProperty(propertyName);
- }
-
- public IStatus validate(String name) {
- if (name.equals(J2EE_PROJECTS_LIST)) {
- return validateTargetComponentVersion((List) model.getProperty(J2EE_PROJECTS_LIST));
- }
- return super.validate(name);
- }
-
- private IStatus validateTargetComponentVersion(List list) {
- int earVersion = getJ2EEVersion();
- for (Iterator iter = list.iterator(); iter.hasNext();) {
- IProject handle = (IProject) iter.next();
- IVirtualComponent comp = ComponentCore.createComponent(handle.getProject());
- if (comp == null) return OK_STATUS; //Not a faceted project, so version not relevant
- int compVersion = J2EEVersionUtil.convertVersionStringToInt(comp);
- if (earVersion < compVersion) {
- String errorStatus = "The Module specification level of " + handle.getName() + ", is incompatible with the containing EAR version"; //$NON-NLS-1$
- return J2EEPlugin.newErrorStatus(errorStatus, null);
- }
- }
- return OK_STATUS;
- }
-
- protected int convertFacetVersionToJ2EEVersion(IProjectFacetVersion version) {
- return J2EEVersionUtil.convertVersionStringToInt(version.getVersionString());
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/IDefaultJ2EEComponentCreationDataModelProperties.java b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/IDefaultJ2EEComponentCreationDataModelProperties.java
deleted file mode 100644
index 5fc021a25..000000000
--- a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/IDefaultJ2EEComponentCreationDataModelProperties.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.earcreation;
-
-public interface IDefaultJ2EEComponentCreationDataModelProperties {
- /**
- * Required - This is the name of the project. type String
- */
- public static final String PROJECT_NAME = "DefaultJ2EEComponentCreationDataModel.PROJECT_NAME"; //$NON-NLS-1$
- /**
- * Required - This is the name of the ear. type String
- */
- public static final String EAR_COMPONENT_NAME = "DefaultJ2EEComponentCreationDataModel.EAR_NAME"; //$NON-NLS-1$
- /**
- * Required - This is the name of the app client. type String
- */
- public static final String APPCLIENT_COMPONENT_NAME = "DefaultJ2EEComponentCreationDataModel.APPCLIENT_NAME"; //$NON-NLS-1$
- /**
- * Required - This is the name of the WEB. type String
- */
- public static final String WEB_COMPONENT_NAME = "DefaultJ2EEComponentCreationDataModel.WEB_COMPONENT_NAME"; //$NON-NLS-1$
- /**
- * Required - This is the name of the EJB. type String
- */
- public static final String EJB_COMPONENT_NAME = "DefaultJ2EEComponentCreationDataModel.EJB_COMPONENT_NAME"; //$NON-NLS-1$
- /**
- * Required - This is the name of the connector. type String
- */
- public static final String CONNECTOR_COMPONENT_NAME = "DefaultJ2EEComponentCreationDataModel.CONNECTOR_COMPONENT_NAME"; //$NON-NLS-1$
-
- public static final String J2EE_VERSION = "DefaultJ2EEComponentCreationDataModel.J2EE_VERSION"; //$NON-NLS-1$
- /**
- * Default is true. type Boolean
- */
- public static final String CREATE_EJB = "DefaultJ2EEComponentCreationDataModel.CREATE_EJB";
- /**
- * Default is true. type Boolean
- */
- public static final String CREATE_WEB = "DefaultJ2EEComponentCreationDataModel.CREATE_WEB";
- /**
- * Default is true. type Boolean
- */
- public static final String CREATE_APPCLIENT = "DefaultJ2EEComponentCreationDataModel.CREATE_CLIENT";
- /**
- * Default is true. type Boolean
- */
- public static final String CREATE_CONNECTOR = "DefaultJ2EEComponentCreationDataModel.CREATE_CONNECTOR";
-
- /**
- * Used for validation only; validates no collsions between various module names. Do not set
- * this value.
- */
- public static final String MODULE_NAME_COLLISIONS_VALIDATION = "DefaultJ2EEComponentCreationDataModel.MODULE_NAME_COLLISIONS_VALIDATION"; //$NON-NLS-1$
-
- /**
- * Default is true. type Boolean
- */
- public static final String ENABLED = "DefaultJ2EEComponentCreationDataModel.ENABLED"; //$NON-NLS-1$
-
- public static final String NESTED_MODEL_EJB = "DefaultJ2EEComponentCreationDataModel.NESTED_MODEL_EJB"; //$NON-NLS-1$
- public static final String NESTED_MODEL_WEB = "DefaultJ2EEComponentCreationDataModel.NESTED_MODEL_WEB"; //$NON-NLS-1$
- public static final String NESTED_MODEL_JCA = "DefaultJ2EEComponentCreationDataModel.NESTED_MODEL_JCA"; //$NON-NLS-1$
- public static final String NESTED_MODEL_CLIENT = "DefaultJ2EEComponentCreationDataModel.NESTED_MODEL_CLIENT"; //$NON-NLS-1$
-
- public static final String FACET_RUNTIME = "DefaultJ2EEComponentCreationDataModel.FACET_RUNTIME";//$NON-NLS-1$
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/IEarFacetInstallDataModelProperties.java b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/IEarFacetInstallDataModelProperties.java
deleted file mode 100644
index 9ffe4bdf5..000000000
--- a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/IEarFacetInstallDataModelProperties.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.earcreation;
-
-import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetInstallDataModelProperties;
-
-
-public interface IEarFacetInstallDataModelProperties extends IJ2EEFacetInstallDataModelProperties {
-
- //TODO what is this???
- public static final String CONTENT_DIR = "IEarFacetInstallDataModelProperties.CONTENT_DIR";//$NON-NLS-1$
-
- public static final String J2EE_PROJECTS_LIST = "IEarFacetInstallDataModelProperties.J2EE_PROJECTS_LIST"; //$NON-NLS-1$
- public static final String JAVA_PROJECT_LIST = "IEarFacetInstallDataModelProperties.JAVA_PROJECT_LIST"; //$NON-NLS-1$
-}
diff --git a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/ILooseConfigConstants.java b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/ILooseConfigConstants.java
deleted file mode 100644
index fd059de77..000000000
--- a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/ILooseConfigConstants.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.earcreation;
-
-
-import org.eclipse.jst.j2ee.commonarchivecore.looseconfig.internal.LooseConfigRegister;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-
-
-public interface ILooseConfigConstants {
- /**
- * The short name of the loose configuration file; will most often need to use
- * {@link #CONFIG_PATH}
- */
- String CONFIG_FILE_NAME = "looseconfig.xmi"; //$NON-NLS-1$
- /** The absolute path to the loose configuration file */
- String CONFIG_PATH = J2EEPlugin.getDefault().getStateLocation().append(CONFIG_FILE_NAME).toOSString();
- /** The property name used by WebSphere to lookup the loose configuration location to load */
- String WAS_PROPERTY = LooseConfigRegister.LOOSE_CONFIG_PROPERTY;
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/EARProjectMap.java b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/EARProjectMap.java
deleted file mode 100644
index 49d57deec..000000000
--- a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/EARProjectMap.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.earcreation.modulemap;
-
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-
-
-/**
- * @lastgen interface EARProjectMap extends EObject {}
- * @deprecated
- * Use
- * <p>
- * Need to use the ModuleCore and WorkbenchComponent Api to get to the referenced modules
- * as with the Flexible project changes a .modulemaps file will not exist in an EAR module and
- * all the info that was captured in .modulemaps file will is now captured in the .component file
- */
-public interface EARProjectMap extends EObject {
- /**
- * @generated This field/method will be replaced during code generation
- * @return The list of Mappings references
- */
- EList getMappings();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return The list of UtilityJARMappings references
- */
- EList getUtilityJARMappings();
-
-} //EARProjectMap
diff --git a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/EARProjectMapImpl.java b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/EARProjectMapImpl.java
deleted file mode 100644
index ed53a879c..000000000
--- a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/EARProjectMapImpl.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.earcreation.modulemap;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-
-
-
-/**
- * @lastgen class EARProjectMapImpl extends EObjectImpl implements EARProjectMap, EObject {}
- * @deprecated
- * Use
- * <p>
- * Need to use the ModuleCore and WorkbenchComponent Api to get to the referenced modules
- * as with the Flexible project changes a .modulemaps file will not exist in an EAR module and
- * all the info that was captured in .modulemaps file will is now captured in the .component file
- */
-public class EARProjectMapImpl extends EObjectImpl implements EARProjectMap {
- /**
- * @generated This field/method will be replaced during code generation.
- */
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected EList mappings = null;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected EList utilityJARMappings = null;
-
-
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected EARProjectMapImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected EClass eStaticClass() {
- return ModulemapPackage.eINSTANCE.getEARProjectMap();
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public EList getMappings() {
- if (mappings == null) {
- mappings = new EObjectContainmentEList(ModuleMapping.class, this, ModulemapPackage.EAR_PROJECT_MAP__MAPPINGS);
- }
- return mappings;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public EList getUtilityJARMappings() {
- if (utilityJARMappings == null) {
- utilityJARMappings = new EObjectContainmentEList(UtilityJARMapping.class, this, ModulemapPackage.EAR_PROJECT_MAP__UTILITY_JAR_MAPPINGS);
- }
- return utilityJARMappings;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) {
- case ModulemapPackage.EAR_PROJECT_MAP__MAPPINGS :
- return ((InternalEList) getMappings()).basicRemove(otherEnd, msgs);
- case ModulemapPackage.EAR_PROJECT_MAP__UTILITY_JAR_MAPPINGS :
- return ((InternalEList) getUtilityJARMappings()).basicRemove(otherEnd, msgs);
- default :
- return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs);
- }
- }
- return eBasicSetContainer(null, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case ModulemapPackage.EAR_PROJECT_MAP__MAPPINGS :
- return getMappings();
- case ModulemapPackage.EAR_PROJECT_MAP__UTILITY_JAR_MAPPINGS :
- return getUtilityJARMappings();
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case ModulemapPackage.EAR_PROJECT_MAP__MAPPINGS :
- getMappings().clear();
- getMappings().addAll((Collection) newValue);
- return;
- case ModulemapPackage.EAR_PROJECT_MAP__UTILITY_JAR_MAPPINGS :
- getUtilityJARMappings().clear();
- getUtilityJARMappings().addAll((Collection) newValue);
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case ModulemapPackage.EAR_PROJECT_MAP__MAPPINGS :
- getMappings().clear();
- return;
- case ModulemapPackage.EAR_PROJECT_MAP__UTILITY_JAR_MAPPINGS :
- getUtilityJARMappings().clear();
- return;
- }
- eDynamicUnset(eFeature);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case ModulemapPackage.EAR_PROJECT_MAP__MAPPINGS :
- return mappings != null && !mappings.isEmpty();
- case ModulemapPackage.EAR_PROJECT_MAP__UTILITY_JAR_MAPPINGS :
- return utilityJARMappings != null && !utilityJARMappings.isEmpty();
- }
- return eDynamicIsSet(eFeature);
- }
-
-} //EARProjectMapImpl
diff --git a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModuleMapping.java b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModuleMapping.java
deleted file mode 100644
index cee99ee07..000000000
--- a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModuleMapping.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.earcreation.modulemap;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jst.j2ee.application.Module;
-
-
-
-/**
- * @lastgen interface ModuleMapping extends EObject {}
- * @deprecated
- * Use
- * <p>
- * Need to use the ModuleCore and WorkbenchComponent Api to get to the referenced modules
- * as with the Flexible project changes a .modulemaps file will not exist in an EAR module and
- * all the info that was captured in .modulemaps file will is now captured in the .component file
- * </p>
- */
-public interface ModuleMapping extends EObject {
- /**
- * @generated This field/method will be replaced during code generation
- * @return The value of the ProjectName attribute
- */
- String getProjectName();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @param value
- * The new value of the ProjectName attribute
- */
- void setProjectName(String value);
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return The Module reference
- */
- Module getModule();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @param l
- * The new value of the Module reference
- */
- void setModule(Module value);
-
-} //ModuleMapping
diff --git a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModuleMappingImpl.java b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModuleMappingImpl.java
deleted file mode 100644
index 333f8d9b7..000000000
--- a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModuleMappingImpl.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.earcreation.modulemap;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.jst.j2ee.application.Module;
-import org.eclipse.jst.j2ee.internal.earcreation.EARCreationResourceHandler;
-
-
-/**
- * @lastgen class ModuleMappingImpl extends EObjectImpl implements ModuleMapping, EObject {}
- * * @deprecated
- * Use
- * <p>
- * Need to use the ModuleCore and WorkbenchComponent Api to get to the referenced modules
- * as with the Flexible project changes a .modulemaps file will not exist in an EAR module and
- * all the info that was captured in .modulemaps file will is now captured in the .component file
- */
-public class ModuleMappingImpl extends EObjectImpl implements ModuleMapping {
- /**
- * The default value of the '{@link #getProjectName() <em>Project Name</em>}' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getProjectName()
- * @generated
- * @ordered
- */
- protected static final String PROJECT_NAME_EDEFAULT = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String projectName = PROJECT_NAME_EDEFAULT;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected Module module = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected ModuleMappingImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected EClass eStaticClass() {
- return ModulemapPackage.eINSTANCE.getModuleMapping();
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public String getProjectName() {
- return projectName;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setProjectName(String newProjectName) {
- String oldProjectName = projectName;
- projectName = newProjectName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ModulemapPackage.MODULE_MAPPING__PROJECT_NAME, oldProjectName, projectName));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public Module getModule() {
- if (module != null && module.eIsProxy()) {
- Module oldModule = module;
- module = (Module) EcoreUtil.resolve(module, this);
- if (module != oldModule) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, ModulemapPackage.MODULE_MAPPING__MODULE, oldModule, module));
- }
- }
- return module;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Module basicGetModule() {
- return module;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setModule(Module newModule) {
- Module oldModule = module;
- module = newModule;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ModulemapPackage.MODULE_MAPPING__MODULE, oldModule, module));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case ModulemapPackage.MODULE_MAPPING__PROJECT_NAME :
- return getProjectName();
- case ModulemapPackage.MODULE_MAPPING__MODULE :
- if (resolve)
- return getModule();
- return basicGetModule();
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case ModulemapPackage.MODULE_MAPPING__PROJECT_NAME :
- return PROJECT_NAME_EDEFAULT == null ? projectName != null : !PROJECT_NAME_EDEFAULT.equals(projectName);
- case ModulemapPackage.MODULE_MAPPING__MODULE :
- return module != null;
- }
- return eDynamicIsSet(eFeature);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case ModulemapPackage.MODULE_MAPPING__PROJECT_NAME :
- setProjectName((String) newValue);
- return;
- case ModulemapPackage.MODULE_MAPPING__MODULE :
- setModule((Module) newValue);
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case ModulemapPackage.MODULE_MAPPING__PROJECT_NAME :
- setProjectName(PROJECT_NAME_EDEFAULT);
- return;
- case ModulemapPackage.MODULE_MAPPING__MODULE :
- setModule((Module) null);
- return;
- }
- eDynamicUnset(eFeature);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public String toString() {
- if (eIsProxy())
- return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(EARCreationResourceHandler.getString("ModuleMappingImpl_UI_0", new Object[]{projectName})); //$NON-NLS-1$
- return result.toString();
- }
-
-} //ModuleMappingImpl
diff --git a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapAdapterFactory.java b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapAdapterFactory.java
deleted file mode 100644
index ae34dbb68..000000000
--- a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapAdapterFactory.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.earcreation.modulemap;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
-import org.eclipse.emf.ecore.EObject;
-
-
-
-/**
- * @lastgen class ModulemapAdapterFactory extends AdapterFactoryImpl {}
- * @deprecated
- * Use
- * <p>
- * Need to use the ModuleCore and WorkbenchComponent Api to get to the referenced modules
- * as with the Flexible project changes a .modulemaps file will not exist in an EAR module and
- * all the info that was captured in .modulemaps file will is now captured in the .component file
- */
-public class ModulemapAdapterFactory extends AdapterFactoryImpl {
- /**
- * @generated This field/method will be replaced during code generation.
- */
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected static ModulemapPackage modelPackage;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public ModulemapAdapterFactory() {
- if (modelPackage == null) {
- modelPackage = ModulemapPackage.eINSTANCE;
- }
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public boolean isFactoryForType(Object object) {
- if (object == modelPackage) {
- return true;
- }
- if (object instanceof EObject) {
- return ((EObject) object).eClass().getEPackage() == modelPackage;
- }
- return false;
- }
-
- /**
- * The switch the delegates to the <code>createXXX</code> methods. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected ModulemapSwitch modelSwitch = new ModulemapSwitch() {
- public Object caseModuleMapping(ModuleMapping object) {
- return createModuleMappingAdapter();
- }
-
- public Object caseEARProjectMap(EARProjectMap object) {
- return createEARProjectMapAdapter();
- }
-
- public Object caseUtilityJARMapping(UtilityJARMapping object) {
- return createUtilityJARMappingAdapter();
- }
-
- public Object defaultCase(EObject object) {
- return createEObjectAdapter();
- }
- };
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createAdapter(Notifier target) {
- return (Adapter) modelSwitch.doSwitch((EObject) target);
- }
-
-
- /**
- * By default create methods return null so that we can easily ignore cases. It's useful to
- * ignore a case when inheritance will catch all the cases anyway.
- */
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createEARProjectMapAdapter() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createModuleMappingAdapter() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createUtilityJARMappingAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for the default case. <!-- begin-user-doc --> This default
- * implementation returns null. <!-- end-user-doc -->
- *
- * @return the new adapter.
- * @generated
- */
- public Adapter createEObjectAdapter() {
- return null;
- }
-
-} //ModulemapAdapterFactory
diff --git a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapFactory.java b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapFactory.java
deleted file mode 100644
index 33a1f779e..000000000
--- a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapFactory.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.earcreation.modulemap;
-
-import org.eclipse.emf.ecore.EFactory;
-
-
-/**
- * @lastgen interface ModulemapFactory extends EFactory {}
- * @deprecated
- * Use
- * <p>
- * Need to use the ModuleCore and WorkbenchComponent Api to get to the referenced modules
- * as with the Flexible project changes a .modulemaps file will not exist in an EAR module and
- * all the info that was captured in .modulemaps file will is now captured in the .component file
- */
-public interface ModulemapFactory extends EFactory {
- /**
- * The singleton instance of the factory. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- ModulemapFactory eINSTANCE = new org.eclipse.jst.j2ee.internal.earcreation.modulemap.ModulemapFactoryImpl();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return EARProjectMap value
- */
- EARProjectMap createEARProjectMap();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return ModuleMapping value
- */
- ModuleMapping createModuleMapping();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return UtilityJARMapping value
- */
- UtilityJARMapping createUtilityJARMapping();
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- ModulemapPackage getModulemapPackage();
-
-} //ModulemapFactory
diff --git a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapFactoryImpl.java b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapFactoryImpl.java
deleted file mode 100644
index 1f132f364..000000000
--- a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapFactoryImpl.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.earcreation.modulemap;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.impl.EFactoryImpl;
-
-
-
-/**
- * @lastgen class ModulemapFactoryImpl extends EFactoryImpl implements ModulemapFactory, EFactory {}
- * @deprecated
- * Use
- * <p>
- * Need to use the ModuleCore and WorkbenchComponent Api to get to the referenced modules
- * as with the Flexible project changes a .modulemaps file will not exist in an EAR module and
- * all the info that was captured in .modulemaps file will is now captured in the .component file
- */
-public class ModulemapFactoryImpl extends EFactoryImpl implements ModulemapFactory {
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public ModulemapFactoryImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EObject create(EClass eClass) {
- switch (eClass.getClassifierID()) {
- case ModulemapPackage.MODULE_MAPPING :
- return createModuleMapping();
- case ModulemapPackage.EAR_PROJECT_MAP :
- return createEARProjectMap();
- case ModulemapPackage.UTILITY_JAR_MAPPING :
- return createUtilityJARMapping();
- }
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EARProjectMap createEARProjectMap() {
- EARProjectMapImpl earProjectMap = new EARProjectMapImpl();
- return earProjectMap;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public ModuleMapping createModuleMapping() {
- ModuleMappingImpl moduleMapping = new ModuleMappingImpl();
- return moduleMapping;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public UtilityJARMapping createUtilityJARMapping() {
- UtilityJARMappingImpl utilityJARMapping = new UtilityJARMappingImpl();
- return utilityJARMapping;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public ModulemapPackage getModulemapPackage() {
- return (ModulemapPackage) getEPackage();
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public static ModulemapPackage getPackage() {
- return ModulemapPackage.eINSTANCE;
- }
-
-} //ModulemapFactoryImpl
diff --git a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapInit.java b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapInit.java
deleted file mode 100644
index 31f97e7f4..000000000
--- a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapInit.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.earcreation.modulemap;
-
-
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.wst.common.internal.emf.utilities.ExtendedEcoreUtil;
-
-//import com.ibm.etools.j2ee.internal.project.EAREditModel;
-/**
-* @deprecated
-* Use
-* <p>
-* Need to use the ModuleCore and WorkbenchComponent Api to get to the referenced modules
-* as with the Flexible project changes a .modulemaps file will not exist in an EAR module and
-* all the info that was captured in .modulemaps file will is now captured in the .component file
-*/
-
-public class ModulemapInit {
- protected static boolean initialized = false;
-
- public static void init() {
- init(true);
- }
-
- public static void init(boolean shouldPreRegisterPackages) {
- if (!initialized) {
- initialized = true;
- invokePrereqInits(shouldPreRegisterPackages);
- if (shouldPreRegisterPackages) {
- ExtendedEcoreUtil.preRegisterPackage("modulemap.xmi", new EPackage.Descriptor() { //$NON-NLS-1$
- public EPackage getEPackage() {
- return ModulemapPackage.eINSTANCE;
- }
- public EFactory getEFactory() {
- return ModulemapFactory.eINSTANCE;
- }
- });
- }
- //ResourceDependencyRegister.registerDependency(J2EEConstants.APPLICATION_DD_URI_OBJ, EAREditModel.MODULE_MAP_URI_OBJ);
- }
- }
-
- public static void invokePrereqInits(boolean shouldPreRegisterPackages) {
- //TODO Should remove....
- //com.ibm.ejs.models.base.extensions.init.ExtensionsInit.init(shouldPreRegisterPackages);
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapPackage.java b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapPackage.java
deleted file mode 100644
index 638f73a11..000000000
--- a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapPackage.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.earcreation.modulemap;
-
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-
-
-/**
- * @lastgen interface ModulemapPackage extends EPackage {}
- * @deprecated
- * Use
- * <p>
- * Need to use the ModuleCore and WorkbenchComponent Api to get to the referenced modules
- * as with the Flexible project changes a .modulemaps file will not exist in an EAR module and
- * all the info that was captured in .modulemaps file will is now captured in the .component file
- */
-public interface ModulemapPackage extends EPackage {
- /**
- * The package name. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- String eNAME = "modulemap"; //$NON-NLS-1$
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
-
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- int EAR_PROJECT_MAP = 1;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- int MODULE_MAPPING = 0;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- int MODULE_MAPPING__PROJECT_NAME = 0;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- int MODULE_MAPPING__MODULE = 1;
-
- /**
- * The number of structural features of the the '<em>Module Mapping</em>' class. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int MODULE_MAPPING_FEATURE_COUNT = 2;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- int EAR_PROJECT_MAP__MAPPINGS = 0;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- int EAR_PROJECT_MAP__UTILITY_JAR_MAPPINGS = 1;
-
- /**
- * The number of structural features of the the '<em>EAR Project Map</em>' class. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int EAR_PROJECT_MAP_FEATURE_COUNT = 2;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- int UTILITY_JAR_MAPPING = 2;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- int UTILITY_JAR_MAPPING__PROJECT_NAME = 0;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- int UTILITY_JAR_MAPPING__URI = 1;
-
-
- /**
- * The number of structural features of the the '<em>Utility JAR Mapping</em>' class. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int UTILITY_JAR_MAPPING_FEATURE_COUNT = 2;
-
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- String eNS_URI = "modulemap.xmi"; //$NON-NLS-1$
- /**
- * The package namespace name. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- String eNS_PREFIX = "modulemap"; //$NON-NLS-1$
-
- /**
- * The singleton instance of the package. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- ModulemapPackage eINSTANCE = org.eclipse.jst.j2ee.internal.earcreation.modulemap.ModulemapPackageImpl.init();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return EARProjectMap object
- */
- EClass getEARProjectMap();
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- EReference getEARProjectMap_Mappings();
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- EReference getEARProjectMap_UtilityJARMappings();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return ModuleMapping object
- */
- EClass getModuleMapping();
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- EAttribute getModuleMapping_ProjectName();
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- EReference getModuleMapping_Module();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return UtilityJARMapping object
- */
- EClass getUtilityJARMapping();
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- EAttribute getUtilityJARMapping_ProjectName();
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- EAttribute getUtilityJARMapping_Uri();
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- ModulemapFactory getModulemapFactory();
-
-} //ModulemapPackage
diff --git a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapPackageImpl.java b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapPackageImpl.java
deleted file mode 100644
index c593480ce..000000000
--- a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapPackageImpl.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.earcreation.modulemap;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.impl.EPackageImpl;
-import org.eclipse.emf.ecore.impl.EcorePackageImpl;
-import org.eclipse.jem.java.internal.impl.JavaRefPackageImpl;
-import org.eclipse.jst.j2ee.application.ApplicationPackage;
-import org.eclipse.jst.j2ee.application.internal.impl.ApplicationPackageImpl;
-import org.eclipse.jst.j2ee.common.internal.impl.CommonPackageImpl;
-
-
-
-/**
- * @lastgen class ModulemapPackageImpl extends EPackageImpl implements ModulemapPackage, EPackage {}
- * @deprecated
- * Use
- * <p>
- * Need to use the ModuleCore and WorkbenchComponent Api to get to the referenced modules
- * as with the Flexible project changes a .modulemaps file will not exist in an EAR module and
- * all the info that was captured in .modulemaps file will is now captured in the .component file
- */
-public class ModulemapPackageImpl extends EPackageImpl implements ModulemapPackage {
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EClass moduleMappingEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EClass earProjectMapEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EClass utilityJARMappingEClass = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- private ModulemapPackageImpl() {
- super(eNS_URI, ModulemapFactory.eINSTANCE);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public static ModulemapPackage init() {
- // Initialize simple dependencies
- CommonPackageImpl.init();
- JavaRefPackageImpl.init();
- ApplicationPackageImpl.init();
- EcorePackageImpl.init();
-
- // Obtain or create and register package and interdependencies
- ModulemapPackageImpl theModulemapPackage = (ModulemapPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new ModulemapPackageImpl());
-
- // Step 1: create meta-model objects
- theModulemapPackage.createPackageContents();
-
- // Step 2: complete initialization
- theModulemapPackage.initializePackageContents();
-
- return theModulemapPackage;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EClass getEARProjectMap() {
- return earProjectMapEClass;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getEARProjectMap_Mappings() {
- return (EReference) earProjectMapEClass.getEReferences().get(0);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getEARProjectMap_UtilityJARMappings() {
- return (EReference) earProjectMapEClass.getEReferences().get(1);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EClass getModuleMapping() {
- return moduleMappingEClass;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getModuleMapping_ProjectName() {
- return (EAttribute) moduleMappingEClass.getEAttributes().get(0);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getModuleMapping_Module() {
- return (EReference) moduleMappingEClass.getEReferences().get(0);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EClass getUtilityJARMapping() {
- return utilityJARMappingEClass;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getUtilityJARMapping_ProjectName() {
- return (EAttribute) utilityJARMappingEClass.getEAttributes().get(0);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getUtilityJARMapping_Uri() {
- return (EAttribute) utilityJARMappingEClass.getEAttributes().get(1);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public ModulemapFactory getModulemapFactory() {
- return (ModulemapFactory) getEFactoryInstance();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private boolean isCreated = false;
-
- /**
- * Creates the meta-model objects for the package. This method is guarded to have no affect on
- * any invocation but its first. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void createPackageContents() {
- if (isCreated)
- return;
- isCreated = true;
-
- // Create classes and their features
- moduleMappingEClass = createEClass(MODULE_MAPPING);
- createEAttribute(moduleMappingEClass, MODULE_MAPPING__PROJECT_NAME);
- createEReference(moduleMappingEClass, MODULE_MAPPING__MODULE);
-
- earProjectMapEClass = createEClass(EAR_PROJECT_MAP);
- createEReference(earProjectMapEClass, EAR_PROJECT_MAP__MAPPINGS);
- createEReference(earProjectMapEClass, EAR_PROJECT_MAP__UTILITY_JAR_MAPPINGS);
-
- utilityJARMappingEClass = createEClass(UTILITY_JAR_MAPPING);
- createEAttribute(utilityJARMappingEClass, UTILITY_JAR_MAPPING__PROJECT_NAME);
- createEAttribute(utilityJARMappingEClass, UTILITY_JAR_MAPPING__URI);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private boolean isInitialized = false;
-
- /**
- * Complete the initialization of the package and its meta-model. This method is guarded to have
- * no affect on any invocation but its first. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void initializePackageContents() {
- if (isInitialized)
- return;
- isInitialized = true;
-
- // Initialize package
- setName(eNAME);
- setNsPrefix(eNS_PREFIX);
- setNsURI(eNS_URI);
-
- // Obtain other dependent packages
- // CommonPackageImpl theCommonPackage =
- // (CommonPackageImpl)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI);
- // JavaRefPackageImpl theJavaRefPackage =
- // (JavaRefPackageImpl)EPackage.Registry.INSTANCE.getEPackage(JavaRefPackage.eNS_URI);
- ApplicationPackageImpl theApplicationPackage = (ApplicationPackageImpl) EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI);
- // EcorePackageImpl theEcorePackage =
- // (EcorePackageImpl)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
-
- // Add supertypes to classes
-
- // Initialize classes and features; add operations and parameters
- initEClass(moduleMappingEClass, ModuleMapping.class, "ModuleMapping", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$
- initEAttribute(getModuleMapping_ProjectName(), ecorePackage.getEString(), "projectName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, true, false); //$NON-NLS-1$
- initEReference(getModuleMapping_Module(), theApplicationPackage.getModule(), null, "module", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, true, false); //$NON-NLS-1$
-
- initEClass(earProjectMapEClass, EARProjectMap.class, "EARProjectMap", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$
- initEReference(getEARProjectMap_Mappings(), this.getModuleMapping(), null, "mappings", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, true, false); //$NON-NLS-1$
- initEReference(getEARProjectMap_UtilityJARMappings(), this.getUtilityJARMapping(), null, "utilityJARMappings", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, true, false); //$NON-NLS-1$
-
- initEClass(utilityJARMappingEClass, UtilityJARMapping.class, "UtilityJARMapping", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$
- initEAttribute(getUtilityJARMapping_ProjectName(), ecorePackage.getEString(), "projectName", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, true, false); //$NON-NLS-1$
- initEAttribute(getUtilityJARMapping_Uri(), ecorePackage.getEString(), "uri", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, true, false); //$NON-NLS-1$
-
- // Create resource
- createResource(eNS_URI);
- }
-} //ModulemapPackageImpl
diff --git a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapSwitch.java b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapSwitch.java
deleted file mode 100644
index ff5df4d72..000000000
--- a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapSwitch.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.earcreation.modulemap;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-
-
-
-/**
- * @lastgen class ModulemapSwitch {}
- * @deprecated
- * Use
- * <p>
- * Need to use the ModuleCore and WorkbenchComponent Api to get to the referenced modules
- * as with the Flexible project changes a .modulemaps file will not exist in an EAR module and
- * all the info that was captured in .modulemaps file will is now captured in the .component file
- */
-public class ModulemapSwitch {
- /**
- * The cached model package <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected static ModulemapPackage modelPackage;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public ModulemapSwitch() {
- if (modelPackage == null) {
- modelPackage = ModulemapPackage.eINSTANCE;
- }
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object doSwitch(EObject theEObject) {
- EClass theEClass = theEObject.eClass();
- if (theEClass.eContainer() == modelPackage) {
- switch (theEClass.getClassifierID()) {
- case ModulemapPackage.MODULE_MAPPING : {
- ModuleMapping moduleMapping = (ModuleMapping) theEObject;
- Object result = caseModuleMapping(moduleMapping);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case ModulemapPackage.EAR_PROJECT_MAP : {
- EARProjectMap earProjectMap = (EARProjectMap) theEObject;
- Object result = caseEARProjectMap(earProjectMap);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case ModulemapPackage.UTILITY_JAR_MAPPING : {
- UtilityJARMapping utilityJARMapping = (UtilityJARMapping) theEObject;
- Object result = caseUtilityJARMapping(utilityJARMapping);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- default :
- return defaultCase(theEObject);
- }
- }
- return defaultCase(theEObject);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object caseEARProjectMap(EARProjectMap object) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object caseModuleMapping(ModuleMapping object) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object caseUtilityJARMapping(UtilityJARMapping object) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object defaultCase(EObject object) {
- return null;
- }
-
-} //ModulemapSwitch
diff --git a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/UtilityJARMapping.java b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/UtilityJARMapping.java
deleted file mode 100644
index e52356154..000000000
--- a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/UtilityJARMapping.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.earcreation.modulemap;
-
-
-import org.eclipse.emf.ecore.EObject;
-
-
-/**
- * @lastgen interface UtilityJARMapping extends EObject {}
- * @deprecated
- * Use
- * <p>
- * Need to use the ModuleCore and WorkbenchComponent Api to get to the referenced modules
- * as with the Flexible project changes a .modulemaps file will not exist in an EAR module and
- * all the info that was captured in .modulemaps file will is now captured in the .component file
- */
-public interface UtilityJARMapping extends EObject {
- /**
- * @generated This field/method will be replaced during code generation
- * @return The value of the ProjectName attribute
- */
- String getProjectName();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @param value
- * The new value of the ProjectName attribute
- */
- void setProjectName(String value);
-
- /**
- * @generated This field/method will be replaced during code generation
- * @return The value of the Uri attribute
- */
- String getUri();
-
- /**
- * @generated This field/method will be replaced during code generation
- * @param value
- * The new value of the Uri attribute
- */
- void setUri(String value);
-
-} //UtilityJARMapping
diff --git a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/UtilityJARMappingImpl.java b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/UtilityJARMappingImpl.java
deleted file mode 100644
index d935451e0..000000000
--- a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/UtilityJARMappingImpl.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.earcreation.modulemap;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-import org.eclipse.jst.j2ee.internal.earcreation.EARCreationResourceHandler;
-
-
-/**
- * @lastgen class UtilityJARMappingImpl extends EObjectImpl implements UtilityJARMapping, EObject {}
- * @deprecated
- * Use
- * <p>
- * Need to use the ModuleCore and WorkbenchComponent Api to get to the referenced modules
- * as with the Flexible project changes a .modulemaps file will not exist in an EAR module and
- * all the info that was captured in .modulemaps file will is now captured in the .component file
- */
-public class UtilityJARMappingImpl extends EObjectImpl implements UtilityJARMapping {
- /**
- * The default value of the '{@link #getProjectName() <em>Project Name</em>}' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getProjectName()
- * @generated
- * @ordered
- */
- protected static final String PROJECT_NAME_EDEFAULT = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String projectName = PROJECT_NAME_EDEFAULT;
- /**
- * The default value of the '{@link #getUri() <em>Uri</em>}' attribute. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @see #getUri()
- * @generated
- * @ordered
- */
- protected static final String URI_EDEFAULT = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String uri = URI_EDEFAULT;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected UtilityJARMappingImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected EClass eStaticClass() {
- return ModulemapPackage.eINSTANCE.getUtilityJARMapping();
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public String getProjectName() {
- return projectName;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setProjectName(String newProjectName) {
- String oldProjectName = projectName;
- projectName = newProjectName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ModulemapPackage.UTILITY_JAR_MAPPING__PROJECT_NAME, oldProjectName, projectName));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public String getUri() {
- return uri;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setUri(String newUri) {
- String oldUri = uri;
- uri = newUri;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ModulemapPackage.UTILITY_JAR_MAPPING__URI, oldUri, uri));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case ModulemapPackage.UTILITY_JAR_MAPPING__PROJECT_NAME :
- return getProjectName();
- case ModulemapPackage.UTILITY_JAR_MAPPING__URI :
- return getUri();
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case ModulemapPackage.UTILITY_JAR_MAPPING__PROJECT_NAME :
- return PROJECT_NAME_EDEFAULT == null ? projectName != null : !PROJECT_NAME_EDEFAULT.equals(projectName);
- case ModulemapPackage.UTILITY_JAR_MAPPING__URI :
- return URI_EDEFAULT == null ? uri != null : !URI_EDEFAULT.equals(uri);
- }
- return eDynamicIsSet(eFeature);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case ModulemapPackage.UTILITY_JAR_MAPPING__PROJECT_NAME :
- setProjectName((String) newValue);
- return;
- case ModulemapPackage.UTILITY_JAR_MAPPING__URI :
- setUri((String) newValue);
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case ModulemapPackage.UTILITY_JAR_MAPPING__PROJECT_NAME :
- setProjectName(PROJECT_NAME_EDEFAULT);
- return;
- case ModulemapPackage.UTILITY_JAR_MAPPING__URI :
- setUri(URI_EDEFAULT);
- return;
- }
- eDynamicUnset(eFeature);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public String toString() {
- if (eIsProxy())
- return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(EARCreationResourceHandler.getString("UtilityJARMappingImpl_UI_0", new Object[]{projectName, uri})); //$NON-NLS-1$
- return result.toString();
- }
-
-} //UtilityJARMappingImpl
diff --git a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/modulecore/util/EarEditAdapterFactory.java b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/modulecore/util/EarEditAdapterFactory.java
deleted file mode 100644
index 889db8005..000000000
--- a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/modulecore/util/EarEditAdapterFactory.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.modulecore.util;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.jst.j2ee.componentcore.util.EARArtifactEdit;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.wst.common.componentcore.ArtifactEdit;
-import org.eclipse.wst.common.componentcore.internal.ArtifactEditModel;
-
-
-/**
- * <p>
- * Adapts {@see org.eclipse.wst.common.modulecore.ArtifactEditModel}s to
- * {@see org.eclipse.jst.j2ee.internal.modulecore.util.EARArtifactEdit}&nbsp; facades.
- * </p>
- */
-public class EarEditAdapterFactory implements IAdapterFactory {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
- */
- public Object getAdapter(Object adaptableObject, Class adapterType) {
-
- if (adapterType == EARArtifactEdit.ADAPTER_TYPE || adapterType == ArtifactEdit.ADAPTER_TYPE) {
- ArtifactEditModel editModel = (ArtifactEditModel) adaptableObject;
- if (J2EEProjectUtilities.isEARProject(editModel.getProject()))
- return new EARArtifactEdit((ArtifactEditModel) adaptableObject);
- }
- return null;
-
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
- */
- public Class[] getAdapterList() {
-
- return new Class[]{ArtifactEdit.class, EARArtifactEdit.class};
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/EarModuleExtension.java b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/EarModuleExtension.java
deleted file mode 100644
index 71c0defc1..000000000
--- a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/EarModuleExtension.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Sep 19, 2003
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.moduleextension;
-
-import org.eclipse.jst.j2ee.internal.archive.operations.ImportOption;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-
-
-
-/**
- * @author cbridgha
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public interface EarModuleExtension {
-
- /**
- * Return a default instance of the J2EEModuleCreationDataModel.
- *
- * @return
- */
- IDataModel createProjectDataModel();
-
- IDataModel createImportDataModel();
-
- IDataModelOperation createProjectCreationOperation(IDataModel dataModel);
-
- IDataModelOperation createProjectCreationOperation(ImportOption option);
-}
diff --git a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/EarModuleExtensionImpl.java b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/EarModuleExtensionImpl.java
deleted file mode 100644
index d67120d17..000000000
--- a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/EarModuleExtensionImpl.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Sep 29, 2003
- *
- * To change the template for this generated file go to Window&gt;Preferences&gt;Java&gt;Code
- * Generation&gt;Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.moduleextension;
-
-import org.eclipse.jst.j2ee.internal.archive.operations.ImportOption;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-
-
-public abstract class EarModuleExtensionImpl implements EarModuleExtension {
- /**
- *
- */
- public EarModuleExtensionImpl() {
- super();
- // TODO Auto-generated constructor stub
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.moduleextension.EarModuleExtension#createProjectCreationOperation(com.ibm.etools.archive.ear.operations.ImportOption)
- */
- public IDataModelOperation createProjectCreationOperation(ImportOption option) {
- if (option.getArchiveType() == ImportOption.MODULE)
- return option.getModel().getDefaultOperation();
- return null;
- }
-
- public IDataModelOperation createProjectCreationOperation(IDataModel dataModel) {
- return dataModel.getDefaultOperation();
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/EarModuleExtensionRegistry.java b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/EarModuleExtensionRegistry.java
deleted file mode 100644
index 3a9ed1419..000000000
--- a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/EarModuleExtensionRegistry.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Oct 29, 2003
- *
- * To change the template for this generated file go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.moduleextension;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.jem.util.RegistryReader;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-
-/**
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public class EarModuleExtensionRegistry extends RegistryReader {
-
- static final String EXTENSION_NAME = "EARModuleExtension"; //$NON-NLS-1$
- static final String ELEMENT_EARMODULE_EXTENSION = "earModuleExtension"; //$NON-NLS-1$
- static final String MODULE_EXTENSION_CLASS = "extensionClass"; //$NON-NLS-1$
- private static EarModuleExtensionRegistry INSTANCE = null;
-
- public EarModuleExtensionRegistry() {
- super(J2EEPlugin.PLUGIN_ID, EXTENSION_NAME);
- }
-
- public static EarModuleExtensionRegistry getInstance() {
- if (INSTANCE == null) {
- INSTANCE = new EarModuleExtensionRegistry();
- INSTANCE.readRegistry();
- }
- return INSTANCE;
- }
-
- /**
- * readElement() - parse and deal w/ an extension like: <earModuleExtension extensionClass =
- * "com.ibm.etools.web.plugin.WebModuleExtensionImpl"/>
- */
- public boolean readElement(IConfigurationElement element) {
- if (!element.getName().equals(ELEMENT_EARMODULE_EXTENSION))
- return false;
-
- EarModuleExtension extension = null;
- try {
- extension = (EarModuleExtension) element.createExecutableExtension(MODULE_EXTENSION_CLASS);
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- if (extension != null)
- addModuleExtension(extension);
- return true;
- }
-
-
- private static void addModuleExtension(EarModuleExtension ext) {
- EarModuleManager.registerModuleExtension(ext);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/EarModuleManager.java b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/EarModuleManager.java
deleted file mode 100644
index 14d2cfb6f..000000000
--- a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/EarModuleManager.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Sep 19, 2003
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.moduleextension;
-
-import java.util.HashMap;
-
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-
-
-/**
- * @author cbridgha
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class EarModuleManager {
- static HashMap moduleExtensions = new HashMap();
-
-
- /**
- * @return
- */
- public static HashMap getModuleExtensions() {
- return moduleExtensions;
- }
-
- public static EarModuleExtension getModuleExtension(String key) {
- //Make sure the registry is loaded
- EarModuleExtensionRegistry.getInstance();
- return (EarModuleExtension) moduleExtensions.get(key);
- }
-
- /**
- * @return
- */
- public static EjbModuleExtension getEJBModuleExtension() {
- return (EjbModuleExtension) getModuleExtension(J2EEProjectUtilities.EJB);
- }
-
- /**
- * @return
- */
- public static JcaModuleExtension getJCAModuleExtension() {
- return (JcaModuleExtension) getModuleExtension(J2EEProjectUtilities.JCA);
- }
-
- /**
- * @return
- */
- public static WebModuleExtension getWebModuleExtension() {
- return (WebModuleExtension) getModuleExtension(J2EEProjectUtilities.DYNAMIC_WEB);
- }
-
- public static boolean hasEJBModuleExtension() {
- return (EjbModuleExtension) getModuleExtension(J2EEProjectUtilities.EJB) != null;
- }
-
- public static boolean hasJCAModuleExtension() {
- return (JcaModuleExtension) getModuleExtension(J2EEProjectUtilities.JCA) != null;
- }
-
- public static boolean hasWebModuleExtension() {
- return getModuleExtension(J2EEProjectUtilities.DYNAMIC_WEB) != null;
- }
-
- public static void registerModuleExtension(EarModuleExtension ext) {
- if (ext instanceof WebModuleExtension)
- moduleExtensions.put(J2EEProjectUtilities.DYNAMIC_WEB, ext);
- else if (ext instanceof EjbModuleExtension)
- moduleExtensions.put(J2EEProjectUtilities.EJB, ext);
- else if (ext instanceof JcaModuleExtension)
- moduleExtensions.put(J2EEProjectUtilities.JCA, ext);
- else
- moduleExtensions.put(J2EEProjectUtilities.ENTERPRISE_APPLICATION, ext);
- }
-
- public static void removeModuleExtension(String key) {
- moduleExtensions.remove(key);
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/EjbModuleExtension.java b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/EjbModuleExtension.java
deleted file mode 100644
index 2ff3645dd..000000000
--- a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/EjbModuleExtension.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Sep 19, 2003
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.moduleextension;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jst.j2ee.ejb.EJBJar;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-
-
-
-/**
- * @author cbridgha
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public interface EjbModuleExtension extends EarModuleExtension {
-
- //void initializeEjbReferencesToModule(J2EENature nature, UpdateModuleReferencesInEARProjectCommand cmd);
-
- //J2EEJavaProjectInfo createProjectInfo();
-
- //J2EEImportOperationOLD createImportOperation(IProject proj, EJBJarFile ejbJarFile);
-
- EJBJar getEJBJar(IProject aProject);
-
- IProject getDefinedEJBClientJARProject(IProject anEJBProject);
-
- IDataModelOperation createEJBClientJARProject(
- final String clientProjectName,
- final String srcFolderName,
- final String ejbProjectName,
- final String earProjectName,
- final org.eclipse.wst.common.project.facet.core.runtime.IRuntime runtime);
-
- IDataModelOperation createEJBClientJARProject(IProject ejbProject);
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/JcaModuleExtension.java b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/JcaModuleExtension.java
deleted file mode 100644
index 92ca9ca7f..000000000
--- a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/JcaModuleExtension.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Sep 19, 2003
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.moduleextension;
-
-//import org.eclipse.jst.j2ee.internal.earcreation.UpdateModuleReferencesInEARProjectCommand;
-//import org.eclipse.jst.j2ee.internal.project.J2EENature;
-
-
-/**
- * @author cbridgha
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public interface JcaModuleExtension extends EarModuleExtension {
-
- //void initializeEjbReferencesToModule(J2EENature nature, UpdateModuleReferencesInEARProjectCommand cmd);
-
- //J2EEJavaProjectInfo createProjectInfo();
-
- //J2EEImportOperation createImportOperation(IProject proj, RARFile rarFile);
-}
diff --git a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/WebModuleExtension.java b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/WebModuleExtension.java
deleted file mode 100644
index cf9a5d031..000000000
--- a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/WebModuleExtension.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Sep 19, 2003
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.moduleextension;
-
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jst.j2ee.application.Module;
-import org.eclipse.jst.j2ee.application.WebModule;
-import org.eclipse.jst.j2ee.internal.project.J2EEJavaProjectInfo;
-//import org.eclipse.jst.j2ee.internal.project.J2EENature;
-
-
-/**
- * @author cbridgha
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public interface WebModuleExtension extends EarModuleExtension {
-
- static final String WEBSETTINGS_FILE_URI = ".j2ee"; //$NON-NLS-1$
-
-// void initializeEjbReferencesToModule(J2EENature nature, UpdateModuleReferencesInEARProjectCommand command);
-
- void addWLPProjects(IProject aProject, Set projectsToBuild);
-
-
- void setContextRootForModuleMapping(WebModule m, IProject nestedProject) throws CoreException;
-
- //J2EEImportOperationOLD createImportOperation(IProject nestedProject, WARFile warFile,
- // EARImportConfiguration importConfig);
-
- String getContentFolder(IProject project, IFile webSettingsFile);
-
- J2EEJavaProjectInfo createProjectInfo();
-
- boolean compareWebContextRoot(Module module, IProject project) throws CoreException;
-
- boolean hasRuntime(IProject project);
-
-}

Back to the top