本文整理了Java中org.jboss.metadata.web.spec.WebMetaData
类的一些代码示例,展示了WebMetaData
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebMetaData
类的具体详情如下:
包路径:org.jboss.metadata.web.spec.WebMetaData
类名称:WebMetaData
[英]The web-app spec metadata
[中]web应用规范元数据
代码示例来源:origin: wildfly/wildfly
if ((metaData.getWebMetaData() != null) && (metaData.getWebMetaData().getContextParams() != null)) {
contextParams.addAll(metaData.getWebMetaData().getContextParams());
代码示例来源:origin: wildfly/wildfly
webFragments.put(resourceRoot.getRootName(), webFragmentMetaData);
if (warMetaData.getWebMetaData() != null && warMetaData.getWebMetaData().getDistributable()!= null && webFragmentMetaData.getDistributable() == null)
UndertowLogger.ROOT_LOGGER.distributableDisabledInFragmentXml(deploymentUnit.getName(),resourceRoot.getRootName());
} catch (XMLStreamException e) {
代码示例来源:origin: wildfly/wildfly
WebMetaData metaData = new WebMetaData();
metaData.setServlets(servlets);
metaData.setServletMappings(servletMappings);
metaData.setFilters(filters);
metaData.setFilterMappings(filterMappings);
metaData.setListeners(listeners);
AnnotationsMetaData annotations = metaData.getAnnotations();
if (annotations == null) {
annotations = new AnnotationsMetaData();
metaData.setAnnotations(annotations);
SecurityRolesMetaData securityRoles = metaData.getSecurityRoles();
if (securityRoles == null) {
securityRoles = new SecurityRolesMetaData();
metaData.setSecurityRoles(securityRoles);
AnnotationsMetaData annotations = metaData.getAnnotations();
if (annotations == null) {
annotations = new AnnotationsMetaData();
metaData.setAnnotations(annotations);
AnnotationsMetaData annotations = metaData.getAnnotations();
if (annotations == null) {
annotations = new AnnotationsMetaData();
metaData.setAnnotations(annotations);
代码示例来源:origin: wildfly/wildfly
if (schemaValidation && webMetaData.getSchemaLocation() != null) {
XMLSchemaValidator validator = new XMLSchemaValidator(new XMLResourceResolver());
InputStream xmlInput = webXml.openStream();
try {
Thread.currentThread().setContextClassLoader(WebMetaDataParser.class.getClassLoader());
if (webMetaData.is23())
validator.validate("-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN", xmlInput);
else if (webMetaData.is24())
validator.validate("http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd", xmlInput);
else if (webMetaData.is25())
validator.validate("http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd", xmlInput);
else if (webMetaData.is30())
validator.validate("http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd", xmlInput);
else if (webMetaData.is31())
validator.validate("http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd", xmlInput);
else if (webMetaData.getVersion() != null && webMetaData.getVersion().equals("4.0"))
validator.validate("http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd", xmlInput);
else
代码示例来源:origin: wildfly/wildfly
WebMetaData specMetaData = warMetaData.getWebMetaData();
if (specMetaData != null) {
isComplete = specMetaData.isMetadataComplete();
absoluteOrderingMetaData = specMetaData.getAbsoluteOrdering();
if (specMetaData == null) {
specMetaData = new WebMetaData();
specMetaData.setVersion(VERSION);
annotatedMetaData.setFilters(null);
annotatedMetaData.setFilterMappings(null);
annotatedMetaData.setListeners(null);
annotatedMetaData.setServlets(null);
annotatedMetaData.setServletMappings(null);
jarAnnotatedMetaData.setFilters(null);
jarAnnotatedMetaData.setFilterMappings(null);
jarAnnotatedMetaData.setListeners(null);
jarAnnotatedMetaData.setServlets(null);
jarAnnotatedMetaData.setServletMappings(null);
jarAnnotatedMetaData.setFilters(null);
jarAnnotatedMetaData.setFilterMappings(null);
jarAnnotatedMetaData.setListeners(null);
jarAnnotatedMetaData.setServlets(null);
jarAnnotatedMetaData.setServletMappings(null);
代码示例来源:origin: org.jboss.metadata/jboss-metadata-war
else if(original != null && original.getVersion() != null)
setServletVersion(original.getVersion());
else if(original != null && original.getDistributable() != null)
setDistributable(original.getDistributable());
else if(original != null && original.getContextParams() != null)
setContextParams(original.getContextParams());
else if(original != null && original.getSessionConfig() != null)
setSessionConfig(original.getSessionConfig());
else if(original != null && original.getFilters() != null)
setFilters(original.getFilters());
else if(original != null && original.getFilterMappings() != null)
setFilterMappings(original.getFilterMappings());
else if(original != null && original.getErrorPages() != null)
setErrorPages(original.getErrorPages());
else if(original != null && original.getJspConfig() != null)
setJspConfig(original.getJspConfig());
else if(original != null && original.getListeners() != null)
setListeners(original.getListeners());
else if(original != null && original.getLoginConfig() != null)
setLoginConfig(original.getLoginConfig());
代码示例来源:origin: org.jboss.ws/jbossws-jboss510-metadata
merged.setDTD("", xml.getDtdPublicId(), xml.getDtdSystemId());
if(xml.getVersion() != null)
merged.setVersion(xml.getVersion());
if(xml.getDescriptionGroup() != null)
merged.setDescriptionGroup(xml.getDescriptionGroup());
if(xml.getContextParams() != null)
merged.setContextParams(xml.getContextParams());
if(xml.getDistributable() != null)
merged.setDistributable(xml.getDistributable());
if(xml.getSessionConfig() != null)
merged.setSessionConfig(xml.getSessionConfig());
if(xml.getFilters() != null)
merged.setFilters(xml.getFilters());
if(xml.getErrorPages() != null)
merged.setErrorPages(xml.getErrorPages());
if(xml.getJspConfig() != null)
merged.setJspConfig(xml.getJspConfig());
if(xml.getListeners() != null)
merged.setListeners(xml.getListeners());
代码示例来源:origin: org.jboss.metadata/jboss-metadata-web
else if (original != null && original.getVersion() != null)
dest.setServletVersion(original.getVersion());
else if (original != null && original.getDistributable() != null)
dest.setDistributable(original.getDistributable());
else if (original != null && original.isMetadataComplete()) {
dest.setMetadataComplete(original.isMetadataComplete());
else if (original != null && original.getContextParams() != null)
dest.setContextParams(original.getContextParams());
else if (original != null && original.getSessionConfig() != null)
dest.setSessionConfig(original.getSessionConfig());
else if (original != null && original.getFilters() != null)
dest.setFilters(original.getFilters());
else if (original != null && original.getFilterMappings() != null)
dest.setFilterMappings(original.getFilterMappings());
else if (original != null && original.getErrorPages() != null)
dest.setErrorPages(original.getErrorPages());
else if (original != null && original.getJspConfig() != null)
dest.setJspConfig(original.getJspConfig());
else if (original != null && original.getListeners() != null)
代码示例来源:origin: org.jboss.metadata/jboss-metadata-web
public static void merge(WebCommonMetaData merged, WebCommonMetaData xml, WebMetaData annotation) {
merge(servletsMetaData, xml.getServlets(), annotation.getServlets());
merged.setServlets(servletsMetaData);
mergeS(servletMappingsMetaData, xml.getServletMappings(), annotation.getServletMappings());
merged.setServletMappings(servletMappingsMetaData);
merge(filtersMetaData, xml.getFilters(), annotation.getFilters());
merged.setFilters(filtersMetaData);
mergeF(filterMappingsMetaData, xml.getFilterMappings(), annotation.getFilterMappings());
merged.setFilterMappings(filterMappingsMetaData);
mergeL(listenerMappingsMetaData, xml.getListeners(), annotation.getListeners());
merged.setListeners(listenerMappingsMetaData);
merge(securityRolesMetaData, xml.getSecurityRoles(), annotation.getSecurityRoles());
merged.setSecurityRoles(securityRolesMetaData);
Environment annEnv = annotation != null ? annotation.getJndiEnvironmentRefsGroup() : null;
EnvironmentRefsGroupMetaDataMerger.merge(environmentRefsGroup, xmlEnv, annEnv, "", "", false);
merged.setJndiEnvironmentRefsGroup(environmentRefsGroup);
MessageDestinationsMetaDataMerger.merge(messageDestinations, xml.getMessageDestinations(), annotation.getMessageDestinations());
merged.setMessageDestinations(messageDestinations);
代码示例来源:origin: org.jboss.ws/jbossws-jboss510-metadata
public static void merge(WebMetaData merged, WebMetaData xml, WebMetaData annotation)
{
//Merge the servlets meta data
ServletsMetaData servletsMetaData = new ServletsMetaData();
merge(servletsMetaData,xml.getServlets(), annotation.getServlets());
merged.setServlets(servletsMetaData);
//Security Roles
SecurityRolesMetaData securityRolesMetaData = new SecurityRolesMetaData();
merge(securityRolesMetaData, xml.getSecurityRoles(), annotation.getSecurityRoles());
merged.setSecurityRoles(securityRolesMetaData);
//Env
EnvironmentRefsGroupMetaData environmentRefsGroup = new EnvironmentRefsGroupMetaData();
Environment xmlEnv = xml != null ? xml.getJndiEnvironmentRefsGroup() : null;
Environment annEnv = annotation != null ? annotation.getJndiEnvironmentRefsGroup() : null;
environmentRefsGroup.merge(xmlEnv,annEnv, "", "", false);
merged.setJndiEnvironmentRefsGroup(environmentRefsGroup);
//Message Destinations
MessageDestinationsMetaData messageDestinations = new MessageDestinationsMetaData();
messageDestinations.merge(xml.getMessageDestinations(), annotation.getMessageDestinations());
merged.setMessageDestinations(messageDestinations);
//merge annotation
mergeIn(merged,annotation);
//merge xml override
mergeIn(merged,xml);
}
代码示例来源:origin: org.jboss.ws/jbossws-jboss510-metadata
EnvironmentRefsGroupMetaData env = metaData.getJndiEnvironmentRefsGroup();
if(env == null)
metaData.setJndiEnvironmentRefsGroup(env);
ServletsMetaData servlets = metaData.getServlets();
if(servlets == null)
metaData.setServlets(servlets);
SecurityRolesMetaData securityRoles = metaData.getSecurityRoles();
if(securityRoles == null)
metaData.setSecurityRoles(securityRoles);
代码示例来源:origin: org.jboss.jbossas/jboss-as-server
specMetaData.setVersion("3.0");
classesAnnotatedMetaData.setFilters(null);
classesAnnotatedMetaData.setFilterMappings(null);
classesAnnotatedMetaData.setListeners(null);
classesAnnotatedMetaData.setServlets(null);
classesAnnotatedMetaData.setServletMappings(null);
specMetaData.augment(classesAnnotatedMetaData, null, true);
jarAnnotatedMetaData.setFilters(null);
jarAnnotatedMetaData.setFilterMappings(null);
jarAnnotatedMetaData.setListeners(null);
jarAnnotatedMetaData.setServlets(null);
jarAnnotatedMetaData.setServletMappings(null);
jarAnnotatedMetaData.setFilters(null);
jarAnnotatedMetaData.setFilterMappings(null);
jarAnnotatedMetaData.setListeners(null);
jarAnnotatedMetaData.setServlets(null);
jarAnnotatedMetaData.setServletMappings(null);
specMetaData.augment(mergedFragmentMetaData, null, true);
代码示例来源:origin: org.jboss.metadata/jboss-metadata-war
EnvironmentRefsGroupMetaData env = metaData.getJndiEnvironmentRefsGroup();
if(env == null)
metaData.setJndiEnvironmentRefsGroup(env);
AnnotationsMetaData annotations = metaData.getAnnotations();
if(annotations == null)
metaData.setAnnotations(annotations);
SecurityRolesMetaData securityRoles = metaData.getSecurityRoles();
if(securityRoles == null)
metaData.setSecurityRoles(securityRoles);
代码示例来源:origin: org.jboss.metadata/jboss-metadata-war
public void process(WebMetaData metaData, Class<?> type)
{
WebFilter annotation = finder.getAnnotation(type, WebFilter.class);
if(annotation == null)
return;
WebMetaData filterMetaData = create(type);
if (metaData.getFilters() == null)
{
metaData.setFilters(filterMetaData.getFilters());
}
else
{
metaData.getFilters().addAll(filterMetaData.getFilters());
}
if (metaData.getFilterMappings() == null)
{
metaData.setFilterMappings(filterMetaData.getFilterMappings());
}
else if (filterMetaData.getFilterMappings() != null)
{
metaData.getFilterMappings().addAll(filterMetaData.getFilterMappings());
}
}
代码示例来源:origin: org.jboss.metadata/jboss-metadata-war
public void process(WebMetaData metaData, Class<?> type)
{
WebServlet annotation = finder.getAnnotation(type, WebServlet.class);
if(annotation == null)
return;
WebMetaData servletMetaData = create(type);
if (metaData.getServlets() == null)
{
metaData.setServlets(servletMetaData.getServlets());
}
else
{
metaData.getServlets().addAll(servletMetaData.getServlets());
}
if (metaData.getServletMappings() == null)
{
metaData.setServletMappings(servletMetaData.getServletMappings());
}
else if (servletMetaData.getServletMappings() != null)
{
metaData.getServletMappings().addAll(servletMetaData.getServletMappings());
}
}
代码示例来源:origin: org.jboss.metadata/jboss-metadata-war
return null;
WebMetaData metaData = new WebMetaData();
ServletsMetaData servlets = new ServletsMetaData();
ServletMetaData servlet = new ServletMetaData();
servlet.setDescriptionGroup(descriptionGroup);
servlets.add(servlet);
metaData.setServlets(servlets);
if (webServlet.urlPatterns() != null || webServlet.value() != null)
metaData.setServletMappings(servletMappings);
代码示例来源:origin: org.jboss.metadata/jboss-metadata-war
return null;
WebMetaData metaData = new WebMetaData();
FiltersMetaData filters = new FiltersMetaData();
FilterMetaData filter = new FilterMetaData();
filter.setDescriptionGroup(descriptionGroup);
filters.add(filter);
metaData.setFilters(filters);
if (webFilter.urlPatterns() != null || webFilter.value() != null || webFilter.servletNames() != null)
metaData.setFilterMappings(filterMappings);
代码示例来源:origin: org.jboss.metadata/jboss-metadata-war
public void process(WebMetaData metaData, Class<?> type)
{
WebListener annotation = finder.getAnnotation(type, WebListener.class);
if(annotation == null)
return;
ListenerMetaData listenerMetaData = create(type);
if (metaData.getListeners() == null)
{
List<ListenerMetaData> listeners = new ArrayList<ListenerMetaData>();
listeners.add(listenerMetaData);
metaData.setListeners(listeners);
}
else
{
metaData.getListeners().add(listenerMetaData);
}
}
代码示例来源:origin: org.jboss/jboss-metadata
else if(original != null && original.getVersion() != null)
setServletVersion(original.getVersion());
else if(original != null && original.getDistributable() != null)
setDistributable(original.getDistributable());
else if(original != null && original.getContextParams() != null)
setContextParams(original.getContextParams());
else if(original != null && original.getSessionConfig() != null)
setSessionConfig(original.getSessionConfig());
else if(original != null && original.getFilters() != null)
setFilters(original.getFilters());
else if(original != null && original.getFilterMappings() != null)
setFilterMappings(original.getFilterMappings());
else if(original != null && original.getErrorPages() != null)
setErrorPages(original.getErrorPages());
else if(original != null && original.getJspConfig() != null)
setJspConfig(original.getJspConfig());
else if(original != null && original.getListeners() != null)
setListeners(original.getListeners());
else if(original != null && original.getLoginConfig() != null)
setLoginConfig(original.getLoginConfig());
代码示例来源:origin: org.wildfly/wildfly-undertow
WebMetaData specMetaData = warMetaData.getWebMetaData();
if (specMetaData != null) {
isComplete = specMetaData.isMetadataComplete();
absoluteOrderingMetaData = specMetaData.getAbsoluteOrdering();
if (specMetaData == null) {
specMetaData = new WebMetaData();
specMetaData.setVersion(VERSION);
annotatedMetaData.setFilters(null);
annotatedMetaData.setFilterMappings(null);
annotatedMetaData.setListeners(null);
annotatedMetaData.setServlets(null);
annotatedMetaData.setServletMappings(null);
jarAnnotatedMetaData.setFilters(null);
jarAnnotatedMetaData.setFilterMappings(null);
jarAnnotatedMetaData.setListeners(null);
jarAnnotatedMetaData.setServlets(null);
jarAnnotatedMetaData.setServletMappings(null);
jarAnnotatedMetaData.setFilters(null);
jarAnnotatedMetaData.setFilterMappings(null);
jarAnnotatedMetaData.setListeners(null);
jarAnnotatedMetaData.setServlets(null);
jarAnnotatedMetaData.setServletMappings(null);
内容来源于网络,如有侵权,请联系作者删除!