private EndStateModel parseEndState(Element element) { EndStateModel state = new EndStateModel(element.getAttribute("id")); state.setParent(element.getAttribute("parent")); state.setView(element.getAttribute("view")); state.setCommit(element.getAttribute("commit")); state.setOutputs(parseOutputs(element)); state.setAttributes(parseAttributes(element)); state.setSecured(parseSecured(element)); state.setOnEntryActions(parseOnEntryActions(element)); state.setExceptionHandlers(parseExceptionHandlers(element)); return state; }
public void merge(Model model) { EndStateModel state = (EndStateModel) 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())); setView(merge(getView(), state.getView())); setCommit(merge(getCommit(), state.getCommit())); setOutputs(merge(getOutputs(), state.getOutputs(), false)); }
private EndStateModel parseEndState(Element element) { EndStateModel state = new EndStateModel(element.getAttribute("id")); state.setParent(element.getAttribute("parent")); state.setView(element.getAttribute("view")); state.setCommit(element.getAttribute("commit")); state.setOutputs(parseOutputs(element)); state.setAttributes(parseAttributes(element)); state.setSecured(parseSecured(element)); state.setOnEntryActions(parseOnEntryActions(element)); state.setExceptionHandlers(parseExceptionHandlers(element)); return state; }
private EndStateModel parseEndState(Element element) { EndStateModel state = new EndStateModel(element.getAttribute("id")); state.setParent(element.getAttribute("parent")); state.setView(element.getAttribute("view")); state.setCommit(element.getAttribute("commit")); state.setOutputs(parseOutputs(element)); state.setAttributes(parseAttributes(element)); state.setSecured(parseSecured(element)); state.setOnEntryActions(parseOnEntryActions(element)); state.setExceptionHandlers(parseExceptionHandlers(element)); return state; }
public void testFlowSecuredState() { EndStateModel end = new EndStateModel("end"); end.setSecured(new SecuredModel("ROLE_USER")); model.setStates(asList(end)); Flow flow = getFlow(model); SecurityRule rule = (SecurityRule) flow.getState("end").getAttributes() .get(SecurityRule.SECURITY_ATTRIBUTE_NAME); assertNotNull(rule); assertEquals(SecurityRule.COMPARISON_ANY, rule.getComparisonType()); assertEquals(1, rule.getAttributes().size()); assertTrue(rule.getAttributes().contains("ROLE_USER")); }
public void merge(Model model) { EndStateModel state = (EndStateModel) 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())); setView(merge(getView(), state.getView())); setCommit(merge(getCommit(), state.getCommit())); setOutputs(merge(getOutputs(), state.getOutputs(), false)); }
public void merge(Model model) { EndStateModel state = (EndStateModel) 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())); setView(merge(getView(), state.getView())); setCommit(merge(getCommit(), state.getCommit())); setOutputs(merge(getOutputs(), state.getOutputs(), false)); }