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 Accounts

    java.lang.Object
      portlets.compoze.groupware.Accounts

All Implemented Interfaces:
  java.io.Serializable

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

This class represents the user accounts.

See Also:
  Serialized Form

Nested Class Summary
`static class` | `Accounts.CannotDeleteAccountException` This class represents the exception throw when attempting to delete the last/only account

Field Summary
`static java.lang.String` | `ACCOUNT_ID_DELIM`
`static int` | `ACCOUNT_NAME_MAX_LENGTH`
`static java.lang.String` | `PROPERTY_ACCOUNT`
`static java.lang.String` | `PROPERTY_ACCOUNT_DEFAULT`
`static java.lang.String` | `PROPERTY_ACCOUNT_IDS`

Constructor Summary
`Accounts(GroupwareSession session, com.bea.p13n.usermgmt.profile.ProfileWrapper userProfileWrapper)` Constructor.

Method Summary
`Account` | `addAccount(com.bea.p13n.usermgmt.profile.ProfileWrapper userProfileWrapper, java.lang.String sName, java.lang.String sProviderName)` Adds the account with the specified name.
`void` | `deleteAccount(com.bea.p13n.usermgmt.profile.ProfileWrapper userProfileWrapper, java.lang.String sID)` Deletes the specified account.
`Account` | `getAccount(java.lang.String sID)` Gets the account by the specified ID.
`Account[]` | `getAccounts()` Gets the accounts.
`Account` | `getCurrentAccount()` Gets the current account.
`Account` | `getDefaultAccount()` Gets the default account.
`ConnectionPropertyValue[]` | `getDefaultConnectionPropertyValues(javax.servlet.http.HttpSession session, com.bea.p13n.usermgmt.profile.ProfileWrapper userProfileWrapper)` Gets the default account property values.
`portlets.compoze.groupware.controls.provider.Provider` | `getDefaultProvider()` Gets the default provider for accounts that do not have a provider specified.
`java.lang.String` | `getRequiredAccountName(javax.servlet.http.HttpSession session, com.bea.p13n.usermgmt.profile.ProfileWrapper userProfileWrapper)` Gets the name of the required account.
`boolean` | `isAccountRequired(javax.servlet.http.HttpSession session, com.bea.p13n.usermgmt.profile.ProfileWrapper userProfileWrapper)` Checks if at least one account is required.
`boolean` | `isConfigurable()` Checks if accounts are configurable.
`boolean` | `supportsMultipleAccounts()` Checks if multiple accounts are supported.

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

Field Detail

### ACCOUNT_ID_DELIM

    public static final java.lang.String ACCOUNT_ID_DELIM

See Also:
  Constant Field Values

### PROPERTY_ACCOUNT

    public static final java.lang.String PROPERTY_ACCOUNT

See Also:
  Constant Field Values

### PROPERTY_ACCOUNT_IDS

    public static final java.lang.String PROPERTY_ACCOUNT_IDS

See Also:
  Constant Field Values

### PROPERTY_ACCOUNT_DEFAULT

    public static final java.lang.String PROPERTY_ACCOUNT_DEFAULT

See Also:
  Constant Field Values

### ACCOUNT_NAME_MAX_LENGTH

    public static final int ACCOUNT_NAME_MAX_LENGTH

See Also:
  Constant Field Values

Constructor Detail

### Accounts

    public Accounts(GroupwareSession session,
                    com.bea.p13n.usermgmt.profile.ProfileWrapper userProfileWrapper)
             throws GroupwareException

  Constructor.

Parameters:
  `session` - the groupware session (may not be `null`)
  `userProfileWrapper` - the user profile (may not be `null`)

Method Detail

### isAccountRequired

    public boolean isAccountRequired(javax.servlet.http.HttpSession session,
                                     com.bea.p13n.usermgmt.profile.ProfileWrapper userProfileWrapper)
                              throws GroupwareException

  Checks if at least one account is required.

  Parameters:
    `session` - the http session (may not be `null`)
    `userProfileWrapper` - the user profile (may not be `null`)
  Returns:
    `true` if an account is required; `false` otherwise
  Throws:
    `GroupwareException`

### getRequiredAccountName

    public java.lang.String getRequiredAccountName(javax.servlet.http.HttpSession session,
                                                   com.bea.p13n.usermgmt.profile.ProfileWrapper userProfileWrapper)
                                            throws GroupwareException

  Gets the name of the required account.

  Parameters:
    `session` - the http session (may not be `null`)
    `userProfileWrapper` - the user profile (may not be `null`)
  Returns:
    the account name (may not be `null`)
  Throws:
    `GroupwareException`

### getDefaultProvider

    public portlets.compoze.groupware.controls.provider.Provider getDefaultProvider()

  Gets the default provider for accounts that do not have a provider specified.

  Returns:
    the default provider

### deleteAccount

    public void deleteAccount(com.bea.p13n.usermgmt.profile.ProfileWrapper userProfileWrapper,
                              java.lang.String sID)
                       throws Accounts.CannotDeleteAccountException,
                              GroupwareException

  Deletes the specified account.

  Parameters:
    `userProfileWrapper` - the user profile (may not be `null`)
    `sID` - the account ID to delete
  Throws:
    `Accounts.CannotDeleteAccountException`
    `GroupwareException`

### addAccount

    public Account addAccount(com.bea.p13n.usermgmt.profile.ProfileWrapper userProfileWrapper,
                              java.lang.String sName,
                              java.lang.String sProviderName)
                       throws GroupwareException

  Adds the account with the specified name. The account name length must be smaller than `ACCOUNT_NAME_MAX_LENGTH`. If the specified name is larger than the max length, the name is truncated.

  Parameters:
    `userProfileWrapper` - the user profile (may not be `null`)
    `sName` - the account name (may not be `null` or empty)
    `sProviderName` - the provider name
  Returns:
    the newly created account
  Throws:
    `GroupwareException`
  See Also:
    `ACCOUNT_NAME_MAX_LENGTH`

### getAccounts

    public Account[] getAccounts()

  Gets the accounts.

  Returns:
    an array of accounts or an empty array for none

### getDefaultAccount

    public Account getDefaultAccount()
                              throws NoAccountsException,
                                     GroupwareException

  Gets the default account.

  Returns:
    the account
  Throws:
    `NoAccountsException`
    `GroupwareException`

### getCurrentAccount

    public Account getCurrentAccount()
                              throws NoAccountsException,
                                     GroupwareException

  Gets the current account.

  Returns:
    the account
  Throws:
    `NoAccountsException`
    `GroupwareException`

### getAccount

    public Account getAccount(java.lang.String sID)

  Gets the account by the specified ID.

  Parameters:
    `sID` - the account ID (may not be `null`)
  Returns:
    the account or `null` if not found

### getDefaultConnectionPropertyValues

    public ConnectionPropertyValue[] getDefaultConnectionPropertyValues(javax.servlet.http.HttpSession session,
                                                                        com.bea.p13n.usermgmt.profile.ProfileWrapper userProfileWrapper)
                                                                 throws GroupwareException

  Gets the default account property values.

  Parameters:
    `session` - the http session (may not be `null`)
    `userProfileWrapper` - the user profile (may not be `null`)
  Throws:
    `GroupwareException`

### isConfigurable

    public boolean isConfigurable()

  Checks if accounts are configurable.

  Returns:
    `true` if accounts are configurable; `false` otherwise

### supportsMultipleAccounts

    public boolean supportsMultipleAccounts()

  Checks if multiple accounts are supported.

  Returns:
    `true` if multiple accounts are supported; `false` otherwise

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.