public String toString() { return StylerUtils.style(attributes); } }
public String toString() { return StylerUtils.style(actions); } }
public String toString() { return StylerUtils.style(exceptionHandlers); } }
public String toString() { return StylerUtils.style(transitions); } }
public String toString() { return StylerUtils.style(parameters); } }
/** * Returns the array of flow execution listeners for specified flow. * @param flowDefinition the flow definition associated with the execution to be listened to * @return the flow execution listeners that apply */ public FlowExecutionListener[] getListeners(FlowDefinition flowDefinition) { Assert.notNull(flowDefinition, "The Flow to load listeners for cannot be null"); List<FlowExecutionListener> listenersToAttach = new LinkedList<>(); for (ConditionalFlowExecutionListenerHolder listenerHolder : listeners) { if (listenerHolder.listenerAppliesTo(flowDefinition)) { listenersToAttach.add(listenerHolder.getListener()); } } if (logger.isDebugEnabled()) { logger.debug("Loaded [" + listenersToAttach.size() + "] of possible " + listeners.size() + " listeners for this execution request for flow '" + flowDefinition.getId() + "', the listeners to attach are " + StylerUtils.style(listenersToAttach)); } return listenersToAttach.toArray(new FlowExecutionListener[listenersToAttach.size()]); }
/** * Lookup the identified state instance of this flow. * @param stateId the state id * @return the state * @throws IllegalArgumentException if the identified state cannot be found */ public State getStateInstance(String stateId) throws IllegalArgumentException { if (!StringUtils.hasText(stateId)) { throw new IllegalArgumentException("The specified stateId is invalid: state identifiers must be non-blank"); } for (State state : states) { if (state.getId().equals(stateId)) { return state; } } throw new IllegalArgumentException("Cannot find state with id '" + stateId + "' in flow '" + getId() + "' -- " + "Known state ids are '" + StylerUtils.style(getStateIds()) + "'"); }
public String toString() { return new ToStringCreator(this).append("flowIds", StylerUtils.style(flowIds)).toString(); } }
/** * Bind allowed parameters in the external context request parameter map to the form object using given binder. * @param context the action execution context, for accessing and setting data in "flow scope" or "request scope" * @param binder the data binder to use * @throws Exception when an unrecoverable exception occurs */ protected void doBind(RequestContext context, DataBinder binder) throws Exception { if (logger.isDebugEnabled()) { logger.debug("Binding allowed request parameters in " + StylerUtils.style(context.getExternalContext().getRequestParameterMap()) + " to form object with name '" + binder.getObjectName() + "', pre-bind formObject toString = " + binder.getTarget()); if (binder.getAllowedFields() != null && binder.getAllowedFields().length > 0) { logger.debug("(Allowed fields are " + StylerUtils.style(binder.getAllowedFields()) + ")"); } else { logger.debug("(Any field is allowed)"); } } binder.bind(new MutablePropertyValues(context.getRequestParameters().asMap())); if (logger.isDebugEnabled()) { logger.debug("Binding completed for form object with name '" + binder.getObjectName() + "', post-bind formObject toString = " + binder.getTarget()); logger.debug("There are [" + binder.getBindingResult().getErrorCount() + "] errors, details: " + binder.getBindingResult().getAllErrors()); } }
/** * Add given state definition to this flow definition. Marked protected, as this method is to be called by the * (privileged) state definition classes themselves during state construction as part of a FlowBuilder invocation. * @param state the state to add * @throws IllegalArgumentException when the state cannot be added to the flow; for instance if another state shares * the same id as the one provided or if given state already belongs to another flow */ protected void add(State state) throws IllegalArgumentException { if (this != state.getFlow() && state.getFlow() != null) { throw new IllegalArgumentException("State " + state + " cannot be added to this flow '" + getId() + "' -- it already belongs to a different flow: '" + state.getFlow().getId() + "'"); } if (this.states.contains(state) || this.containsState(state.getId())) { throw new IllegalArgumentException("This flow '" + getId() + "' already contains a state with id '" + state.getId() + "' -- state ids must be locally unique to the flow definition; " + "existing state-ids of this flow include: " + StylerUtils.style(getStateIds())); } boolean firstAdd = states.isEmpty(); states.add(state); if (firstAdd) { setStartState(state); } }
+ getFlow().getId() + "'; transitions must be defined to handle action result outcomes -- " + "possible flow configuration error? Note: the eventIds signaled were: '" + StylerUtils.style(eventIds) + "', while the supported set of transitional criteria for this action state is '" + StylerUtils.style(getTransitionSet().getTransitionCriterias()) + "'"); } else { throw new IllegalStateException(
/** * Signals that the method with the specified signature could not be invoked with the provided arguments. * @param methodSignature the method signature * @param arguments the arguments * @param cause the root cause */ public MethodInvocationException(MethodSignature methodSignature, Object[] arguments, Throwable cause) { super("Unable to invoke method " + methodSignature + " with arguments " + StylerUtils.style(arguments), cause); this.methodSignature = methodSignature; this.arguments = arguments; }
/** * Creates an exception indicating a flow definition could not be found. * @param flowId the flow id * @param availableFlowIds all flow ids available to the locator generating this exception */ public NoSuchFlowDefinitionException(String flowId, String[] availableFlowIds) { super("No such flow definition with id '" + flowId + "' found; the flows available are: " + StylerUtils.style(availableFlowIds)); this.flowId = flowId; }
/** * Signals that the method with the specified signature could not be invoked with the provided arguments. * @param methodSignature the method signature * @param arguments the arguments * @param cause the root cause */ public MethodInvocationException(MethodSignature methodSignature, Object[] arguments, Throwable cause) { super("Unable to invoke method " + methodSignature + " with arguments " + StylerUtils.style(arguments), cause); this.methodSignature = methodSignature; this.arguments = arguments; }
/** * Signals that the method with the specified signature could not be invoked with the provided arguments. * @param methodSignature the method signature * @param arguments the arguments * @param cause the root cause */ public MethodInvocationException(MethodSignature methodSignature, Object[] arguments, Throwable cause) { super("Unable to invoke method " + methodSignature + " with arguments " + StylerUtils.style(arguments), cause); this.methodSignature = methodSignature; this.arguments = arguments; }
public String toString() { return StylerUtils.style(actions); } }
public String toString() { return StylerUtils.style(parameters); } }
public BadRequestException(String uri, Map uriParameters, String requestMethod, String servletName) { super(CommonErrorCode.BAD_REQUEST, "No mapping found for HTTP request with [URI '" + uri + "', method '" + requestMethod + "', parameters " + StylerUtils.style(uriParameters) + "] in DispatcherServlet with name '" + servletName + "'"); this.uri = uri; this.uriParameters = uriParameters; this.requestMethod = requestMethod; this.servletName = servletName; }
public String toString() { return StylerUtils.style(attributes); } }
public String toString() { return StylerUtils.style(parameters); } }