Search in sources :

Example 1 with SetAction

use of org.springframework.webflow.action.SetAction in project cas by apereo.

the class SpringWebflowEndpoint method convertActionToString.

private static String convertActionToString(final Action action) {
    if (action instanceof EvaluateAction) {
        return convertEvaluateActionToString(action);
    }
    if (action instanceof AnnotatedAction) {
        val eval = (AnnotatedAction) action;
        if (eval.getTargetAction() instanceof EvaluateAction) {
            return convertEvaluateActionToString(eval.getTargetAction());
        }
        return eval.getTargetAction().toString();
    }
    if (action instanceof SetAction) {
        val expF = ReflectionUtils.findField(action.getClass(), "nameExpression");
        val resultExpF = ReflectionUtils.findField(action.getClass(), "valueExpression");
        return "set " + stringifyActionField(action, expF) + " = " + stringifyActionField(action, resultExpF);
    }
    return action.toString();
}
Also used : lombok.val(lombok.val) SetAction(org.springframework.webflow.action.SetAction) EvaluateAction(org.springframework.webflow.action.EvaluateAction) AnnotatedAction(org.springframework.webflow.execution.AnnotatedAction)

Aggregations

lombok.val (lombok.val)1 EvaluateAction (org.springframework.webflow.action.EvaluateAction)1 SetAction (org.springframework.webflow.action.SetAction)1 AnnotatedAction (org.springframework.webflow.execution.AnnotatedAction)1