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

How to use
getCode
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.getCode (Showing top 9 results out of 315)

origin: Evolveum/midpoint

private String formatCode() {
  return DebugUtil.excerpt(scriptType.getCode().replaceAll("[\\s\\r\\n]+", " "), MAX_CODE_CHARS);
}
origin: Evolveum/midpoint

/**
 * 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());
}
origin: Evolveum/midpoint

/**
 * 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;
  }
}
origin: Evolveum/midpoint

private String getTooltipString() {
  ExpressionType expression = getMapping().getExpression();
  if (expression == null || expression.getExpressionEvaluator().isEmpty()) {
    return "asIs";
  }
  JAXBElement<?> evalElement = expression.getExpressionEvaluator().get(0);
  Object eval = evalElement.getValue();
  if (QNameUtil.match(evalElement.getName(), SchemaConstants.C_VALUE)) {
    return getStringConstant(eval);
  } else if (eval instanceof AsIsExpressionEvaluatorType) {
    return "asIs";
  } else if (eval instanceof ScriptExpressionEvaluatorType) {
    return ((ScriptExpressionEvaluatorType) eval).getCode();
  } else if (eval instanceof ItemPathType) {
    return String.valueOf(((ItemPathType) eval).getItemPath());
  } else {
    return "";
  }
}
origin: Evolveum/midpoint

String codeString = expressionType.getCode();
if (codeString == null) {
  throw new ExpressionEvaluationException("No script code in " + contextDescription);
origin: Evolveum/midpoint

@Test
public void testParseExpressionFromJaxb() throws SchemaException, SAXException, IOException, JAXBException {
  PrismContext prismContext = PrismTestUtil.getPrismContext();
  RoleType roleType = PrismTestUtil.parseObjectable(new File(TestConstants.COMMON_DIR, "role.xml"), RoleType.class);
  // WHEN
  PrismObject<RoleType> role = roleType.asPrismObject();
  role.revive(prismContext);
  // THEN
  System.out.println("Parsed role:");
  System.out.println(role.debugDump());
  role.checkConsistence();
  assertPropertyValue(role, RoleType.F_NAME, PrismTestUtil.createPolyString("r3"));
  PrismAsserts.assertEquals("Wrong number of approver expressions", 1, role.asObjectable().getApproverExpression().size());
  Object o = role.asObjectable().getApproverExpression().get(0).getExpressionEvaluator().get(0).getValue();
  PrismAsserts.assertEquals("Invalid evaluator type", ScriptExpressionEvaluatorType.class, o.getClass());
  String code = ((ScriptExpressionEvaluatorType) o).getCode();
  PrismAsserts.assertEquals("Incorrect code parsed", "midpoint.oid2ort(user.getOid())", code);
}
origin: Evolveum/midpoint

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;
}
origin: Evolveum/midpoint

lhsCode = this.getCode();
String rhsCode;
rhsCode = that.getCode();
if (!strategy.equals(LocatorUtils.property(thisLocator, "code", lhsCode), LocatorUtils.property(thatLocator, "code", rhsCode), lhsCode, rhsCode)) {
  return false;
origin: Evolveum/midpoint

String codeString = expressionType.getCode();
if (codeString == null) {
  throw new ExpressionEvaluationException("No script code in " + contextDescription);
com.evolveum.midpoint.xml.ns._public.common.common_3ScriptExpressionEvaluatorTypegetCode

Popular methods of ScriptExpressionEvaluatorType

    Popular in Java

    • Running tasks concurrently on multiple threads
    • getResourceAsStream (ClassLoader)
    • compareTo (BigDecimal)
    • orElseThrow (Optional)
      Return the contained value, if present, otherwise throw an exception to be created by the provided s
    • Kernel (java.awt.image)
    • Runnable (java.lang)
      Represents a command that can be executed. Often used to run code in a different Thread.
    • URL (java.net)
      A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
    • Iterator (java.util)
      An iterator over a sequence of objects, such as a collection.If a collection has been changed since
    • JLabel (javax.swing)
    • Response (javax.ws.rs.core)
      Defines the contract between a returned instance and the runtime when an application needs to provid
    • Top PhpStorm 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