Compoze Software, Inc.

com.compoze.contact
Class DistributionList


java.lang.Object

  |

  +--com.compoze.contact.DistributionList

All Implemented Interfaces:
java.io.Serializable

public class DistributionList
extends java.lang.Object
implements java.io.Serializable

This class represents a distribution list. Distribution lists contain a collection of contacts (obtained with getContacts()), a collection of sub-lists (obtained with getDistributionLists()) and a parent distribution list (obtained with getParent()). The distribution list also has the ability to manipulate itself (copy or move itself to another distribution list, rename, etc).

To add and search for distribution lists, see the DistributionLists collection class. Once the list is obtained, its accessor methods may be called to set and get properties. The update() method must be called to store any changes to the server.

If you wish to begin manipulating the contacts associated with a list, get the contacts collection using getContacts() and look to its documentation for further details.

The following table contains the mappings from Distribution List properties to their corresponding Java methods:

Distribution List Property Java Methods
DistributionListProperty.AUTHOR getAuthor()
DistributionListProperty.CONTACT_COUNT getContactCount()
DistributionListProperty.DATE_CREATED getDateCreated()
DistributionListProperty.DATE_LAST_MODIFIED getDateLastModified()
DistributionListProperty.DESCRIPTION getDescription()
DistributionListProperty.DISTRIBUTION_LIST_COUNT getDistributionListCount()
DistributionListProperty.FLAG getFlag()
DistributionListProperty.NAME getName()
DistributionListProperty.CUSTOM_NUM1 getCustomNum1()
DistributionListProperty.CUSTOM_NUM2 getCustomNum2()
DistributionListProperty.CUSTOM_NUM3 getCustomNum3()
DistributionListProperty.CUSTOM_NUM4 getCustomNum4()
DistributionListProperty.CUSTOM_STR1 getCustomStr1()
DistributionListProperty.CUSTOM_STR2 getCustomStr2()
DistributionListProperty.CUSTOM_STR3 getCustomStr3()
DistributionListProperty.CUSTOM_STR4 getCustomStr4()

See Also:
Serialized Form

Constructor Summary
DistributionList()
          Constructor.
 
Method Summary
 void clearFlag()
          Clears the flag on this distribution list.
 DistributionList copyTo(DistributionList targetList, boolean bRecursive)
          Copies the lists of this distribution list to the specified target distribution list.
 DistributionList copyTo(DistributionList targetList, boolean bRecursive, java.lang.String sNewName)
          Copies the lists of this distribution list to the specified target distribution list.
 void delete()
          Deletes the list and all sub-lists.
 void delete(boolean bRecursive)
          Deletes the list.
 void flag(Flag flag)
          Flags this distribution list with the specified flag.
 AccessManager getAccessManager()
          Gets the access manager for this distribution list.
 java.lang.String getAuthor()
          Gets the name of the author.
 int getContactCount()
          Gets the number of contacts associated with the list.
 ListContacts getContacts()
          Gets the contacts in this distribution list.
 long getCustomNum1()
          Gets the custom number1 field of the distribution list.
 long getCustomNum2()
          Gets the custom number2 field of the distribution list.
 long getCustomNum3()
          Gets the custom number3 field of the distribution list.
 long getCustomNum4()
          Gets the custom number4 field of the distribution list.
 java.lang.String getCustomStr1()
          Gets the custom string1 field of the distribution list.
 java.lang.String getCustomStr2()
          Gets the custom string2 field of the distribution list.
 java.lang.String getCustomStr3()
          Gets the custom string3 field of the distribution list.
 java.lang.String getCustomStr4()
          Gets the custom string4 field of the distribution list.
 java.util.Date getDateCreated()
          Gets the date the distribution list was created.
 java.util.Date getDateLastModified()
          Gets the date the distribution list was last modified.
 java.lang.String getDescription()
          Gets the description of the distribution list.
 int getDistributionListCount()
          Gets the number of lists associated with the list.
 DistributionLists getDistributionLists()
          Gets the sub-lists of this distribution list.
 Flag getFlag()
          Gets the flag of the distribution list.
 long getID()
          Gets the unique identifier (id) of the distribution list.
 java.lang.String getName()
          Gets the name of the distribution list.
 DistributionList getParent()
          Gets the parent list of this distribution list.
 long getParentDistributionListID()
          Gets the parent list id of this distribution list.
 DistributionList moveTo(DistributionList targetList, boolean bRecursive)
          Copies the lists of this distribution list to the specified target distribution list.
 DistributionList moveTo(DistributionList targetList, boolean bRecursive, java.lang.String sNewName)
          Moves the lists of this distribution list to the specified target distribution list.
 void setCustomNum1(long lCustomNum1)
          Sets the custom number1 field of the distribution list.
 void setCustomNum2(long lCustomNum2)
          Sets the custom number2 field of the distribution list.
 void setCustomNum3(long lCustomNum3)
          Sets the custom number3 field of the distribution list.
 void setCustomNum4(long lCustomNum4)
          Sets the custom number4 field of the distribution list.
 void setCustomStr1(java.lang.String sCustomStr1)
          Sets the custom string1 field of the distribution list.
 void setCustomStr2(java.lang.String sCustomStr2)
          Sets the custom string2 field of the distribution list.
 void setCustomStr3(java.lang.String sCustomStr3)
          Sets the custom string3 field of the distribution list.
 void setCustomStr4(java.lang.String sCustomStr4)
          Sets the custom string4 field of the distribution list.
 void setDescription(java.lang.String sDescription)
          Sets the description of the distribution list.
 void setName(java.lang.String sName)
          Sets the name of the distribution list (renames the distribution list).
 java.lang.String toString()
          Returns a string representation of the object.
 boolean update()
          Updates the list (saves the list entry).
 boolean update(boolean bForce)
          Updates the list (saves the list entry).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DistributionList


public DistributionList()
Constructor.
Method Detail

getID


public long getID()
Gets the unique identifier (id) of the distribution list. This is non-zero number that uniquely identifies the distribution list.
Returns:
the id of the distribution list

getAuthor


public java.lang.String getAuthor()
Gets the name of the author. The author is the name of the user who originally created this list.
Returns:
the author name

getName


public java.lang.String getName()
Gets the name of the distribution list.
Returns:
the name of the distribution list

setName


public void setName(java.lang.String sName)
Sets the name of the distribution list (renames the distribution list).
Parameters:
sName - the name of distribution list

getFlag


public Flag getFlag()
Gets the flag of the distribution list.
Returns:
the flag of the distribution list or null for none

flag


public void flag(Flag flag)
Flags this distribution list with the specified flag.
Parameters:
flag - the flag

clearFlag


public void clearFlag()
Clears the flag on this distribution list.

getDescription


public java.lang.String getDescription()
Gets the description of the distribution list.
Returns:
the description of the distribution list

setDescription


public void setDescription(java.lang.String sDescription)
Sets the description of the distribution list.
Parameters:
sDescription - the description of distribution list

getContactCount


public int getContactCount()
Gets the number of contacts associated with the list. This number includes the contacts directly under the list.
Returns:
the number of contacts (0 for none)

getDistributionListCount


public int getDistributionListCount()
Gets the number of lists associated with the list. This number includes the lists directly under the list.
Returns:
the number of lists (0 for none)

getDateCreated


public java.util.Date getDateCreated()
Gets the date the distribution list was created.
Returns:
the date created

getDateLastModified


public java.util.Date getDateLastModified()
Gets the date the distribution list was last modified.
Returns:
the date last modified

getCustomNum1


public long getCustomNum1()
Gets the custom number1 field of the distribution list.
Returns:
the custom number1 field of the distribution list or null if the custom number1 field is not set

setCustomNum1


public void setCustomNum1(long lCustomNum1)
Sets the custom number1 field of the distribution list.
Parameters:
lCustomNum1 - the custom number1 field of the distribution list

getCustomNum2


public long getCustomNum2()
Gets the custom number2 field of the distribution list.
Returns:
the custom number2 field of the distribution list or null if the custom number2 field is not set

setCustomNum2


public void setCustomNum2(long lCustomNum2)
Sets the custom number2 field of the distribution list.
Parameters:
lCustomNum2 - the custom number2 field of the distribution list

getCustomNum3


public long getCustomNum3()
Gets the custom number3 field of the distribution list.
Returns:
the custom number3 field of the distribution list or null if the custom number3 field is not set

setCustomNum3


public void setCustomNum3(long lCustomNum3)
Sets the custom number3 field of the distribution list.
Parameters:
lCustomNum3 - the custom number3 field of the distribution list

getCustomNum4


public long getCustomNum4()
Gets the custom number4 field of the distribution list.
Returns:
the custom number4 field of the distribution list or null if the custom number4 field is not set

setCustomNum4


public void setCustomNum4(long lCustomNum4)
Sets the custom number4 field of the distribution list.
Parameters:
lCustomNum4 - the custom number4 field of the distribution list

getCustomStr1


public java.lang.String getCustomStr1()
Gets the custom string1 field of the distribution list.
Returns:
the custom string1 field of the distribution list or null if the custom string1 field is not set

setCustomStr1


public void setCustomStr1(java.lang.String sCustomStr1)
Sets the custom string1 field of the distribution list.
Parameters:
sCustomStr1 - the custom string1 field of the distribution list

getCustomStr2


public java.lang.String getCustomStr2()
Gets the custom string2 field of the distribution list.
Returns:
the custom string2 field of the distribution list or null if the custom string2 field is not set

setCustomStr2


public void setCustomStr2(java.lang.String sCustomStr2)
Sets the custom string2 field of the distribution list.
Parameters:
sCustomStr2 - the custom string2 field of the distribution list

getCustomStr3


public java.lang.String getCustomStr3()
Gets the custom string3 field of the distribution list.
Returns:
the custom string3 field of the distribution list or null if the custom string3 field is not set

setCustomStr3


public void setCustomStr3(java.lang.String sCustomStr3)
Sets the custom string3 field of the distribution list.
Parameters:
sCustomStr3 - the custom string3 field of the distribution list

getCustomStr4


public java.lang.String getCustomStr4()
Gets the custom string4 field of the distribution list.
Returns:
the custom string4 field of the distribution list or null if the custom string4 field is not set

setCustomStr4


public void setCustomStr4(java.lang.String sCustomStr4)
Sets the custom string4 field of the distribution list.
Parameters:
sCustomStr4 - the custom string4 field of the distribution list

getAccessManager


public AccessManager getAccessManager()
                               throws AccessManagerException
Gets the access manager for this distribution list. The access manager is used to modify the permissions.
Returns:
the access manager for this distribution list
Throws:
AccessManagerException - an error occurs retrieving the access manager
See Also:
ContactPermission

copyTo


public DistributionList copyTo(DistributionList targetList,
                               boolean bRecursive)
Copies the lists of this distribution list to the specified target distribution list.
Parameters:
targetList - the target list to copy the lists to
bRecursive - true to copy sub-lists as well
Returns:
the target distribution list

copyTo


public DistributionList copyTo(DistributionList targetList,
                               boolean bRecursive,
                               java.lang.String sNewName)
Copies the lists of this distribution list to the specified target distribution list.
Parameters:
targetList - the target list to copy the lists to
bRecursive - true to copy sub-lists as well
sNewName - the new name for the distribution list
Returns:
the new distribution list

moveTo


public DistributionList moveTo(DistributionList targetList,
                               boolean bRecursive)
Copies the lists of this distribution list to the specified target distribution list.
Parameters:
targetList - the target list to move the lists to
bRecursive - true to move sub-lists as well
Returns:
the target distribution list

moveTo


public DistributionList moveTo(DistributionList targetList,
                               boolean bRecursive,
                               java.lang.String sNewName)
Moves the lists of this distribution list to the specified target distribution list.
Parameters:
targetList - the target list to move the lists to
bRecursive - true to move sub-lists as well
sNewName - the new name for the distribution list
Returns:
the new distribution list

getParentDistributionListID


public long getParentDistributionListID()
Gets the parent list id of this distribution list.
Returns:
the parent id of this distribution list (or 0 if there is no parent)

getParent


public DistributionList getParent()
Gets the parent list of this distribution list.
Returns:
the parent of this distribution list (or null if there is no parent)

getDistributionLists


public DistributionLists getDistributionLists()
Gets the sub-lists of this distribution list.
Returns:
the sub-lists of this distribution list

getContacts


public ListContacts getContacts()
Gets the contacts in this distribution list.
Returns:
the contacts in this distribution list (or null if there are no contacts)

update


public boolean update()
               throws java.security.AccessControlException
Updates the list (saves the list entry). This method must be called to commit changes to the list.
Throws:
java.security.AccessControlException - occurs if the user does not have permission to edit the distribution list

update


public boolean update(boolean bForce)
               throws java.security.AccessControlException
Updates the list (saves the list entry). This method must be called to commit changes to the list.
Parameters:
bForce - true to force the update; false otherwise (currently ignored)
Returns:
true if the update is successful; false otherwise
Throws:
java.security.AccessControlException - occurs if the user does not have permission to edit the distribution list

delete


public void delete()
            throws java.security.AccessControlException
Deletes the list and all sub-lists.
Throws:
java.security.AccessControlException - occurs if the user does not have permission to delete the list

delete


public void delete(boolean bRecursive)
            throws java.security.AccessControlException
Deletes the list.
Parameters:
bRecursive - true to recursively remove all sub-lists
Throws:
java.security.AccessControlException - occurs if the user does not have permission to delete the list

toString


public java.lang.String toString()
Returns a string representation of the object.
Overrides:
toString in class java.lang.Object
Returns:
the string representation of the object

Compoze Software, Inc.

Copyright ©1999-2001 Compoze Software, Inc. All rights reserved.