congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
com.evolveum.midpoint.prism.util
Code IndexAdd Tabnine to your IDE (free)

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

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

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

public ObjectDelta<O> getDelta() {
  if (odo == null) {
    return null;
  }
  return odo.getObjectDelta();
}

origin: Evolveum/midpoint

public static void assertHasObject(PrismContainerValue<?> pcv, ItemPath path) {
  for (PrismValue value : getValues(pcv, path)) {
    assertHasObject((PrismReferenceValue) value);
  }
}
origin: Evolveum/midpoint

public <X> ItemDeltaItem<PrismPropertyValue<X>,PrismPropertyDefinition<X>> resolveStructuredProperty(
    ItemPath resolvePath, PrismPropertyDefinition outputDefinition, ItemPath outputPath,
    PrismContext prismContext) {
  ItemDeltaItem<PrismPropertyValue<Structured>,PrismPropertyDefinition<Structured>> thisIdi = (ItemDeltaItem<PrismPropertyValue<Structured>,PrismPropertyDefinition<Structured>>)this;
  PrismProperty<X> outputPropertyNew = resolveStructuredPropertyItem((PrismProperty<Structured>) thisIdi.getItemNew(), resolvePath, outputDefinition);
  PrismProperty<X> outputPropertyOld = resolveStructuredPropertyItem((PrismProperty<Structured>) thisIdi.getItemOld(), resolvePath, outputDefinition);
  PropertyDelta<X> outputDelta = resolveStructuredPropertyDelta((PropertyDelta<Structured>) thisIdi.getDelta(), resolvePath, outputDefinition, outputPath, prismContext);
  return new ItemDeltaItem<>(outputPropertyOld, outputDelta, outputPropertyNew);
}
origin: Evolveum/midpoint

protected void assertSituation(PrismObject<ShadowType> shadow, SynchronizationSituationType expectedSituation) {
  if (expectedSituation == null) {
    PrismAsserts.assertNoItem(shadow, ShadowType.F_SYNCHRONIZATION_SITUATION);
  } else {
    PrismAsserts.assertPropertyValue(shadow, ShadowType.F_SYNCHRONIZATION_SITUATION, expectedSituation);
  }
}
origin: Evolveum/midpoint

public static void resetPrismContext(PrismContextFactory newPrismContextFactory) throws SchemaException, SAXException, IOException {
  if (prismContextFactory == newPrismContextFactory) {
    // Exactly the same factory instance, nothing to do.
    return;
  }
  setFactory(newPrismContextFactory);
  resetPrismContext();
}
origin: Evolveum/midpoint

public ItemDeltaItem(ItemDeltaItem<V,D> idi) {
  super();
  this.itemOld = idi.getItemOld();
  this.itemNew = idi.getItemNew();
  this.delta = idi.getDelta();
}
origin: Evolveum/midpoint

protected void cloneTo(ProtectedDataType<T> cloned) {
  cloned.clearValue = CloneUtil.clone(clearValue);
  cloned.encryptedDataType = CloneUtil.clone(encryptedDataType);
  cloned.hashedDataType = CloneUtil.clone(hashedDataType);
  // content is virtual, there is no point in copying it
}
origin: Evolveum/midpoint

public PrismObject<O> getOldObject() {
  if (odo == null) {
    return null;
  }
  return odo.getOldObject();
}

origin: Evolveum/midpoint

public boolean isContainer() {
  Item<V,D> item = getAnyItem();
  if (item != null) {
    return item instanceof PrismContainer<?>;
  }
  if (getDelta() != null) {
    return getDelta() instanceof ContainerDelta<?>;
  }
  return false;
}
origin: Evolveum/midpoint

public ItemDeltaItem<V,D> clone() {
  ItemDeltaItem<V,D> clone = new ItemDeltaItem<>();
  copyValues(clone);
  return clone;
}
origin: Evolveum/midpoint

public PrismObject<O> getAnyObject() {
  if (odo == null) {
    return null;
  }
  return odo.getAnyObject();
}

origin: Evolveum/midpoint

  @Override
  public String toString() {
    return serializeQuietly(prismContext, object);
  }
};
origin: Evolveum/midpoint

public static <O extends Objectable> void setDeltaOldValue(PrismObject<O> oldObject, Collection<? extends ItemDelta> itemDeltas) {
  for(ItemDelta itemDelta: itemDeltas) {
    setDeltaOldValue(oldObject, itemDelta);
  }
}
origin: Evolveum/midpoint

public static void assertHasNoTargetName(PrismContainerValue<?> pcv, ItemPath path) {
  for (PrismValue value : getValues(pcv, path)) {
    PrismReferenceValue prv = (PrismReferenceValue) value;
    assertHasNoTargetName(prv);
  }
}
origin: Evolveum/midpoint

public static void assertHasTargetName(PrismContainerValue<?> pcv, ItemPath path) {
  for (PrismValue value : getValues(pcv, path)) {
    PrismReferenceValue prv = (PrismReferenceValue) value;
    assertHasTargetName(prv);
  }
}
origin: Evolveum/midpoint

public static void assertHasNoObject(PrismContainerValue<?> pcv, ItemPath path) {
  for (PrismValue value : getValues(pcv, path)) {
    assertHasNoObject((PrismReferenceValue) value);
  }
}
origin: Evolveum/midpoint

private static Object normalizeValuesToDelete(Object root) {
  if (root instanceof ObjectDeltaObject<?>) {
    return ((ObjectDeltaObject<?>) root).normalizeValuesToDelete(true);
  } else if (root instanceof ItemDeltaItem<?, ?>) {
    // TODO normalize as well
    return root;
  } else {
    return root;
  }
}
origin: Evolveum/midpoint

  @Override
  public void visit(Visitable visitable) {
    if (visitable != null && visitable instanceof Item) {
      assertNotEmpty((Item<?,?>)visitable);
    }
  }
};
origin: Evolveum/midpoint

public boolean isProperty() {
  Item<V,D> item = getAnyItem();
  if (item != null) {
    return item instanceof PrismProperty<?>;
  }
  if (getDelta() != null) {
    return getDelta() instanceof PropertyDelta<?>;
  }
  return false;
}
com.evolveum.midpoint.prism.util

Most used classes

  • PrismTestUtil
    Class that statically instantiates the prism contexts and provides convenient static version of the
  • PrismAsserts
    Set of prism-related asserts. DO NOT use this in the main code. Although it is placed in "main" for
  • CloneUtil
  • PrismUtil
    TODO clean this up as it is part of prism-api!
  • ObjectDeltaObject
    A class defining old object state (before change), delta (change) and new object state (after change
  • JavaTypeConverter,
  • DefinitionUtil,
  • ItemPathTypeUtil,
  • PrismPrettyPrinter,
  • PrismContextFactory,
  • PrismMonitor
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