Examples of InvalidActionException


Examples of com.opensymphony.workflow.InvalidActionException

        if(!isActive())
        {
          if(getEntryState() == WorkflowEntry.UNKNOWN)
            throw new WorkflowException("The workflow with id " + workflowId + " is in an unknown state - the database could be down or the workflow corrupt");
          else
            throw new InvalidActionException("Workflow " + workflowId + " is no longer active");
        }
        if(currentWorkflows.contains(id))
        {
          throw new WorkflowException("The selected workflow is executing...");
        }
View Full Code Here

Examples of org.eurekastreams.commons.exceptions.InvalidActionException

        // determine request type
        String actionName = actionRewrites.containsKey(apiName) ? actionRewrites.get(apiName) : apiName;
        String requestType = actionTypes.get(actionName);
        if (requestType == null)
        {
            return new InvalidActionException(String.format("Request for unknown API '%s'.", actionName));
        }

        try
        {
            // get action parameter
View Full Code Here

Examples of org.eurekastreams.commons.exceptions.InvalidActionException

            }
            return serviceActionController.execute(actionContext, action);
        }
        else if (springBean == null)
        {
            throw new InvalidActionException(String.format("Unknown bean '%s'.", actionName));
        }
        else
        {
            throw new InvalidActionException(String.format("Bean '%s' is not an action.", actionName));
        }
    }
View Full Code Here

Examples of org.eurekastreams.commons.exceptions.InvalidActionException

     * Tests how exceptions are returned to client.
     */
    @Test
    public void testBadActionException()
    {
        Exception exIn = new InvalidActionException("Inner message");
        Exception exOut = coreForbidNestingExceptionTest(exIn);
        assertTrue(exOut instanceof GeneralException);
        assertTrue(exOut.getCause() == null || exOut.getCause() == exOut);
        assertTrue(!exOut.getMessage().equals(exIn.getMessage()));
    }
View Full Code Here

Examples of org.eurekastreams.commons.exceptions.InvalidActionException

        // In the future, have a SystemOnly property on actions that would define whether they can be executed where an
        // external source supplies the name of the action to execute. For non-SystemOnly authorizer-less actions, use
        // a controller-supplied default authorizer (probably isSystemAdmin).
        if (externalActionSelection && action.getAuthorizationStrategy() == null)
        {
            throw new InvalidActionException(
                    "Action must have an authorizer to run when external action selection is allowed.");
        }
        // Since there's no good way to tell if an action actually needs/uses a principal (just because it's a
        // ServiceAction doesn't mean it actually does anything with a principal), the check to prevent
        // principal-requiring actions from running where there is no principal has been omitted.
View Full Code Here

Examples of org.eurekastreams.commons.exceptions.InvalidActionException

                actionContext.setActionId(actionRequest.getActionKey());
                result = serviceActionController.execute(actionContext, action);
            }
            else
            {
                throw new InvalidActionException("Supplied bean is not an executable action.");
            }

            // //////////////////////////////////////////////
            // set the results to be passed back
View Full Code Here

Examples of org.eurekastreams.commons.exceptions.InvalidActionException

        // insure action is complete and valid for this controller
        if (inServiceAction.getValidationStrategy() == null || inServiceAction.getAuthorizationStrategy() == null
                || inServiceAction.getExecutionStrategy() == null)
        {
            logger.error("Action missing strategies.");
            throw new InvalidActionException("Action missing strategies.");
        }

        Serializable results = null;
        DefaultTransactionDefinition transDef = new DefaultTransactionDefinition();
        transDef.setName(inServiceAction.toString());
View Full Code Here

Examples of org.eurekastreams.commons.exceptions.InvalidActionException

        if (inTaskHandlerAction.getValidationStrategy() == null
                || inTaskHandlerAction.getAuthorizationStrategy() == null
                || inTaskHandlerAction.getExecutionStrategy() == null || inTaskHandlerAction.getTaskHandler() == null)
        {
            logger.error("Action missing strategies.");
            throw new InvalidActionException("Action missing strategies.");
        }

        Serializable results = null;
        DefaultTransactionDefinition transDef = new DefaultTransactionDefinition();
        transDef.setName(inTaskHandlerAction.toString());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.