@Override public GetOperationOptionsBuilder pointInTime(PointInTimeType value) { return forPaths(opts -> opts.setPointInTimeType(value)); }
/** * Specifies the point in time for the returned data. This option controls whether fresh or cached data will * be returned or whether future data projection will be returned. MidPoint usually deals with fresh data * that describe situation at the current point in time. But the client code may want to get data from the * cache that may be possibly stale. Or the client code may want a projection about the future state of the * data (e.g. taking running asynchronous operation into consideration). * If this option is not specified then the current point in time is the default if no staleness option is * specified or if it is zero. If non-zero staleness option is specified then this option defaults to cached * data. */ public static GetOperationOptions createPointInTimeType(PointInTimeType pit) { GetOperationOptions opts = new GetOperationOptions(); opts.setPointInTimeType(pit); return opts; }
private <F extends ObjectType, T extends ObjectType> PrismObject<T> deleteProvisioningObject( Class<T> objectTypeClass, String oid, LensContext<F> context, LensElementContext<T> objectContext, ProvisioningOperationOptions options, ResourceType resource, Task task, OperationResult result) throws ObjectNotFoundException, ObjectAlreadyExistsException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException, PolicyViolationException { PrismObject<T> shadowToModify = null; OperationProvisioningScriptsType scripts = null; try { GetOperationOptions rootOpts = GetOperationOptions.createNoFetch(); rootOpts.setPointInTimeType(PointInTimeType.FUTURE); shadowToModify = provisioning.getObject(objectTypeClass, oid, SelectorOptions.createCollection(rootOpts), task, result); } catch (ObjectNotFoundException ex) { // this is almost OK, mute the error and try to delete account (it // will fail if something is wrong) result.muteLastSubresultError(); } if (ShadowType.class.isAssignableFrom(objectTypeClass)) { scripts = prepareScripts(shadowToModify, context, objectContext, ProvisioningOperationTypeType.DELETE, resource, task, result); } ModelImplUtils.setRequestee(task, context); PrismObject<T> objectAfterModification = provisioning.deleteObject(objectTypeClass, oid, options, scripts, task, result); ModelImplUtils.clearRequestee(task); return objectAfterModification; }
try { GetOperationOptions rootOpts = GetOperationOptions.createNoFetch(); rootOpts.setPointInTimeType(PointInTimeType.FUTURE); shadowToModify = provisioning.getObject(objectTypeClass, oid, SelectorOptions.createCollection(rootOpts), task, result);
private static GetOperationOptions getOptionsTypeToGetOptions(GetOperationOptionsType optionsType) { GetOperationOptions options = new GetOperationOptions(); options.setRetrieve(RetrieveOption.fromRetrieveOptionType(optionsType.getRetrieve())); options.setResolve(optionsType.isResolve()); options.setResolveNames(optionsType.isResolveNames()); options.setNoFetch(optionsType.isNoFetch()); options.setRaw(optionsType.isRaw()); options.setTolerateRawData(optionsType.isTolerateRawData()); options.setDoNotDiscovery(optionsType.isNoDiscovery()); // TODO relational value search query (but it might become obsolete) options.setAllowNotFound(optionsType.isAllowNotFound()); options.setPointInTimeType(PointInTimeType.toPointInTimeType(optionsType.getPointInTimeType())); options.setDefinitionProcessing(DefinitionProcessingOption.toDefinitionProcessingOption(optionsType.getDefinitionProcessing())); options.setStaleness(optionsType.getStaleness()); options.setDistinct(optionsType.isDistinct()); return options; }
getOptions.setPointInTimeType(PointInTimeType.FUTURE); if (projCtx.isDoReconciliation()) { getOptions.setForceRefresh(true);
option.setPointInTimeType(PointInTimeType.FUTURE); Collection<SelectorOptions<GetOperationOptions>> options = SelectorOptions.createCollection(option);
rootOpts.setPointInTimeType(PointInTimeType.FUTURE); Collection<SelectorOptions<GetOperationOptions>> options = SelectorOptions.createCollection(rootOpts); LOGGER.trace("Loading shadow {} from linkRef, options={}", oid, options);
rootOps.setPointInTimeType(PointInTimeType.FUTURE); PrismObject<ShadowType> objectOld = provisioningService.getObject(ShadowType.class, projCtx.getOid(), SelectorOptions.createCollection(rootOps),
rootOpts.setPointInTimeType(PointInTimeType.FUTURE); Collection<SelectorOptions<GetOperationOptions>> options = SelectorOptions.createCollection(rootOpts); shadow = provisioningService.getObject(ShadowType.class, oid, options, task, result);