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

## com.compoze.ebusiness
Class Recipients

    java.lang.Object
      |
      +--com.compoze.ebusiness.Recipients

All Implemented Interfaces:
  java.io.Serializable

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

This class implements a collection of recipients. A collection of recipients provides an way to add SMTP recipients and resolve the addresses of those recipients.

See Also:
  `Recipient`, Serialized Form

Constructor Summary
`Recipients()` Constructor.

Method Summary
`void` | `addSmtp(java.lang.String sAddress)` Adds the recipient in the collection as required
`void` | `addSmtp(java.lang.String sAddress, RecipientRole role)` Adds the recipient in the collection.
`int` | `getCount()` Gets the number of recipients in the collection.
`Recipient` | `getFirstUnresolved()` Gets the first unresolved recipient in the collection.
`Recipient` | `getNextUnresolved()` Gets the next unresolved recipient in the collection.
`javax.mail.internet.InternetAddress[]` | `getResolved()` Gets the resolved recipients in the collection.
`boolean` | `isResolved()` Checks if the recepients are all resolved.
`java.util.List` | `recipients()` Gets the list of recipients in the collection.
`java.util.List` | `recipients(RecipientRole role)` Gets the list of recipients in the collection matching the specified role.
`void` | `resolve()` Resolves all of the recipients in the collection.
`java.lang.String` | `toString()` Returns the string representation of the object.

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

Constructor Detail

### Recipients

    public Recipients()

  Constructor.

Method Detail

### addSmtp

    public void addSmtp(java.lang.String sAddress)

  Adds the recipient in the collection as required
  Parameters:
    `sAddress` - the address of the repicient (for example, "somebody@somewhere.com")

### addSmtp

    public void addSmtp(java.lang.String sAddress,
                        RecipientRole role)

  Adds the recipient in the collection.
  Parameters:
    `sAddress` - the address of the repicient (for example, "somebody@somewhere.com")
    `role` - the role of the recipient

### getCount

    public int getCount()

  Gets the number of recipients in the collection.
  Returns:
    the number of recipients in the collection

### recipients

    public java.util.List recipients()

  Gets the list of recipients in the collection.
  Returns:
    a list of `Recipient`s in the collection (unmodifiable)

### recipients

    public java.util.List recipients(RecipientRole role)

  Gets the list of recipients in the collection matching the specified role.
  Parameters:
    `role` - the recipient role to match (may not be `null`)
  Returns:
    a list of `Recipient`s in the collection (unmodifiable)

### getResolved

    public javax.mail.internet.InternetAddress[] getResolved()

  Gets the resolved recipients in the collection.
  Returns:
    an array of addresses corresponding to a recipient

### getFirstUnresolved

    public Recipient getFirstUnresolved()

  Gets the first unresolved recipient in the collection.
  Returns:
    the recipient from the collection or `null` if there are no unresolved recipients

### getNextUnresolved

    public Recipient getNextUnresolved()

  Gets the next unresolved recipient in the collection.
  Returns:
    the recipient from the collection or `null` if there are no more unresolved recipients

### resolve

    public void resolve()

  Resolves all of the recipients in the collection.

### isResolved

    public boolean isResolved()

  Checks if the recepients are all resolved.
  Returns:
    `true` if the recipients are all resolved; `false` otherwise

### toString

    public java.lang.String toString()

  Returns the string representation of the object.
  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    the string representation of the object

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

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