Package org.jboss.dependency.spi

Examples of org.jboss.dependency.spi.DependencyItem


      if (addDependencyItem())
      {
         Object name = context.getName();
         Object iDependOn = getUnderlyingValue();

         DependencyItem item;
         if (isSearchApplied())
         {
            item = new SearchDependencyItem(name, iDependOn, whenRequired, dependentState, search);
         }
         else
View Full Code Here


      ControllerState whenRequired = visitor.getContextState();
      ControllerState dependentState = state;
      if (dependentState == null)
         dependentState = ControllerState.INSTALLED;

      DependencyItem item = new SearchDependencyItem(name, iDependOn, whenRequired, dependentState, search);
      visitor.addDependency(item);

      super.describeVisit(visitor);
   }
View Full Code Here

                     ControllerState whenRequired = whenRequiredState;
                     if (whenRequired == null)
                     {
                        whenRequired = visitor.getContextState();
                     }
                     DependencyItem item = new SearchClassContextDependencyItem(
                           context.getName(),
                           injectionClass,
                           whenRequired,
                           dependentState,
                           search);
View Full Code Here

      if (state == null)
      {
         state = ControllerState.INSTALLED;
      }

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

   {
      context = visitor.getControllerContext();
      setValue(context.getName());
      ControllerState whenRequired = visitor.getContextState();

      DependencyItem item = new AbstractDependencyItem(getUnderlyingValue(), getUnderlyingValue(), whenRequired, ControllerState.INSTANTIATED);
      visitor.addDependency(item);

      super.initialVisit(visitor);
   }
View Full Code Here

      TestDelegate delegate = new TestDelegate("InstallTestRecursive");
      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 delegate = new TestDelegate("UninstallTestRecursive");
      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 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

TOP

Related Classes of org.jboss.dependency.spi.DependencyItem

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.