Package org.jboss.metadata.spi.retrieval

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


      if (mode == null)
         mode = BeanAccessMode.STANDARD;

      if (metaData == null)
      {
         MetaDataRetrieval retrieval = new AnnotatedElementMetaDataLoader(beanClass);
         metaData = new MetaDataRetrievalToMetaDataBridge(retrieval);
      }

      if (existingMetaData == null)
      {
View Full Code Here


    * @param annotations the annotations
    * @param add true for add, false for remove
    */
   private void updateAnnotations(MutableMetaDataRepository repository, ClassLoader classloader, ComponentMutableMetaData component, KernelControllerContext context, Signature signature, ScopeKey scope, Set<AnnotationMetaData> annotations, boolean add)
   {
      MetaDataRetrieval retrieval = ((MetaDataRetrieval) component).getComponentMetaDataRetrieval(signature);
      MutableMetaDataLoader mutable;
      if (retrieval != null)
      {
         mutable = getMutableMetaDataLoader(retrieval);
         if (mutable == null)
View Full Code Here

   {
      Controller controller = context.getController();
      if (controller instanceof KernelController)
      {
         KernelController kernelController = (KernelController) controller;
         MetaDataRetrieval result = kernelController.getKernel().getMetaDataRepository().createMetaDataRetrieval(context, retrievals);
         if (result != null)
            return result;
      }
      return super.createMetaDataRetrieval(context, retrievals);
   }
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

      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

     
      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 = new MemoryMetaDataLoader(thisScope);
            repository.addMetaDataRetrieval(retrieval);
         }
View Full Code Here

         throw new IllegalArgumentException("Null repository");
      if (context == null)
         throw new IllegalArgumentException("Null context");

      ScopeKey scopeKey = context.getMutableScope();
      MetaDataRetrieval retrieval = repository.getMetaDataRetrieval(scopeKey);
      if (retrieval == null)
      {
         retrieval = new MemoryMetaDataLoader(scopeKey);
         repository.addMetaDataRetrieval(retrieval);
      }
View Full Code Here

   public void start()
   {
      KernelMetaDataRepository kmdr = underlyingKernel.getMetaDataRepository();
      MutableMetaDataRepository mmdr = kmdr.getMetaDataRepository();
      ScopeKey scopeKey = new ScopeKey(scopes);
      MetaDataRetrieval retrieval = mmdr.getMetaDataRetrieval(scopeKey);
      // Not found create it
      if (retrieval == null)
      {
         retrieval = new MemoryMetaDataLoader(scopeKey);
         mmdr.addMetaDataRetrieval(retrieval);
      }
      MutableMetaData mmd = (MutableMetaData)retrieval;
      // deploy against this kernel
      Kernel kernel = underlyingKernel;
      // Get the parent scope - if exists
      ScopeKey parent = scopeKey.getParent();
      if (parent != null)
      {
         MetaDataRetrieval pretrieval = mmdr.getMetaDataRetrieval(parent);
         MetaDataItem<Kernel> item = pretrieval.retrieveMetaData(Kernel.class);
         if (item != null)
            kernel = item.getValue();
      }
      // Create a scoped kernel Kernel
      Kernel scopedKernel = null;//new ScopedKernel(kernel);
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

      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

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.