public ApplicationTranslator() { super(APPLICATION, ApplicationPackage.eINSTANCE.getApplication()); }
public static ApplicationFactory getActiveFactory() { return (ApplicationFactory) getPackage().getEFactoryInstance(); } /**
/** * <p> * Method used for adding a j2ee project to an ear project; subclasses must override to create a * new instance of the correct kind of Module * </p> */ public Module createNewModule() { if(isBinary()){ throwAttemptedBinaryEditModelAccess(); } return ((ApplicationPackage) EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI)).getApplicationFactory().createJavaClientModule(); }
protected Module createModuleForCopying(ModuleFile aModuleFile) { Module aModule = null; if (aModuleFile.isWARFile()) { aModule = getApplicationFactory().createWebModule(); } else if (aModuleFile.isEJBJarFile()) { aModule = getApplicationFactory().createEjbModule(); } else if (aModuleFile.isApplicationClientFile()) { aModule = getApplicationFactory().createJavaClientModule(); } else if (aModuleFile.isRARFile()) { aModule = getApplicationFactory().createConnectorModule(); } aModule.setUri(aModuleFile.getURI()); return aModule; }
/** * <p> * Creates a new EJB module * </p> * * @return */ public Module createNewModule() { verifyOperationSupported(); if (isBinary()) { throwAttemptedBinaryEditModelAccess(); } return ((ApplicationPackage) EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI)).getApplicationFactory().createEjbModule(); }
protected static EClass eClassApplication() { return ApplicationFactoryImpl.getPackage().getApplication(); } protected static EClass eClassApplicationClient() {
/** * @return */ private static Translator[] createWebModuleTranslators() { return new Translator[] { IDTranslator.INSTANCE, new Translator(WEB + "/" + WEB_URI, APPLICATION_PKG.getModule_Uri()), //$NON-NLS-1$ new Translator(WEB + "/" + CONTEXT_ROOT, APPLICATION_PKG.getWebModule_ContextRoot()), //$NON-NLS-1$ ALT_DD_TRANSLATOR, // CommonTranslators.createDeploymentExtensionTranslator(APPLICATION_PKG.getModule_Extensions()) }; }
protected ApplicationFactory getApplicationFactory() { return ((ApplicationPackage) EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI)).getApplicationFactory(); }
/** * @return */ private static Translator[] createEJBModuleTranslators() { return new Translator[] { IDTranslator.INSTANCE, new Translator(EJB, APPLICATION_PKG.getModule_Uri()), ALT_DD_TRANSLATOR, // CommonTranslators.createDeploymentExtensionTranslator(APPLICATION_PKG.getModule_Extensions()) }; }
/** * Get the one application factory. */ public ApplicationFactory getApplicationFactory() { return (ApplicationFactory) getApplicationPackage().getEFactoryInstance(); }
/** * @see com.ibm.etools.commonarchive.EARFile */ public Module getModule(String aUri, String altDD) { return getDeploymentDescriptor().getModule(aUri, altDD); }
public EObject createModelRoot(int version) { verifyOperationSupported(); ApplicationResource res = (ApplicationResource) getDeploymentDescriptorResource(); res.setModuleVersionID(version); addApplicationIfNecessary(res); return ((ApplicationResource) getDeploymentDescriptorResource()).getRootObject(); }
/** * This creates a new child for * {@link org.eclipse.jst.j2ee.internal.internal.application.command.CreateChildCommand}. */ public Object createChild(Object object) { // TODO: check that this is what you want. Module child = org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin.getPlugin().getApplicationFactory().createModule(); // TODO: initialize child here... return child; }
public boolean usesAltDD() { if (module == null) return false; return !ArchiveUtil.isNullOrEmpty(module.getAltDD()); }
public String getText(Object object) { String displayName = ((Application) object).getDisplayName(); return displayName == null ? ApplicationProvidersResourceHandler.getString("<<No_display_name>>_ERROR_") : displayName; //$NON-NLS-1$ }
/** * <p> * Retrieves J2EE version information from ApplicationResource. * </p> * * @return an integer representation of a J2EE Spec version * */ public int getJ2EEVersion() { verifyOperationSupported(); return getApplicationXmiResource().getJ2EEVersionID(); }
public String getUri() { if (module != null) return module.getUri(); if (moduleFile != null) return moduleFile.getURI(); return null; }
/** * @return */ private static Translator[] createJavaModuleTranslators() { return new Translator[] { IDTranslator.INSTANCE, new Translator(JAVA, APPLICATION_PKG.getModule_Uri()), ALT_DD_TRANSLATOR, // CommonTranslators.createDeploymentExtensionTranslator(APPLICATION_PKG.getModule_Extensions()) }; }
/** * @return */ private static Translator[] createConnectorModuleTranslators() { return new Translator[] { IDTranslator.INSTANCE, new Translator(CONNECTOR, APPLICATION_PKG.getModule_Uri()), ALT_DD_TRANSLATOR, // CommonTranslators.createDeploymentExtensionTranslator(APPLICATION_PKG.getModule_Extensions()) }; }