use of org.springframework.webflow.engine.FlowExecutionExceptionHandler in project cas by apereo.
the class AbstractCasWebflowConfigurer method cloneActionState.
/**
* Clone action state.
*
* @param source the source
* @param target the target
*/
public void cloneActionState(final ActionState source, final ActionState target) {
source.getActionList().forEach(a -> target.getActionList().add(a));
source.getExitActionList().forEach(a -> target.getExitActionList().add(a));
source.getAttributes().asMap().forEach((k, v) -> target.getAttributes().put(k, v));
source.getTransitionSet().forEach(t -> target.getTransitionSet().addAll(t));
final Field field = ReflectionUtils.findField(target.getExceptionHandlerSet().getClass(), "exceptionHandlers");
ReflectionUtils.makeAccessible(field);
final List<FlowExecutionExceptionHandler> list = (List<FlowExecutionExceptionHandler>) ReflectionUtils.getField(field, target.getExceptionHandlerSet());
list.forEach(h -> source.getExceptionHandlerSet().add(h));
target.setDescription(source.getDescription());
target.setCaption(source.getCaption());
}
Aggregations