Package org.eclipse.jetty.webapp
Class MetaData
java.lang.Object
org.eclipse.jetty.webapp.MetaData
MetaData
All data associated with the configuration and deployment of a web application.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
protected final Map
<Resource, List<DiscoveredAnnotation>> protected final List
<DescriptorProcessor> protected boolean
protected Ordering
protected Map
<String, MetaData.OriginInfo> protected boolean
protected WebDescriptor
protected final Map
<String, FragmentDescriptor> protected final Map
<Resource, FragmentDescriptor> protected final List
<FragmentDescriptor> protected final List
<WebDescriptor> protected WebDescriptor
private static final Logger
static final Resource
static final String
static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
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
(List<DiscoveredAnnotation> annotations) Annotations not associated with a WEB-INF/lib fragment jar.void
addFragment
(Resource jarResource, Resource xmlResource) Add a web-fragment.xmlvoid
addOverride
(Resource override) void
addWebInfJar
(Resource newResource) void
clear()
Empty ready for reusegetFragment
(String name) getFragment
(Resource jar) getJarForFragment
(String name) getOriginDescriptor
(String name) getOriginInfo
(String name) boolean
boolean
boolean
boolean
void
void
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
void
setOrigin
(String name, Annotation annotation, Class<?> annotated) void
setOrigin
(String name, Descriptor d) void
setOriginAPI
(String name) void
setValidateXml
(boolean validateXml) void
setWebInfClassesDirs
(List<Resource> dirs) void
-
Field Details
-
LOG
-
VALIDATE_XML
- See Also:
-
ORDERED_LIBS
- See Also:
-
NON_FRAG_RESOURCE
-
_origins
-
_webDefaultsRoot
-
_webXmlRoot
-
_webOverrideRoots
-
_metaDataComplete
protected boolean _metaDataComplete -
_descriptorProcessors
-
_webFragmentRoots
-
_webFragmentNameMap
-
_webFragmentResourceMap
-
_annotations
-
_webInfClasses
-
_webInfJars
-
_orderedContainerResources
-
_orderedWebInfResources
-
_ordering
-
_allowDuplicateFragmentNames
protected boolean _allowDuplicateFragmentNames -
_validateXml
protected boolean _validateXml
-
-
Constructor Details
-
MetaData
public MetaData()
-
-
Method Details
-
clear
public void clear()Empty ready for reuse -
setDefaults
- Throws:
Exception
-
setWebXml
- Throws:
Exception
-
addOverride
- Throws:
Exception
-
addFragment
Add a web-fragment.xml- Parameters:
jarResource
- the jar the fragment is contained inxmlResource
- the resource representing the xml file- Throws:
Exception
- if unable to add fragment
-
addDiscoveredAnnotations
Annotations not associated with a WEB-INF/lib fragment jar. These are from WEB-INF/classes or the ??container path??- Parameters:
annotations
- the list of discovered annotations to add
-
addDiscoveredAnnotation
Add an annotation that has been discovered on a class, method or field within a resource eg a jar or dir. This method is synchronized as it is anticipated that it may be called by many threads during the annotation scanning phase.- Parameters:
annotation
- the discovered annotation
-
addDescriptorProcessor
-
removeDescriptorProcessor
-
orderFragments
public void orderFragments() -
resolve
Resolve all servlet/filter/listener metadata from all sources: descriptors and annotations.- Parameters:
context
- the context to resolve servlets / filters / listeners metadata from- Throws:
Exception
- if unable to resolve metadata
-
isDistributable
public boolean isDistributable() -
getWebXml
-
getOverrideWebs
-
getWebDefault
-
getFragments
-
getOrderedWebInfJars
-
getOrderedFragments
-
getOrdering
-
setOrdering
-
getFragment
-
getFragment
-
getJarForFragment
-
getNamedFragments
-
getOrigin
-
getOriginInfo
-
getOriginDescriptor
-
setOrigin
-
setOrigin
-
setOriginAPI
-
isMetaDataComplete
public boolean isMetaDataComplete() -
addWebInfJar
-
getWebInfJars
-
getContainerResources
-
addContainerResource
-
setWebInfClassesDirs
-
getWebInfClassesDirs
-
isAllowDuplicateFragmentNames
public boolean isAllowDuplicateFragmentNames() -
setAllowDuplicateFragmentNames
public void setAllowDuplicateFragmentNames(boolean allowDuplicateFragmentNames) -
isValidateXml
public boolean isValidateXml()- Returns:
- the validateXml
-
setValidateXml
public void setValidateXml(boolean validateXml) - Parameters:
validateXml
- the validateXml to set
-
getOrigins
-