Class UniquenessRequestControlProperties
- java.lang.Object
-
- com.unboundid.ldap.sdk.unboundidds.controls.UniquenessRequestControlProperties
-
- All Implemented Interfaces:
java.io.Serializable
@Mutable @ThreadSafety(level=NOT_THREADSAFE) public final class UniquenessRequestControlProperties extends java.lang.Object implements java.io.Serializable
This class provides a data structure that holds a set of properties for use in conjunction with theUniquenessRequestControl
.
NOTE: This class, and other classes within the
com.unboundid.ldap.sdk.unboundidds
package structure, are only supported for use against Ping Identity, UnboundID, and Nokia/Alcatel-Lucent 8661 server products. These classes provide support for proprietary functionality or for external specifications that are not considered stable or mature enough to be guaranteed to work in an interoperable way with other types of LDAP servers.
The control must be created with either a set of attribute types or a filter (or both). See theUniquenessRequestControl
class-level documentation for details about how the server will behave if either or both of these values are provided.
The following default values will be used for properties that are not specified:- An empty set of attribute types.
-
A multiple attribute behavior of
UniquenessMultipleAttributeBehavior.UNIQUE_WITHIN_EACH_ATTRIBUTE
. - No base DN.
- No filter.
- The control will not prevent conflicts with soft-deleted entries.
-
A pre-commit validation level of
UniquenessValidationLevel.ALL_SUBTREE_VIEWS
. -
A post-commit validation level of
UniquenessValidationLevel.ALL_SUBTREE_VIEWS
. - Do alert on conflicts detected during post-commit validation.
- Do not create a conflict prevention details entry.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UniquenessRequestControlProperties(Filter filter)
Creates a new instance of this uniqueness request control properties object with the provided filter and default values for all other properties as specified in the class-level javadoc documentation.UniquenessRequestControlProperties(java.lang.String... attributeTypes)
Creates a new instance of this uniqueness request control properties object with the provided set of attribute types and default values for all other properties as specified in the class-level javadoc documentation.UniquenessRequestControlProperties(java.util.Collection<java.lang.String> attributeTypes)
Creates a new instance of this uniqueness request control properties object with the provided set of attribute types and default values for all other properties as specified in the class-level javadoc documentation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
alertOnPostCommitConflictDetection()
Indicates whether the server should raise an administrative alert if a conflict is detected during post-commit validation processing.boolean
createConflictPreventionDetailsEntry()
Indicates whether the server should create a temporary conflict prevention details entry before beginning pre-commit validation to provide better support for preventing conflicts.java.util.Set<java.lang.String>
getAttributeTypes()
Retrieves the set of attribute types that the server will check for uniqueness conflicts.java.lang.String
getBaseDN()
Retrieves the base DN that will be used for searches used to identify uniqueness conflicts, if defined.Filter
getFilter()
Retrieves a filter that will be used to identify uniqueness conflicts, if defined.UniquenessMultipleAttributeBehavior
getMultipleAttributeBehavior()
Retrieves the behavior that the server should exhibit if multiple attribute types are configured.UniquenessValidationLevel
getPostCommitValidationLevel()
Retrieves the post-commit validation level, which will be used to identify any conflicts that were introduced by the request with which the control is associated, or by some other concurrent changed processed in the server.UniquenessValidationLevel
getPreCommitValidationLevel()
Retrieves the pre-commit validation level, which will be used to identify any conflicts before the associated request is processed.boolean
preventConflictsWithSoftDeletedEntries()
Indicates whether the server should attempt to identify conflicts with soft-deleted entries.void
setAlertOnPostCommitConflictDetection(boolean alertOnPostCommitConflictDetection)
Specifies whether the server should raise an administrative alert if a conflict is detected during post-commit validation processing.void
setAttributeTypes(java.lang.String... attributeTypes)
Specifies the set of attribute types that the server will check for uniqueness conflicts.void
setAttributeTypes(java.util.Collection<java.lang.String> attributeTypes)
Specifies the set of attribute types that the server will check for uniqueness conflicts.void
setBaseDN(java.lang.String baseDN)
Specifies the base DN that will be used for searches used to identify uniqueness conflicts.void
setCreateConflictPreventionDetailsEntry(boolean createConflictPreventionDetailsEntry)
Specifies whether the server should create a temporary conflict prevention details entry before beginning pre-commit validation to provide better support for preventing conflicts.void
setFilter(Filter filter)
Specifies a filter that will be used to identify uniqueness conflicts.void
setMultipleAttributeBehavior(UniquenessMultipleAttributeBehavior multipleAttributeBehavior)
Specifies the behavior that the server should exhibit if multiple attribute types are configured.void
setPostCommitValidationLevel(UniquenessValidationLevel postCommitValidationLevel)
Specifies the post-commit validation level, which will be used to identify any conflicts that were introduced by the request with which the control is associated, or by some other concurrent changed processed in the server.void
setPreCommitValidationLevel(UniquenessValidationLevel preCommitValidationLevel)
Specifies the pre-commit validation level, which will be used to identify any conflicts before the associated request is processed.void
setPreventConflictsWithSoftDeletedEntries(boolean preventConflictsWithSoftDeletedEntries)
Specifies whether the server should attempt to identify conflicts with soft-deleted entries.java.lang.String
toString()
Retrieves a string representation of this uniqueness request control properties object.void
toString(java.lang.StringBuilder buffer)
Appends a string representation of this uniqueness request control properties object to the provided buffer.
-
-
-
Constructor Detail
-
UniquenessRequestControlProperties
public UniquenessRequestControlProperties(@NotNull java.lang.String... attributeTypes)
Creates a new instance of this uniqueness request control properties object with the provided set of attribute types and default values for all other properties as specified in the class-level javadoc documentation.- Parameters:
attributeTypes
- The set of attribute types that the server will check for uniqueness conflicts. It must not benull
or empty. The server should be configured with equality indexes for each of these attribute types.
-
UniquenessRequestControlProperties
public UniquenessRequestControlProperties(@NotNull java.util.Collection<java.lang.String> attributeTypes)
Creates a new instance of this uniqueness request control properties object with the provided set of attribute types and default values for all other properties as specified in the class-level javadoc documentation.- Parameters:
attributeTypes
- The set of attribute types that the server will check for uniqueness conflicts. It must not benull
or empty. The server should be configured with equality indexes for each of these attribute types.
-
UniquenessRequestControlProperties
public UniquenessRequestControlProperties(@NotNull Filter filter)
Creates a new instance of this uniqueness request control properties object with the provided filter and default values for all other properties as specified in the class-level javadoc documentation.- Parameters:
filter
- The filter that the server will use to check for uniqueness conflicts. It must not benull
.
-
-
Method Detail
-
getAttributeTypes
@NotNull public java.util.Set<java.lang.String> getAttributeTypes()
Retrieves the set of attribute types that the server will check for uniqueness conflicts.- Returns:
- The set of attribute types that the server will check for uniqueness conflicts, or an empty set if only a filter should be used to identify conflicts.
-
setAttributeTypes
public void setAttributeTypes(@Nullable java.lang.String... attributeTypes)
Specifies the set of attribute types that the server will check for uniqueness conflicts.- Parameters:
attributeTypes
- The set of attribute types that the server will check for uniqueness conflicts. It must not benull
or empty if no filter is configured. It may optionally benull
or empty if a filter is provided. The server should be configured with an equality index for each of the provided attribute types.
-
setAttributeTypes
public void setAttributeTypes(@Nullable java.util.Collection<java.lang.String> attributeTypes)
Specifies the set of attribute types that the server will check for uniqueness conflicts.- Parameters:
attributeTypes
- The set of attribute types that the server will check for uniqueness conflicts. It must not benull
or empty if no filter is configured. It may optionally benull
or empty if a filter is provided. The server should be configured with an equality index for each of the provided attribute types.
-
getMultipleAttributeBehavior
@NotNull public UniquenessMultipleAttributeBehavior getMultipleAttributeBehavior()
Retrieves the behavior that the server should exhibit if multiple attribute types are configured.- Returns:
- The behavior that the server should exhibit if multiple attribute types are configured.
-
setMultipleAttributeBehavior
public void setMultipleAttributeBehavior(@NotNull UniquenessMultipleAttributeBehavior multipleAttributeBehavior)
Specifies the behavior that the server should exhibit if multiple attribute types are configured.- Parameters:
multipleAttributeBehavior
- The behavior that the server should exhibit if multiple attribute types are configured. This must not benull
.
-
getBaseDN
@Nullable public java.lang.String getBaseDN()
Retrieves the base DN that will be used for searches used to identify uniqueness conflicts, if defined.- Returns:
- The base DN that will be used for searches used to identify
uniqueness conflicts, or
null
if the server should search below all public naming contexts.
-
setBaseDN
public void setBaseDN(@Nullable java.lang.String baseDN)
Specifies the base DN that will be used for searches used to identify uniqueness conflicts.- Parameters:
baseDN
- The base DN that will be used for searches used to identify uniqueness conflicts. It may benull
to indicate that the server should search below all public naming contexts.
-
getFilter
@Nullable public Filter getFilter()
Retrieves a filter that will be used to identify uniqueness conflicts, if defined.- Returns:
- A filter that will be used to identify uniqueness conflicts, or
null
if no filter has been defined.
-
setFilter
public void setFilter(@Nullable Filter filter)
Specifies a filter that will be used to identify uniqueness conflicts.- Parameters:
filter
- A filter that will be used to identify uniqueness conflicts. It must not benull
if no set of attribute types has been configured. It may optionally benull
if a set of attribute types has been configured. If no attribute types are provided, then this filter should be indexed within the server.
-
preventConflictsWithSoftDeletedEntries
public boolean preventConflictsWithSoftDeletedEntries()
Indicates whether the server should attempt to identify conflicts with soft-deleted entries.- Returns:
true
if the server should identify conflicts with both regular entries and soft-deleted entries, orfalse
if the server should only identify conflicts with regular entries.
-
setPreventConflictsWithSoftDeletedEntries
public void setPreventConflictsWithSoftDeletedEntries(boolean preventConflictsWithSoftDeletedEntries)
Specifies whether the server should attempt to identify conflicts with soft-deleted entries.- Parameters:
preventConflictsWithSoftDeletedEntries
- Indicates whether the server should attempt to identify conflicts with soft-deleted entries.
-
getPreCommitValidationLevel
@NotNull public UniquenessValidationLevel getPreCommitValidationLevel()
Retrieves the pre-commit validation level, which will be used to identify any conflicts before the associated request is processed.- Returns:
- The pre-commit validation level.
-
setPreCommitValidationLevel
public void setPreCommitValidationLevel(@NotNull UniquenessValidationLevel preCommitValidationLevel)
Specifies the pre-commit validation level, which will be used to identify any conflicts before the associated request is processed.- Parameters:
preCommitValidationLevel
- The pre-commit validation level. It must not benull
.
-
getPostCommitValidationLevel
@NotNull public UniquenessValidationLevel getPostCommitValidationLevel()
Retrieves the post-commit validation level, which will be used to identify any conflicts that were introduced by the request with which the control is associated, or by some other concurrent changed processed in the server.- Returns:
- The post-commit validation level.
-
setPostCommitValidationLevel
public void setPostCommitValidationLevel(@NotNull UniquenessValidationLevel postCommitValidationLevel)
Specifies the post-commit validation level, which will be used to identify any conflicts that were introduced by the request with which the control is associated, or by some other concurrent changed processed in the server.- Parameters:
postCommitValidationLevel
- The post-commit validation level. It must not benull
.
-
alertOnPostCommitConflictDetection
public boolean alertOnPostCommitConflictDetection()
Indicates whether the server should raise an administrative alert if a conflict is detected during post-commit validation processing.- Returns:
true
if the server should raise an administrative alert if a conflict is detected during post-commit validation processing, orfalse
if not.
-
setAlertOnPostCommitConflictDetection
public void setAlertOnPostCommitConflictDetection(boolean alertOnPostCommitConflictDetection)
Specifies whether the server should raise an administrative alert if a conflict is detected during post-commit validation processing.- Parameters:
alertOnPostCommitConflictDetection
- Indicates whether the server should raise an administrative alert if a conflict is detected during post-commit validation processing.
-
createConflictPreventionDetailsEntry
public boolean createConflictPreventionDetailsEntry()
Indicates whether the server should create a temporary conflict prevention details entry before beginning pre-commit validation to provide better support for preventing conflicts. If created, the entry will be removed after post-commit validation processing has completed.- Returns:
true
if the server should create a temporary conflict prevention details entry before beginning pre-commit validation, orfalse
if not.
-
setCreateConflictPreventionDetailsEntry
public void setCreateConflictPreventionDetailsEntry(boolean createConflictPreventionDetailsEntry)
Specifies whether the server should create a temporary conflict prevention details entry before beginning pre-commit validation to provide better support for preventing conflicts. If created, the entry will be removed after post-commit validation processing has completed.- Parameters:
createConflictPreventionDetailsEntry
- Indicates whether the server should create a temporary conflict prevention details entry before beginning pre-commit validation.
-
toString
@NotNull public java.lang.String toString()
Retrieves a string representation of this uniqueness request control properties object.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of this uniqueness request control properties object.
-
-