wt.notify
Class WTDistributionList

java.lang.Object
  extended bywt.notify.WTDistributionList
All Implemented Interfaces:
DistributionList, Evolvable, Externalizable, Serializable

public class WTDistributionList
extends Object
implements DistributionList, Evolvable

Reference implementation of DistributionList.

Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
static long EXTERNALIZATION_VERSION_UID
           
protected static long OLD_FORMAT_VERSION_UID
           
private  Vector principals
           
private static long R60_VERSION_UID
           
private  boolean resolved
           
private  Vector resolvedUsers
           
private static String RESOURCE
           
private  Vector roleholders2
           
private  Vector roles
           
(package private) static long serialVersionUID
           
private  Vector userLocales
           
 
Constructor Summary
WTDistributionList()
          no-arg constructor

Supported API: false
WTDistributionList(WTUser recipient)
          

Supported API: false
 
Method Summary
 void addPrincipal(WTPrincipal principal)
          Adds a principal to the list.
 void addPrincipal(WTPrincipalReference principal_ref)
          Adds a principal to the list.
 void addRecipient(Object object)
          Add a recipient to the distribution list.
 void addRole(Role role)
          Specifies which roles in the distribution list's roleholders should be resolved to users.
 void addRoleHolder(RoleHolder2 roleHolder2)
          

Supported API: false
 void addUser(WTUser user)
          Add the given user to the list of WTUsers, and add that user's locale to the list of Locales.
private  void addUserLocale(WTUser user)
           
 Enumeration getResolvedUsers()
          Derives the unique set of WTUsers based on the users, principals, and roles in the distribution list.
 Enumeration getUserLocales()
          Returns the union of locales used by all the users in the distribution list.
 Enumeration getUsersFromLocale(Locale locale)
          Returns an enumeration of users from a specified locale.
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
private  Vector readObjectVector(ObjectInput input)
           
private  Vector readObjRefVector(ObjectInput input)
           
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
private  Vector readPrincipalRefVector(ObjectInput input)
           
protected  boolean readVersion(WTDistributionList thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
private  Enumeration resolveRolesToPrincipals(Enumeration role_princ_enum, RoleHolder2 role_map)
           
private  void resolveToUsers(RoleHolder2 role_map)
           
private  void resolveUsers()
           
protected  void setResolvedUsers(Vector users)
          

Supported API: false
 String toString()
          Returns string representation of the object.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
private  void writeObjectVector(ObjectOutput output, Vector vector)
           
private  void writeObjRefVector(ObjectOutput output, Vector vector)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

resolved

private boolean resolved

resolvedUsers

private Vector resolvedUsers

userLocales

private Vector userLocales

principals

private Vector principals

roles

private Vector roles

roleholders2

private Vector roleholders2

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values

R60_VERSION_UID

private static final long R60_VERSION_UID
See Also:
Constant Field Values
Constructor Detail

WTDistributionList

public WTDistributionList()
no-arg constructor

Supported API: false


WTDistributionList

public WTDistributionList(WTUser recipient)
                   throws WTException


Supported API: false

Parameters:
recipient -
Throws:
WTException
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(WTDistributionList thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

setResolvedUsers

protected void setResolvedUsers(Vector users)


Supported API: false

Parameters:
users -

addPrincipal

public void addPrincipal(WTPrincipal principal)
                  throws WTException
Adds a principal to the list. If principal already in the list, action is ignored.

Supported API: false

Specified by:
addPrincipal in interface DistributionList
Parameters:
principal - the WTPrincipal object to be added to the rolePrincipalMap
Throws:
WTException

addPrincipal

public void addPrincipal(WTPrincipalReference principal_ref)
Adds a principal to the list. If principal already in the list, action is ignored.

Supported API: false

Specified by:
addPrincipal in interface DistributionList
Parameters:
principal_ref -

addUser

public void addUser(WTUser user)
             throws WTException
Add the given user to the list of WTUsers, and add that user's locale to the list of Locales.

Supported API: false

Specified by:
addUser in interface DistributionList
Parameters:
user -
Throws:
WTException

addRecipient

public void addRecipient(Object object)
                  throws WTException
Add a recipient to the distribution list. The recipient can be one of:

Supported API: false

Specified by:
addRecipient in interface DistributionList
Parameters:
object -
Throws:
WTException

getResolvedUsers

public Enumeration getResolvedUsers()
                             throws WTException
Derives the unique set of WTUsers based on the users, principals, and roles in the distribution list.

Supported API: false

Specified by:
getResolvedUsers in interface DistributionList
Returns:
Enumeration
Throws:
WTException

getUserLocales

public Enumeration getUserLocales()
                           throws WTException
Returns the union of locales used by all the users in the distribution list.

Supported API: false

Specified by:
getUserLocales in interface DistributionList
Returns:
Enumeration
Throws:
WTException

getUsersFromLocale

public Enumeration getUsersFromLocale(Locale locale)
                               throws WTException
Returns an enumeration of users from a specified locale. If locale is null, returns users from the default locale.

Supported API: false

Specified by:
getUsersFromLocale in interface DistributionList
Parameters:
locale -
Returns:
Enumeration
Throws:
WTException

addRole

public void addRole(Role role)
             throws WTException
Specifies which roles in the distribution list's roleholders should be resolved to users.

Supported API: false

Specified by:
addRole in interface DistributionList
Parameters:
role -
Throws:
WTException

addRoleHolder

public void addRoleHolder(RoleHolder2 roleHolder2)
                   throws WTException


Supported API: false

Specified by:
addRoleHolder in interface DistributionList
Parameters:
roleHolder2 -
Throws:
WTException

addUserLocale

private void addUserLocale(WTUser user)
                    throws WTException
Throws:
WTException

resolveToUsers

private void resolveToUsers(RoleHolder2 role_map)
                     throws WTException
Throws:
WTException

resolveRolesToPrincipals

private Enumeration resolveRolesToPrincipals(Enumeration role_princ_enum,
                                             RoleHolder2 role_map)
                                      throws WTException
Throws:
WTException

resolveUsers

private void resolveUsers()
                   throws WTException
Throws:
WTException

writeObjRefVector

private void writeObjRefVector(ObjectOutput output,
                               Vector vector)
                        throws IOException
Throws:
IOException

writeObjectVector

private void writeObjectVector(ObjectOutput output,
                               Vector vector)
                        throws IOException
Throws:
IOException

readPrincipalRefVector

private Vector readPrincipalRefVector(ObjectInput input)
                               throws IOException,
                                      ClassNotFoundException
Throws:
IOException
ClassNotFoundException

readObjRefVector

private Vector readObjRefVector(ObjectInput input)
                         throws IOException,
                                ClassNotFoundException
Throws:
IOException
ClassNotFoundException

readObjectVector

private Vector readObjectVector(ObjectInput input)
                         throws IOException,
                                ClassNotFoundException
Throws:
IOException
ClassNotFoundException

toString

public String toString()
Returns string representation of the object.