Compoze Software, Inc.

portlets.compoze.im
Class ImProvider


java.lang.Object

  |

  +--portlets.compoze.im.ImProvider

All Implemented Interfaces:
java.io.Serializable

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

This class represents an IM provider.

See Also:
Serialized Form

Field Summary
static int VALUE_YAHOO
          This is the value of the 'Yahoo!' provider.
static ImProvider YAHOO
          This value represents the 'Yahoo' provider.
 
Method Summary
 boolean equals(java.lang.Object o)
          Indicates whether some other ImProvider object is "equal to" this one.
 java.lang.String formatEmail(java.lang.String sUsername)
          Formats the provider email address.
static ImProvider get(java.lang.String sName)
          Gets the provider by name.
static ImProvider getDefaultProvider()
          Gets the default provider.
 java.lang.String getKey()
          Gets the i18n resource key name.
 java.lang.String getName()
          Gets the provider name.
static java.util.List getProviders()
          Gets the list of providers.
 int getValue()
          Gets the provider value.
static boolean isEnabled(com.bea.p13n.usermgmt.profile.ProfileWrapper userProfileWrapper)
          Checks if IM is enabled.
static void setEnabled(com.bea.p13n.usermgmt.profile.ProfileWrapper userProfileWrapper, boolean bEnabled)
          Sets the IM enabled flag.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VALUE_YAHOO


public static final int VALUE_YAHOO
This is the value of the 'Yahoo!' provider.

YAHOO


public static final ImProvider YAHOO
This value represents the 'Yahoo' provider.
Method Detail

getValue


public int getValue()
Gets the provider value.
Returns:
the provider value (see VALUE_ constants)

formatEmail


public java.lang.String formatEmail(java.lang.String sUsername)
Formats the provider email address.
Parameters:
sUsername - the username (may not be null or empty)
Returns:
the provider formatted email address

getName


public java.lang.String getName()
Gets the provider name.
Returns:
the provider name

getDefaultProvider


public static ImProvider getDefaultProvider()
Gets the default provider.
Returns:
the provider

getKey


public java.lang.String getKey()
Gets the i18n resource key name.
Returns:
the i18n resource key name

get


public static ImProvider get(java.lang.String sName)
Gets the provider by name.
Parameters:
sName - the name
Returns:
the provider or null if not found

isEnabled


public static boolean isEnabled(com.bea.p13n.usermgmt.profile.ProfileWrapper userProfileWrapper)
                         throws ImException
Checks if IM is enabled.
Parameters:
userProfileWrapper - the user profile
Returns:
true if Im is enabled; false otherwise

setEnabled


public static void setEnabled(com.bea.p13n.usermgmt.profile.ProfileWrapper userProfileWrapper,
                              boolean bEnabled)
                       throws ImException
Sets the IM enabled flag.
Parameters:
userProfileWrapper - the user profile
bEnabled - true if Im is enabled; false otherwise

equals


public boolean equals(java.lang.Object o)
Indicates whether some other ImProvider object is "equal to" this one. Equality is determined by matching the provider value (see VALUE_ constants).
Overrides:
equals in class java.lang.Object
Returns:
true if this object is the same as the obj argument; false otherwise
See Also:
getValue()

getProviders


public static java.util.List getProviders()
Gets the list of providers.
Returns:
a list of ImProvider objects or an empty list if none available

Compoze Software, Inc.

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