|
From: Adrian B. <adr...@jb...> - 2006-07-10 12:18:57
|
User: adrian
Date: 06/07/10 08:18:48
Modified: src/main/org/jboss/metadata/spi/retrieval
MetaDataRetrieval.java
MetaDataRetrievalToMetaDataBridge.java
Log:
[JBMICROCONT-70] - Scoped metadata and basic repository
Revision Changes Path
1.2 +22 -0 container/src/main/org/jboss/metadata/spi/retrieval/MetaDataRetrieval.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: MetaDataRetrieval.java
===================================================================
RCS file: /cvsroot/jboss/container/src/main/org/jboss/metadata/spi/retrieval/MetaDataRetrieval.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- MetaDataRetrieval.java 22 Jun 2006 14:57:27 -0000 1.1
+++ MetaDataRetrieval.java 10 Jul 2006 12:18:48 -0000 1.2
@@ -23,16 +23,24 @@
import java.lang.annotation.Annotation;
+import org.jboss.metadata.spi.scope.ScopeKey;
/**
* MetaDataRetrieval.
*
* @author <a href="ad...@jb...">Adrian Brock</a>
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
public interface MetaDataRetrieval
{
/**
+ * Return the scope key
+ *
+ * @return the scope key
+ */
+ ScopeKey getScope();
+
+ /**
* The valid time
*
* @return the valid time
@@ -47,6 +55,13 @@
AnnotationsItem retrieveAnnotations();
/**
+ * Get all the local annotations
+ *
+ * @return the annotations
+ */
+ AnnotationsItem retrieveLocalAnnotations();
+
+ /**
* Get annotation
*
* @param annotationType the annotation type
@@ -62,6 +77,13 @@
MetaDatasItem retrieveMetaData();
/**
+ * Get all the local metadata
+ *
+ * @return the metadata
+ */
+ MetaDatasItem retrieveLocalMetaData();
+
+ /**
* Get metadata
*
* @param type the type
1.2 +16 -0 container/src/main/org/jboss/metadata/spi/retrieval/MetaDataRetrievalToMetaDataBridge.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: MetaDataRetrievalToMetaDataBridge.java
===================================================================
RCS file: /cvsroot/jboss/container/src/main/org/jboss/metadata/spi/retrieval/MetaDataRetrievalToMetaDataBridge.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- MetaDataRetrievalToMetaDataBridge.java 22 Jun 2006 14:57:27 -0000 1.1
+++ MetaDataRetrievalToMetaDataBridge.java 10 Jul 2006 12:18:48 -0000 1.2
@@ -29,7 +29,7 @@
* MetaDataRetrievalToMetaDataBridge.
*
* @author <a href="ad...@jb...">Adrian Brock</a>
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
public class MetaDataRetrievalToMetaDataBridge implements MetaData
{
@@ -67,6 +67,14 @@
return item.getValue();
}
+ public Annotation[] getLocalAnnotations()
+ {
+ AnnotationsItem item = retrieval.retrieveLocalAnnotations();
+ if (item == null)
+ return NO_ANNOTATIONS;
+ return item.getValue();
+ }
+
public Object[] getMetaData()
{
MetaDatasItem item = retrieval.retrieveMetaData();
@@ -75,6 +83,14 @@
return item.getValue();
}
+ public Object[] getLocalMetaData()
+ {
+ MetaDatasItem item = retrieval.retrieveLocalMetaData();
+ if (item == null)
+ return NO_METADATA;
+ return item.getValue();
+ }
+
public <T> T getMetaData(Class<T> type)
{
if (type == null)
|