Package org.jboss.dependency.plugins

Examples of org.jboss.dependency.plugins.AbstractDependencyItem


      TestDelegate delegate = new TestDelegate("ReinstallTestRecursive");
      RecursiveControllerContext context = new RecursiveControllerContext(delegate, this);

      TestDelegate other = new TestDelegate("Other");
      TestControllerContext otherContext = new TestControllerContext(other);
      DependencyItem item = new AbstractDependencyItem(other.getName(), delegate.getName(), ControllerState.CREATE, ControllerState.CONFIGURED);
      otherContext.getDependencyInfo().addIDependOn(item);
      assertInstall(otherContext, ControllerState.CONFIGURED);

      assertInstall(context, ControllerState.INSTALLED);
      assertContext(otherContext, ControllerState.INSTALLED);
View Full Code Here


      TestDelegate other = new TestDelegate("Other ");
      for (int i = 0; i < delegates.length; ++i)
      {
         delegates[i] = new TestDelegate("InstallTestRecursive " + i);
         contexts[i] = new RecursiveControllerContext(delegates[i], this);
         DependencyItem item = new AbstractDependencyItem(delegates[i].getName(), other.getName(), ControllerState.CREATE, ControllerState.CONFIGURED);
         contexts[i].getDependencyInfo().addIDependOn(item);
         assertInstall(contexts[i], ControllerState.CONFIGURED);
      }
     
      TestControllerContext otherContext = new TestControllerContext(other);
View Full Code Here

            for(ControllerState whenRequired : getStateModel())
            {
               ControllerContext context = createControllerContext(method.getName());
               DependencyInfo info = context.getDependencyInfo();
               info.addDependsOnMe(ProxyDependencyItem.createDependencyInfo(method, i, whenRequired));
               DependencyItem beanDependency = new AbstractDependencyItem("bean", context.getName(), whenRequired, null);
               bean.getDependencyInfo().addIDependOn(beanDependency);
               ControllerState previous = getStateModel().getPreviousState(whenRequired);
               if (previous == null)
                  previous = ControllerState.INSTALLED;
               install(bean);
               assertEquals(previous, bean.getState());
               install(context);
               ControllerState state = context.getState();
               assertTrue(context.getName().toString(), ControllerState.ERROR.equals(state) || ControllerState.INSTALLED.equals(state));
               if (ControllerState.INSTALLED.equals(state))
                  assertEquals(ControllerState.INSTALLED, bean.getState());
               else
                  assertEquals(previous, bean.getState());                 
               uninstall(context);
               if (beanDependency.isResolved())
               {
                  Throwable t = context.getError();
                  if (t != null)
                  {
                     StackTraceElement[] elements = t.getStackTrace();
View Full Code Here

      }
      DependencyInfo dependencyInfo = realCtx.getDependencyInfo();
      assertNotNull(dependencyInfo);
      try
      {
         dependencyInfo.addIDependOn(new AbstractDependencyItem());
      }
      catch(Throwable t)
      {
         assertUnsupported(t);
      }
View Full Code Here

   }

   protected List<? extends MetaDataVisitorNode> internalApplyAnnotation(ClassInfo info, MetaData retrieval, SuperDemand annotation, KernelControllerContext context) throws Throwable
   {
      DependencyInfo di = context.getDependencyInfo();
      DependencyItem item = new AbstractDependencyItem(context.getName(), annotation.demand(), new ControllerState(annotation.whenRequired()), new ControllerState(annotation.dependentState()));
      di.addIDependOn(item);
      return null;
   }
View Full Code Here

*/
public class SecurityDomainDependencyFactory
{
   public DependencyItem createDependencyItem(SecurityDomain annotation, Dependency dependency)
   {
      return new AbstractDependencyItem(annotation.domain(), dependency.name(), ControllerState.INSTANTIATED, null);
   }
View Full Code Here

      ControllerContext context = controller.getContext(name, null);
      if (context == null)
         throw new IllegalArgumentException("Cannot find context: " + name);
     
      DependencyInfo di = context.getDependencyInfo();
      DependencyItem item = new AbstractDependencyItem(context.getName(), demand, new ControllerState(whenRequired), new ControllerState(dependentState));
      di.addIDependOn(item);
   }
View Full Code Here

      if (isInnerBean)
      {
         Object name = ctx.getName();
         Object iDependOn = getUnderlyingValue();
         ControllerState whenRequired = visitor.getContextState();
         DependencyItem di = new AbstractDependencyItem(name, iDependOn, whenRequired, ControllerState.INSTALLED);
         visitor.addDependency(di);
      }
      super.initialVisit(visitor);
   }
View Full Code Here

         if (whenRequired == null)
         {
            whenRequired = visitor.getContextState();
         }

         DependencyItem item = new AbstractDependencyItem(name, iDependOn, whenRequired, dependentState);
         visitor.addDependency(item);
      }
      super.initialVisit(visitor);
   }
View Full Code Here

         dependent = new ControllerState(dependentState);
     
      DependencyInfo di = targetControllerContext.getDependencyInfo();
      for (Object dependency : dependencies)
      {
         DependencyItem item = new AbstractDependencyItem(targetName, dependency, whenRequired, dependent);
         di.addIDependOn(item);
      }
   }
View Full Code Here

TOP

Related Classes of org.jboss.dependency.plugins.AbstractDependencyItem

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.