BEA Systems, Inc.

com.beasys.commerce.axiom.contact
Class UnifiedProfileTypeManagerBean

java.lang.Object
  |
  +--com.beasys.commerce.axiom.contact.UnifiedProfileTypeManagerBean

public class UnifiedProfileTypeManagerBean
extends java.lang.Object
implements javax.ejb.SessionBean

Implementation of the session bean used to access UnifiedProfile types

See Also:
Serialized Form

Field Summary
protected  java.util.ArrayList nullCache
           
protected static java.lang.String UUP_CACHE
           
 
Constructor Summary
UnifiedProfileTypeManagerBean()
           
 
Method Summary
 void createUnifiedProfileType(UnifiedProfileType profileType)
          Creates an entry in the profile type database.
 void deleteUnifiedProfileType(java.lang.String typeName)
          Removes an entry from the profile type database.
 void ejbActivate()
          This method is required by the EJB Specification, but is not used by this example.
 void ejbCreate()
          Creates the session bean.
 void ejbPassivate()
          This method is required by the EJB Specification, but is not used by this example.
 void ejbRemove()
          This method is required by the EJB Specification, but is not used by this example.
protected  UnifiedProfileType getCachedProfileType(java.lang.String username)
           
protected  java.sql.Connection getConnection()
          Get a connection to the database
 UnifiedProfileType getProfileTypeForUser(java.lang.String username)
           
 UnifiedProfileType getUnifiedProfileType(java.lang.String typeName)
          Uses a direct jdbc connection to read profile type information from the database.
 java.lang.String[] getUnifiedProfileTypes()
          Returns a list of all registered profile types.
protected  boolean isNullProfileType(java.lang.String username)
           
protected  void putCachedProfileType(java.lang.String username, UnifiedProfileType upt)
           
protected  void putNullProfileType(java.lang.String username)
           
 void setSessionContext(javax.ejb.SessionContext ctx)
          Sets the session context.
 void updateUnifiedProfileType(UnifiedProfileType profileType)
          Updates an entry in the profile type database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UUP_CACHE

protected static java.lang.String UUP_CACHE

nullCache

protected java.util.ArrayList nullCache
Constructor Detail

UnifiedProfileTypeManagerBean

public UnifiedProfileTypeManagerBean()
Method Detail

ejbCreate

public void ejbCreate()
Creates the session bean.

ejbActivate

public void ejbActivate()
This method is required by the EJB Specification, but is not used by this example.
Specified by:
ejbActivate in interface javax.ejb.SessionBean

ejbRemove

public void ejbRemove()
This method is required by the EJB Specification, but is not used by this example.
Specified by:
ejbRemove in interface javax.ejb.SessionBean

ejbPassivate

public void ejbPassivate()
This method is required by the EJB Specification, but is not used by this example.
Specified by:
ejbPassivate in interface javax.ejb.SessionBean

setSessionContext

public final void setSessionContext(javax.ejb.SessionContext ctx)
Sets the session context.
Specified by:
setSessionContext in interface javax.ejb.SessionBean
Parameters:
ctx - Context for session

createUnifiedProfileType

public void createUnifiedProfileType(UnifiedProfileType profileType)
                              throws UserManagementException
Creates an entry in the profile type database.
Parameters:
profileType - the new type to add
Throws:
UserManagementException - if operation fails

deleteUnifiedProfileType

public void deleteUnifiedProfileType(java.lang.String typeName)
                              throws UserManagementException
Removes an entry from the profile type database.
Parameters:
typeName - the namd of the type to remove
Throws:
UserManagementException - if operation fails

updateUnifiedProfileType

public void updateUnifiedProfileType(UnifiedProfileType profileType)
                              throws UserManagementException
Updates an entry in the profile type database. Uses the typeName field in the profileType as the key.
Parameters:
profileType - the new values for this type
Throws:
UserManagementException - if operation fails

getUnifiedProfileType

public UnifiedProfileType getUnifiedProfileType(java.lang.String typeName)
                                         throws UserManagementException
Uses a direct jdbc connection to read profile type information from the database.
Parameters:
typeName - the name of the type to return
Returns:
a value object that represents a unified profile type, or null if none was found
Throws:
UserManagementException - if operation fails

getUnifiedProfileTypes

public java.lang.String[] getUnifiedProfileTypes()
                                          throws UserManagementException
Returns a list of all registered profile types.
Returns:
a list of all registered profile types
Throws:
UserManagementException - if operation fails

getProfileTypeForUser

public UnifiedProfileType getProfileTypeForUser(java.lang.String username)
                                         throws UserManagementException

getConnection

protected java.sql.Connection getConnection()
                                     throws java.sql.SQLException
Get a connection to the database

getCachedProfileType

protected UnifiedProfileType getCachedProfileType(java.lang.String username)

putCachedProfileType

protected void putCachedProfileType(java.lang.String username,
                                    UnifiedProfileType upt)

isNullProfileType

protected boolean isNullProfileType(java.lang.String username)

putNullProfileType

protected void putNullProfileType(java.lang.String username)

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved