private DecisionStateModel parseDecisionState(Element element) { DecisionStateModel state = new DecisionStateModel(element.getAttribute("id")); state.setParent(element.getAttribute("parent")); state.setIfs(parseIfs(element)); state.setOnExitActions(parseOnExitActions(element)); state.setAttributes(parseAttributes(element)); state.setSecured(parseSecured(element)); state.setOnEntryActions(parseOnEntryActions(element)); state.setExceptionHandlers(parseExceptionHandlers(element)); return state; }
public void merge(Model model) { DecisionStateModel state = (DecisionStateModel) 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())); setIfs(merge(getIfs(), state.getIfs())); setOnExitActions(merge(getOnExitActions(), state.getOnExitActions(), false)); }
private void parseAndAddDecisionState(DecisionStateModel state, Flow flow) { MutableAttributeMap<Object> attributes = parseMetaAttributes(state.getAttributes()); parseAndPutSecured(state.getSecured(), attributes); getLocalContext().getFlowArtifactFactory().createDecisionState(state.getId(), flow, parseActions(state.getOnEntryActions()), parseIfs(state.getIfs()), parseExceptionHandlers(state.getExceptionHandlers(), null), parseActions(state.getOnExitActions()), attributes); }
public Model createCopy() { DecisionStateModel copy = new DecisionStateModel(getId()); super.fillCopy(copy); copy.setIfs(copyList(ifs)); copy.setOnExitActions(copyList(onExitActions)); return copy; }
public void testMerge() { DecisionStateModel child = new DecisionStateModel("child"); DecisionStateModel parent = new DecisionStateModel("child"); parent.setSecured(new SecuredModel("secured")); LinkedList<IfModel> ifs = new LinkedList<>(); ifs.add(new IfModel("test", "foo")); parent.setIfs(ifs); child.merge(parent); assertNotNull(child.getSecured()); assertNotNull("test", child.getIfs().get(0).getTest()); }
public void testNotMergeable() { DecisionStateModel child = new DecisionStateModel("child"); DecisionStateModel parent = new DecisionStateModel("parent"); assertFalse(child.isMergeableWith(parent)); }
public void testMergeStates() { FlowModel child = new FlowModel(); child.setStates(asList(new ViewStateModel("view"), new EndStateModel("end"))); FlowModel parent = new FlowModel(); ViewStateModel view = new ViewStateModel("view"); view.setView("jsp"); parent.setStates(asList(view, new DecisionStateModel("decider"), new ActionStateModel("action"))); child.merge(parent); assertEquals(4, child.getStates().size()); assertEquals("jsp", ((ViewStateModel) child.getStates().get(0)).getView()); }
public Model createCopy() { DecisionStateModel copy = new DecisionStateModel(getId()); super.fillCopy(copy); copy.setIfs(copyList(ifs)); copy.setOnExitActions(copyList(onExitActions)); return copy; }
public void testMergeable() { DecisionStateModel child = new DecisionStateModel("child"); assertTrue(child.isMergeableWith(child)); }
public void merge(Model model) { DecisionStateModel state = (DecisionStateModel) 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())); setIfs(merge(getIfs(), state.getIfs())); setOnExitActions(merge(getOnExitActions(), state.getOnExitActions(), false)); }
private DecisionStateModel parseDecisionState(Element element) { DecisionStateModel state = new DecisionStateModel(element.getAttribute("id")); state.setParent(element.getAttribute("parent")); state.setIfs(parseIfs(element)); state.setOnExitActions(parseOnExitActions(element)); state.setAttributes(parseAttributes(element)); state.setSecured(parseSecured(element)); state.setOnEntryActions(parseOnEntryActions(element)); state.setExceptionHandlers(parseExceptionHandlers(element)); return state; }
private void parseAndAddDecisionState(DecisionStateModel state, Flow flow) { MutableAttributeMap<Object> attributes = parseMetaAttributes(state.getAttributes()); parseAndPutSecured(state.getSecured(), attributes); getLocalContext().getFlowArtifactFactory().createDecisionState(state.getId(), flow, parseActions(state.getOnEntryActions()), parseIfs(state.getIfs()), parseExceptionHandlers(state.getExceptionHandlers(), null), parseActions(state.getOnExitActions()), attributes); }
public void testNotMergeableWithNull() { DecisionStateModel child = new DecisionStateModel("child"); assertFalse(child.isMergeableWith(null)); }
public void merge(Model model) { DecisionStateModel state = (DecisionStateModel) 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())); setIfs(merge(getIfs(), state.getIfs())); setOnExitActions(merge(getOnExitActions(), state.getOnExitActions(), false)); }
private DecisionStateModel parseDecisionState(Element element) { DecisionStateModel state = new DecisionStateModel(element.getAttribute("id")); state.setParent(element.getAttribute("parent")); state.setIfs(parseIfs(element)); state.setOnExitActions(parseOnExitActions(element)); state.setAttributes(parseAttributes(element)); state.setSecured(parseSecured(element)); state.setOnEntryActions(parseOnEntryActions(element)); state.setExceptionHandlers(parseExceptionHandlers(element)); return state; }
private void parseAndAddDecisionState(DecisionStateModel state, Flow flow) { MutableAttributeMap attributes = parseMetaAttributes(state.getAttributes()); parseAndPutSecured(state.getSecured(), attributes); getLocalContext().getFlowArtifactFactory().createDecisionState(state.getId(), flow, parseActions(state.getOnEntryActions()), parseIfs(state.getIfs()), parseExceptionHandlers(state.getExceptionHandlers(), null), parseActions(state.getOnExitActions()), attributes); }