public MetaData internalExecute(ControllerContext context) { return context.getScopeInfo().getMetaData(); } }
protected void preAliasInstall(ControllerContext aliasContext) { ScopeInfo scopeInfo = aliasContext.getScopeInfo(); scopeInfo.setInstallScope(scopeKey); }
public ScopeKey internalExecute(ControllerContext context) { return context.getScopeInfo().getScope(); } }
/** * Get the controller context. * * @param name the context name * @param state the state * @return context or null if not found */ protected ControllerContext getContext(String name, ControllerState state) { return controller.getContext(name, state); }
public Object internalExecute(ControllerContext context) { // todo - change to actual id when impl return context.getName(); } }
public ControllerStateWrapper(MapControllerStateModel owner, ControllerState state, int index, ControllerStateWrapper before, ControllerStateWrapper after) { super(state.getStateString(), false); this.owner = owner; this.index = index; this.before = before; this.after = after; }
/** * Remove a dependency. * * @param item the dependency item. */ protected void removeDependsOnMe(RequirementDependencyItem item) { if (context == null) return; DependencyInfo dependencyInfo = context.getDependencyInfo(); dependencyInfo.removeDependsOnMe(item); }
/** * Register a dependency with another context * * @param controller the controller * @param context the other context */ protected void addDependsOnMe(Controller controller, ControllerContext context) { DependencyInfo info = context.getDependencyInfo(); if (info != null) info.addDependsOnMe(this); }
/** * See if the context has its dependencies resolved to move to the given state. * <p/> * This method must be invoked with the write lock taken * * @param ctx The context * @param state The state we want to move to * @return true if the dependencies are resolved */ private boolean resolveDependencies(ControllerContext ctx, ControllerState state) { DependencyInfo dependencies = ctx.getDependencyInfo(); return dependencies == null || dependencies.resolveDependencies(this, state); }
public ControllerState internalExecute(ControllerContext context) { return context.getState(); } }
/** * Get install scope key. * * @param context the context * @return install scope key */ protected ScopeKey getScopeKey(ControllerContext context) { ScopeInfo scopeInfo = context.getScopeInfo(); if (scopeInfo != null) return scopeInfo.getInstallScope(); return null; } }
public ScopeKey getMutableScope(ControllerContext context) { return context.getScopeInfo().getMutableScope(); }
@SuppressWarnings("unchecked") public Object cast(Object o, Class c) { return new ControllerState((String)o); } }
@SuppressWarnings("unchecked") public Object cast(Object o, Class c) { return Cardinality.toCardinality((String)o); } }
protected Set<CallbackItem<?>> getCallbacks(DependencyInfo dependency) { return dependency.getInstallItems(); }
/** * Create and register a new state instance. If a state instance already exists with the given name * return that instance * * @param stateString the name of the state * @return the state */ public static ControllerState newState(String stateString) { return getOrCreateState(stateString, true); }
/** * Create cardinality which ends at #end and starts at zero. * * @param end the right number of cardinality interval * @return cardinality * @see org.jboss.dependency.spi.Cardinality#createCardinality(int,int) */ public static Cardinality createLimitedCardinality(int end) { return createCardinality(0, end); }
public Object internalExecute(ControllerContext context) { return context.getName(); } }
public ScopeKey getFullScope(ControllerContext context) { return context.getScopeInfo().getScope(); }
@SuppressWarnings("unchecked") public Object cast(Object o, Class c) { return Cardinality.toCardinality((String)o); } }