Tabnine Logo
ScriptExpressionEvaluatorType.setCode
Code IndexAdd Tabnine to your IDE (free)

How to use
setCode
method
in
com.evolveum.midpoint.xml.ns._public.common.common_3.ScriptExpressionEvaluatorType

Best Java code snippets using com.evolveum.midpoint.xml.ns._public.common.common_3.ScriptExpressionEvaluatorType.setCode (Showing top 3 results out of 315)

origin: Evolveum/midpoint

public ScriptExpressionEvaluatorType code(String value) {
  setCode(value);
  return this;
}
origin: Evolveum/midpoint

private MappingType createCondition(String conditionName, char conditionType) {
  ScriptExpressionEvaluatorType script = new ScriptExpressionEvaluatorType();
  switch (conditionType) {
    case '+': script.setCode("basic.stringify(name) == 'jack1'"); break;
    case '-': script.setCode("basic.stringify(name) == 'jack'"); break;
    case '0': script.setCode("basic.stringify(name) == 'never there'"); break;
    case '!': script.setCode(createDumpConditionCode(conditionName)); break;
    default: throw new AssertionError(conditionType);
  }
  ExpressionType expression = new ExpressionType();
  expression.getExpressionEvaluator().add(new ObjectFactory().createScript(script));
  VariableBindingDefinitionType source = new VariableBindingDefinitionType();
  source.setPath(new ItemPathType(UserType.F_NAME));
  MappingType rv = new MappingType();
  rv.setName(conditionName);
  rv.setExpression(expression);
  rv.getSource().add(source);
  return rv;
}
origin: Evolveum/midpoint

private void createCustomConstruction(RoleType role, String name, int order) {
  ConstructionType c = new ConstructionType(prismContext);
  c.setDescription(name);
  c.setResourceRef(ObjectTypeUtil.createObjectRef(RESOURCE_DUMMY_EMPTY_OID, ObjectTypes.RESOURCE));
  ResourceAttributeDefinitionType nameDef = new ResourceAttributeDefinitionType();
  nameDef.setRef(new ItemPathType(ItemPath.create(new QName(SchemaConstants.NS_ICF_SCHEMA, "name"))));
  MappingType outbound = new MappingType();
  outbound.setName(name);
  ExpressionType expression = new ExpressionType();
  ScriptExpressionEvaluatorType script = new ScriptExpressionEvaluatorType();
  script.setCode(
       "import com.evolveum.midpoint.model.impl.lens.TestAssignmentProcessor2\n\n"
      + "TestAssignmentProcessor2.startCallback('" + name + "')\n"
      + "this.binding.variables.each {k,v -> TestAssignmentProcessor2.variableCallback(k, v, '" + name + "')}\n"
      + "TestAssignmentProcessor2.finishCallback('" + name + "')\n"
      + "return null");
  expression.getExpressionEvaluator().add(new ObjectFactory().createScript(script));
  outbound.setExpression(expression);
  nameDef.setOutbound(outbound);
  c.getAttribute().add(nameDef);
  AssignmentType a = new AssignmentType(prismContext);
  a.setDescription("Assignment for " + c.getDescription());
  a.setConstruction(c);
  addAssignmentOrInducement(role, order, a);
}
com.evolveum.midpoint.xml.ns._public.common.common_3ScriptExpressionEvaluatorTypesetCode

Popular methods of ScriptExpressionEvaluatorType

    Popular in Java

    • Making http requests using okhttp
    • getExternalFilesDir (Context)
    • getResourceAsStream (ClassLoader)
    • getOriginalFilename (MultipartFile)
      Return the original filename in the client's filesystem.This may contain path information depending
    • Component (java.awt)
      A component is an object having a graphical representation that can be displayed on the screen and t
    • Font (java.awt)
      The Font class represents fonts, which are used to render text in a visible way. A font provides the
    • MessageDigest (java.security)
      Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
    • DecimalFormat (java.text)
      A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
    • TreeSet (java.util)
      TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
    • Logger (org.apache.log4j)
      This is the central class in the log4j package. Most logging operations, except configuration, are d
    • Best IntelliJ plugins
    Tabnine Logo
    • Products

      Search for Java codeSearch for JavaScript code
    • IDE Plugins

      IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Tabnine for your IDE now