org.jboss.metadata.plugins.context
Class AbstractMetaDataContext

java.lang.Object
  extended by org.jboss.metadata.plugins.context.AbstractMetaDataContext
All Implemented Interfaces:
MetaDataContext, MetaDataRetrieval
Direct Known Subclasses:
CachingMetaDataContext

public class AbstractMetaDataContext
extends Object
implements MetaDataContext

AbstractMetaDataContext.

Version:
$Revision: 69888 $
Author:
Adrian Brock

Constructor Summary
AbstractMetaDataContext(MetaDataContext parent, List<MetaDataRetrieval> retrievals)
          Create a new AbstractMetaDataContext.
AbstractMetaDataContext(MetaDataContext parent, MetaDataRetrieval retrieval)
          Create a new AbstractMetaDataContext.
AbstractMetaDataContext(MetaDataRetrieval retrieval)
          Create a new AbstractMetaDataContext.
 
Method Summary
 void append(MetaDataRetrieval retrieval)
          Append a meta data retrieval
 MetaDataRetrieval getComponentMetaDataRetrieval(Signature signature)
          Get the component metadata retrieval
 List<MetaDataRetrieval> getLocalRetrievals()
          Get the local retrievals
 MetaDataContext getParent()
          Get the parent
 List<MetaDataRetrieval> getRetrievals()
          Get the retrievals
 ScopeKey getScope()
          Return the scope key
 MetaDataRetrieval getScopedRetrieval(ScopeLevel level)
          Get scoped retrieval for level param.
 ValidTime getValidTime()
          The valid time
 boolean isEmpty()
          Is metadata empty.
 void prepend(MetaDataRetrieval retrieval)
          Prepend a meta data retrieval
 void remove(MetaDataRetrieval retrieval)
          Remove a meta data retrieval
<T extends Annotation>
AnnotationItem<T>
retrieveAnnotation(Class<T> annotationType)
          Get annotation
 AnnotationsItem retrieveAnnotations()
          Get all the annotations
 AnnotationsItem retrieveLocalAnnotations()
          Get all the local annotations
 MetaDatasItem retrieveLocalMetaData()
          Get all the local metadata
 MetaDatasItem retrieveMetaData()
          Get all the metadata
<T> MetaDataItem<T>
retrieveMetaData(Class<T> type)
          Get metadata
 MetaDataItem<?> retrieveMetaData(String name)
          Get metadata
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMetaDataContext

public AbstractMetaDataContext(MetaDataRetrieval retrieval)
Create a new AbstractMetaDataContext.

Parameters:
retrieval - the retrieval

AbstractMetaDataContext

public AbstractMetaDataContext(MetaDataContext parent,
                               MetaDataRetrieval retrieval)
Create a new AbstractMetaDataContext.

Parameters:
parent - the parent
retrieval - the retrieval

AbstractMetaDataContext

public AbstractMetaDataContext(MetaDataContext parent,
                               List<MetaDataRetrieval> retrievals)
Create a new AbstractMetaDataContext.

Parameters:
parent - the parent
retrievals - the retrievals
Method Detail

getScope

public ScopeKey getScope()
Description copied from interface: MetaDataRetrieval
Return the scope key

Specified by:
getScope in interface MetaDataRetrieval
Returns:
the scope key

getValidTime

public ValidTime getValidTime()
Description copied from interface: MetaDataRetrieval
The valid time

Specified by:
getValidTime in interface MetaDataRetrieval
Returns:
the valid time

getParent

public MetaDataContext getParent()
Description copied from interface: MetaDataContext
Get the parent

Specified by:
getParent in interface MetaDataContext
Returns:
the parent context

getRetrievals

public List<MetaDataRetrieval> getRetrievals()
Description copied from interface: MetaDataContext
Get the retrievals

Specified by:
getRetrievals in interface MetaDataContext
Returns:
the retrievals

getLocalRetrievals

public List<MetaDataRetrieval> getLocalRetrievals()
Description copied from interface: MetaDataContext
Get the local retrievals

Specified by:
getLocalRetrievals in interface MetaDataContext
Returns:
the local retrievals

append

public void append(MetaDataRetrieval retrieval)
Description copied from interface: MetaDataContext
Append a meta data retrieval

Specified by:
append in interface MetaDataContext
Parameters:
retrieval - the meta data retrieval

prepend

public void prepend(MetaDataRetrieval retrieval)
Description copied from interface: MetaDataContext
Prepend a meta data retrieval

Specified by:
prepend in interface MetaDataContext
Parameters:
retrieval - the meta data retrieval

remove

public void remove(MetaDataRetrieval retrieval)
Description copied from interface: MetaDataContext
Remove a meta data retrieval

Specified by:
remove in interface MetaDataContext
Parameters:
retrieval - the meta data retrieval

retrieveAnnotations

public AnnotationsItem retrieveAnnotations()
Description copied from interface: MetaDataRetrieval
Get all the annotations

Specified by:
retrieveAnnotations in interface MetaDataRetrieval
Returns:
the annotations

retrieveLocalAnnotations

public AnnotationsItem retrieveLocalAnnotations()
Description copied from interface: MetaDataRetrieval
Get all the local annotations

Specified by:
retrieveLocalAnnotations in interface MetaDataRetrieval
Returns:
the annotations

retrieveAnnotation

public <T extends Annotation> AnnotationItem<T> retrieveAnnotation(Class<T> annotationType)
Description copied from interface: MetaDataRetrieval
Get annotation

Specified by:
retrieveAnnotation in interface MetaDataRetrieval
Type Parameters:
T - the annotation type
Parameters:
annotationType - the annotation type
Returns:
the annotation or null if not present

retrieveMetaData

public MetaDatasItem retrieveMetaData()
Description copied from interface: MetaDataRetrieval
Get all the metadata

Specified by:
retrieveMetaData in interface MetaDataRetrieval
Returns:
the metadata

retrieveLocalMetaData

public MetaDatasItem retrieveLocalMetaData()
Description copied from interface: MetaDataRetrieval
Get all the local metadata

Specified by:
retrieveLocalMetaData in interface MetaDataRetrieval
Returns:
the metadata

retrieveMetaData

public <T> MetaDataItem<T> retrieveMetaData(Class<T> type)
Description copied from interface: MetaDataRetrieval
Get metadata

Specified by:
retrieveMetaData in interface MetaDataRetrieval
Type Parameters:
T - the metadata type
Parameters:
type - the type
Returns:
the metadata or null if not present

retrieveMetaData

public MetaDataItem<?> retrieveMetaData(String name)
Description copied from interface: MetaDataRetrieval
Get metadata

Specified by:
retrieveMetaData in interface MetaDataRetrieval
Parameters:
name - the name of the meta data
Returns:
the metadata or null if not present

getComponentMetaDataRetrieval

public MetaDataRetrieval getComponentMetaDataRetrieval(Signature signature)
Description copied from interface: MetaDataRetrieval
Get the component metadata retrieval

Specified by:
getComponentMetaDataRetrieval in interface MetaDataRetrieval
Parameters:
signature - the signature
Returns:
the component metadata retrieval

isEmpty

public boolean isEmpty()
Description copied from interface: MetaDataRetrieval
Is metadata empty.

Specified by:
isEmpty in interface MetaDataRetrieval
Returns:
true if metadata empty

getScopedRetrieval

public MetaDataRetrieval getScopedRetrieval(ScopeLevel level)
Description copied from interface: MetaDataRetrieval
Get scoped retrieval for level param.

Specified by:
getScopedRetrieval in interface MetaDataRetrieval
Parameters:
level - the scope level
Returns:
list of retrieval instances


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.