Class OperationOptions
- java.lang.Object
-
- org.identityconnectors.framework.common.objects.OperationOptions
-
public final class OperationOptions extends java.lang.ObjectArbitrary options to be passed into various operations. This serves as a catch-all for extra options.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringOP_ATTRIBUTES_TO_GETDetermines which attributes to retrieve duringSearchApiOpandSyncApiOp.static java.lang.StringOP_CONTAINERAn option to use withSearchApiOpthat specifies the container under which to perform the search.static java.lang.StringOP_FAIL_ON_ERRORAn option to specify whether aBatchApiOpshould abort processing on the first error encountered in the batch.static java.lang.StringOP_PAGE_SIZEAn option to use withSearchApiOpthat specifies the requested page results page size.static java.lang.StringOP_PAGED_RESULTS_COOKIEAn option to use withSearchApiOpthat specifies an opaque cookie which is used by the connector to track its position in the set of query results.static java.lang.StringOP_PAGED_RESULTS_OFFSETAn option to use withSearchApiOpthat specifies the index within the result set of the first result which should be returned.static java.lang.StringOP_REQUIRE_SERIALAn option to instruct a connector that batched operations must be executed in serial fashion where possible/applicable.static java.lang.StringOP_RUN_AS_USERAn option that specifies an account under which to execute the script/operation.static java.lang.StringOP_RUN_WITH_PASSWORDAn option to use withScriptOnResourceApiOpand possibly others that specifies a password under which to execute the script/operation.static java.lang.StringOP_SCOPEAn option to use withSearchApiOp(in conjunction withOP_CONTAINER) that specifies how far beneath the specified container to search.static java.lang.StringOP_SORT_KEYSAn option to use withSearchApiOpthat specifies the sort keys which should be used for ordering theConnectorObjectreturned by search request.static java.lang.StringOP_TOTAL_PAGED_RESULTS_POLICYAn option to use withSearchApiOpthat specifies the policy used for calculating the total number of paged results.static java.lang.StringSCOPE_OBJECTA value ofOP_SCOPEthat indicates to search for the specified container object itself.static java.lang.StringSCOPE_ONE_LEVELA value ofOP_SCOPEthat indicates to search for objects that the specified container directly contains.static java.lang.StringSCOPE_SUBTREEA value ofOP_SCOPEthat indicates to search for objects that the specified container directly or indirectly contains.
-
Constructor Summary
Constructors Constructor Description OperationOptions(java.util.Map<java.lang.String,java.lang.Object> operationOptions)Public only for serialization; please useOperationOptionsBuilder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]getAttributesToGet()Get the string array of attribute names to return in the object.QualifiedUidgetContainer()Convenience method that returnsOP_CONTAINER.booleangetFailOnError()Returns the state of the failOnError option; defaults tofalse.java.util.Map<java.lang.String,java.lang.Object>getOptions()Returns a map of options.java.lang.StringgetPagedResultsCookie()Returns the opaque cookie which is used by the Connector to track its position in the set of query results.java.lang.IntegergetPagedResultsOffset()Returns the index within the result set of the first result which should be returned.java.lang.IntegergetPageSize()Returns the requested page results page size or0if paged results are not required.booleangetRequireSerial()Return the state of the allowParallel option; defaults tofalse.java.lang.StringgetRunAsUser()Get the account to run the operation as..GuardedStringgetRunWithPassword()Get the password to run the operation as..java.lang.StringgetScope()Convenience method that returnsOP_SCOPE.SortKey[]getSortKeys()Returns the sort keys which should be used for ordering theConnectorObjects returned by this search request.SearchResult.CountPolicygetTotalPagedResultsPolicy()Returns theSearchResult.CountPolicyused to calculateSearchResult.getTotalPagedResults().java.lang.StringtoString()Add basic debugging of internal data.
-
-
-
Field Detail
-
OP_SCOPE
public static final java.lang.String OP_SCOPE
An option to use withSearchApiOp(in conjunction withOP_CONTAINER) that specifies how far beneath the specified container to search. Must be one of the following values:- See Also:
- Constant Field Values
-
SCOPE_OBJECT
public static final java.lang.String SCOPE_OBJECT
A value ofOP_SCOPEthat indicates to search for the specified container object itself.- See Also:
- Constant Field Values
-
SCOPE_ONE_LEVEL
public static final java.lang.String SCOPE_ONE_LEVEL
A value ofOP_SCOPEthat indicates to search for objects that the specified container directly contains.- See Also:
- Constant Field Values
-
SCOPE_SUBTREE
public static final java.lang.String SCOPE_SUBTREE
A value ofOP_SCOPEthat indicates to search for objects that the specified container directly or indirectly contains.- See Also:
- Constant Field Values
-
OP_CONTAINER
public static final java.lang.String OP_CONTAINER
An option to use withSearchApiOpthat specifies the container under which to perform the search. Must be of typeQualifiedUid. Should be implemented for those object classes whoseObjectClassInfo.isContainer()returns true.- See Also:
- Constant Field Values
-
OP_RUN_AS_USER
public static final java.lang.String OP_RUN_AS_USER
An option that specifies an account under which to execute the script/operation. The specified account will appear to have performed any action that the script/operation performs.Check the javadoc for a particular connector to see whether that connector supports this option.
- See Also:
- Constant Field Values
-
OP_RUN_WITH_PASSWORD
public static final java.lang.String OP_RUN_WITH_PASSWORD
An option to use withScriptOnResourceApiOpand possibly others that specifies a password under which to execute the script/operation.- See Also:
- Constant Field Values
-
OP_ATTRIBUTES_TO_GET
public static final java.lang.String OP_ATTRIBUTES_TO_GET
Determines which attributes to retrieve duringSearchApiOpandSyncApiOp.This option overrides the default behavior, which is for the connector to return exactly the set of attributes that are identified as
returned by defaultin the schema for that connector.This option allows a client application to request additional attributes that would not otherwise not be returned (generally because such attributes are more expensive for a connector to fetch and to format) and/or to request only a subset of the attributes that would normally be returned.
- See Also:
- Constant Field Values
-
OP_PAGED_RESULTS_COOKIE
public static final java.lang.String OP_PAGED_RESULTS_COOKIE
An option to use withSearchApiOpthat specifies an opaque cookie which is used by the connector to track its position in the set of query results.- Since:
- 1.4
- See Also:
- Constant Field Values
-
OP_TOTAL_PAGED_RESULTS_POLICY
public static final java.lang.String OP_TOTAL_PAGED_RESULTS_POLICY
An option to use withSearchApiOpthat specifies the policy used for calculating the total number of paged results.- Since:
- 1.5
- See Also:
- Constant Field Values
-
OP_PAGED_RESULTS_OFFSET
public static final java.lang.String OP_PAGED_RESULTS_OFFSET
An option to use withSearchApiOpthat specifies the index within the result set of the first result which should be returned.- Since:
- 1.4
- See Also:
- Constant Field Values
-
OP_PAGE_SIZE
public static final java.lang.String OP_PAGE_SIZE
An option to use withSearchApiOpthat specifies the requested page results page size.- Since:
- 1.4
- See Also:
- Constant Field Values
-
OP_SORT_KEYS
public static final java.lang.String OP_SORT_KEYS
An option to use withSearchApiOpthat specifies the sort keys which should be used for ordering theConnectorObjectreturned by search request.- Since:
- 1.4
- See Also:
- Constant Field Values
-
OP_FAIL_ON_ERROR
public static final java.lang.String OP_FAIL_ON_ERROR
An option to specify whether aBatchApiOpshould abort processing on the first error encountered in the batch. Default behavior is to continue processing in spite of errors.- Since:
- 1.5
- See Also:
- Constant Field Values
-
OP_REQUIRE_SERIAL
public static final java.lang.String OP_REQUIRE_SERIAL
An option to instruct a connector that batched operations must be executed in serial fashion where possible/applicable. The default behavior should be to execute tasks in parallel for speed and efficiency. In either case the task id must be reflected in teh response for each task so they can be properly reordered.- Since:
- 1.5
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OperationOptions
public OperationOptions(java.util.Map<java.lang.String,java.lang.Object> operationOptions)
Public only for serialization; please useOperationOptionsBuilder.- Parameters:
operationOptions- The options.
-
-
Method Detail
-
getOptions
public java.util.Map<java.lang.String,java.lang.Object> getOptions()
Returns a map of options. Each value in the map must be of a type that the framework can serialize. SeeObjectSerializerFactoryfor a list of supported types.- Returns:
- A map of options.
-
toString
public java.lang.String toString()
Add basic debugging of internal data.- Overrides:
toStringin classjava.lang.Object
-
getScope
public java.lang.String getScope()
Convenience method that returnsOP_SCOPE.- Returns:
- The value for
OP_SCOPE.
-
getContainer
public QualifiedUid getContainer()
Convenience method that returnsOP_CONTAINER.- Returns:
- The value for
OP_CONTAINER.
-
getAttributesToGet
public java.lang.String[] getAttributesToGet()
Get the string array of attribute names to return in the object.
-
getRunAsUser
public java.lang.String getRunAsUser()
Get the account to run the operation as..
-
getRunWithPassword
public GuardedString getRunWithPassword()
Get the password to run the operation as..
-
getPagedResultsCookie
public java.lang.String getPagedResultsCookie()
Returns the opaque cookie which is used by the Connector to track its position in the set of query results. Paged results will be enabled if and only if the page size is non-zero.The cookie must be
nullin the initial search request sent by the client. For subsequent search requests the client must include the cookie returned with the previous search result, until the resource provider returns anullcookie indicating that the final page of results has been returned.- Returns:
- The opaque cookie which is used by the Connector to track its
position in the set of search results, or
nullif paged results are not requested (when the page size is 0), or if the first page of results is being requested (when the page size is non-zero). - Since:
- 1.4
- See Also:
getPageSize(),getPagedResultsOffset()
-
getTotalPagedResultsPolicy
public SearchResult.CountPolicy getTotalPagedResultsPolicy()
Returns theSearchResult.CountPolicyused to calculateSearchResult.getTotalPagedResults().- Returns:
- The count policy.
- Since:
- 1.5
- See Also:
SearchResult.getTotalPagedResults()
-
getPagedResultsOffset
public java.lang.Integer getPagedResultsOffset()
Returns the index within the result set of the first result which should be returned. Paged results will be enabled if and only if the page size is non-zero. If the parameter is not present or a value less than 1 is specified then the page following the previous page returned will be returned. A value equal to or greater than 1 indicates that a specific page should be returned starting from the position specified.- Returns:
- The index within the result set of the first result which should be returned.
- Since:
- 1.4
- See Also:
getPageSize(),getPagedResultsCookie()
-
getPageSize
public java.lang.Integer getPageSize()
Returns the requested page results page size or0if paged results are not required. For all paged result requests other than the initial request, a cookie should be provided with the search request. SeegetPagedResultsCookie()for more information.- Returns:
- The requested page results page size or
0if paged results are not required. - Since:
- 1.4
- See Also:
getPagedResultsCookie(),getPagedResultsOffset()
-
getSortKeys
public SortKey[] getSortKeys()
Returns the sort keys which should be used for ordering theConnectorObjects returned by this search request.- Returns:
- The sort keys which should be used for ordering the
ConnectorObjects returned by this search request (nevernull). - Since:
- 1.4
-
getFailOnError
public boolean getFailOnError()
Returns the state of the failOnError option; defaults tofalse.
-
getRequireSerial
public boolean getRequireSerial()
Return the state of the allowParallel option; defaults tofalse.
-
-