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)); }
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 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()); }