Package org.jboss.metadata.spi

Examples of org.jboss.metadata.spi.MutableMetaData


         retrieval = new MemoryMetaDataLoader(ScopeKey.DEFAULT_SCOPE);
         repository.addMetaDataRetrieval(retrieval);
      }
      if (retrieval instanceof MutableMetaData)
      {
         MutableMetaData mmd = (MutableMetaData)retrieval;
         mmd.addMetaData(tracker, ContextTracker.class);
      }
      else
      {
         log.info("Cannot add/modify default scoped metadata: " + retrieval);
      }
View Full Code Here


      KernelMetaDataRepository kmdr = kernel.getMetaDataRepository();
      MutableMetaDataRepository repository = kmdr.getMetaDataRepository();
      MetaDataRetrieval retrieval = repository.getMetaDataRetrieval(ScopeKey.DEFAULT_SCOPE);
      if (retrieval != null && retrieval instanceof MutableMetaData)
      {
         MutableMetaData mmd = (MutableMetaData)retrieval;
         mmd.removeMetaData(ContextTracker.class);

         if (retrieval.isEmpty())
            repository.removeMetaDataRetrieval(retrieval.getScope());
      }
      else
View Full Code Here

    */
   protected abstract MetaDataRetrieval initComponentRetrieval(Signature signature);
  
   public <T extends Annotation> T addAnnotation(Signature signature, T annotation)
   {
      MutableMetaData component = initRetrieval(signature);
      return component.addAnnotation(annotation);
   }
View Full Code Here

      return component.addAnnotation(annotation);
   }

   public <T> T addMetaData(Signature signature, String name, T metaData, Class<T> type)
   {
      MutableMetaData component = initRetrieval(signature);
      return component.addMetaData(name, metaData, type);
   }
View Full Code Here

      return component.addMetaData(name, metaData, type);
   }

   public <T> T addMetaData(Signature signature, T metaData, Class<T> type)
   {
      MutableMetaData component = initRetrieval(signature);
      return component.addMetaData(metaData, type);
   }
View Full Code Here

      return component.addMetaData(metaData, type);
   }

   public <T extends Annotation> T removeAnnotation(Signature signature, Class<T> annotationType)
   {
      MutableMetaData component = initRetrieval(signature);
      return component.removeAnnotation(annotationType);
   }
View Full Code Here

      return component.removeAnnotation(annotationType);
   }

   public <T> T removeMetaData(Signature signature, Class<T> type)
   {
      MutableMetaData component = initRetrieval(signature);
      return component.removeMetaData(type);
   }
View Full Code Here

      return component.removeMetaData(type);
   }

   public <T> T removeMetaData(Signature signature, String name, Class<T> type)
   {
      MutableMetaData component = initRetrieval(signature);
      return component.removeMetaData(name, type);
   }
View Full Code Here

      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 = kernel;// TODO new ScopedKernel(kernel);

      mmd.addMetaData(scopedKernel, Kernel.class);

   }
View Full Code Here

      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);

      mmd.addMetaData(scopedKernel, Kernel.class);

   }
View Full Code Here

TOP

Related Classes of org.jboss.metadata.spi.MutableMetaData

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.