private String getLanguage(ScriptExpressionEvaluatorType expressionType) { if (expressionType.getLanguage() != null) { return expressionType.getLanguage(); } return DEFAULT_LANGUAGE; }
/** * Creates a new {@code ScriptExpressionEvaluatorType} instance by deeply copying a given {@code ScriptExpressionEvaluatorType} instance. * * * @param o * The instance to copy. * @throws NullPointerException * if {@code o} is {@code null}. */ public ScriptExpressionEvaluatorType(final ScriptExpressionEvaluatorType o) { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 super(o); if (o == null) { throw new NullPointerException("Cannot create a copy of 'ScriptExpressionEvaluatorType' from 'null'."); } // CBuiltinLeafInfo: java.lang.String this.language = ((o.language == null)?null:o.getLanguage()); // CEnumLeafInfo: com.evolveum.midpoint.xml.ns._public.common.common_3.ScriptExpressionReturnTypeType this.returnType = ((o.returnType == null)?null:o.getReturnType()); // CBuiltinLeafInfo: java.lang.String this.code = ((o.code == null)?null:o.getCode()); }
} else if (eval instanceof ScriptExpressionEvaluatorType) { ScriptExpressionEvaluatorType script = (ScriptExpressionEvaluatorType) eval; if (script.getLanguage() == null) { return "groovy"; } else { return StringUtils.substringAfter(script.getLanguage(), "#");
/** * Creates and returns a deep copy of this object. * * * @return * A deep copy of this object. */ @Override public ScriptExpressionEvaluatorType clone() { { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 final ScriptExpressionEvaluatorType clone = ((ScriptExpressionEvaluatorType) super.clone()); // CBuiltinLeafInfo: java.lang.String clone.language = ((this.language == null)?null:this.getLanguage()); // CEnumLeafInfo: com.evolveum.midpoint.xml.ns._public.common.common_3.ScriptExpressionReturnTypeType clone.returnType = ((this.returnType == null)?null:this.getReturnType()); // CBuiltinLeafInfo: java.lang.String clone.code = ((this.code == null)?null:this.getCode()); return clone; } }
private ScriptExpression createScriptExpression(ScriptExpressionEvaluatorType expressionType, ItemDefinition outputDefinition, String shortDesc) throws ExpressionSyntaxException { ScriptExpression expression = new ScriptExpression(scriptExpressionfactory.getEvaluators().get(expressionType.getLanguage()), expressionType); expression.setOutputDefinition(outputDefinition); expression.setObjectResolver(scriptExpressionfactory.getObjectResolver()); expression.setFunctions(new ArrayList<>(scriptExpressionfactory.getFunctions())); return expression; }
private ScriptExpression createScriptExpression(ScriptExpressionEvaluatorType expressionType, ItemDefinition outputDefinition, String shortDesc) throws ExpressionSyntaxException { ScriptExpression expression = new ScriptExpression(scriptExpressionfactory.getEvaluators().get(expressionType.getLanguage()), expressionType); expression.setOutputDefinition(outputDefinition); expression.setObjectResolver(scriptExpressionfactory.getObjectResolver()); expression.setFunctions(new ArrayList<>(scriptExpressionfactory.getFunctions())); return expression; }
lhsLanguage = this.getLanguage(); String rhsLanguage; rhsLanguage = that.getLanguage(); if (!strategy.equals(LocatorUtils.property(thisLocator, "language", lhsLanguage), LocatorUtils.property(thatLocator, "language", rhsLanguage), lhsLanguage, rhsLanguage)) { return false;
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = super.hashCode(locator, strategy); { String theLanguage; theLanguage = this.getLanguage(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "language", theLanguage), currentHashCode, theLanguage); } { ScriptExpressionReturnTypeType theReturnType; theReturnType = this.getReturnType(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "returnType", theReturnType), currentHashCode, theReturnType); } { String theCode; theCode = this.getCode(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "code", theCode), currentHashCode, theCode); } return currentHashCode; }