org.opends.server.types
Class AccountStatusNotification

java.lang.Object
  extended by org.opends.server.types.AccountStatusNotification

@PublicAPI(stability=VOLATILE,
           mayInstantiate=false,
           mayExtend=false,
           mayInvoke=true)
public final class AccountStatusNotification
extends java.lang.Object

This class defines a data type for storing information associated with an account status notification.


Constructor Summary
AccountStatusNotification(AccountStatusNotificationType notificationType, Entry userEntry, Message message, java.util.Map<AccountStatusNotificationProperty,java.util.List<java.lang.String>> notificationProperties)
          Creates a new account status notification object with the provided information.
 
Method Summary
static java.util.Map<AccountStatusNotificationProperty,java.util.List<java.lang.String>> createProperties(PasswordPolicyState pwPolicyState, boolean tempLocked, int timeToExpiration, java.util.List<AttributeValue> oldPasswords, java.util.List<AttributeValue> newPasswords)
          Creates a set of account status notification properties from the provided information.
 Message getMessage()
          Retrieves a message that provides additional information for this account status notification.
 java.util.Map<AccountStatusNotificationProperty,java.util.List<java.lang.String>> getNotificationProperties()
          Retrieves a set of properties that may provide additional information for this account status notification.
 java.util.List<java.lang.String> getNotificationProperty(AccountStatusNotificationProperty property)
          Retrieves the set of values for the specified account status notification property.
 AccountStatusNotificationType getNotificationType()
          Retrieves the notification type for this account status notification.
 DN getUserDN()
          Retrieves the DN of the user entry to which this notification applies.
 Entry getUserEntry()
          Retrieves user entry for whom this notification applies.
 java.lang.String toString()
          Retrieves a string representation of this account status notification.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AccountStatusNotification

public AccountStatusNotification(AccountStatusNotificationType notificationType,
                                 Entry userEntry,
                                 Message message,
                                 java.util.Map<AccountStatusNotificationProperty,java.util.List<java.lang.String>> notificationProperties)
Creates a new account status notification object with the provided information.

Parameters:
notificationType - The type for this account status notification.
userEntry - The entry for the user to whom this notification applies.
message - The human-readable message for this notification.
notificationProperties - A set of properties that may include additional information about this notification.
Method Detail

getNotificationType

public AccountStatusNotificationType getNotificationType()
Retrieves the notification type for this account status notification.

Returns:
The notification type for this account status notification.

getUserDN

public DN getUserDN()
Retrieves the DN of the user entry to which this notification applies.

Returns:
The DN of the user entry to which this notification applies.

getUserEntry

public Entry getUserEntry()
Retrieves user entry for whom this notification applies.

Returns:
The user entry for whom this notification applies.

getMessage

public Message getMessage()
Retrieves a message that provides additional information for this account status notification.

Returns:
A message that provides additional information for this account status notification.

getNotificationProperties

public java.util.Map<AccountStatusNotificationProperty,java.util.List<java.lang.String>> getNotificationProperties()
Retrieves a set of properties that may provide additional information for this account status notification.

Returns:
A set of properties that may provide additional information for this account status notification.

getNotificationProperty

public java.util.List<java.lang.String> getNotificationProperty(AccountStatusNotificationProperty property)
Retrieves the set of values for the specified account status notification property.

Parameters:
property - The account status notification property for which to retrieve the associated values.
Returns:
The set of values for the specified account status notification property, or null if the specified property is not defined for this account status notification.

createProperties

@PublicAPI(stability=PRIVATE,
           mayInstantiate=false,
           mayExtend=false,
           mayInvoke=false)
public static java.util.Map<AccountStatusNotificationProperty,java.util.List<java.lang.String>> createProperties(PasswordPolicyState pwPolicyState,
                                                                                                                                                                           boolean tempLocked,
                                                                                                                                                                           int timeToExpiration,
                                                                                                                                                                           java.util.List<AttributeValue> oldPasswords,
                                                                                                                                                                           java.util.List<AttributeValue> newPasswords)
Creates a set of account status notification properties from the provided information.

Parameters:
pwPolicyState - The password policy state for the user associated with the notification.
tempLocked - Indicates whether the user's account has been temporarily locked.
timeToExpiration - The length of time in seconds until the user's password expires, or -1 if it's not about to expire.
oldPasswords - The set of old passwords for the user, or null if this is not applicable.
newPasswords - The set of new passwords for the user, or null if this is not applicable.
Returns:
The created set of account status notification properties.

toString

public java.lang.String toString()
Retrieves a string representation of this account status notification.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this account status notification.