org.eclipse.jetty.webapp
Class MetaData

java.lang.Object
  extended by org.eclipse.jetty.webapp.MetaData

public class MetaData
extends java.lang.Object

MetaData All data associated with the configuration and deployment of a web application.


Nested Class Summary
static class MetaData.Origin
           
static class MetaData.OriginInfo
           
 
Field Summary
protected  java.util.List<DiscoveredAnnotation> _annotations
           
protected  java.util.List<DescriptorProcessor> _descriptorProcessors
           
protected  boolean _metaDataComplete
           
protected  java.util.List<Resource> _orderedContainerJars
           
protected  java.util.List<Resource> _orderedWebInfJars
           
protected  Ordering _ordering
           
protected  java.util.Map<java.lang.String,MetaData.OriginInfo> _origins
           
protected  WebDescriptor _webDefaultsRoot
           
protected  java.util.Map<Resource,java.util.List<DiscoveredAnnotation>> _webFragmentAnnotations
           
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> _webInfJars
           
protected  java.util.List<WebDescriptor> _webOverrideRoots
           
protected  WebDescriptor _webXmlRoot
           
static java.lang.String ORDERED_LIBS
           
 
Constructor Summary
MetaData()
           
 
Method Summary
 void addContainerJar(Resource jar)
           
 void addDescriptorProcessor(DescriptorProcessor p)
           
 void addDiscoveredAnnotations(java.util.List<DiscoveredAnnotation> annotations)
          Annotations not associated with a WEB-INF/lib fragment jar.
 void addDiscoveredAnnotations(Resource resource, java.util.List<DiscoveredAnnotation> annotations)
           
 void addFragment(Resource jarResource, Resource xmlResource)
          Add a web-fragment.xml
 void addOverride(Resource override)
           
 void addWebInfJar(Resource newResource)
           
 FragmentDescriptor getFragment(Resource jar)
           
 FragmentDescriptor getFragment(java.lang.String name)
           
 java.util.List<FragmentDescriptor> getFragments()
           
 Resource getJarForFragment(java.lang.String name)
           
 java.util.Map<java.lang.String,FragmentDescriptor> getNamedFragments()
           
 java.util.List<Resource> getOrderedContainerJars()
           
 java.util.List<FragmentDescriptor> getOrderedFragments()
           
 java.util.List<Resource> getOrderedWebInfJars()
           
 Ordering getOrdering()
           
 MetaData.Origin getOrigin(java.lang.String name)
           
 Descriptor getOriginDescriptor(java.lang.String name)
           
 java.util.List<WebDescriptor> getOverrideWebs()
           
 WebDescriptor getWebDefault()
           
 java.util.List<Resource> getWebInfJars()
           
 WebDescriptor getWebXml()
           
 boolean isDistributable()
           
 boolean isMetaDataComplete()
           
 void orderFragments()
           
 void resolve(WebAppContext context)
          Resolve all servlet/filter/listener metadata from all sources: descriptors and annotations.
 void setDefaults(Resource webDefaults)
           
 void setOrdering(Ordering o)
           
 void setOrigin(java.lang.String name)
           
 void setOrigin(java.lang.String name, Descriptor d)
           
 void setWebXml(Resource webXml)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ORDERED_LIBS

public static final java.lang.String ORDERED_LIBS
See Also:
Constant Field Values

_origins

protected java.util.Map<java.lang.String,MetaData.OriginInfo> _origins

_webDefaultsRoot

protected WebDescriptor _webDefaultsRoot

_webXmlRoot

protected WebDescriptor _webXmlRoot

_webOverrideRoots

protected final java.util.List<WebDescriptor> _webOverrideRoots

_metaDataComplete

protected boolean _metaDataComplete

_annotations

protected final java.util.List<DiscoveredAnnotation> _annotations

_descriptorProcessors

protected final java.util.List<DescriptorProcessor> _descriptorProcessors

_webFragmentRoots

protected final java.util.List<FragmentDescriptor> _webFragmentRoots

_webFragmentNameMap

protected final java.util.Map<java.lang.String,FragmentDescriptor> _webFragmentNameMap

_webFragmentResourceMap

protected final java.util.Map<Resource,FragmentDescriptor> _webFragmentResourceMap

_webFragmentAnnotations

protected final java.util.Map<Resource,java.util.List<DiscoveredAnnotation>> _webFragmentAnnotations

_webInfJars

protected final java.util.List<Resource> _webInfJars

_orderedWebInfJars

protected final java.util.List<Resource> _orderedWebInfJars

_orderedContainerJars

protected final java.util.List<Resource> _orderedContainerJars

_ordering

protected Ordering _ordering
Constructor Detail

MetaData

public MetaData()
Method Detail

setDefaults

public void setDefaults(Resource webDefaults)
                 throws java.lang.Exception
Throws:
java.lang.Exception

setWebXml

public void setWebXml(Resource webXml)
               throws java.lang.Exception
Throws:
java.lang.Exception

addOverride

public void addOverride(Resource override)
                 throws java.lang.Exception
Throws:
java.lang.Exception

addFragment

public void addFragment(Resource jarResource,
                        Resource xmlResource)
                 throws java.lang.Exception
Add a web-fragment.xml

Parameters:
jarResource - the jar the fragment is contained in
xmlResource - the resource representing the xml file
Throws:
java.lang.Exception

addDiscoveredAnnotations

public void addDiscoveredAnnotations(java.util.List<DiscoveredAnnotation> annotations)
Annotations not associated with a WEB-INF/lib fragment jar. These are from WEB-INF/classes or the ??container path??

Parameters:
annotations -

addDiscoveredAnnotations

public void addDiscoveredAnnotations(Resource resource,
                                     java.util.List<DiscoveredAnnotation> annotations)

addDescriptorProcessor

public void addDescriptorProcessor(DescriptorProcessor p)

orderFragments

public void orderFragments()

resolve

public void resolve(WebAppContext context)
             throws java.lang.Exception
Resolve all servlet/filter/listener metadata from all sources: descriptors and annotations.

Throws:
java.lang.Exception

isDistributable

public boolean isDistributable()

getWebXml

public WebDescriptor getWebXml()

getOverrideWebs

public java.util.List<WebDescriptor> getOverrideWebs()

getWebDefault

public WebDescriptor getWebDefault()

getFragments

public java.util.List<FragmentDescriptor> getFragments()

getOrderedWebInfJars

public java.util.List<Resource> getOrderedWebInfJars()

getOrderedFragments

public java.util.List<FragmentDescriptor> getOrderedFragments()

getOrdering

public Ordering getOrdering()

setOrdering

public void setOrdering(Ordering o)

getFragment

public FragmentDescriptor getFragment(Resource jar)

getFragment

public FragmentDescriptor getFragment(java.lang.String name)

getJarForFragment

public Resource getJarForFragment(java.lang.String name)

getNamedFragments

public java.util.Map<java.lang.String,FragmentDescriptor> getNamedFragments()

getOrigin

public MetaData.Origin getOrigin(java.lang.String name)

getOriginDescriptor

public Descriptor getOriginDescriptor(java.lang.String name)

setOrigin

public void setOrigin(java.lang.String name,
                      Descriptor d)

setOrigin

public void setOrigin(java.lang.String name)

isMetaDataComplete

public boolean isMetaDataComplete()

addWebInfJar

public void addWebInfJar(Resource newResource)

getWebInfJars

public java.util.List<Resource> getWebInfJars()

getOrderedContainerJars

public java.util.List<Resource> getOrderedContainerJars()

addContainerJar

public void addContainerJar(Resource jar)


Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.