public void merge(Model model) { ActionStateModel state = (ActionStateModel) model; setParent(null); setAttributes(merge(getAttributes(), state.getAttributes())); setSecured((SecuredModel) merge(getSecured(), state.getSecured())); setOnEntryActions(merge(getOnEntryActions(), state.getOnEntryActions(), false)); setExceptionHandlers(merge(getExceptionHandlers(), state.getExceptionHandlers())); setTransitions(merge(getTransitions(), state.getTransitions())); setOnExitActions(merge(getOnExitActions(), state.getOnExitActions(), false)); setActions(merge(getActions(), state.getActions(), false)); }
private void parseAndAddActionState(ActionStateModel state, Flow flow) { MutableAttributeMap<Object> attributes = parseMetaAttributes(state.getAttributes()); parseAndPutSecured(state.getSecured(), attributes); getLocalContext().getFlowArtifactFactory().createActionState(state.getId(), flow, parseActions(state.getOnEntryActions()), parseActions(state.getActions()), parseTransitions(state.getTransitions()), parseExceptionHandlers(state.getExceptionHandlers(), state.getTransitions()), parseActions(state.getOnExitActions()), attributes); }
public void testMerge() { ActionStateModel child = new ActionStateModel("child"); ActionStateModel parent = new ActionStateModel("parent"); LinkedList<AbstractActionModel> actions = new LinkedList<>(); EvaluateModel eval = new EvaluateModel("foo.bar"); actions.add(eval); parent.setActions(actions); parent.setSecured(new SecuredModel("secured")); child.merge(parent); assertNotNull(child.getSecured()); assertEquals("foo.bar", ((EvaluateModel) child.getActions().get(0)).getExpression()); }
public void merge(Model model) { ActionStateModel state = (ActionStateModel) model; setParent(null); setAttributes(merge(getAttributes(), state.getAttributes())); setSecured((SecuredModel) merge(getSecured(), state.getSecured())); setOnEntryActions(merge(getOnEntryActions(), state.getOnEntryActions(), false)); setExceptionHandlers(merge(getExceptionHandlers(), state.getExceptionHandlers())); setTransitions(merge(getTransitions(), state.getTransitions())); setOnExitActions(merge(getOnExitActions(), state.getOnExitActions(), false)); setActions(merge(getActions(), state.getActions(), false)); }
public void merge(Model model) { ActionStateModel state = (ActionStateModel) model; setParent(null); setAttributes(merge(getAttributes(), state.getAttributes())); setSecured((SecuredModel) merge(getSecured(), state.getSecured())); setOnEntryActions(merge(getOnEntryActions(), state.getOnEntryActions(), false)); setExceptionHandlers(merge(getExceptionHandlers(), state.getExceptionHandlers())); setTransitions(merge(getTransitions(), state.getTransitions())); setOnExitActions(merge(getOnExitActions(), state.getOnExitActions(), false)); setActions(merge(getActions(), state.getActions(), false)); }
private void parseAndAddActionState(ActionStateModel state, Flow flow) { MutableAttributeMap<Object> attributes = parseMetaAttributes(state.getAttributes()); parseAndPutSecured(state.getSecured(), attributes); getLocalContext().getFlowArtifactFactory().createActionState(state.getId(), flow, parseActions(state.getOnEntryActions()), parseActions(state.getActions()), parseTransitions(state.getTransitions()), parseExceptionHandlers(state.getExceptionHandlers(), state.getTransitions()), parseActions(state.getOnExitActions()), attributes); }
private void parseAndAddActionState(ActionStateModel state, Flow flow) { MutableAttributeMap attributes = parseMetaAttributes(state.getAttributes()); parseAndPutSecured(state.getSecured(), attributes); getLocalContext().getFlowArtifactFactory().createActionState(state.getId(), flow, parseActions(state.getOnEntryActions()), parseActions(state.getActions()), parseTransitions(state.getTransitions()), parseExceptionHandlers(state.getExceptionHandlers(), state.getTransitions()), parseActions(state.getOnExitActions()), attributes); }