public static GetOperationOptions createRetrieve(RetrieveOption retrieve) { GetOperationOptions options = new GetOperationOptions(); options.retrieve = retrieve; return options; }
private GetOperationOptionsBuilderImpl forPaths(Consumer<GetOperationOptions> modifier) { for (UniformItemPath path : currentPaths) { GetOperationOptions optionsForPath = options.computeIfAbsent(path, (key) -> new GetOperationOptions()); modifier.accept(optionsForPath); } return this; }
/** * Requirement how stale or fresh the retrieved data should be. It specifies maximum age of the value in millisecods. * The default value is zero, which means that a fresh value must always be returned. This means that caches that do * not guarantee fresh value cannot be used. If non-zero value is specified then such caches may be used. In case that * Long.MAX_VALUE is specified then the caches are always used and fresh value is never retrieved. */ public static GetOperationOptions createStaleness(Long staleness) { GetOperationOptions opts = new GetOperationOptions(); opts.setStaleness(staleness); return opts; }
/** * Whether to override default iteration method (in searchObjectsIterative) configured for particular DBMS. */ public static GetOperationOptions createIterationMethod(IterationMethodType value) { GetOperationOptions opts = new GetOperationOptions(); opts.setIterationMethod(value); return opts; }
/** * No not fetch any information from external sources, e.g. do not fetch account data from resource, * do not fetch resource schema, etc. * Such operation returns only the data stored in midPoint repository. */ public static GetOperationOptions createNoFetch() { GetOperationOptions opts = new GetOperationOptions(); opts.setNoFetch(true); return opts; }
/** * Resolve the object reference names. */ public static GetOperationOptions createResolveNames() { GetOperationOptions opts = new GetOperationOptions(); opts.setResolveNames(true); return opts; }
/** * Return read-only object. The returned object will be only read by the client. The client will not modify it. * Immutable object is returned if it is possible. * This option allows to turn on internal optimization (e.g. avoid cloning the values). It should be used * at all times when the client do not plan to modify the returned object. */ public static GetOperationOptions createReadOnly() { GetOperationOptions opts = new GetOperationOptions(); opts.setReadOnly(true); return opts; }
/** * This flag indicated if the "object not found" error is critical for * processing the original request. If it is not, we just ignore it and * don't log it. In other cases, error in logs may lead to misleading * information.. */ public static GetOperationOptions createAllowNotFound() { GetOperationOptions opts = new GetOperationOptions(); opts.setAllowNotFound(true); return opts; }
public static GetOperationOptions createMaxStaleness() { GetOperationOptions opts = new GetOperationOptions(); opts.setStaleness(Long.MAX_VALUE); return opts; }
public static GetOperationOptions createExecutionPhase() { GetOperationOptions opts = new GetOperationOptions(); opts.setExecutionPhase(true); return opts; }
/** * TODO */ public static GetOperationOptions createDefinitionProcessing(DefinitionProcessingOption value) { GetOperationOptions opts = new GetOperationOptions(); opts.setDefinitionProcessing(value); return opts; }
/** * Avoid any smart processing of the data except for schema application. Do not synchronize the data, do not apply * any expressions, etc. */ public static GetOperationOptions createRaw() { GetOperationOptions opts = new GetOperationOptions(); opts.setRaw(true); return opts; }
/** * Force to get object from the resource even if some of the error occurred. * If the any copy of the shadow is fetched, we can't delete this object * from the gui, for example */ public static GetOperationOptions createDoNotDiscovery() { GetOperationOptions opts = new GetOperationOptions(); opts.setDoNotDiscovery(true); return opts; }
/** * Resolve the object reference. This only makes sense with a (path-based) selector. */ public static GetOperationOptions createResolve() { GetOperationOptions opts = new GetOperationOptions(); opts.setResolve(true); return opts; }
/** * Tolerate "raw" data in returned object. In some cases, raw data are tolerated by default (e.g. if raw=true * and the object is ResourceType or ShadowType). But generally, toleration of raw data can be explicitly requested * by setting this flag to TRUE. */ public static GetOperationOptions createTolerateRawData() { GetOperationOptions opts = new GetOperationOptions(); opts.setTolerateRawData(true); return opts; }
public static GetOperationOptions createForceRefresh() { GetOperationOptions opts = new GetOperationOptions(); opts.setForceRefresh(true); return opts; }
/** * Whether to attach diagnostics data to the returned object(s). */ public static GetOperationOptions createAttachDiagData() { GetOperationOptions opts = new GetOperationOptions(); opts.setAttachDiagData(true); return opts; }
/** * 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; }
/** * Should the results be made distinct. * Not all providers support this option. * * BEWARE: * - may bring a potentially huge performance penalty * - may interfere with paging (!) * * So please consider this option an EXPERIMENTAL, for now. */ public static GetOperationOptions createDistinct() { GetOperationOptions opts = new GetOperationOptions(); opts.setDistinct(true); return opts; }
public static GetOperationOptions toGetOperationOptions(ModelExecuteOptions modelOptions) { if (modelOptions == null) { return null; } GetOperationOptions getOptions = new GetOperationOptions(); getOptions.setRaw(modelOptions.getRaw()); return getOptions; } }