Class OperationOptions
- java.lang.Object
-
- org.identityconnectors.framework.common.objects.OperationOptions
-
public final class OperationOptions extends Object
Arbitrary 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 String
OP_ALLOW_PARTIAL_ATTRIBUTE_VALUES
An option to use withSearchApiOp
which specifies that the search operation may return objects with partial attribute values.static String
OP_ALLOW_PARTIAL_RESULTS
An option to use withSearchApiOp
which specifies that the search operation may return only a reasonable subset of the results (objects).static String
OP_ATTRIBUTES_TO_GET
Determines which attributes to retrieve duringSearchApiOp
andSyncApiOp
.static String
OP_CONTAINER
An option to use withSearchApiOp
that specifies the container under which to perform the search.static String
OP_PAGE_SIZE
An option to use withSearchApiOp
that specifies the requested page results page size.static String
OP_PAGED_RESULTS_COOKIE
An option to use withSearchApiOp
that specifies an opaque cookie which is used by the connector to track its position in the set of query results.static String
OP_PAGED_RESULTS_OFFSET
An option to use withSearchApiOp
that specifies the index within the result set of the first result which should be returned.static String
OP_RETURN_DEFAULT_ATTRIBUTES
If set to true the connector will return all the attributes that are returned by default.static String
OP_RUN_AS_USER
An option to use withScriptOnResourceApiOp
and possibly others that specifies an account under which to execute the script/operation.static String
OP_RUN_WITH_PASSWORD
An option to use withScriptOnResourceApiOp
and possibly others that specifies a password under which to execute the script/operation.static String
OP_SCOPE
An option to use withSearchApiOp
(in conjunction withOP_CONTAINER
) that specifies how far beneath the specified container to search.static String
OP_SORT_KEYS
An option to use withSearchApiOp
that specifies the sort keys which should be used for ordering theConnectorObject
returned by search request.static String
SCOPE_OBJECT
A value ofOP_SCOPE
that indicates to search for the specified container object itself.static String
SCOPE_ONE_LEVEL
A value ofOP_SCOPE
that indicates to search for objects that the specified container directly contains.static String
SCOPE_SUBTREE
A value ofOP_SCOPE
that indicates to search for objects that the specified container directly or indirectly contains.
-
Constructor Summary
Constructors Constructor Description OperationOptions(Map<String,Object> operationOptions)
Public only for serialization; please useOperationOptionsBuilder
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Boolean
getAllowPartialAttributeValues()
Returns a flag which specifies that the search operation may return objects with partial attribute values.Boolean
getAllowPartialResults()
Returns a flag which specifies that the search operation may return only a reasonable subset of the results.String[]
getAttributesToGet()
Get the string array of attribute names to return in the object.QualifiedUid
getContainer()
Convenience method that returnsOP_CONTAINER
.Map<String,Object>
getOptions()
Returns a map of options.String
getPagedResultsCookie()
Returns the opaque cookie which is used by the Connector to track its position in the set of query results.Integer
getPagedResultsOffset()
Returns the index within the result set of the first result which should be returned.Integer
getPageSize()
Returns the requested page results page size or0
if paged results are not required.Boolean
getReturnDefaultAttributes()
Returns the flag indicating whether to return the default attributes on top of those specified by OP_ATTRIBUTES_TO_GET.String
getRunAsUser()
Get the account to run the operation as..GuardedString
getRunWithPassword()
Get the password to run the operation as..String
getScope()
Convenience method that returnsOP_SCOPE
.SortKey[]
getSortKeys()
Returns the sort keys which should be used for ordering theConnectorObject
s returned by this search request.String
toString()
Add basic debugging of internal data.
-
-
-
Field Detail
-
OP_SCOPE
public static final 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 String SCOPE_OBJECT
A value ofOP_SCOPE
that indicates to search for the specified container object itself.- See Also:
- Constant Field Values
-
SCOPE_ONE_LEVEL
public static final String SCOPE_ONE_LEVEL
A value ofOP_SCOPE
that indicates to search for objects that the specified container directly contains.- See Also:
- Constant Field Values
-
SCOPE_SUBTREE
public static final String SCOPE_SUBTREE
A value ofOP_SCOPE
that indicates to search for objects that the specified container directly or indirectly contains.- See Also:
- Constant Field Values
-
OP_CONTAINER
public static final String OP_CONTAINER
An option to use withSearchApiOp
that 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 String OP_RUN_AS_USER
An option to use withScriptOnResourceApiOp
and possibly others 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 String OP_RUN_WITH_PASSWORD
An option to use withScriptOnResourceApiOp
and 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 String OP_ATTRIBUTES_TO_GET
Determines which attributes to retrieve duringSearchApiOp
andSyncApiOp
.This option overrides the default behavior, which is for the connector to return exactly the set of attributes that are identified as
returned by default
in 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_RETURN_DEFAULT_ATTRIBUTES
public static final String OP_RETURN_DEFAULT_ATTRIBUTES
If set to true the connector will return all the attributes that are returned by default. If ATTRS_TO_GET option was also specified, it will be understood as additional attributes to return on top of all the default attributes. If set to false (or not present) then only the attributes specified by ATTRS_TO_GET will be returned. If neither ATTRS_TO_GET nor RETURN_DEFAULT_ATTRIBUTES is present then only the default attributes will be returned.- See Also:
- Constant Field Values
-
OP_ALLOW_PARTIAL_RESULTS
public static final String OP_ALLOW_PARTIAL_RESULTS
An option to use withSearchApiOp
which specifies that the search operation may return only a reasonable subset of the results (objects). If this option is specified then the connector is free to sacrifice completeness in favor of performance. In this case the server size limits and short-cuts may be used to get a better operation performance. Even if this option is specified the connector must set the allResultsReturned flag in SearchResult in case that partial results were returned.- See Also:
- Constant Field Values
-
OP_ALLOW_PARTIAL_ATTRIBUTE_VALUES
public static final String OP_ALLOW_PARTIAL_ATTRIBUTE_VALUES
An option to use withSearchApiOp
which specifies that the search operation may return objects with partial attribute values. E.g. it may result group object with only a partial list of members (or no member list at all). This allows for a more efficient searches in cases, that the search result is only meant to be displayed in the user interface table. Composing the list of all the members of a big groups may be significant overhead and this option allows to reduce that overhead. Even if this option is specified the connector must set the attributeValueCompleteness status in Attribute in case that partial attribute values were returned. Please note that the connector may return incomplete attributes even if this flag is NOT set. E.g. in case that the connector knows that the password is set but it cannot reveal its value.- See Also:
- Constant Field Values
-
OP_PAGED_RESULTS_COOKIE
public static final String OP_PAGED_RESULTS_COOKIE
An option to use withSearchApiOp
that specifies an opaque cookie which is used by the connector to track its position in the set of query results.- See Also:
- Constant Field Values
-
OP_PAGED_RESULTS_OFFSET
public static final String OP_PAGED_RESULTS_OFFSET
An option to use withSearchApiOp
that specifies the index within the result set of the first result which should be returned.- See Also:
- Constant Field Values
-
OP_PAGE_SIZE
public static final String OP_PAGE_SIZE
An option to use withSearchApiOp
that specifies the requested page results page size.- See Also:
- Constant Field Values
-
OP_SORT_KEYS
public static final String OP_SORT_KEYS
An option to use withSearchApiOp
that specifies the sort keys which should be used for ordering theConnectorObject
returned by search request.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OperationOptions
public OperationOptions(Map<String,Object> operationOptions)
Public only for serialization; please useOperationOptionsBuilder
.- Parameters:
operationOptions
- The options.
-
-
Method Detail
-
getOptions
public Map<String,Object> getOptions()
Returns a map of options. Each value in the map must be of a type that the framework can serialize. SeeObjectSerializerFactory
for a list of supported types.- Returns:
- A map of options.
-
toString
public String toString()
Add basic debugging of internal data.
-
getScope
public 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 String[] getAttributesToGet()
Get the string array of attribute names to return in the object.
-
getReturnDefaultAttributes
public Boolean getReturnDefaultAttributes()
Returns the flag indicating whether to return the default attributes on top of those specified by OP_ATTRIBUTES_TO_GET.
-
getRunAsUser
public String getRunAsUser()
Get the account to run the operation as..
-
getRunWithPassword
public GuardedString getRunWithPassword()
Get the password to run the operation as..
-
getAllowPartialResults
public Boolean getAllowPartialResults()
Returns a flag which specifies that the search operation may return only a reasonable subset of the results. If this option is specified then the connector is free to sacrifice completeness in favor of performance. In this case the server size limits and short-cuts may be used to get a better operation performance. Even if this option is specified the connector must set the allResultsReturned flag in SearchResult in case that partial results were returned.- Returns:
- flag which specifies that the search operation may return only a reasonable part of the results.
- Since:
- 1.4.1
-
getAllowPartialAttributeValues
public Boolean getAllowPartialAttributeValues()
Returns a flag which specifies that the search operation may return objects with partial attribute values. E.g. it may result group object with only a partial list of members (or no member list at all). This allows for a more efficient searches in cases, that the search result is only meant to be displayed in the user interface table. Composing the list of all the members of a big groups may be significant overhead and this option allows to reduce that overhead. Even if this option is specified the connector must set the attributeValueCompleteness status in Attribute in case that partial attribute values were returned. Please note that the connector may return incomplete attributes even if this flag is NOT set. E.g. in case that the connector knows that the password is set but it cannot reveal its value.- Returns:
- flag which specifies that the search operation may return return objects with partial attribute values.
- Since:
- 1.4.3
-
getPagedResultsCookie
public 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
null
in 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 anull
cookie 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
null
if 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()
-
getPagedResultsOffset
public 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 Integer getPageSize()
Returns the requested page results page size or0
if 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
0
if 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 theConnectorObject
s returned by this search request.- Returns:
- The sort keys which should be used for ordering the
ConnectorObject
s returned by this search request (nevernull
). - Since:
- 1.4
-
-