public class MetaData
extends java.lang.Object
Modifier and Type | Class | Description |
---|---|---|
static class |
MetaData.OriginInfo |
Modifier and Type | Field | Description |
---|---|---|
protected boolean |
_allowDuplicateFragmentNames |
|
protected java.util.Map<Resource,java.util.List<DiscoveredAnnotation>> |
_annotations |
|
protected java.util.List<DescriptorProcessor> |
_descriptorProcessors |
|
protected boolean |
_metaDataComplete |
|
protected java.util.List<Resource> |
_orderedContainerResources |
|
protected java.util.List<Resource> |
_orderedWebInfResources |
|
protected Ordering |
_ordering |
|
protected java.util.Map<java.lang.String,MetaData.OriginInfo> |
_origins |
|
protected boolean |
_validateXml |
|
protected WebDescriptor |
_webDefaultsRoot |
|
protected java.util.Map<java.lang.String,FragmentDescriptor> |
_webFragmentNameMap |
|
protected java.util.Map<Resource,FragmentDescriptor> |
_webFragmentResourceMap |
|
protected java.util.List<FragmentDescriptor> |
_webFragmentRoots |
|
protected java.util.List<Resource> |
_webInfClasses |
|
protected java.util.List<Resource> |
_webInfJars |
|
protected java.util.List<WebDescriptor> |
_webOverrideRoots |
|
protected WebDescriptor |
_webXmlRoot |
|
static Resource |
NON_FRAG_RESOURCE |
|
static java.lang.String |
ORDERED_LIBS |
|
static java.lang.String |
VALIDATE_XML |
Constructor | Description |
---|---|
MetaData() |
Modifier and Type | Method | Description |
---|---|---|
void |
addContainerResource(Resource jar) |
|
void |
addDescriptorProcessor(DescriptorProcessor p) |
|
void |
addDiscoveredAnnotation(DiscoveredAnnotation annotation) |
Add an annotation that has been discovered on a class, method or field within a resource
eg a jar or dir.
|
void |
addDiscoveredAnnotations(java.util.List<DiscoveredAnnotation> annotations) |
Annotations not associated with a WEB-INF/lib fragment jar.
|
void |
addFragment(Resource jarResource,
Resource xmlResource) |
Add a web-fragment.xml
|
void |
addOverride(Resource override) |
|
void |
addWebInfJar(Resource newResource) |
|
void |
clear() |
Empty ready for reuse
|
java.util.List<Resource> |
getContainerResources() |
|
FragmentDescriptor |
getFragment(java.lang.String name) |
|
FragmentDescriptor |
getFragment(Resource jar) |
|
java.util.List<FragmentDescriptor> |
getFragments() |
|
Resource |
getJarForFragment(java.lang.String name) |
|
java.util.Map<java.lang.String,FragmentDescriptor> |
getNamedFragments() |
|
java.util.List<FragmentDescriptor> |
getOrderedFragments() |
|
java.util.List<Resource> |
getOrderedWebInfJars() |
|
Ordering |
getOrdering() |
|
Origin |
getOrigin(java.lang.String name) |
|
Descriptor |
getOriginDescriptor(java.lang.String name) |
|
MetaData.OriginInfo |
getOriginInfo(java.lang.String name) |
|
java.util.Map<java.lang.String,MetaData.OriginInfo> |
getOrigins() |
|
java.util.List<WebDescriptor> |
getOverrideWebs() |
|
WebDescriptor |
getWebDefault() |
|
java.util.List<Resource> |
getWebInfClassesDirs() |
|
java.util.List<Resource> |
getWebInfJars() |
|
WebDescriptor |
getWebXml() |
|
boolean |
isAllowDuplicateFragmentNames() |
|
boolean |
isDistributable() |
|
boolean |
isMetaDataComplete() |
|
boolean |
isValidateXml() |
|
void |
orderFragments() |
|
void |
removeDescriptorProcessor(DescriptorProcessor p) |
|
void |
resolve(WebAppContext context) |
Resolve all servlet/filter/listener metadata from all sources: descriptors and annotations.
|
void |
setAllowDuplicateFragmentNames(boolean allowDuplicateFragmentNames) |
|
void |
setDefaults(Resource webDefaults) |
|
void |
setOrdering(Ordering o) |
|
void |
setOrigin(java.lang.String name,
java.lang.annotation.Annotation annotation,
java.lang.Class<?> annotated) |
|
void |
setOrigin(java.lang.String name,
Descriptor d) |
|
void |
setOriginAPI(java.lang.String name) |
|
void |
setValidateXml(boolean validateXml) |
|
void |
setWebInfClassesDirs(java.util.List<Resource> dirs) |
|
void |
setWebXml(Resource webXml) |
public static final java.lang.String VALIDATE_XML
public static final java.lang.String ORDERED_LIBS
public static final Resource NON_FRAG_RESOURCE
protected java.util.Map<java.lang.String,MetaData.OriginInfo> _origins
protected WebDescriptor _webDefaultsRoot
protected WebDescriptor _webXmlRoot
protected final java.util.List<WebDescriptor> _webOverrideRoots
protected boolean _metaDataComplete
protected final java.util.List<DescriptorProcessor> _descriptorProcessors
protected final java.util.List<FragmentDescriptor> _webFragmentRoots
protected final java.util.Map<java.lang.String,FragmentDescriptor> _webFragmentNameMap
protected final java.util.Map<Resource,FragmentDescriptor> _webFragmentResourceMap
protected final java.util.Map<Resource,java.util.List<DiscoveredAnnotation>> _annotations
protected final java.util.List<Resource> _webInfClasses
protected final java.util.List<Resource> _webInfJars
protected final java.util.List<Resource> _orderedContainerResources
protected final java.util.List<Resource> _orderedWebInfResources
protected Ordering _ordering
protected boolean _allowDuplicateFragmentNames
protected boolean _validateXml
public void clear()
public void setDefaults(Resource webDefaults) throws java.lang.Exception
java.lang.Exception
public void setWebXml(Resource webXml) throws java.lang.Exception
java.lang.Exception
public void addOverride(Resource override) throws java.lang.Exception
java.lang.Exception
public void addFragment(Resource jarResource, Resource xmlResource) throws java.lang.Exception
jarResource
- the jar the fragment is contained inxmlResource
- the resource representing the xml filejava.lang.Exception
- if unable to add fragmentpublic void addDiscoveredAnnotations(java.util.List<DiscoveredAnnotation> annotations)
annotations
- the list of discovered annotations to addpublic void addDiscoveredAnnotation(DiscoveredAnnotation annotation)
annotation
- the discovered annotationpublic void addDescriptorProcessor(DescriptorProcessor p)
public void removeDescriptorProcessor(DescriptorProcessor p)
public void orderFragments()
public void resolve(WebAppContext context) throws java.lang.Exception
context
- the context to resolve servlets / filters / listeners metadata fromjava.lang.Exception
- if unable to resolve metadatapublic boolean isDistributable()
public WebDescriptor getWebXml()
public java.util.List<WebDescriptor> getOverrideWebs()
public WebDescriptor getWebDefault()
public java.util.List<FragmentDescriptor> getFragments()
public java.util.List<Resource> getOrderedWebInfJars()
public java.util.List<FragmentDescriptor> getOrderedFragments()
public Ordering getOrdering()
public void setOrdering(Ordering o)
public FragmentDescriptor getFragment(Resource jar)
public FragmentDescriptor getFragment(java.lang.String name)
public Resource getJarForFragment(java.lang.String name)
public java.util.Map<java.lang.String,FragmentDescriptor> getNamedFragments()
public Origin getOrigin(java.lang.String name)
public MetaData.OriginInfo getOriginInfo(java.lang.String name)
public Descriptor getOriginDescriptor(java.lang.String name)
public void setOrigin(java.lang.String name, Descriptor d)
public void setOrigin(java.lang.String name, java.lang.annotation.Annotation annotation, java.lang.Class<?> annotated)
public void setOriginAPI(java.lang.String name)
public boolean isMetaDataComplete()
public void addWebInfJar(Resource newResource)
public java.util.List<Resource> getWebInfJars()
public java.util.List<Resource> getContainerResources()
public void addContainerResource(Resource jar)
public void setWebInfClassesDirs(java.util.List<Resource> dirs)
public java.util.List<Resource> getWebInfClassesDirs()
public boolean isAllowDuplicateFragmentNames()
public void setAllowDuplicateFragmentNames(boolean allowDuplicateFragmentNames)
public boolean isValidateXml()
public void setValidateXml(boolean validateXml)
validateXml
- the validateXml to setpublic java.util.Map<java.lang.String,MetaData.OriginInfo> getOrigins()
Copyright © 1995–2018 Webtide. All rights reserved.