congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
ResourceEventDescription.getDelta
Code IndexAdd Tabnine to your IDE (free)

How to use
getDelta
method
in
com.evolveum.midpoint.provisioning.api.ResourceEventDescription

Best Java code snippets using com.evolveum.midpoint.provisioning.api.ResourceEventDescription.getDelta (Showing top 3 results out of 315)

origin: Evolveum/midpoint

  public PrismObject<ShadowType> getShadow() {
    PrismObject<ShadowType> shadow;
    if (getCurrentShadow() != null) {
      shadow = getCurrentShadow();
    } else if (getOldShadow() != null) {
      shadow = getOldShadow();
    } else if (getDelta() != null && getDelta().isAdd()) {
      if (getDelta().getObjectToAdd() == null) {
        throw new IllegalStateException("Found ADD delta, but no object to add was specified.");
      }
      shadow = getDelta().getObjectToAdd();
    } else {
      throw new IllegalStateException("Resource event description does not contain neither old shadow, nor current shadow, nor shadow in delta");
    }
    return shadow;
  }
}
origin: Evolveum/midpoint

private void applyDefinitions(ResourceEventDescription eventDescription,
    OperationResult parentResult) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, ExpressionEvaluationException {
  if (eventDescription.getCurrentShadow() != null){
    shadowCache.applyDefinition(eventDescription.getCurrentShadow(), parentResult);
  }
  if (eventDescription.getOldShadow() != null){
    shadowCache.applyDefinition(eventDescription.getOldShadow(), parentResult);
  }
  if (eventDescription.getDelta() != null){
    shadowCache.applyDefinition(eventDescription.getDelta(), null, parentResult);
  }
}
origin: Evolveum/midpoint

@Override
public void notifyEvent(ResourceEventDescription eventDescription, Task task, OperationResult parentResult) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ObjectNotFoundException, GenericConnectorException, ObjectAlreadyExistsException, ExpressionEvaluationException {
  Validate.notNull(eventDescription, "Event description must not be null.");
  Validate.notNull(task, "Task must not be null.");
  Validate.notNull(parentResult, "Operation result must not be null");
  LOGGER.trace("Received event notification with the description: {}", eventDescription.debugDump());
  if (eventDescription.getCurrentShadow() == null && eventDescription.getDelta() == null){
    throw new IllegalStateException("Neither current shadow, nor delta specified. It is required to have at least one of them specified.");
  }
  applyDefinitions(eventDescription, parentResult);
  PrismObject<ShadowType> shadow = null;
  shadow = eventDescription.getShadow();
  ProvisioningContext ctx = provisioningContextFactory.create(shadow, task, parentResult);
  ctx.assertDefinition();
  Collection<ResourceAttribute<?>> identifiers = ShadowUtil.getPrimaryIdentifiers(shadow);
  Change change = new Change(identifiers, eventDescription.getCurrentShadow(), eventDescription.getOldShadow(), eventDescription.getDelta());
  ObjectClassComplexTypeDefinition objectClassDefinition = ShadowUtil.getObjectClassDefinition(shadow);
  change.setObjectClassDefinition(objectClassDefinition);
  LOGGER.trace("Start to precess change: {}", change.toString());
  try {
    shadowCache.processChange(ctx, change, null, parentResult);
  } catch (EncryptionException e) {
    // TODO: better handling
    throw new SystemException(e.getMessage(), e);
  }
  LOGGER.trace("Change after processing {} . Start synchronizing.", change.toString());
  shadowCache.processSynchronization(ctx, change, parentResult);
}
com.evolveum.midpoint.provisioning.apiResourceEventDescriptiongetDelta

Popular methods of ResourceEventDescription

  • debugDump
  • getCurrentShadow
  • getOldShadow
  • <init>
  • getShadow
  • isProtected
  • setCurrentShadow
  • setDelta
  • setOldShadow
  • setSourceChannel

Popular in Java

  • Reactive rest calls using spring rest template
  • onCreateOptionsMenu (Activity)
  • getContentResolver (Context)
  • setScale (BigDecimal)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • JLabel (javax.swing)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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