Tabnine Logo
ObjectDeltaObject.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
com.evolveum.midpoint.prism.util.ObjectDeltaObject
constructor

Best Java code snippets using com.evolveum.midpoint.prism.util.ObjectDeltaObject.<init> (Showing top 20 results out of 315)

origin: Evolveum/midpoint

public static <O extends ObjectType> AuthorizationParameters<O,ObjectType> buildObjectDelete(PrismObject<O> object) {
  // TODO: Do we need to create delta here?
  ObjectDeltaObject<O> odo = new ObjectDeltaObject<>(object, null, null);
  return new AuthorizationParameters<>(odo, null, null, null);
}

origin: Evolveum/midpoint

public static <O extends ObjectType> AuthorizationParameters<O,ObjectType> buildObjectAdd(PrismObject<O> object) {
  // TODO: Do we need to create delta here?
  ObjectDeltaObject<O> odo = new ObjectDeltaObject<>(null, null, object);
  return new AuthorizationParameters<>(odo, null, null, null);
}

origin: Evolveum/midpoint

public static <O extends ObjectType> AuthorizationParameters<O,ObjectType> buildObject(PrismObject<O> object) {
  ObjectDeltaObject<O> odo = new ObjectDeltaObject<>(object, null, object);
  return new AuthorizationParameters<>(odo, null, null, null);
}

origin: Evolveum/midpoint

public static <O extends ObjectType> AuthorizationParameters<O,ObjectType> buildObjectDelta(PrismObject<O> object, ObjectDelta<O> delta) throws SchemaException {
  ObjectDeltaObject<O> odo;
  if (delta != null && delta.isAdd()) {
    odo = new ObjectDeltaObject<>(null, delta, object);
  } else {
    odo = new ObjectDeltaObject<>(object, delta, null);
    odo.recomputeIfNeeded(false);
  }
  return new AuthorizationParameters<>(odo, null, null, null);
}
origin: Evolveum/midpoint

public static <IV extends PrismValue, ID extends ItemDefinition> ItemDeltaItem<IV, ID> toItemDeltaItem(
    Object object, ObjectResolver objectResolver, String string, OperationResult result) {
  if (object == null) {
    return null;
  }
  if (object instanceof ItemDeltaItem<?, ?>) {
    return (ItemDeltaItem<IV, ID>) object;
  }
  if (object instanceof PrismObject<?>) {
    return (ItemDeltaItem<IV, ID>) new ObjectDeltaObject((PrismObject<?>) object, null,
        (PrismObject<?>) object);
  } else if (object instanceof Item<?, ?>) {
    return new ItemDeltaItem<>((Item<IV, ID>) object, null, (Item<IV, ID>) object);
  } else if (object instanceof ItemDelta<?, ?>) {
    return new ItemDeltaItem<>(null, (ItemDelta<IV, ID>) object, null);
  } else {
    throw new IllegalArgumentException("Unexpected object " + object + " " + object.getClass());
  }
}
origin: Evolveum/midpoint

public static <T extends Objectable> ObjectDeltaObject<T> create(PrismObject<T> oldObject, ObjectDelta<T> delta) throws SchemaException {
  PrismObject<T> newObject = oldObject.clone();
  delta.applyTo(newObject);
  return new ObjectDeltaObject<>(oldObject, delta, newObject);
}
origin: Evolveum/midpoint

public ObjectDeltaObject<O> clone() {
  ObjectDeltaObject<O> clone = new ObjectDeltaObject<>(
      CloneUtil.clone(oldObject),
      CloneUtil.clone(delta),
      CloneUtil.clone(newObject));
  // TODO what about the internals?
  return clone;
}
origin: Evolveum/midpoint

@Override
public ObjectDeltaObject<O> getObjectDeltaObject() throws SchemaException {
  return new ObjectDeltaObject<>(getObjectOld(), getDelta(), getObjectNew());
}
origin: Evolveum/midpoint

@Override
public ObjectDeltaObject<ShadowType> getObjectDeltaObject() throws SchemaException {
  return new ObjectDeltaObject<>(getObjectCurrent(), getDelta(), getObjectNew());
}
origin: Evolveum/midpoint

public AuthorizationParameters<O,T> build() throws SchemaException {
  if (odo == null) {
    if (oldObject == null && delta == null && newObject == null) {
      return new AuthorizationParameters<>(null, target, relation, orderConstraints);
    } else {
      ObjectDeltaObject<O> odo = new ObjectDeltaObject<>(oldObject, delta, newObject);
      odo.recomputeIfNeeded(false);
      return new AuthorizationParameters<>(odo, target, relation, orderConstraints);
    }
  } else {
    return new AuthorizationParameters<>(odo, target, relation, orderConstraints);
  }
}

origin: Evolveum/midpoint

protected AssignmentEvaluator<UserType> createAssignmentEvaluator() throws ObjectNotFoundException, SchemaException {
  PrismObject<UserType> userJack = userTypeJack.asPrismObject();
  ObjectDeltaObject<UserType> focusOdo = new ObjectDeltaObject<>(userJack, null, null);
  focusOdo.recompute();
  return createAssignmentEvaluator(focusOdo);
}
origin: Evolveum/midpoint

  private ObjectDeltaObject<?> createSourceContext(MappingEvaluationRequestType request, Task task,
      OperationResult result) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException {
    if (request.getSourceContext() == null) {
      return null;
    }
    MappingEvaluationSourceContextType ctx = request.getSourceContext();

    PrismObject<?> oldObject;
    if (ctx.getObject() != null) {
      oldObject = ctx.getObject().getValue().asPrismObject();
    } else if (ctx.getObjectRef() != null) {
      oldObject = objectResolver.resolve(ctx.getObjectRef(), ObjectType.class, null, "resolving default source", task, result).asPrismObject();
    } else {
      oldObject = null;
    }
    ObjectDelta<?> delta;
    if (ctx.getDelta() != null) {
      delta = DeltaConvertor.createObjectDelta(ctx.getDelta(), prismContext);
    } else {
      delta = null;
    }
    return new ObjectDeltaObject(oldObject, delta, null);
  }
}
origin: Evolveum/midpoint

private ExpressionVariables createVariablesOdo() throws SchemaException, IOException {
  ExpressionVariables variables = new ExpressionVariables();
  PrismObject<UserType> userOld = createUser();
  ObjectDelta<UserType> delta = PrismTestUtil.getPrismContext().deltaFactory().object().createModificationReplaceProperty(UserType.class,
      userOld.getOid(), UserType.F_FULL_NAME,
      PrismTestUtil.createPolyString("Captain Jack Sparrow"));
  ObjectDeltaObject<UserType> odo = new ObjectDeltaObject<>(userOld, delta, null);
  odo.recompute();
  variables.addVariableDefinition(ExpressionConstants.VAR_USER, odo);
  return variables;
}
origin: Evolveum/midpoint

ObjectDeltaObject<UserType> userOdo = new ObjectDeltaObject<>(userTypeJack.asPrismObject(), null, null);
userOdo.recompute();
AssignmentEvaluator<UserType> assignmentEvaluator = createAssignmentEvaluator(userOdo);
origin: Evolveum/midpoint

private <AH extends AssignmentHolderType> boolean isRuleConditionTrue(GlobalPolicyRuleType globalPolicyRule, PrismObject<AH> focus,
    EvaluatedAssignmentImpl<AH> evaluatedAssignment, LensContext<AH> context, Task task, OperationResult result)
    throws ExpressionEvaluationException, ObjectNotFoundException, SchemaException, SecurityViolationException, ConfigurationException, CommunicationException {
  MappingType condition = globalPolicyRule.getCondition();
  if (condition == null) {
    return true;
  }
  MappingImpl.Builder<PrismPropertyValue<Boolean>, PrismPropertyDefinition<Boolean>> builder = mappingFactory
      .createMappingBuilder();
  ObjectDeltaObject<AH> focusOdo = new ObjectDeltaObject<>(focus, null, focus);
  builder = builder.mappingType(condition)
      .contextDescription("condition in global policy rule " + globalPolicyRule.getName())
      .sourceContext(focusOdo)
      .defaultTargetDefinition(
          prismContext.definitionFactory().createPropertyDefinition(CONDITION_OUTPUT_NAME, DOMUtil.XSD_BOOLEAN))
      .addVariableDefinition(ExpressionConstants.VAR_USER, focusOdo)
      .addVariableDefinition(ExpressionConstants.VAR_FOCUS, focusOdo)
      .addVariableDefinition(ExpressionConstants.VAR_TARGET, evaluatedAssignment != null ? evaluatedAssignment.getTarget() : null)
      .addVariableDefinition(ExpressionConstants.VAR_EVALUATED_ASSIGNMENT, evaluatedAssignment)
      .addVariableDefinition(ExpressionConstants.VAR_ASSIGNMENT, evaluatedAssignment != null ? evaluatedAssignment.getAssignmentType() : null)
      .rootNode(focusOdo);
  MappingImpl<PrismPropertyValue<Boolean>, PrismPropertyDefinition<Boolean>> mapping = builder.build();
  mappingEvaluator.evaluateMapping(mapping, context, task, result);
  PrismValueDeltaSetTriple<PrismPropertyValue<Boolean>> conditionTriple = mapping.getOutputTriple();
  return conditionTriple != null && ExpressionUtil.computeConditionResult(conditionTriple.getNonNegativeValues());	// TODO: null -> true (in the method) - ok?
}
//endregion
origin: Evolveum/midpoint

ObjectDeltaObject<UserType> userOdo = new ObjectDeltaObject<>(userTypeJack.asPrismObject(), null, null);
userOdo.recompute();
origin: Evolveum/midpoint

ObjectDeltaObject<F> focusOdo = new ObjectDeltaObject<>(null, focus.createAddDelta(), focus);
ObjectDelta<T> targetDelta = target.createAddDelta();
origin: Evolveum/midpoint

ObjectDeltaObject<UserType> userOdo = new ObjectDeltaObject<>(userTypeJack.asPrismObject(), null, null);
userOdo.recompute();
origin: Evolveum/midpoint

ObjectDeltaObject<UserType> userOdo = new ObjectDeltaObject<>(userTypeJack.asPrismObject(), null, null);
userOdo.recompute();
origin: Evolveum/midpoint

assignmentType.setActivation(ActivationUtil.createDisabled());
ObjectDeltaObject<UserType> userOdo = new ObjectDeltaObject<>(userTypeJack.asPrismObject(), null, null);
userOdo.recompute();
com.evolveum.midpoint.prism.utilObjectDeltaObject<init>

Popular methods of ObjectDeltaObject

  • getObjectDelta
  • getOldObject
  • getNewObject
  • getAnyObject
  • clone
  • equals
  • findIdi
  • hashCode
  • recompute
  • create
  • dumpObject
  • getDefinition
  • dumpObject,
  • getDefinition,
  • hasAnyObject,
  • normalizeValuesToDelete,
  • recomputeIfNeeded,
  • update

Popular in Java

  • Parsing JSON documents to java classes using gson
  • compareTo (BigDecimal)
  • scheduleAtFixedRate (Timer)
  • setScale (BigDecimal)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • Permission (java.security)
    Legacy security code; do not use.
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Table (org.hibernate.mapping)
    A relational table
  • Top plugins for WebStorm
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