/** * * @return EJBResource from (@link getDeploymentDescriptorResource()) * */ public EJBResource getEJBJarXmiResource() { verifyOperationSupported(); return (EJBResource) getDeploymentDescriptorResource(); }
/** * * @return EJBJar from (@link getDeploymentDescriptorRoot()) * */ public EJBJar getEJBJar() { verifyOperationSupported(); return (EJBJar) getDeploymentDescriptorRoot(); }
/** * <p> * Checks is a EJB Client Jar exists for the ejb module project * </p> * * @return boolean * */ public boolean hasEJBClientJARProject() { verifyOperationSupported(); if (getEJBClientJarModule() != null) return true; return false; }
/** * <p> * Retrieves J2EE version information from EJBResource. * </p> * * @return an integer representation of a J2EE Spec version * */ public int getJ2EEVersion() { verifyOperationSupported(); return getEJBJarXmiResource().getJ2EEVersionID(); }
/** * <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(); }
public EObject createModelRoot() { verifyOperationSupported(); if (isBinary()) { throwAttemptedBinaryEditModelAccess(); } return createModelRoot(getJ2EEVersion()); }
/** * <p> * Obtains the EJBJar (@see EJBJar) root object from the EJBResource. If the root object does * not exist, then one is created (@link addEJBJarIfNecessary(getEJBJarXmiResource())). The root * object contains all other resource defined objects. * </p> * * @return EObject * */ public EObject getDeploymentDescriptorRoot() { verifyOperationSupported(); Resource res = getDeploymentDescriptorResource(); List contents = res.getContents(); if (contents.size() > 0) return (EObject) contents.get(0); if (isBinary()) { return null; } if (!WorkbenchResourceHelper.getFile(res).exists()) return null; addEJBJarIfNecessary((EJBResource) getDeploymentDescriptorResource()); return (EObject) contents.get(0); }
/** * <p> * Retrieves the underlying resource from the ArtifactEditModel using defined URI. * </p> * * @return Resource * */ public Resource getDeploymentDescriptorResource() { verifyOperationSupported(); if (isBinary()) { return getBinaryComponentHelper().getResource(J2EEConstants.EJBJAR_DD_URI_OBJ); } return getArtifactEditModel().getResource(J2EEConstants.EJBJAR_DD_URI_OBJ); }
public EObject createModelRoot(int version) { verifyOperationSupported(); if (isBinary()) { throwAttemptedBinaryEditModelAccess(); } EJBResource res = (EJBResource) getDeploymentDescriptorResource(); res.setModuleVersionID(version); addEJBJarIfNecessary(res); return ((EJBResource) getDeploymentDescriptorResource()).getRootObject(); }
verifyOperationSupported(); EJBJar jar = getEJBJar(); IVirtualComponent ejbComponent, ejbClientComponent = null;