whenRequired = ac.indexState(req); dependentState = ac.indexState(dep);
/** * Index and optimize the controller state for the current controller * * @param the state * @return the indexed state */ protected ControllerState indexState(ControllerState state) { if (controller == null || controller instanceof AbstractController == false || state.equals(ControllerState.ERROR)) return state; return ((AbstractController)controller).indexState(state); } }
public void change(ControllerContext context, ControllerState state) throws Throwable { boolean trace = log.isTraceEnabled(); if (context == null) throw new IllegalArgumentException("Null context"); if (state == null) throw new IllegalArgumentException("Null state"); change(context, indexState(state), trace); }
/** * Create an abstract controller */ public AbstractController() { addState(ControllerState.NOT_INSTALLED, null); addState(ControllerState.PRE_INSTALL, null); addState(ControllerState.DESCRIBED, null); addState(ControllerState.INSTANTIATED, null); addState(ControllerState.CONFIGURED, null); addState(ControllerState.CREATE, null); addState(ControllerState.START, null); addState(ControllerState.INSTALLED, null); indexedInstalledState = indexState(ControllerState.INSTALLED); registry = createContextRegistry(); }
context.setRequiredState(underlyingController.indexState(context.getRequiredState()));