Class AttributeDeltaBuilder
- java.lang.Object
-
- org.identityconnectors.framework.common.objects.AttributeDeltaBuilder
-
public class AttributeDeltaBuilder extends Object
-
-
Constructor Summary
Constructors Constructor Description AttributeDeltaBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributeDeltaBuilder
addValueToAdd(Object... objs)
Adds each of the specified objects as a value for the valuesToAdd of the attributeDelta that is being built.AttributeDeltaBuilder
addValueToAdd(Collection<?> obj)
Adds each object in the collection as a value for the valuesToAdd of the attributeDelta that is being built.AttributeDeltaBuilder
addValueToRemove(Object... objs)
Adds each of the specified objects as a value for the valuesToRemove of the attributeDelta that is being built.AttributeDeltaBuilder
addValueToRemove(Collection<?> obj)
Adds each object in the collection as a value for the valuesToRemove of the attributeDelta that is being built.AttributeDeltaBuilder
addValueToReplace(Object... objs)
Adds each of the specified objects as a value for the valuesToReplace of the attributeDelta that is being built.AttributeDeltaBuilder
addValueToReplace(Collection<?> obj)
Adds each object in the collection as a value for the valuesToReplace of the attributeDelta that is being built.AttributeDelta
build()
Creates a attributeDelta with the specified name and the value for valuesToAdd, valuesToRemove and valuesToReplace that have been provided to the builder.static AttributeDelta
build(String name)
Creates a attributeDelta with the specified name and anull
value for valuesToAdd, valuesToRemove and valuesToReplace.static AttributeDelta
build(String name, Object... args)
Creates anAttributeDelta
with the name and the values provided for valuesToReplace.static AttributeDelta
build(String name, Collection<?> valuesToReplace)
Creates anAttributeDelta
with the name and the values provided for valuesToReplace.static AttributeDelta
build(String name, Collection<?> valuesToAdd, Collection<?> valuesToRemove)
Creates anAttributeDelta
with the name and the values provided for valuesToAdd and valuesToRemove.static AttributeDelta
buildCurrentPassword(char[] password)
Builds an of operational attribute that represents the current password of an object on a target system or application.static AttributeDelta
buildCurrentPassword(GuardedString password)
Builds an of operational attribute that represents the current password of an object on a target system or application.static AttributeDelta
buildDisableDate(long date)
Builds an of operational attribute that represents the date and time to disable an object on a target system or application.static AttributeDelta
buildDisableDate(Date date)
Builds an of operational attribute that represents the date and time to disable an object on a target system or application.static AttributeDelta
buildEnabled(boolean value)
Builds an of operational attribute that represents whether object is enabled on a target system or application.static AttributeDelta
buildEnableDate(long date)
Builds an of operational attribute that represents the date and time to enable an object on a target system or application.static AttributeDelta
buildEnableDate(Date date)
Builds an of operational attribute that represents the date and time to enable an object on a target system or application.static AttributeDelta
buildLastLoginDate(long date)
Builds an of pre-defined attribute that represents the date and time of the most recent login for an object (such as an account) on a target system or application.static AttributeDelta
buildLastLoginDate(Date date)
Builds an of pre-defined attribute that represents the date and time of the most recent login for an object (such as an account) on a target system or application.static AttributeDelta
buildLastPasswordChangeDate(long date)
Builds an of pre-defined attribute that represents the date and time that the password was most recently changed for an object (such as an account) on a target system or application.static AttributeDelta
buildLastPasswordChangeDate(Date date)
Builds an of pre-defined attribute that represents the date and time that the password was most recently changed for an object (such as an account) on a target system or application.static AttributeDelta
buildLockOut(boolean lock)
Builds an of operational attribute that represents whether an object is locked out on a target system or application.static AttributeDelta
buildPassword(char[] password)
Builds an of operational attribute that represents the password of an object on a target system or application.static AttributeDelta
buildPassword(GuardedString password)
Builds an of operational attribute that represents the password of an object on a target system or application.static AttributeDelta
buildPasswordChangeInterval(long value)
Builds an of pre-defined attribute that represents how often the password must be changed for an object (such as an account) on a target system or application.static AttributeDelta
buildPasswordExpirationDate(long dateTime)
Builds an of operational attribute that represents the date and time that a password will expire on a target system or application.static AttributeDelta
buildPasswordExpirationDate(Date dateTime)
Builds an of operational attribute that represents the date and time that a password will expire on a target system or application.static AttributeDelta
buildPasswordExpired(boolean value)
Builds an of operational attribute that represents whether the password of an object is expired on a target system or application.String
getName()
Get the name of the attributeDelta that is being built.List<Object>
getValuesToAdd()
Return any current value of the valuesToAdd in the attributeDelta that is being built.List<Object>
getValueToRemove()
Return any current value of the valuesToRemove in the the attributeDelta that is being built.List<Object>
getValueToReplace()
Return any current value of the valuesToReplace in the attribute that is being built.AttributeDeltaBuilder
setName(String name)
Set the name of the attributeDelta that is being built.
-
-
-
Method Detail
-
build
public static AttributeDelta build(String name)
Creates a attributeDelta with the specified name and anull
value for valuesToAdd, valuesToRemove and valuesToReplace.- Parameters:
name
- unique name of the attributeDelta.- Returns:
- instance of
AttributeDelta
with anull
or actual values for valuesToAdd, valuesToRemove and valuesToReplace.
-
build
public static AttributeDelta build(String name, Collection<?> valuesToAdd, Collection<?> valuesToRemove)
Creates anAttributeDelta
with the name and the values provided for valuesToAdd and valuesToRemove.- Parameters:
name
- unique name of the attributeDelta.valuesToAdd
- a collection of objects that are used as values for the valuesToAdd of the attributeDelta.valuesToRemove
- a collection of objects that are used as values for the valuesToRemove of the attributeDelta.- Returns:
- instance of
AttributeDelta
with the specified name and a value that includes the arguments provided.
-
build
public static AttributeDelta build(String name, Object... args)
Creates anAttributeDelta
with the name and the values provided for valuesToReplace.- Parameters:
name
- unique name of the attributeDelta.args
- variable number of arguments that are used as values for the valuesToReplace of the attributeDelta.- Returns:
- instance of
AttributeDelta
with the specified name and a value that includes the arguments provided.
-
build
public static AttributeDelta build(String name, Collection<?> valuesToReplace)
Creates anAttributeDelta
with the name and the values provided for valuesToReplace.- Parameters:
name
- unique name of the attributeDelta.valuesToReplace
- a collection of objects that are used as values for the valuesToReplace of the attributeDelta.- Returns:
- instance of
AttributeDelta
with the specified name and a value that includes the arguments provided.
-
getName
public String getName()
Get the name of the attributeDelta that is being built.- Returns:
- The name of the attributeDelta.
-
setName
public AttributeDeltaBuilder setName(String name)
Set the name of the attributeDelta that is being built.- Returns:
- instance of
AttributeDelta
with the specified name and a value that includes the arguments provided. - Throws:
IllegalArgumentException
- if the name parameter is blank.
-
getValuesToAdd
public List<Object> getValuesToAdd()
Return any current value of the valuesToAdd in the attributeDelta that is being built.- Returns:
- any current value of the valuesToAdd in the attributeDelta that is being built.
-
getValueToRemove
public List<Object> getValueToRemove()
Return any current value of the valuesToRemove in the the attributeDelta that is being built.- Returns:
- any current value of the valuesToRemove in the attributeDelta that is being built.
-
getValueToReplace
public List<Object> getValueToReplace()
Return any current value of the valuesToReplace in the attribute that is being built.- Returns:
- any current value of the valuesToReplace in the attribute that is being built.
-
addValueToAdd
public AttributeDeltaBuilder addValueToAdd(Collection<?> obj)
Adds each object in the collection as a value for the valuesToAdd of the attributeDelta that is being built.- Parameters:
obj
- the values to add for ValueToAdd- Returns:
- instance of
AttributeDelta
with the specified name and a value that includes the arguments provided.
-
addValueToAdd
public AttributeDeltaBuilder addValueToAdd(Object... objs)
Adds each of the specified objects as a value for the valuesToAdd of the attributeDelta that is being built.- Parameters:
objs
- the values to add for ValueToAdd- Returns:
- instance of
AttributeDelta
with the specified name and a value that includes the arguments provided.
-
addValueToRemove
public AttributeDeltaBuilder addValueToRemove(Collection<?> obj)
Adds each object in the collection as a value for the valuesToRemove of the attributeDelta that is being built.- Parameters:
obj
- the values to add for ValueToRemove- Returns:
- a new attributeDelta with the name and any values of the valuesToAdd that have been provided to the builder.
- Throws:
NullPointerException
- if any of the values is null.IllegalArgumentException
- if no name has been provided.
-
addValueToRemove
public AttributeDeltaBuilder addValueToRemove(Object... objs)
Adds each of the specified objects as a value for the valuesToRemove of the attributeDelta that is being built.- Parameters:
objs
- the values to add for ValueToRemove- Returns:
- instance of
AttributeDelta
with the specified name and a value that includes the arguments provided.
-
addValueToReplace
public AttributeDeltaBuilder addValueToReplace(Collection<?> obj)
Adds each object in the collection as a value for the valuesToReplace of the attributeDelta that is being built.- Parameters:
obj
- the values to add for ValueToReplace- Returns:
- a new attributeDelta with the name and any values of the valuesToRemove that have been provided to the builder.
- Throws:
NullPointerException
- if any of the values is null.IllegalArgumentException
- if no name has been provided.
-
addValueToReplace
public AttributeDeltaBuilder addValueToReplace(Object... objs)
Adds each of the specified objects as a value for the valuesToReplace of the attributeDelta that is being built.- Parameters:
objs
- the values to add for ValueToReplace- Returns:
- instance of
AttributeDelta
with the specified name and a value that includes the arguments provided.
-
build
public AttributeDelta build()
Creates a attributeDelta with the specified name and the value for valuesToAdd, valuesToRemove and valuesToReplace that have been provided to the builder.- Returns:
- instance of
AttributeDelta
with name andList<Object>
for valuesToAdd, valuesToRemove and valuesToReplace. - Throws:
IllegalArgumentException
- if no name has been provided.
-
buildPasswordExpirationDate
public static AttributeDelta buildPasswordExpirationDate(Date dateTime)
Builds an of operational attribute that represents the date and time that a password will expire on a target system or application.- Parameters:
dateTime
- UTC time in milliseconds.- Returns:
- an
AttributeDelta
with the pre-defined name for password expiration date.
-
buildPasswordExpirationDate
public static AttributeDelta buildPasswordExpirationDate(long dateTime)
Builds an of operational attribute that represents the date and time that a password will expire on a target system or application.- Parameters:
dateTime
- UTC time in milliseconds.- Returns:
- an
AttributeDelta
with the pre-defined name for password expiration date.
-
buildPassword
public static AttributeDelta buildPassword(GuardedString password)
Builds an of operational attribute that represents the password of an object on a target system or application.- Parameters:
password
- the string that represents a password.- Returns:
- an
AttributeDelta
with the predefined name for password.
-
buildPassword
public static AttributeDelta buildPassword(char[] password)
Builds an of operational attribute that represents the password of an object on a target system or application.The caller is responsible for clearing out the array of characters.
- Parameters:
password
- the characters that represent a password.- Returns:
- an
AttributeDelta
with the predefined name for password.
-
buildCurrentPassword
public static AttributeDelta buildCurrentPassword(GuardedString password)
Builds an of operational attribute that represents the current password of an object on a target system or application.Passing the current password indicates the account owner (and not an administrator) is changing the password. The use case is that an administrator password change may not keep history or validate against policy.
- Parameters:
password
- the string that represents a password.- Returns:
- an
AttributeDelta
with the predefined name for current password.
-
buildCurrentPassword
public static AttributeDelta buildCurrentPassword(char[] password)
Builds an of operational attribute that represents the current password of an object on a target system or application.Passing the current password indicates the account owner (and not an administrator) is changing the password. The use case is that an administrator password change may not keep history or validate against policy.
The caller is responsible for clearing out the array of characters.
- Parameters:
password
- the characters that represent a password.- Returns:
- an
AttributeDelta
with the predefined name for current password.
-
buildEnabled
public static AttributeDelta buildEnabled(boolean value)
Builds an of operational attribute that represents whether object is enabled on a target system or application.- Use this attribute with
CreateApiOp
orUpdateApiOp
to enable or disable an object. - Read this attribute from
GetApiOp
to determine whether an object currently is enabled or disabled. - Use this attribute with
SearchApiOp
to select objects that are enabled or to select objects that are disabled.
- Parameters:
value
- true indicates the object is enabled; otherwise false.- Returns:
- an
AttributeDelta
with the predefined name for enabled.
- Use this attribute with
-
buildEnableDate
public static AttributeDelta buildEnableDate(Date date)
Builds an of operational attribute that represents the date and time to enable an object on a target system or application.- Use this attribute with
CreateApiOp
orUpdateApiOp
to set a date and time to enable an object. - Read this attribute from
GetApiOp
to determine when an object will be enabled. - Use this attribute with
SearchApiOp
to select objects that are scheduled to be enabled at a certain date and time.
- Parameters:
date
- The date and time to enable a particular object.- Returns:
- an
AttributeDelta
with the predefined name for enable date.
- Use this attribute with
-
buildEnableDate
public static AttributeDelta buildEnableDate(long date)
Builds an of operational attribute that represents the date and time to enable an object on a target system or application. The date-and-time parameter is UTC in milliseconds.- Use this attribute with
CreateApiOp
orUpdateApiOp
to set a date and time to enable an object. - Read this attribute from
GetApiOp
to determine when an object will be enabled. - Use this attribute with
SearchApiOp
to select objects that are scheduled to be enabled at a certain date and time.
- Parameters:
date
- The date and time (UTC in milliseconds) to enable a particular object.- Returns:
- an
AttributeDelta
with the predefined name for enable date.
- Use this attribute with
-
buildDisableDate
public static AttributeDelta buildDisableDate(Date date)
Builds an of operational attribute that represents the date and time to disable an object on a target system or application.- Use this attribute with
CreateApiOp
orUpdateApiOp
to set a date and time to disable an object. - Read this attribute from
GetApiOp
to determine when an object will be disabled. - Use this attribute with
SearchApiOp
to select objects that are scheduled to be disabled at a certain date and time.
- Parameters:
date
- The date and time to disable a particular object.- Returns:
- an
AttributeDelta
with the predefined name for disable date.
- Use this attribute with
-
buildDisableDate
public static AttributeDelta buildDisableDate(long date)
Builds an of operational attribute that represents the date and time to disable an object on a target system or application. The date-and-time parameter is UTC in milliseconds.- Use this attribute with
CreateApiOp
orUpdateApiOp
to set a date and time to disable an object. - Read this attribute from
GetApiOp
to determine when an object will be disabled. - Use this attribute with
SearchApiOp
to select objects that are scheduled to be disabled at a certain date and time.
- Parameters:
date
- The date and time (UTC in milliseconds) to disable a particular object.- Returns:
- an
AttributeDelta
with the predefined name for disable date.
- Use this attribute with
-
buildLockOut
public static AttributeDelta buildLockOut(boolean lock)
Builds an of operational attribute that represents whether an object is locked out on a target system or application.- Read this attribute from
GetApiOp
to determine whether an object is currently locked out. - Use this attribute with
UpdateApiOp
to clear the lock-out status of an object (or to set the lock-out status of an object). - Use this attribute with
SearchApiOp
to select objects that are currently locked out (or to select objects that are not currently locked out).
- Parameters:
lock
- true if the object is locked out; otherwise false.- Returns:
- an
AttributeDelta
with the predefined name for lockout state.
- Read this attribute from
-
buildPasswordExpired
public static AttributeDelta buildPasswordExpired(boolean value)
Builds an of operational attribute that represents whether the password of an object is expired on a target system or application.- Read this attribute from
GetApiOp
to determine whether the password of an object is currently expired. - Use this attribute with
UpdateApiOp
to expire the password of an object (or to clear the expired status of the password of an object). - Use this attribute with
SearchApiOp
to select objects that have passwords that are currently expired (or to select objects that have passwords that are not currently expired).
- Parameters:
value
- from the API true expires and from the SPI its shows its either expired or not.- Returns:
- an
AttributeDelta
with the predefined name for password expiration state.
- Read this attribute from
-
buildLastLoginDate
public static AttributeDelta buildLastLoginDate(Date date)
Builds an of pre-defined attribute that represents the date and time of the most recent login for an object (such as an account) on a target system or application.- Parameters:
date
- The date and time of the last login.- Returns:
- an
AttributeDelta
with the predefined name for password expiration state.
-
buildLastLoginDate
public static AttributeDelta buildLastLoginDate(long date)
Builds an of pre-defined attribute that represents the date and time of the most recent login for an object (such as an account) on a target system or application.The time parameter is UTC in milliseconds.
- Parameters:
date
- The date and time (UTC in milliseconds) of the last login.- Returns:
- an
AttributeDelta
with the predefined name for password expiration state.
-
buildLastPasswordChangeDate
public static AttributeDelta buildLastPasswordChangeDate(Date date)
Builds an of pre-defined attribute that represents the date and time that the password was most recently changed for an object (such as an account) on a target system or application.- Parameters:
date
- The date and time that the password was most recently changed.- Returns:
- an
AttributeDelta
with the predefined name for password expiration state.
-
buildLastPasswordChangeDate
public static AttributeDelta buildLastPasswordChangeDate(long date)
Builds an of pre-defined attribute that represents the date and time that the password was most recently changed for an object (such as an account) on a target system or application.The time parameter is UTC in milliseconds.
- Parameters:
date
- The date and time that the password was most recently changed.- Returns:
- an
AttributeDelta
with the predefined name for password expiration state.
-
buildPasswordChangeInterval
public static AttributeDelta buildPasswordChangeInterval(long value)
Builds an of pre-defined attribute that represents how often the password must be changed for an object (such as an account) on a target system or application.The value for this attribute is expressed in milliseconds.
- Parameters:
value
- The number of milliseconds between the time that the password was most recently changed and the time when the password must be changed again.- Returns:
- an
AttributeDelta
with the predefined name for password expiration state.
-
-