Compoze Software, Inc.

portlets.compoze.groupware.c13n
Class DefaultAccountListener

java.lang.Object
  extended byportlets.compoze.groupware.c13n.DefaultAccountListener
All Implemented Interfaces:
AccountListener, java.io.Serializable
Direct Known Subclasses:
BEALoginCollabWebDAVAccountListener, BEALoginDominoAccountListener, BEALoginExchangeAccountListener, CollabWebDAVAccountListener, DominoAccountListener, ExchangeAccountListener, SiteMinderDominoAccountListener

public class DefaultAccountListener
extends java.lang.Object
implements AccountListener, java.io.Serializable

This class represents a default implementation of the account listener interface for receiving account events.

See Also:
Serialized Form

Constructor Summary
DefaultAccountListener()
           
 
Method Summary
protected static ConnectionPropertyValue[] appendConnectionPropertyValue(ConnectionPropertyValue[] values, ConnectionPropertyValue newValue)
          Appends the connection properties value.
static ConnectionPropertyValue[] appendConnectionPropertyValues(ConnectionPropertyValue[] values, ConnectionPropertyValue[] newValues)
          Appends the connection properties values.
protected static java.lang.String decodeValue(java.lang.String sValue)
          Decodes the specified value.
static void dumpConnectionPropertyValues(ConnectionPropertyValue[] values)
          Dumps the connection property values to System.out.
protected static java.lang.String encodeValue(java.lang.String sValue)
          Encodes the specified value.
static AccountListener getAccountListener()
          Gets an instance of the account listener.
 ConnectionPropertyValue[] getAdditionalConnectionPropertyValues(javax.servlet.http.HttpSession httpSession, GroupwareSession groupwareSession, javax.servlet.http.HttpServletRequest request, Account account, com.bea.p13n.usermgmt.profile.ProfileWrapper userProfileWrapper)
          Invoked when getting additional account property values.
protected static ConnectionPropertyValue getConnectionPropertyValue(ConnectionPropertyValue[] values, ConnectionProperty connProp)
          Gets the connection property value for the specified connection property.
 ConnectionPropertyValue[] getConnectionPropertyValues(javax.servlet.http.HttpSession session, com.bea.p13n.usermgmt.profile.ProfileWrapper userProfileWrapper, Account account, ConnectionPropertyValue[] values)
          Invoked when getting account property values.
 ConnectionPropertyValue[] getDefaultConnectionPropertyValues(javax.servlet.http.HttpSession session, com.bea.p13n.usermgmt.profile.ProfileWrapper userProfileWrapper, ConnectionPropertyValue[] values)
          Invoked when getting default account property values.
 portlets.compoze.groupware.controls.provider.Provider getDefaultProvider()
          Invoked when checking for the default provider.
 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()
          Invoked when checking if users can configure accounts.
static boolean isPasswordEncrypted()
          Checks is password is encrypted.
 boolean isPropertyModifiable(ConnectionProperty connProp)
          Invoked when checking if the connection property is modifiable.
 boolean isPropertyRequired(ConnectionProperty connProp)
          Invoked when checking if the connection property is required.
 void setConnectionPropertyValues(javax.servlet.http.HttpSession session, com.bea.p13n.usermgmt.profile.ProfileWrapper userProfileWrapper, Account account, ConnectionPropertyValue[] values)
          Invoked when setting account property values.
 boolean supportsMultipleAccounts()
          Invoked when checking if multiple accounts are supported.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAccountListener

public DefaultAccountListener()
Method Detail

isPropertyModifiable

public boolean isPropertyModifiable(ConnectionProperty connProp)
Invoked when checking if the connection property is modifiable.

Specified by:
isPropertyModifiable in interface AccountListener
Parameters:
connProp - the connection property
Returns:
true if the connection property is modifiable; false otherwise

isPropertyRequired

public boolean isPropertyRequired(ConnectionProperty connProp)
Invoked when checking if the connection property is required.

Specified by:
isPropertyRequired in interface AccountListener
Parameters:
connProp - the connection property
Returns:
true if the connection property is required; false otherwise

supportsMultipleAccounts

public boolean supportsMultipleAccounts()
Invoked when checking if multiple accounts are supported.

Specified by:
supportsMultipleAccounts in interface AccountListener
Returns:
true if multiple accounts are supported; false otherwise

isConfigurable

public boolean isConfigurable()
Invoked when checking if users can configure accounts.

Specified by:
isConfigurable in interface AccountListener
Returns:
true if accounts are configurable; false otherwise

getDefaultProvider

public portlets.compoze.groupware.controls.provider.Provider getDefaultProvider()
Invoked when checking for the default provider.

Specified by:
getDefaultProvider in interface AccountListener
Returns:
the default provider

setConnectionPropertyValues

public void setConnectionPropertyValues(javax.servlet.http.HttpSession session,
                                        com.bea.p13n.usermgmt.profile.ProfileWrapper userProfileWrapper,
                                        Account account,
                                        ConnectionPropertyValue[] values)
                                 throws GroupwareException
Invoked when setting account property values.

Specified by:
setConnectionPropertyValues in interface AccountListener
Parameters:
session - the http session (may not be null)
userProfileWrapper - the user profile (may not be null)
account - the account (may not be null)
values - an array of connection property values
Throws:
GroupwareException

getConnectionPropertyValues

public ConnectionPropertyValue[] getConnectionPropertyValues(javax.servlet.http.HttpSession session,
                                                             com.bea.p13n.usermgmt.profile.ProfileWrapper userProfileWrapper,
                                                             Account account,
                                                             ConnectionPropertyValue[] values)
                                                      throws GroupwareException
Invoked when getting account property values.

Specified by:
getConnectionPropertyValues in interface AccountListener
Parameters:
session - the http session (may not be null)
userProfileWrapper - the user profile (may not be null)
account - the account (may not be null)
values - an array of connection property values
Returns:
an array of connection property values
Throws:
GroupwareException

getDefaultConnectionPropertyValues

public ConnectionPropertyValue[] getDefaultConnectionPropertyValues(javax.servlet.http.HttpSession session,
                                                                    com.bea.p13n.usermgmt.profile.ProfileWrapper userProfileWrapper,
                                                                    ConnectionPropertyValue[] values)
                                                             throws GroupwareException
Invoked when getting default account property values.

Specified by:
getDefaultConnectionPropertyValues in interface AccountListener
Parameters:
session - the http session (may not be null)
userProfileWrapper - the user profile (may not be null)
values - an array of connection property values (may not be null)
Returns:
an array of connection property values or an empty array
Throws:
GroupwareException

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.

Specified by:
isAccountRequired in interface AccountListener
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.

Specified by:
getRequiredAccountName in interface AccountListener
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

getConnectionPropertyValue

protected static ConnectionPropertyValue getConnectionPropertyValue(ConnectionPropertyValue[] values,
                                                                    ConnectionProperty connProp)
Gets the connection property value for the specified connection property.

Parameters:
values - an array of connection property values
connProp - the connection property value
Returns:
the connection property value

encodeValue

protected static java.lang.String encodeValue(java.lang.String sValue)
                                       throws GroupwareException
Encodes the specified value.

Parameters:
sValue - the value to encode
Returns:
the encodeed value
Throws:
GroupwareException

decodeValue

protected static java.lang.String decodeValue(java.lang.String sValue)
                                       throws GroupwareException
Decodes the specified value.

Parameters:
sValue - the value to decode
Returns:
the decoded value
Throws:
GroupwareException

dumpConnectionPropertyValues

public static void dumpConnectionPropertyValues(ConnectionPropertyValue[] values)
Dumps the connection property values to System.out.

Parameters:
values - an array of connection property values

appendConnectionPropertyValue

protected static ConnectionPropertyValue[] appendConnectionPropertyValue(ConnectionPropertyValue[] values,
                                                                         ConnectionPropertyValue newValue)
Appends the connection properties value.

Parameters:
values - an array of connection property values (may not be null)
Returns:
the connection property values

appendConnectionPropertyValues

public static ConnectionPropertyValue[] appendConnectionPropertyValues(ConnectionPropertyValue[] values,
                                                                       ConnectionPropertyValue[] newValues)
Appends the connection properties values.

Parameters:
values - an array of connection property values (may not be null)
newValues - an array of connection property values to append (may not be null)
Returns:
the connection property values

getAccountListener

public static AccountListener getAccountListener()
Gets an instance of the account listener.

Returns:
the account listener

isPasswordEncrypted

public static boolean isPasswordEncrypted()
Checks is password is encrypted.

Returns:
true if password is encrypted; false otherwise

getAdditionalConnectionPropertyValues

public ConnectionPropertyValue[] getAdditionalConnectionPropertyValues(javax.servlet.http.HttpSession httpSession,
                                                                       GroupwareSession groupwareSession,
                                                                       javax.servlet.http.HttpServletRequest request,
                                                                       Account account,
                                                                       com.bea.p13n.usermgmt.profile.ProfileWrapper userProfileWrapper)
                                                                throws GroupwareException
Invoked when getting additional account property values.

Specified by:
getAdditionalConnectionPropertyValues in interface AccountListener
Parameters:
httpSession - the http session (may not be null)
groupwareSession - the groupware session (may not be null)
account - the grouwpware account for which to retrieve additional property values (may not be null)
userProfileWrapper - the user profile (may not be null)
Returns:
an array of connection property values or an empty array
Throws:
GroupwareException

Compoze Software, Inc.

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