Package org.jboss.metadata.spi.scope

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


   public void testIsParentNotDirectly() throws Exception
   {
      ScopeKey parent = new ScopeKey(testScope1);
      ScopeKey test = new ScopeKey();
      test.addScope(testScope1);
      test.addScope(testScope2);
      test.addScope(testScope3);
      assertFalse(parent.isParent(test));
   }
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

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

            // handle custom annotations
View Full Code Here

   {
      ControllerContext context = install(scope, app, deployment, id);

      ScopeKey scopeKey = new ScopeKey();
      if (app != null)
         scopeKey.addScope(CommonLevels.APPLICATION, app);
      if (deployment != null)
         scopeKey.addScope(CommonLevels.DEPLOYMENT, deployment);
      if (id > 0)
         scopeKey.addScope(CommonLevels.INSTANCE, "id-" + id);
View Full Code Here

      ScopeKey scopeKey = new ScopeKey();
      if (app != null)
         scopeKey.addScope(CommonLevels.APPLICATION, app);
      if (deployment != null)
         scopeKey.addScope(CommonLevels.DEPLOYMENT, deployment);
      if (id > 0)
         scopeKey.addScope(CommonLevels.INSTANCE, "id-" + id);

      SearchInfo searchInfo = new ScopeKeySearchInfo(scopeKey);
      GraphController gc = (GraphController)getController();
View Full Code Here

      if (app != null)
         scopeKey.addScope(CommonLevels.APPLICATION, app);
      if (deployment != null)
         scopeKey.addScope(CommonLevels.DEPLOYMENT, deployment);
      if (id > 0)
         scopeKey.addScope(CommonLevels.INSTANCE, "id-" + id);

      SearchInfo searchInfo = new ScopeKeySearchInfo(scopeKey);
      GraphController gc = (GraphController)getController();
      ControllerContext lookup = gc.getContext("bean", null, searchInfo);
      assertSame(context, lookup);
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);

            // handle custom annotations
View Full Code Here

   {
      if (name == null)
         throw new IllegalArgumentException("Null scope");

      ScopeKey scopeKey = ScopeKey.DEFAULT_SCOPE.clone();
      scopeKey.addScope(CommonLevels.INSTANCE, name.toString());
      if (className != null)
         scopeKey.addScope(CommonLevels.CLASS, className);
      // todo - some other level
      scopeKey.addScope(CommonLevels.WORK, String.valueOf(hashCode()));
      setScope(scopeKey);
View Full Code Here

         throw new IllegalArgumentException("Null scope");

      ScopeKey scopeKey = ScopeKey.DEFAULT_SCOPE.clone();
      scopeKey.addScope(CommonLevels.INSTANCE, name.toString());
      if (className != null)
         scopeKey.addScope(CommonLevels.CLASS, className);
      // todo - some other level
      scopeKey.addScope(CommonLevels.WORK, String.valueOf(hashCode()));
      setScope(scopeKey);
      setMutableScope(new ScopeKey(CommonLevels.INSTANCE, name.toString()));
   }
View Full Code Here

      ScopeKey scopeKey = ScopeKey.DEFAULT_SCOPE.clone();
      scopeKey.addScope(CommonLevels.INSTANCE, name.toString());
      if (className != null)
         scopeKey.addScope(CommonLevels.CLASS, className);
      // todo - some other level
      scopeKey.addScope(CommonLevels.WORK, String.valueOf(hashCode()));
      setScope(scopeKey);
      setMutableScope(new ScopeKey(CommonLevels.INSTANCE, name.toString()));
   }
  
   /**
 
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.