Package org.jboss.metadata.spi.scope

Examples of org.jboss.metadata.spi.scope.ScopeKey.addScope()


      {
         if (scope == null)
         {
            ScopeKey key = parent.getScope().clone();
            key.removeScopeLevel(CommonLevels.INSTANCE);
            key.addScope(CommonLevels.INSTANCE, bmd.getName());
         }
         return scope;
      }
     
      ScopeKey getMutableScope()
View Full Code Here


   }

   static ScopeKey createScope(String app, String dep)
   {
      ScopeKey result = ScopeKey.DEFAULT_SCOPE.clone();
      result.addScope(CommonLevels.APPLICATION, app);
      result.addScope(CommonLevels.DEPLOYMENT, dep);
      return result;
   }

}
View Full Code Here

   static ScopeKey createScope(String app, String dep)
   {
      ScopeKey result = ScopeKey.DEFAULT_SCOPE.clone();
      result.addScope(CommonLevels.APPLICATION, app);
      result.addScope(CommonLevels.DEPLOYMENT, dep);
      return result;
   }

}
View Full Code Here

   private MetaData setupMetaData(Class<?> clazz, Annotation...annotations)
   {
      MutableMetaDataRepository repository = new BasicMetaDataRepository();
     
      ScopeKey scopeKey = ScopeKey.DEFAULT_SCOPE.clone();
      scopeKey.addScope(CommonLevels.INSTANCE, "Test");
      scopeKey.addScope(CommonLevels.CLASS, clazz.getName());
      scopeKey.addScope(CommonLevels.WORK, String.valueOf(hashCode()));
      ScopeKey mutableScope = new ScopeKey(CommonLevels.INSTANCE, "Test".toString());
      MemoryMetaDataLoader mutable = new MemoryMetaDataLoader(mutableScope);
      repository.addMetaDataRetrieval(mutable);
View Full Code Here

   {
      MutableMetaDataRepository repository = new BasicMetaDataRepository();
     
      ScopeKey scopeKey = ScopeKey.DEFAULT_SCOPE.clone();
      scopeKey.addScope(CommonLevels.INSTANCE, "Test");
      scopeKey.addScope(CommonLevels.CLASS, clazz.getName());
      scopeKey.addScope(CommonLevels.WORK, String.valueOf(hashCode()));
      ScopeKey mutableScope = new ScopeKey(CommonLevels.INSTANCE, "Test".toString());
      MemoryMetaDataLoader mutable = new MemoryMetaDataLoader(mutableScope);
      repository.addMetaDataRetrieval(mutable);
      addClassAnnotations(clazz, mutable, annotations);
View Full Code Here

      MutableMetaDataRepository repository = new BasicMetaDataRepository();
     
      ScopeKey scopeKey = ScopeKey.DEFAULT_SCOPE.clone();
      scopeKey.addScope(CommonLevels.INSTANCE, "Test");
      scopeKey.addScope(CommonLevels.CLASS, clazz.getName());
      scopeKey.addScope(CommonLevels.WORK, String.valueOf(hashCode()));
      ScopeKey mutableScope = new ScopeKey(CommonLevels.INSTANCE, "Test".toString());
      MemoryMetaDataLoader mutable = new MemoryMetaDataLoader(mutableScope);
      repository.addMetaDataRetrieval(mutable);
      addClassAnnotations(clazz, mutable, annotations);
     
View Full Code Here

            // remove old context
            repository.removeMetaData(context);
            // create new scope key
            ScopeInfo scopeInfo = context.getScopeInfo();
            ScopeKey scopeKey = new ScopeKey(scopeInfo.getScope().getScopes());
            scopeKey.addScope(CommonLevels.CLASS, info.getClassInfo().getType());
            scopeInfo.setScope(scopeKey);
            // re-register
            repository.addMetaData(context);

            QualifiersMdrUtil.populateQualifiersForContext(context);
View Full Code Here

      }
      catch (ClassNotFoundException e)
      {
         throw new RuntimeException("Unable to load class: " + className + " for " + key, e);
      }
      key.addScope(new Scope(CommonLevels.CLASS, clazz));
      return key;
   }

   @Override
   public void updateMetaData(MutableMetaDataRepository repository, ControllerContext context, MutableMetaDataLoader mutable, boolean add)
View Full Code Here

         throw new IllegalArgumentException("Null context");
     
      DeploymentContext top = context.getTopLevel();
     
      ScopeKey result = ScopeKey.DEFAULT_SCOPE.clone();
      result.addScope(CommonLevels.APPLICATION, top.getName());
      result.addScope(CommonLevels.DEPLOYMENT, context.getName());
      return result;
   }

   public ScopeKey getMutableDeploymentScope(DeploymentContext context)
View Full Code Here

     
      DeploymentContext top = context.getTopLevel();
     
      ScopeKey result = ScopeKey.DEFAULT_SCOPE.clone();
      result.addScope(CommonLevels.APPLICATION, top.getName());
      result.addScope(CommonLevels.DEPLOYMENT, context.getName());
      return result;
   }

   public ScopeKey getMutableDeploymentScope(DeploymentContext context)
   {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.