Class OperationOptionsBuilder
- java.lang.Object
-
- org.identityconnectors.framework.common.objects.OperationOptionsBuilder
-
public final class OperationOptionsBuilder extends Object
Builder forOperationOptions
.
-
-
Constructor Summary
Constructors Constructor Description OperationOptionsBuilder()
Create a builder with an empty set of options.OperationOptionsBuilder(OperationOptions options)
Create a builder from an existing set of options.
-
Method Summary
-
-
-
Constructor Detail
-
OperationOptionsBuilder
public OperationOptionsBuilder()
Create a builder with an empty set of options.
-
OperationOptionsBuilder
public OperationOptionsBuilder(OperationOptions options)
Create a builder from an existing set of options.- Parameters:
options
- The existing set of options. Must not be null.
-
-
Method Detail
-
setOption
public OperationOptionsBuilder setOption(String name, Object value)
Sets a given option and a value for that option.- Parameters:
name
- The name of the optionvalue
- The value of the option. Must be one of the types that we can serialize. SeeObjectSerializerFactory
for a list of supported types.- Returns:
- A this reference to allow chaining
-
setAttributesToGet
public OperationOptionsBuilder setAttributesToGet(String... attrNames)
Sets theOperationOptions.OP_ATTRIBUTES_TO_GET
option.- Parameters:
attrNames
- list ofAttribute
names.- Returns:
- A this reference to allow chaining
-
setAttributesToGet
public OperationOptionsBuilder setAttributesToGet(Collection<String> attrNames)
Sets theOperationOptions.OP_ATTRIBUTES_TO_GET
option.- Parameters:
attrNames
- list ofAttribute
names.- Returns:
- A this reference to allow chaining
-
setReturnDefaultAttributes
public OperationOptionsBuilder setReturnDefaultAttributes(Boolean flag)
Sets theOperationOptions.OP_RETURN_DEFAULT_ATTRIBUTES
option.- Returns:
- A this reference to allow chaining
-
setRunWithPassword
public OperationOptionsBuilder setRunWithPassword(GuardedString password)
Set the run with password option.- Returns:
- A this reference to allow chaining
-
setRunAsUser
public OperationOptionsBuilder setRunAsUser(String user)
Set the run as user option.- Returns:
- A this reference to allow chaining
-
setScope
public OperationOptionsBuilder setScope(String scope)
Convenience method to setOperationOptions.OP_SCOPE
.- Parameters:
scope
- The scope. May not be null.- Returns:
- A this reference to allow chaining
-
setContainer
public OperationOptionsBuilder setContainer(QualifiedUid container)
Convenience method to setOperationOptions.OP_CONTAINER
.- Parameters:
container
- The container. May not be null.- Returns:
- A this reference to allow chaining
-
setPagedResultsCookie
public OperationOptionsBuilder setPagedResultsCookie(String pagedResultsCookie)
Convenience method to setOperationOptions.OP_PAGED_RESULTS_COOKIE
.- Parameters:
pagedResultsCookie
- The pagedResultsCookie. May not be null.- Returns:
- A this reference to allow chaining
- Since:
- 1.4
-
setPagedResultsOffset
public OperationOptionsBuilder setPagedResultsOffset(Integer pagedResultsOffset)
Convenience method to setOperationOptions.OP_PAGED_RESULTS_OFFSET
.- Parameters:
pagedResultsOffset
- The pagedResultsOffset. May not be null.- Returns:
- A this reference to allow chaining
- Since:
- 1.4
-
setPageSize
public OperationOptionsBuilder setPageSize(Integer pageSize)
Convenience method to setOperationOptions.OP_PAGE_SIZE
.- Parameters:
pageSize
- The pageSize. May not be null.- Returns:
- A this reference to allow chaining
- Since:
- 1.4
-
setSortKeys
public OperationOptionsBuilder setSortKeys(List<SortKey> sortKeys)
Convenience method to setOperationOptions.OP_SORT_KEYS
.- Parameters:
sortKeys
- The sort keys. May not be null.- Returns:
- A this reference to allow chaining
- Since:
- 1.4
-
setSortKeys
public OperationOptionsBuilder setSortKeys(SortKey... sortKeys)
Convenience method to setOperationOptions.OP_SORT_KEYS
.- Parameters:
sortKeys
- The sort keys. May not be null.- Returns:
- A this reference to allow chaining
- Since:
- 1.4
-
setAllowPartialResults
public OperationOptionsBuilder setAllowPartialResults(boolean allowPartialResults)
Convenience method to setOperationOptions.OP_ALLOW_PARTIAL_RESULTS
.- Parameters:
allowPartialResults
- Flag indicating whether partial results are allowed.- Returns:
- A this reference to allow chaining
- Since:
- 1.4.2
-
setAllowPartialAttributeValues
public OperationOptionsBuilder setAllowPartialAttributeValues(boolean allowPartialAttributeValues)
Convenience method to setOperationOptions.OP_ALLOW_PARTIAL_ATTRIBUTE_VALUES
.- Parameters:
allowPartialResults
- Flag indicating whether partial attribute values are allowed.- Returns:
- A this reference to allow chaining
- Since:
- 1.4.3
-
getOptions
public Map<String,Object> getOptions()
Returns a mutable reference of the options map.- Returns:
- A mutable reference of the options map.
-
build
public OperationOptions build()
Creates theOperationOptions
.- Returns:
- The newly-created
OperationOptions
-
-