Package org.jboss.metadata.plugins.context

Examples of org.jboss.metadata.plugins.context.AbstractMetaDataContext


      super(name);
   }

   protected MetaDataContext createContext(MetaDataContext parent, List<MetaDataRetrieval> retrievals)
   {
      return new AbstractMetaDataContext(parent, retrievals);
   }
View Full Code Here


      super(name, false);
   }

   protected MetaData setupMetaData(MetaDataLoader loader)
   {
      AbstractMetaDataContext parent = new AbstractMetaDataContext(null, loader);
      MutableMetaDataLoader empty = createTestMutableMetaDataLoader();
      AbstractMetaDataContext context = new AbstractMetaDataContext(parent, empty);
      return new MetaDataRetrievalToMetaDataBridge(context);
   }
View Full Code Here

      super(name, true);
   }

   protected MetaData setupMetaData(MetaDataLoader loader)
   {
      AbstractMetaDataContext context = new AbstractMetaDataContext(null, loader);
      return new MetaDataRetrievalToMetaDataBridge(context);
   }
View Full Code Here

         MetaDataRetrieval retrieval = repository.getMetaDataRetrieval(thisScope);
         if (retrieval == null)
            retrieval = new MemoryMetaDataLoader(thisScope);
         retrievals.add(0, retrieval);
      }
      MetaDataContext metaDataContext = new AbstractMetaDataContext(null, retrievals);
      repository.addMetaDataRetrieval(metaDataContext);
     
      try
      {
         controller.install(test);
View Full Code Here

      MetaDataRetrieval classMetaData = ClassMetaDataRetrievalFactory.INSTANCE.getMetaDataRetrieval(new Scope(CommonLevels.CLASS, beanClass));
      ScopeKey instanceScope = new ScopeKey(CommonLevels.INSTANCE, name);
      mutableMetaData = new MemoryMetaDataLoader(instanceScope);
      MetaDataRetrieval dynamicXml = new EJBMetaDataLoader(instanceScope, container);
     
      MetaDataContext classContext = new AbstractMetaDataContext(classMetaData);
      MetaDataRetrieval[] instance = { dynamicXml, mutableMetaData };
      MetaDataContext instanceContext = new AbstractMetaDataContext(classContext, Arrays.asList(instance));
      metaData = new MetaDataRetrievalToMetaDataBridge(instanceContext);
   }
View Full Code Here

   public void testProvidedMetaData() throws Throwable
   {
      MemoryMetaDataLoader memory = new MemoryMetaDataLoader(new ScopeKey(CommonLevels.INSTANCE, "foobar"));
      memory.addAnnotation(new AliasesImpl("alias"));
      MetaDataRetrieval retrieval = new AbstractMetaDataContext(null, memory);
      MetaData metaData = new MetaDataRetrievalToMetaDataBridge(retrieval);

      BeanMetaData bmd = AnnotationToBeanMetaDataFactory.createBeanMetaData(Object.class, metaData);
      assertNotNull(bmd);
      assertEquals(Collections.singleton((Object)"alias"), bmd.getAliases());
View Full Code Here

      ScopeKey instanceScope = new ScopeKey(CommonLevels.INSTANCE, canonicalObjectName);
      mutableMetaData = new MemoryMetaDataLoader(instanceScope);
      //MetaDataRetrieval dynamicXml = new EJBMetaDataLoader(instanceScope, beanMetaData, classLoader);
      this.bridgedMetaDataLoader = new BridgedMetaDataLoader<JBossEnterpriseBeanMetaData>(instanceScope, beanMetaData, classLoader);
     
      MetaDataContext classContext = new AbstractMetaDataContext(classMetaData);
      MetaDataRetrieval[] instance = { bridgedMetaDataLoader, mutableMetaData };
      MetaDataContext instanceContext = new AbstractMetaDataContext(classContext, Arrays.asList(instance));
      metaData = new MetaDataRetrievalToMetaDataBridge(instanceContext);
   }
View Full Code Here

      MetaDataContext classContext = null;
      if(beanMetaData == null || !beanMetaData.getEjbJarMetaData().isMetadataComplete())
      {
         // Create a fallback parent meta data context which targets the annotations
         MetaDataRetrieval classMetaData = ClassMetaDataRetrievalFactory.INSTANCE.getMetaDataRetrieval(new Scope(CommonLevels.CLASS, beanClass));
         classContext = new AbstractMetaDataContext(classMetaData);
      }
      MetaDataRetrieval[] instance = { bridgedMetaDataLoader, mutableMetaData };
      MetaDataContext instanceContext = new AbstractMetaDataContext(classContext, Arrays.asList(instance));
      metaData = new MetaDataRetrievalToMetaDataBridge(instanceContext);
   }
View Full Code Here

            retrieval = new MemoryMetaDataLoader(thisScope);
            repository.addMetaDataRetrieval(retrieval);
         }
         retrievals.add(0, retrieval);
      }
      AbstractMetaDataContext metaDataContext = new AbstractMetaDataContext(null, retrievals);
      repository.addMetaDataRetrieval(metaDataContext);
   }
View Full Code Here

      if (retrieval == null)
      {
         retrieval = new MemoryMetaDataLoader(scopeKey);
         repository.addMetaDataRetrieval(retrieval);
      }
      AbstractMetaDataContext metaDataContext = new AbstractMetaDataContext(null, retrieval);
      repository.addMetaDataRetrieval(metaDataContext);
   }
View Full Code Here

TOP

Related Classes of org.jboss.metadata.plugins.context.AbstractMetaDataContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.