本文整理了Java中org.eclipse.jst.j2ee.webapplication.WebApp.getVersionID()
方法的一些代码示例,展示了WebApp.getVersionID()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebApp.getVersionID()
方法的具体详情如下:
包路径:org.eclipse.jst.j2ee.webapplication.WebApp
类名称:WebApp
方法名:getVersionID
[英]This returns the module version id. Compare with J2EEVersionConstants to determine module level
[中]这将返回模块版本id。与J2EEVersionConstants进行比较以确定模块级别
代码示例来源:origin: org.eclipse/org.eclipse.jst.jsf.core
/**
* @param webAppObj as Object
* @return true if webApp instanceof org.eclipse.jst.j2ee.web.WebApp and versionID == 24
*/
public static boolean isWebApp24(Object webAppObj) {
if (webAppObj instanceof WebApp &&
((WebApp)webAppObj).getVersionID() == 24)
return true;
return false;
}
代码示例来源:origin: org.eclipse/org.eclipse.jst.jsf.core
/**
* @param webAppObj as Object
* @return true if webApp instanceof org.eclipse.jst.j2ee.web.WebApp and versionID == 23
*/
public static boolean isWebApp23(Object webAppObj) {
if (webAppObj instanceof WebApp &&
((WebApp)webAppObj).getVersionID() == 23)
return true;
return false;
}
代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee.core
/**
*
*/
private void validate14() {
int versionId = webDD.getVersionID();
if (versionId == J2EEVersionConstants.WEB_2_4_ID) {
validateUrlPattern();
}
}
代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee.webservice
public Collection getServiceRefs(WebApp webapp) {
List list = new ArrayList();
try {
if (webapp.getVersionID() >= J2EEVersionConstants.WEB_2_4_ID)
list.addAll(webapp.getServiceRefs());
else
list.addAll(get13ServiceRefs(webapp));
} catch (Exception e) {
//Ignore
}
return list;
}
代码示例来源:origin: org.eclipse/org.eclipse.jst.jsf.core
private void setupContextParams(final org.eclipse.jst.j2ee.webapplication.WebApp webApp, final IDataModel config) {
if (webApp.getVersionID() == J2EEVersionConstants.WEB_2_3_ID)//shouldn't have to do it this way, but that's the way it goes 119442
JSFUtils11.setupConfigFileContextParamForV2_3(webApp, config);
else
JSFUtils11.setupConfigFileContextParamForV2_4(webApp, config);
}
}
代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee.core
protected boolean isWeb22(ResourceRef ref) {
return isWeb(ref) && ((WebApp)ref.eContainer()).getVersionID() <= J2EEVersionConstants.WEB_2_2_ID;
}
代码示例来源:origin: org.eclipse/org.eclipse.jst.jsf.core
String filesString = null;
if (webApp.getVersionID() == J2EEVersionConstants.WEB_2_3_ID) {
EList contexts = webApp.getContexts();
Iterator itContexts = contexts.iterator();
代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee.core
/**
* @param ref
* @throws ArchiveWrappedException
*/
private void validateWebAppRefs(ModuleRef ref) throws ArchiveWrappedException {
WebApp webApp = (WebApp)ref.getDeploymentDescriptor();
List ejbRefs = new ArrayList();
ejbRefs.addAll(webApp.getEjbRefs());
ejbRefs.addAll(webApp.getEjbLocalRefs());
validateEJBRefMandatoryElements(ejbRefs, ref.getUri());
validateEJBRefs(ejbRefs, ref.getUri());
if (webApp != null && webApp.getVersionID() <= J2EEVersionConstants.WEB_2_3_ID) {
Set allRefs = new HashSet();
List resourceRefs = webApp.getResourceRefs();
List resourceEnvRefs = webApp.getResourceEnvRefs();
List serviceRefs = webApp.getServiceRefs();
validateDuplicateEJBRefs(allRefs,ejbRefs);
validateDuplicateResourceRefs(allRefs,resourceRefs);
validateDuplicateResourceEnvRefs(allRefs,resourceEnvRefs);
validateDuplicateServiceRefs(allRefs,serviceRefs);
}
}
/**
代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee.core
boolean isVersion22 = warFile.getDeploymentDescriptor().getVersionID() <= J2EEVersionConstants.WEB_2_2_ID;
代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee.ui
archiveType = WARFILE;
WebApp war = ((WARFile) anArchive).getDeploymentDescriptor();
if (war.getVersionID() == J2EEVersionConstants.WEB_2_2_ID)
archiveType |= J2EE12;
else if (war.getVersionID() == J2EEVersionConstants.WEB_2_3_ID)
archiveType |= J2EE13;
else if (war.getVersionID() == J2EEVersionConstants.WEB_2_4_ID)
archiveType |= J2EE14;
} else if (anArchive.isApplicationClientFile()) {
内容来源于网络,如有侵权,请联系作者删除!