Overview | Package | Class | Tree | Deprecated | Index | Help
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## portlets.compoze.groupware
Class RecipientInfo

    java.lang.Object
      portlets.compoze.groupware.RecipientInfo

All Implemented Interfaces:
  java.io.Serializable

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

This class represents information about recipients.

See Also:
  Serialized Form

Nested Class Summary
`static class` | `RecipientInfo.Recipient` This class represents a recipient.
`static class` | `RecipientInfo.UnresolvedRecipient` This class represents an unresolved recipient.

Field Summary
`protected RecipientInfo.Recipient[]` | `m_bccRecipients`
`protected RecipientInfo.Recipient[]` | `m_ccRecipients`
`protected RecipientInfo.Recipient[]` | `m_resourceRecipients`
`protected RecipientInfo.Recipient[]` | `m_roomRecipients`
`protected RecipientInfo.Recipient[]` | `m_toRecipients`
`static java.lang.String` | `RECIPIENT_NAME_SEPARATOR` This value represents the deliminter for separating recipients.

Constructor Summary
`RecipientInfo()` Constructor.
`RecipientInfo(RecipientInfo.Recipient[] toRecipients, RecipientInfo.Recipient[] ccRecipients, RecipientInfo.Recipient[] bccRecipients)` Constructor.
`RecipientInfo(RecipientInfo.Recipient[] toRecipients, RecipientInfo.Recipient[] ccRecipients, RecipientInfo.Recipient[] bccRecipients, RecipientInfo.Recipient[] roomRecipients, RecipientInfo.Recipient[] resourceRecipients)` Constructor.

Method Summary
`static java.lang.String` | `appendRecipient(java.lang.String sRecipientList, java.lang.String sRecipient)` Appends the recipient to the separated sequence of recipient addresses using the delimiter.
`static RecipientInfo` | `create(java.lang.String sTo, java.lang.String sCc, java.lang.String sBcc)` Creates the recipient info from the to, cc and bcc strings.
`static RecipientInfo` | `create(java.lang.String sTo, java.lang.String sCc, java.lang.String sBcc, boolean bCommaSeperated)` Creates the recipient info from the to, cc and bcc strings.
`static RecipientInfo` | `create(java.lang.String sTo, java.lang.String sCc, java.lang.String sBcc, java.lang.String sRoom, java.lang.String sResource, boolean bCommaSeperated)` Creates the recipient info from the to, cc and bcc strings.
`RecipientInfo.Recipient[]` | `getBccRecipients()` Gets the 'bcc' recipients.
`RecipientInfo.Recipient[]` | `getCcRecipients()` Gets the 'cc' recipients.
`static java.lang.String` | `getRecipientList(RecipientInfo.Recipient[] recipients)` Gets a separated sequence of recipient display names from the specified recipient info array using the delimiter.
`static java.lang.String` | `getRecipientList(RecipientInfo.Recipient[] recipients, java.lang.String sPostfix, int iMaxLength)` Gets a pretty-truncated, separated sequence of recipient display names from the specified recipient info array using the delimiter.
`static java.lang.String` | `getRecipientListEmails(RecipientInfo.Recipient[] recipients)` Gets a separated sequence of recipient e-mail addresses from the specified recipient info array using the delimiter.
`RecipientInfo.Recipient[]` | `getResourceRecipients()` Gets the 'resource' recipients.
`RecipientInfo.Recipient[]` | `getRoomRecipients()` Gets the 'room' recipients.
`RecipientInfo.Recipient[]` | `getToRecipients()` Gets the 'to' recipients.
`boolean` | `hasRecipients()` Checks if the recipient info has any recipients.
`boolean` | `hasUnresolvedRecipients()` Checks if the recipient info has unresolved recipients.
`boolean` | `isBccRecipient(int iIndex)` Checks if the specified recipient index is a 'bcc' recipient.
`boolean` | `isCcRecipient(int iIndex)` Checks if the specified recipient index is a 'cc' recipient.
`boolean` | `isToRecipient(int iIndex)` Checks if the specified recipient index is a 'to' recipient.
`protected static java.lang.String` | `prettyTruncate(java.lang.String sStr, java.lang.String sPostfix, int iLength)` Truncates a string after a certain number of characters and append the specified string to it.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### RECIPIENT_NAME_SEPARATOR

    public static final java.lang.String RECIPIENT_NAME_SEPARATOR

  This value represents the deliminter for separating recipients.

  See Also:
    Constant Field Values

### m_toRecipients

    protected RecipientInfo.Recipient[] m_toRecipients

### m_ccRecipients

    protected RecipientInfo.Recipient[] m_ccRecipients

### m_bccRecipients

    protected RecipientInfo.Recipient[] m_bccRecipients

### m_roomRecipients

    protected RecipientInfo.Recipient[] m_roomRecipients

### m_resourceRecipients

    protected RecipientInfo.Recipient[] m_resourceRecipients

Constructor Detail

### RecipientInfo

    public RecipientInfo()

  Constructor.

### RecipientInfo

    public RecipientInfo(RecipientInfo.Recipient[] toRecipients,
                         RecipientInfo.Recipient[] ccRecipients,
                         RecipientInfo.Recipient[] bccRecipients)

  Constructor.

Parameters:
  `toRecipients` - the 'to' recipients (may not be `null`)
  `ccRecipients` - the 'cc' recipients (may not be `null`)
  `bccRecipients` - the 'bcc' recipients (may not be `null`)

### RecipientInfo

    public RecipientInfo(RecipientInfo.Recipient[] toRecipients,
                         RecipientInfo.Recipient[] ccRecipients,
                         RecipientInfo.Recipient[] bccRecipients,
                         RecipientInfo.Recipient[] roomRecipients,
                         RecipientInfo.Recipient[] resourceRecipients)

  Constructor.

Parameters:
  `toRecipients` - the 'to' recipients (may not be `null`)
  `ccRecipients` - the 'cc' recipients (may not be `null`)
  `bccRecipients` - the 'bcc' recipients (may not be `null`)
  `roomRecipients` - the 'room' recipients (may not be `null`)
  `resourceRecipients` - the 'resource' recipients (may not be `null`)

Method Detail

### isToRecipient

    public boolean isToRecipient(int iIndex)

  Checks if the specified recipient index is a 'to' recipient.

  Parameters:
    `iIndex` - the recipient index
  Returns:
    `true` if the specified recipient index is a 'to' recipient; `false` otherwise

### isCcRecipient

    public boolean isCcRecipient(int iIndex)

  Checks if the specified recipient index is a 'cc' recipient.

  Parameters:
    `iIndex` - the recipient index
  Returns:
    `true` if the specified recipient index is a 'cc' recipient; `false` otherwise

### isBccRecipient

    public boolean isBccRecipient(int iIndex)

  Checks if the specified recipient index is a 'bcc' recipient.

  Parameters:
    `iIndex` - the recipient index
  Returns:
    `true` if the specified recipient index is a 'bcc' recipient; `false` otherwise

### getToRecipients

    public RecipientInfo.Recipient[] getToRecipients()

  Gets the 'to' recipients.

  Returns:
    the 'to' recipients or an empty array for none

### getRoomRecipients

    public RecipientInfo.Recipient[] getRoomRecipients()

  Gets the 'room' recipients.

  Returns:
    the 'room' recipients or an empty array for none

### getResourceRecipients

    public RecipientInfo.Recipient[] getResourceRecipients()

  Gets the 'resource' recipients.

  Returns:
    the 'resource' recipients or an empty array for none

### appendRecipient

    public static java.lang.String appendRecipient(java.lang.String sRecipientList,
                                                   java.lang.String sRecipient)

  Appends the recipient to the separated sequence of recipient addresses using the delimiter.

  Parameters:
    `sRecipientList` - a separated sequence of recipient addresses
    `sRecipient` - the recipient to append
  Returns:
    a separated sequence of addresses
  See Also:
    `RECIPIENT_NAME_SEPARATOR`

### getRecipientList

    public static java.lang.String getRecipientList(RecipientInfo.Recipient[] recipients)

  Gets a separated sequence of recipient display names from the specified recipient info array using the delimiter.

  Parameters:
    `recipients` - the recipient info to build the list from (may not be `null`)
  Returns:
    a separated sequence of recipient display names
  See Also:
    `RECIPIENT_NAME_SEPARATOR`

### getRecipientListEmails

    public static java.lang.String getRecipientListEmails(RecipientInfo.Recipient[] recipients)

  Gets a separated sequence of recipient e-mail addresses from the specified recipient info array using the delimiter.

  Parameters:
    `recipients` - the recipient info to build the list from (may not be `null`)
  Returns:
    a separated sequence of recipient e-mail addresses
  See Also:
    `RECIPIENT_NAME_SEPARATOR`

### getRecipientList

    public static java.lang.String getRecipientList(RecipientInfo.Recipient[] recipients,
                                                    java.lang.String sPostfix,
                                                    int iMaxLength)

  Gets a pretty-truncated, separated sequence of recipient display names from the specified recipient info array using the delimiter.

  Parameters:
    `recipients` - the recipient info to build the list from (may not be `null`)
    `sPostfix` - the string to put at the end of the original recipient string
  Returns:
    a separated sequence of recipient display names
  See Also:
    `RECIPIENT_NAME_SEPARATOR`

### getCcRecipients

    public RecipientInfo.Recipient[] getCcRecipients()

  Gets the 'cc' recipients.

  Returns:
    the 'cc' recipients or an empty array for none

### getBccRecipients

    public RecipientInfo.Recipient[] getBccRecipients()

  Gets the 'bcc' recipients.

  Returns:
    the 'bcc' recipients or an empty array for none

### create

    public static RecipientInfo create(java.lang.String sTo,
                                       java.lang.String sCc,
                                       java.lang.String sBcc)

  Creates the recipient info from the to, cc and bcc strings.

  Parameters:
    `sTo` - the to recipient strings to parse
    `sCc` - the cc recipient strings to parse
    `sBcc` - the bcc recipient strings to parse

### create

    public static RecipientInfo create(java.lang.String sTo,
                                       java.lang.String sCc,
                                       java.lang.String sBcc,
                                       boolean bCommaSeperated)

  Creates the recipient info from the to, cc and bcc strings.

  Parameters:
    `sTo` - the to recipient strings to parse
    `sCc` - the cc recipient strings to parse
    `sBcc` - the bcc recipient strings to parse
    `bCommaSeperated` - `true` if using comma as separator, or `false` otherwise
  Returns:
    the recipient info (see #RecipientInfo) created

### hasUnresolvedRecipients

    public boolean hasUnresolvedRecipients()

  Checks if the recipient info has unresolved recipients.

  Returns:
    `true` if the recipient info has unresolved recipients; `false` otherwise

### hasRecipients

    public boolean hasRecipients()

  Checks if the recipient info has any recipients.

  Returns:
    `true` if the recipient info has any recipients; `false` otherwise

### prettyTruncate

    protected static java.lang.String prettyTruncate(java.lang.String sStr,
                                                     java.lang.String sPostfix,
                                                     int iLength)

  Truncates a string after a certain number of characters and append the specified string to it. This is useful for taking a string and appending "..." if the string becomes too long.

  Parameters:
    `sStr` - the original string
    `sPostfix` - the string to put at the end of the original string
    `iLength` - the maximum length of the result (string plus postfix)

### create

    public static RecipientInfo create(java.lang.String sTo,
                                       java.lang.String sCc,
                                       java.lang.String sBcc,
                                       java.lang.String sRoom,
                                       java.lang.String sResource,
                                       boolean bCommaSeperated)

  Creates the recipient info from the to, cc and bcc strings.

  Parameters:
    `sTo` - the to recipient strings to parse
    `sCc` - the cc recipient strings to parse
    `sBcc` - the bcc recipient strings to parse
    `sRoom` - the room recipient strings to parse
    `sResource` - the resource recipient strings to parse
    `bCommaSeperated` - `true` if using comma as separator, or `false` otherwise
  Returns:
    the recipient info (see #RecipientInfo) created

Overview | Package | Class | Tree | Deprecated | Index | Help
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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