Package org.jboss.metadata.spi.retrieval

Examples of org.jboss.metadata.spi.retrieval.MetaDataRetrieval


      ScopeKey scopeKey = scopeInfo.getScope();
      ArrayList<MetaDataRetrieval> retrievals = new ArrayList<MetaDataRetrieval>();
      for (Scope scope : scopeKey.getScopes())
      {
         ScopeKey thisScope = new ScopeKey(scope);
         MetaDataRetrieval retrieval = repository.getMetaDataRetrieval(thisScope);
         if (retrieval == null)
         {
            retrieval = scopeInfo.initMetaDataRetrieval(repository, context, scope);
            if (retrieval == null)
            {
View Full Code Here


         throw new IllegalArgumentException("Null name");
      this.classLoader = container.getClassloader();
      if (classLoader == null)
         throw new IllegalArgumentException("Null class");
     
      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

         return null;

      if (signature instanceof MethodSignature == false)
         return null;
     
      MetaDataRetrieval retrieval = cache.get(signature);
      if (retrieval != null)
         return retrieval;

      retrieval = new MethodMetaDataRetrieval((MethodSignature) signature);
      cache.put(signature, retrieval);
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

      MutableMetaDataRepository repository = getRepository(deploymentContext);
      if (repository == null)
         return null;

      ScopeKey mutableScope = deploymentContext.getMutableScope();
      MetaDataRetrieval retrieval = repository.getMetaDataRetrieval(mutableScope);
      if (retrieval == null)
      {
         initMutableMetaDataRetrieval(repository, deploymentContext);
         retrieval = repository.getMetaDataRetrieval(mutableScope);
      }
View Full Code Here

      if (signature == null)
         return null;

      if (cachedComponents != null)
      {
         MetaDataRetrieval retrieval = cachedComponents.get(signature);
         if (retrieval != null)
            return retrieval;
      }
     
      MetaDataRetrieval retrieval = super.getComponentMetaDataRetrieval(signature);
     
      if (retrieval != null)
      {
         if (cachedComponents == null)
            cachedComponents = new ConcurrentHashMap<Signature, MetaDataRetrieval>();
View Full Code Here

   {
      if (cachedScopedRetrievals == null)
      {
         cachedScopedRetrievals = new HashMap<ScopeLevel, MetaDataRetrieval>();
      }
      MetaDataRetrieval retrieval = cachedScopedRetrievals.get(level);
      if (update)
      {
         retrieval = super.getScopedRetrieval(level);
         cachedScopedRetrievals.put(level, retrieval);
      }
View Full Code Here

      if (signature == null)
         return null;

      if (cachedComponents != null)
      {
         MetaDataRetrieval retrieval = cachedComponents.get(signature);
         if (retrieval != null)
            return retrieval;
      }
     
      MetaDataRetrieval retrieval = super.getComponentMetaDataRetrieval(signature);
     
      if (retrieval != null)
      {
         if (cachedComponents == null)
            cachedComponents = new ConcurrentHashMap<Signature, MetaDataRetrieval>();
View Full Code Here

      ScopeKey scopeKey = context.getScopeInfo().getInstallScope();
      if (scopeKey != null)
      {
         // find scoped controller
         MutableMetaDataRepository mmdr = repository.getMetaDataRepository();
         MetaDataRetrieval mdr = mmdr.getMetaDataRetrieval(scopeKey);
         if (mdr == null)
         {
            throw new IllegalArgumentException("Expecting MetaDataRetrieval instance in scope: " + scopeKey);
         }
         MetaDataItem<ScopedKernelController> controllerItem = mdr.retrieveMetaData(ScopedKernelController.class);
         if (controllerItem == null)
         {
            throw new IllegalArgumentException("Expecting ScopedKernelController instance in scope:" + scopeKey);
         }
         ScopedKernelController scopedController = controllerItem.getValue();
View Full Code Here

                  for (Scope s : scopes)
                     contextScopeKey.addScope(s);
*/
         // find scoped controller
         MutableMetaDataRepository mmdr = repository.getMetaDataRepository();
         MetaDataRetrieval mdr = mmdr.getMetaDataRetrieval(scopeKey);
         if (mdr == null)
         {
            mdr = new MemoryMetaDataLoader(scopeKey);
            mmdr.addMetaDataRetrieval(mdr);
         }
         MetaDataItem<ScopedKernelController> controllerItem = mdr.retrieveMetaData(ScopedKernelController.class);
         ScopedKernelController scopedController;
         if (controllerItem != null)
         {
            scopedController = controllerItem.getValue();
         }
         else
         {
            AbstractController parentController = null;
            ScopeKey parentKey = scopeKey.getParent();
            while (parentController == null && parentKey != null)
            {
               MetaDataRetrieval pmdr = mmdr.getMetaDataRetrieval(parentKey);
               if (pmdr != null)
               {
                  MetaDataItem<ScopedKernelController> pci = pmdr.retrieveMetaData(ScopedKernelController.class);
                  if (pci != null)
                  {
                     parentController = pci.getValue();
                  }
               }
View Full Code Here

TOP

Related Classes of org.jboss.metadata.spi.retrieval.MetaDataRetrieval

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.