/** *This returns the j2ee version id. Compare with J2EEVersionConstants to determine j2ee level */ public int getJ2EEVersionID() throws IllegalStateException { J2EEVersionResource res = (J2EEVersionResource) eResource(); if (res == null) throw new IllegalStateException(); return res.getJ2EEVersionID(); } /**
/** *This returns the module version id. Compare with J2EEVersionConstants to determine module level */ public int getVersionID() throws IllegalStateException { J2EEVersionResource res = (J2EEVersionResource) eResource(); if (res == null) throw new IllegalStateException(); return res.getModuleVersionID(); } /**
/** *This returns the j2ee version id. Compare with J2EEVersionConstants to determine j2ee level */ public int getJ2EEVersionID() throws IllegalStateException { J2EEVersionResource res = (J2EEVersionResource) eResource(); if (res == null) throw new IllegalStateException(); return res.getJ2EEVersionID(); }
/** This returns the module version id. Compare with J2EEVersionConstants to determine module level */ public int getVersionID() throws IllegalStateException { J2EEVersionResource res = (J2EEVersionResource) eResource(); if (res == null) throw new IllegalStateException(); return res.getModuleVersionID(); }
/** *This returns the j2ee version id. Compare with J2EEVersionConstants to determine j2ee level */ public int getJ2EEVersionID() throws IllegalStateException { J2EEVersionResource res = (J2EEVersionResource) eResource(); if (res == null) throw new IllegalStateException(); return res.getJ2EEVersionID(); }
/** This returns the module version id. Compare with J2EEVersionConstants to determine module level */ public int getVersionID() throws IllegalStateException { J2EEVersionResource res = (J2EEVersionResource) eResource(); if (res == null) throw new IllegalStateException(); return res.getModuleVersionID(); } /**
/** *This returns the j2ee version id. Compare with J2EEVersionConstants to determine j2ee level */ public int getJ2EEVersionID() throws IllegalStateException { J2EEVersionResource res = (J2EEVersionResource) eResource(); if (res == null) throw new IllegalStateException("XMLResource is null"); return res.getJ2EEVersionID(); }
/** * This returns the module version id. Compare with J2EEVersionConstants to determine module level */ public int getVersionID() throws IllegalStateException { J2EEVersionResource res = (J2EEVersionResource) eResource(); if (res == null) throw new IllegalStateException(); return res.getModuleVersionID(); }
public int getJ2EEVersionID() throws IllegalStateException { J2EEVersionResource res = (J2EEVersionResource) eResource(); if (res == null) throw new IllegalStateException(); return res.getJ2EEVersionID(); }
public int getVersionID() throws IllegalStateException { J2EEVersionResource res = (J2EEVersionResource) eResource(); if (res == null) throw new IllegalStateException(); return res.getModuleVersionID(); }
public int getJ2EEVersionID() throws IllegalStateException { try { J2EEVersionResource res = (J2EEVersionResource) eResource(); if (res == null) throw new IllegalStateException(); return res.getJ2EEVersionID(); } catch (ClassCastException exception) { return J2EEVersionConstants.J2EE_1_3_ID; } }
/** * This returns the module version id. Compare with J2EEVersionConstants to determine module level */ public int getVersionID() throws IllegalStateException { J2EEVersionResource res = (J2EEVersionResource) eResource(); if (res == null) { // fix defect 3276, when resource is unloaded if (version == null) throw new IllegalStateException(); if (version.equals("2.4"))//$NON-NLS-1$ return J2EEVersionConstants.WEB_2_4_ID; if (version.equals("2.3"))//$NON-NLS-1$ return J2EEVersionConstants.WEB_2_3_ID; if (version.equals("2.2"))//$NON-NLS-1$ return J2EEVersionConstants.WEB_2_2_ID; } return res.getModuleVersionID(); }
/** * Sets the namespaceURI, localpart, and prefix on the supplied QName to the supplied values respectively. * @param qnameEObject The properties on this QName will be set. If the QName does not belong to a Resource, * the version is assumed to be J2EE 1.4. * @param namespaceURI The namespaceURI * @param localPart The localPart * @param prefix The prefix. Used in JSR-109 v1.1 only. This is the prefix that will be used for the namespace declaration If the supplied prefix is null or of length 0, the existing prefix is used. If no prefix exists, and this * is a JSR-109 v1.1 descriptor the default prefix defined in DEFAULT_PREFIX is used. * @return boolean Returns true if values were set successfully. False otherwise. */ public static void setQNameValue(QName qnameEObject, String namespaceURI, String localPart, String prefix) { int versionID; //Get the versionID from the QName's Resource if available J2EEVersionResource res = (J2EEVersionResource)qnameEObject.eResource(); if (res == null) { //use a J2EE 1.4 version ID as the default versionID = J2EEVersionConstants.J2EE_1_4_ID; } else { versionID = res.getJ2EEVersionID(); } setQNameValue(qnameEObject, namespaceURI, localPart, prefix, versionID); }
/** This returns the module version id. Compare with J2EEVersionConstants to determine module level */ public int getVersionID() throws IllegalStateException { J2EEVersionResource ejbRes = (J2EEVersionResource) eResource(); if (ejbRes == null) { // fix defect 3276, when resource is unloaded if (version == null) throw new IllegalStateException(); if (version.equals("2.1")) //$NON-NLS-1$ return J2EEVersionConstants.EJB_2_1_ID; if (version.equals("2.0")) //$NON-NLS-1$ return J2EEVersionConstants.EJB_2_0_ID; if (version.equals("1.1")) //$NON-NLS-1$ return J2EEVersionConstants.EJB_1_1_ID; if (version.equals("1.0")) //$NON-NLS-1$ return J2EEVersionConstants.EJB_1_0_ID; } return ejbRes.getModuleVersionID(); } /**
public static void setValue(WebServices webServices, DescriptionGroupItem item, String value, boolean setLang) { J2EEVersionResource res = (J2EEVersionResource)webServices.eResource(); boolean isJ2EE14=false; if (res.getJ2EEVersionID()==J2EEVersionConstants.J2EE_1_4_ID) { isJ2EE14 = true; } switch (item.getValue()) { case DescriptionGroupItem.DESCRIPTION: setDescription(webServices, isJ2EE14, value, setLang); //break; case DescriptionGroupItem.DISPLAY_NAME: setDisplayName(webServices, isJ2EE14, value, setLang); //break; case DescriptionGroupItem.SMALL_ICON: setSmallIcon(webServices, isJ2EE14, value, setLang); //break; case DescriptionGroupItem.LARGE_ICON: setLargeIcon(webServices, isJ2EE14, value, setLang); //break; default://do nothing ; } }
switch (res.getModuleVersionID()) { case J2EEVersionConstants.EJB_2_0_ID : if (getVersion().equalsIgnoreCase(VERSION_2_X)) cmpVersion = res.getModuleVersionID();
public static String[] getValues(WebServices webServices, DescriptionGroupItem item, boolean getLang) { J2EEVersionResource res = (J2EEVersionResource)webServices.eResource(); boolean isJ2EE14=false; if (res.getJ2EEVersionID()==J2EEVersionConstants.J2EE_1_4_ID) { isJ2EE14 = true; } switch (item.getValue()) { case DescriptionGroupItem.DESCRIPTION: return getDescriptions(webServices, isJ2EE14, getLang); //break; case DescriptionGroupItem.DISPLAY_NAME: return getDisplayNames(webServices, isJ2EE14, getLang); //break; case DescriptionGroupItem.SMALL_ICON: return getSmallIcons(webServices, isJ2EE14, getLang); //break; case DescriptionGroupItem.LARGE_ICON: return getLargeIcons(webServices, isJ2EE14, getLang); //break; default: return null; } }
public static String getValue(WebServiceDescription webServicesDescription, DescriptionGroupItem item, boolean getLang) { J2EEVersionResource res = (J2EEVersionResource)webServicesDescription.eResource(); boolean isJ2EE14=false; if (res.getJ2EEVersionID()==J2EEVersionConstants.J2EE_1_4_ID) { isJ2EE14 = true; } switch (item.getValue()) { case DescriptionGroupItem.DESCRIPTION: return getDescription(webServicesDescription, isJ2EE14, getLang); //break; case DescriptionGroupItem.DISPLAY_NAME: return getDisplayName(webServicesDescription, isJ2EE14, getLang); //break; case DescriptionGroupItem.SMALL_ICON: return getSmallIcon(webServicesDescription, isJ2EE14, getLang); //break; case DescriptionGroupItem.LARGE_ICON: return getLargeIcon(webServicesDescription, isJ2EE14, getLang); //break; default: return null; } }
public static void setValue(Handler handler, DescriptionGroupItem item, String value, boolean setLang) { J2EEVersionResource res = (J2EEVersionResource)handler.eResource(); boolean isJ2EE14=false; if (res.getJ2EEVersionID()==J2EEVersionConstants.J2EE_1_4_ID) { isJ2EE14 = true; } switch (item.getValue()) { case DescriptionGroupItem.DESCRIPTION: setDescription(handler, isJ2EE14, value, setLang); //break; case DescriptionGroupItem.DISPLAY_NAME: setDisplayName(handler, isJ2EE14, value, setLang); //break; case DescriptionGroupItem.SMALL_ICON: setSmallIcon(handler, isJ2EE14, value, setLang); //break; case DescriptionGroupItem.LARGE_ICON: setLargeIcon(handler, isJ2EE14, value, setLang); //break; default://do nothing ; } }
public static void setValue(WebServiceDescription webServiceDescription, DescriptionGroupItem item, String value, boolean setLang) { J2EEVersionResource res = (J2EEVersionResource)webServiceDescription.eResource(); boolean isJ2EE14=false; if (res.getJ2EEVersionID()==J2EEVersionConstants.J2EE_1_4_ID) { isJ2EE14 = true; } switch (item.getValue()) { case DescriptionGroupItem.DESCRIPTION: setDescription(webServiceDescription, isJ2EE14, value, setLang); //break; case DescriptionGroupItem.DISPLAY_NAME: setDisplayName(webServiceDescription, isJ2EE14, value, setLang); //break; case DescriptionGroupItem.SMALL_ICON: setSmallIcon(webServiceDescription, isJ2EE14, value, setLang); //break; case DescriptionGroupItem.LARGE_ICON: setLargeIcon(webServiceDescription, isJ2EE14, value, setLang); //break; default: } }