Class GetOperationOptions
- java.lang.Object
-
- com.evolveum.midpoint.schema.AbstractOptions
-
- com.evolveum.midpoint.schema.GetOperationOptions
-
- All Implemented Interfaces:
ShortDumpable
,Serializable
,Cloneable
public class GetOperationOptions extends AbstractOptions implements Serializable, Cloneable, ShortDumpable
- Author:
- semancik
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static GetOperationOptions
EMPTY
-
Constructor Summary
Constructors Constructor Description GetOperationOptions()
-
Method Summary
-
Methods inherited from class com.evolveum.midpoint.schema.AbstractOptions
appendFlag, appendVal, removeLastComma
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.evolveum.midpoint.util.ShortDumpable
shortDump, shortDumpLazily
-
-
-
-
Field Detail
-
EMPTY
public static final GetOperationOptions EMPTY
-
-
Method Detail
-
getRetrieve
public RetrieveOption getRetrieve()
-
setRetrieve
public void setRetrieve(RetrieveOption retrieve)
-
getRetrieve
public static RetrieveOption getRetrieve(GetOperationOptions options)
-
createRetrieve
public static GetOperationOptions createRetrieve(RetrieveOption retrieve)
-
createRetrieve
public static GetOperationOptions createRetrieve()
Specifies whether to return specific items. It is used for optimizations. Some requests only needs a subset of items therefore fetching them all is a waste of resources. Other requests may need expensive data that are not normally returned by default.If no retrieve option is set in the entire options set then it means that the whole object with a default set of properties has to be returned. This is equivalent to specifying DEFAULT retrieve root option.
If there is at least one retrieve option in the set then the following rules apply:
- Items marked as INCLUDE will be returned.
- Any item marked as EXCLUDE may not be returned. (Note: Excluded items may still be returned if their retrieval is cheap.)
- Items marked as DEFAULT will be returned if they would also be returned without any options (by default).
- Items that are not marked (have no option or have null retrieve option) but their superitem is marked (have retrieve option) behave in the same way as superitem. E.g. if a superitem is marked as INCLUDE they will also be included in the result. This also applies transitively (e.g. superitem of superitem).
- If a superitem is marked as EXCLUDE and subitem is marked as INCLUDE then the behavior is undefined. Do not do this. Strange things may happen.
- For items that are not marked in any way and for which the superitem is also not marked the "I do not care" behavior is assumed. This means that they may be returned or they may be not. The implementation will return them if their retrieval is cheap but they will be most likely omitted from the result.
-
createDontRetrieve
public static GetOperationOptions createDontRetrieve()
Specifies whether to return specific items. It is used for optimizations. Some requests only needs a subset of items therefore fetching them all is a waste of resources. Other requests may need expensive data that are not normally returned by default.If no retrieve option is set in the entire options set then it means that the whole object with a default set of properties has to be returned. This is equivalent to specifying DEFAULT retrieve root option.
If there is at least one retrieve option in the set then the following rules apply:
- Items marked as INCLUDE will be returned.
- Any item marked as EXCLUDE may not be returned. (Note: Excluded items may still be returned if their retrieval is cheap.)
- Items marked as DEFAULT will be returned if they would also be returned without any options (by default).
- Items that are not marked (have no option or have null retrieve option) but their superitem is marked (have retrieve option) behave in the same way as superitem. E.g. if a superitem is marked as INCLUDE they will also be included in the result. This also applies transitively (e.g. superitem of superitem).
- If a superitem is marked as EXCLUDE and subitem is marked as INCLUDE then the behavior is undefined. Do not do this. Strange things may happen.
- For items that are not marked in any way and for which the superitem is also not marked the "I do not care" behavior is assumed. This means that they may be returned or they may be not. The implementation will return them if their retrieval is cheap but they will be most likely omitted from the result.
-
createRetrieve
public static GetOperationOptions createRetrieve(RelationalValueSearchQuery query)
Specifies whether to return specific items. It is used for optimizations. Some requests only needs a subset of items therefore fetching them all is a waste of resources. Other requests may need expensive data that are not normally returned by default.If no retrieve option is set in the entire options set then it means that the whole object with a default set of properties has to be returned. This is equivalent to specifying DEFAULT retrieve root option.
If there is at least one retrieve option in the set then the following rules apply:
- Items marked as INCLUDE will be returned.
- Any item marked as EXCLUDE may not be returned. (Note: Excluded items may still be returned if their retrieval is cheap.)
- Items marked as DEFAULT will be returned if they would also be returned without any options (by default).
- Items that are not marked (have no option or have null retrieve option) but their superitem is marked (have retrieve option) behave in the same way as superitem. E.g. if a superitem is marked as INCLUDE they will also be included in the result. This also applies transitively (e.g. superitem of superitem).
- If a superitem is marked as EXCLUDE and subitem is marked as INCLUDE then the behavior is undefined. Do not do this. Strange things may happen.
- For items that are not marked in any way and for which the superitem is also not marked the "I do not care" behavior is assumed. This means that they may be returned or they may be not. The implementation will return them if their retrieval is cheap but they will be most likely omitted from the result.
-
getResolve
public Boolean getResolve()
-
setResolve
public void setResolve(Boolean resolve)
-
resolve
public GetOperationOptions resolve(Boolean resolve)
-
isResolve
public static boolean isResolve(GetOperationOptions options)
-
createResolve
public static GetOperationOptions createResolve()
Resolve the object reference. This only makes sense with a (path-based) selector.
-
getResolveNames
public Boolean getResolveNames()
-
setResolveNames
public void setResolveNames(Boolean resolveNames)
-
resolveNames
public GetOperationOptions resolveNames(Boolean resolveNames)
-
isResolveNames
public static boolean isResolveNames(GetOperationOptions options)
-
createResolveNames
public static GetOperationOptions createResolveNames()
Resolve the object reference names.
-
getNoFetch
public Boolean getNoFetch()
-
setNoFetch
public void setNoFetch(Boolean noFetch)
-
noFetch
public GetOperationOptions noFetch(Boolean noFetch)
-
isNoFetch
public static boolean isNoFetch(GetOperationOptions options)
-
createNoFetch
public static GetOperationOptions createNoFetch()
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.
-
createNoFetchCollection
public static Collection<SelectorOptions<GetOperationOptions>> createNoFetchCollection()
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.
-
getRaw
public Boolean getRaw()
-
setRaw
public void setRaw(Boolean raw)
-
raw
public GetOperationOptions raw(Boolean raw)
-
isRaw
public static boolean isRaw(GetOperationOptions options)
-
createRaw
public static GetOperationOptions createRaw()
Avoid any smart processing of the data except for schema application. Do not synchronize the data, do not apply any expressions, etc.
-
createRawCollection
public static Collection<SelectorOptions<GetOperationOptions>> createRawCollection()
Avoid any smart processing of the data except for schema application. Do not synchronize the data, do not apply any expressions, etc.
-
getTolerateRawData
public Boolean getTolerateRawData()
-
setTolerateRawData
public void setTolerateRawData(Boolean value)
-
tolerateRawData
public GetOperationOptions tolerateRawData(Boolean value)
-
isTolerateRawData
public static boolean isTolerateRawData(GetOperationOptions options)
-
createTolerateRawData
public static GetOperationOptions createTolerateRawData()
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.
-
getDoNotDiscovery
public Boolean getDoNotDiscovery()
-
setDoNotDiscovery
public void setDoNotDiscovery(Boolean force)
-
doNotDiscovery
public GetOperationOptions doNotDiscovery(Boolean force)
-
isDoNotDiscovery
public static boolean isDoNotDiscovery(GetOperationOptions options)
-
createDoNotDiscovery
public static GetOperationOptions createDoNotDiscovery()
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
-
getRelationalValueSearchQuery
public RelationalValueSearchQuery getRelationalValueSearchQuery()
-
setRelationalValueSearchQuery
public void setRelationalValueSearchQuery(RelationalValueSearchQuery relationalValueSearchQuery)
-
relationalValueSearchQuery
public GetOperationOptions relationalValueSearchQuery(RelationalValueSearchQuery relationalValueSearchQuery)
-
createAllowNotFound
public static GetOperationOptions createAllowNotFound()
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..
-
getAllowNotFound
public Boolean getAllowNotFound()
-
setAllowNotFound
public void setAllowNotFound(Boolean allowNotFound)
-
allowNotFound
public GetOperationOptions allowNotFound(Boolean allowNotFound)
-
isAllowNotFound
public static boolean isAllowNotFound(GetOperationOptions options)
-
createReadOnly
public static GetOperationOptions createReadOnly()
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.
-
createReadOnlyCollection
public static Collection<SelectorOptions<GetOperationOptions>> createReadOnlyCollection()
-
getReadOnly
public Boolean getReadOnly()
-
setReadOnly
public void setReadOnly(Boolean readOnly)
-
readOnly
public GetOperationOptions readOnly(Boolean readOnly)
-
isReadOnly
public static boolean isReadOnly(GetOperationOptions options)
-
getPointInTimeType
public PointInTimeType getPointInTimeType()
-
setPointInTimeType
public void setPointInTimeType(PointInTimeType pointInTimeType)
-
pointInTimeType
public GetOperationOptions pointInTimeType(PointInTimeType pointInTimeType)
-
createPointInTimeType
public static GetOperationOptions createPointInTimeType(PointInTimeType pit)
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.
-
getPointInTimeType
public static PointInTimeType getPointInTimeType(GetOperationOptions options)
-
getStaleness
public Long getStaleness()
-
setStaleness
public void setStaleness(Long staleness)
-
staleness
public GetOperationOptions staleness(Long staleness)
-
createStaleness
public static GetOperationOptions createStaleness(Long staleness)
Requirement how stale or fresh the retrieved data should be. It specifies maximum age of the value in milliseconds. 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.
-
createMaxStaleness
public static GetOperationOptions createMaxStaleness()
-
getStaleness
public static long getStaleness(GetOperationOptions options)
-
isMaxStaleness
public static boolean isMaxStaleness(GetOperationOptions options)
-
getForceRefresh
public Boolean getForceRefresh()
-
setForceRefresh
public void setForceRefresh(Boolean forceRefresh)
-
forceRefresh
public GetOperationOptions forceRefresh(Boolean forceRefresh)
-
isForceRefresh
public static boolean isForceRefresh(GetOperationOptions options)
-
createForceRefresh
public static GetOperationOptions createForceRefresh()
-
getForceRetry
public Boolean getForceRetry()
-
setForceRetry
public void setForceRetry(Boolean forceRetry)
-
createForceRetry
public static GetOperationOptions createForceRetry()
-
isForceRetry
public static boolean isForceRetry(GetOperationOptions options)
-
getDistinct
public Boolean getDistinct()
-
setDistinct
public void setDistinct(Boolean distinct)
-
distinct
public GetOperationOptions distinct(Boolean distinct)
-
isDistinct
public static boolean isDistinct(GetOperationOptions options)
-
createDistinct
@Experimental public static GetOperationOptions createDistinct()
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.
-
getAttachDiagData
public Boolean getAttachDiagData()
-
setAttachDiagData
public void setAttachDiagData(Boolean value)
-
attachDiagData
public GetOperationOptions attachDiagData(Boolean value)
-
isAttachDiagData
public static boolean isAttachDiagData(GetOperationOptions options)
-
createAttachDiagData
public static GetOperationOptions createAttachDiagData()
Whether to attach diagnostics data to the returned object(s).
-
getDefinitionProcessing
public DefinitionProcessingOption getDefinitionProcessing()
-
setDefinitionProcessing
public void setDefinitionProcessing(DefinitionProcessingOption definitionProcessing)
-
definitionProcessing
public GetOperationOptions definitionProcessing(DefinitionProcessingOption definitionProcessing)
-
getDefinitionProcessing
public static DefinitionProcessingOption getDefinitionProcessing(GetOperationOptions options)
-
createDefinitionProcessing
public static GetOperationOptions createDefinitionProcessing(DefinitionProcessingOption value)
TODO
-
getIterationMethod
public IterationMethodType getIterationMethod()
-
setIterationMethod
public void setIterationMethod(IterationMethodType iterationMethod)
-
iterationMethod
public GetOperationOptions iterationMethod(IterationMethodType iterationMethod)
-
getIterationMethod
public static IterationMethodType getIterationMethod(GetOperationOptions options)
-
createIterationMethod
public static GetOperationOptions createIterationMethod(IterationMethodType value)
Whether to override default iteration method (in searchObjectsIterative) configured for particular DBMS.
-
getExecutionPhase
public Boolean getExecutionPhase()
-
setExecutionPhase
public void setExecutionPhase(Boolean executionPhase)
-
executionPhase
public GetOperationOptions executionPhase(Boolean executionPhase)
-
isExecutionPhase
public static boolean isExecutionPhase(GetOperationOptions options)
-
createExecutionPhase
public static GetOperationOptions createExecutionPhase()
-
getErrorHandling
public FetchErrorHandlingType getErrorHandling()
-
setErrorHandling
public void setErrorHandling(FetchErrorHandlingType value)
-
setErrorReportingMethod
public void setErrorReportingMethod(FetchErrorReportingMethodType method, PrismContext prismContext)
-
errorHandling
public GetOperationOptions errorHandling(FetchErrorHandlingType value)
-
getErrorHandling
public static FetchErrorHandlingType getErrorHandling(GetOperationOptions options)
-
getErrorReportingMethod
public static FetchErrorReportingMethodType getErrorReportingMethod(GetOperationOptions options)
-
clone
public GetOperationOptions clone()
-
shortDump
public void shortDump(StringBuilder sb)
Description copied from interface:ShortDumpable
Show the content of the object intended for diagnostics. This method is supposed to append a compact, human-readable output in a single line. Unlike toString() method, there is no requirement to identify the actual class or type of the object. It is assumed that the class/type will be obvious from the context in which the output is used.- Specified by:
shortDump
in interfaceShortDumpable
- Parameters:
sb
- StringBuilder to which to a compact one-line content of the object intended for diagnostics by system administrator should be appended.
-
fromRestOptions
public static Collection<SelectorOptions<GetOperationOptions>> fromRestOptions(List<String> options, List<String> include, List<String> exclude, List<String> resolveNames, DefinitionProcessingOption definitionProcessing, PrismContext prismContext)
-
toRestIncludeOption
public static List<String> toRestIncludeOption(Collection<SelectorOptions<GetOperationOptions>> options)
-
fromRestOptions
public static GetOperationOptions fromRestOptions(List<String> options, DefinitionProcessingOption definitionProcessing)
-
merge
@NotNull @SafeVarargs public static @NotNull Collection<SelectorOptions<GetOperationOptions>> merge(PrismContext prismContext, Collection<SelectorOptions<GetOperationOptions>>... parts)
-
merge
public void merge(GetOperationOptions increment)
-
disableReadOnly
@Experimental public static Collection<SelectorOptions<GetOperationOptions>> disableReadOnly(Collection<SelectorOptions<GetOperationOptions>> options)
Disables readOnly option (while not modifying the original object).
-
-