public ActionFieldFunction getFieldValue(int i) { return (ActionFieldFunction) this.getFieldValues()[i]; }
private RuleModel updateMethodCall(RuleModel model) { for (int i = 0; i < model.rhs.length; i++) { if (model.rhs[i] instanceof ActionCallMethod) { ActionCallMethod action = (ActionCallMethod) model.rhs[i]; // Check if method name is filled, if not this was made with an older Guvnor version if (action.getMethodName() == null || "".equals(action.getMethodName())) { if (action.getFieldValues() != null && action.getFieldValues().length >= 1) { action.setMethodName(action.getFieldValues()[0].getField()); action.setFieldValues(new ActionFieldValue[0]); action.setState(ActionCallMethod.TYPE_DEFINED); } } } } return model; } }
private DropDownData getEnums(String field) { return oracle.getEnums(getVariableType(), field, FieldNatureUtil.toMap(this.model.getFieldValues())); }
private DropDownData getEnums(String field) { return oracle.getEnums(getVariableType(), field, FieldNatureUtil.toMap(this.model.getFieldValues())); }
private ActionCallMethod visitActionCallMethod(ActionCallMethod acm) { ActionCallMethod clone = new ActionCallMethod(); clone.setVariable(acm.getVariable()); clone.setState(acm.getState()); clone.setMethodName(acm.getMethodName()); for (ActionFieldValue aff : acm.getFieldValues()) { clone.addFieldValue(cloneActionFieldFunction((ActionFieldFunction) aff)); } return clone; }
private ActionCallMethod visitActionCallMethod(ActionCallMethod acm) { ActionCallMethod clone = new ActionCallMethod(); clone.setVariable(acm.getVariable()); clone.setState(acm.getState()); clone.setMethodName(acm.getMethodName()); for (ActionFieldValue aff : acm.getFieldValues()) { clone.addFieldValue(cloneActionFieldFunction((ActionFieldFunction) aff)); } return clone; }
private void doLayout() { layout.clear(); layout.setWidget(0, 0, getSetterLabel()); FlexTable inner = new FlexTable(); for (int i = 0; i < model.getFieldValues().length; i++) { ActionFieldFunction val = model.getFieldValue(i); inner.setWidget(i, 0, typeLabel(val.getType())); inner.setWidget(i, 1, valueEditor(val)); } layout.setWidget(0, 1, inner); }
private void doLayout() { layout.clear(); layout.setWidget(0, 0, getSetterLabel()); FlexTable inner = new FlexTable(); for (int i = 0; i < model.getFieldValues().length; i++) { ActionFieldFunction val = model.getFieldValue(i); inner.setWidget(i, 0, typeLabel(val.getType())); inner.setWidget(i, 1, valueEditor(val)); } layout.setWidget(0, 1, inner); }
private ActionSetField clone(final ActionSetField action) { if (action instanceof ActionUpdateField) { final ActionUpdateField auf = (ActionUpdateField) action; final ActionUpdateField clone = new ActionUpdateField(auf.getVariable()); clone.setFieldValues(auf.getFieldValues()); return clone; } else if (action instanceof ActionCallMethod) { final ActionCallMethod acm = (ActionCallMethod) action; final ActionCallMethod clone = new ActionCallMethod(acm.getVariable()); clone.setState(acm.getState()); clone.setMethodName(acm.getMethodName()); clone.setFieldValues(acm.getFieldValues()); return clone; } else if (action instanceof ActionSetField) { final ActionSetField clone = new ActionSetField(action.getVariable()); clone.setFieldValues(action.getFieldValues()); return clone; } else { return action; } } }