com.ibm.websphere.userprofile
Class UserProfileManager

java.lang.Object
  |
  +--com.ibm.websphere.userprofile.UserProfileManager

Deprecated. Userprofile API is deprecated in current release

public class UserProfileManager
extends java.lang.Object


The User Profile implementation in WebSphere Application Server version 3.0 differs significantly from that in version 2.0. Most importantly, the User Profile management functions are now separated from the data elements (i.e., the elements mapped to the columns in the database schema). The management functions in the com.ibm.websphere.userprofile.UserProfile class are now deprecated and disabled, and the class will now be used solely for getting and setting data for individual instances of users.
Use this class for management functions of userprofile.Following sample code showing how to use UserProfileManager.

com.ibm.websphere.userprofile.UserProfileManager manager =   com.ibm.websphere.userprofile.UserProfileManager.getUserProfileManager();

//For creating userprofile
com.ibm.websphere.userprofile.UserProfile userprofile = manager.addUserProfile("bpink");                               
...


Constructor Summary
UserProfileManager()
          Deprecated.  
 
Method Summary
 UserProfile addUserProfile(java.lang.String userName)
          Deprecated. Creates a new UserProfile object for the specified userName and adds the object to the database table.
 UserProfile addUserProfile(java.lang.String userName, boolean mode)
          Deprecated. Creates a new UserProfile object for the specified userName and adds the object to the database table.
 UserProfile addUserProfile(java.lang.String userName, boolean mode, boolean autoCommit)
          Deprecated. Creates a new UserProfile object for the specified userName and adds the object to the database table.
 UserProfile addUserProfile(java.lang.String userName, java.lang.String legacyKey)
          Deprecated. Creates a new UserProfile object for the specified userName and adds the object to the database table.
 UserProfile addUserProfile(java.lang.String userName, java.lang.String legacyKey, boolean mode)
          Deprecated. Creates a new UserProfile object for the specified userName and adds the object to the database table.
 UserProfile addUserProfile(java.lang.String userName, java.lang.String legacyKey, boolean mode, boolean autoCommit)
          Deprecated. Creates a new UserProfile object for the specified userName and adds the object to the database table.
 java.util.Enumeration findUserProfiles(java.lang.String column, java.lang.Object key)
          Deprecated. Returns an Enumeration of all the UserProfile objects that match the specified search criteria.
 java.util.Enumeration findUserProfilesByAddress1(java.lang.String address1)
          Deprecated. Returns an Enumeration of all the UserProfile objects that match the specified search criteria.
 java.util.Enumeration findUserProfilesByAddress2(java.lang.String address2)
          Deprecated. Returns an Enumeration of all the UserProfile objects that match the specified search criteria.
 java.util.Enumeration findUserProfilesByCity(java.lang.String city)
          Deprecated. Returns an Enumeration of all the UserProfile objects that match the specified search criteria.
 java.util.Enumeration findUserProfilesByDayPhone(java.lang.String dayPhone)
          Deprecated. Returns an Enumeration of all the UserProfile objects that match the specified search criteria.
 java.util.Enumeration findUserProfilesByEMail(java.lang.String eMail)
          Deprecated. Returns an Enumeration of all the UserProfile objects that match the specified search criteria.
 java.util.Enumeration findUserProfilesByEmployer(java.lang.String employer)
          Deprecated. Returns an Enumeration of all the UserProfile objects that match the specified search criteria.
 java.util.Enumeration findUserProfilesByFax(java.lang.String fax)
          Deprecated. Returns an Enumeration of all the UserProfile objects that match the specified search criteria.
 java.util.Enumeration findUserProfilesByFirstName(java.lang.String firstName)
          Deprecated. Returns an Enumeration of all the UserProfile objects that match the specified search criteria.
 java.util.Enumeration findUserProfilesByLanguage(java.lang.String language)
          Deprecated. Returns an Enumeration of all the UserProfile objects that match the specified search criteria.
 java.util.Enumeration findUserProfilesByNation(java.lang.String nation)
          Deprecated. Returns an Enumeration of all the UserProfile objects that match the specified search criteria.
 java.util.Enumeration findUserProfilesByNightPhone(java.lang.String nightPhone)
          Deprecated. Returns an Enumeration of all the UserProfile objects that match the specified search criteria.
 java.util.Enumeration findUserProfilesByPostalCode(java.lang.String postalCode)
          Deprecated. Returns an Enumeration of all the UserProfile objects that match the specified search criteria.
 java.util.Enumeration findUserProfilesByStateOrProvince(java.lang.String province)
          Deprecated. Returns an Enumeration of all the UserProfile objects that match the specified search criteria.
 java.util.Enumeration findUserProfilesBySurName(java.lang.String surName)
          Deprecated. Returns an Enumeration of all the UserProfile objects that match the specified search criteria.
 UserProfile getUserProfile(java.lang.String userName)
          Deprecated. Returns the UserProfile object referenced by the specified userName in read Only mode
 UserProfile getUserProfile(java.lang.String userName, boolean mode)
          Deprecated. Returns the UserProfile object referenced by the specified userName in specified mode
 UserProfile getUserProfile(java.lang.String userName, boolean mode, boolean autoCommit)
          Deprecated. Returns the UserProfile object referenced by the specified userName in specified mode
static UserProfileManager getUserProfileManager()
          Deprecated. To get UserProfileManager
 void releaseResources(UserProfile userprofile)
          Deprecated. To Release the resources held by the UserProfile object and for object reuse.
 void remove(java.lang.String userName)
          Deprecated. To remove the specified UserProfile from the database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserProfileManager

public UserProfileManager()
Deprecated. 
Method Detail

getUserProfileManager

public static UserProfileManager getUserProfileManager()
Deprecated. 
To get UserProfileManager
Returns:
com.ibm.websphere.userprofile.UserProfileManager

addUserProfile

public UserProfile addUserProfile(java.lang.String userName)
                           throws UserProfileCreateException
Deprecated. 
Creates a new UserProfile object for the specified userName and adds the object to the database table. All fields, except the userName, are initialized as empty. If a userName is not specified, the method returns null and does not create a new UserProfile object. If a UserProfile for this userName already exists, throws UserProfileCreateException. UserProfile Object is returned in read write mode.
Parameters:
userName - The unique userName for this UserProfile object
Returns:
com.ibm.websphere.userprofile.UserProfile

addUserProfile

public UserProfile addUserProfile(java.lang.String userName,
                                  boolean mode)
                           throws UserProfileCreateException
Deprecated. 
Creates a new UserProfile object for the specified userName and adds the object to the database table. All fields, except the userName, are initialized as empty. If a userName is not specified, the method returns null and does not create a new UserProfile object. If a UserProfile for this userName already exists, the method throws UserProfileCreateException. If readWrite mode is false, updating the fields won't get updated in database.
Parameters:
userName - The unique userName for this UserProfile object
mode - To specify whether it is read_only or read_write. true for read write mode and false for read only mode
Returns:
com.ibm.websphere.userprofile.UserProfile

addUserProfile

public UserProfile addUserProfile(java.lang.String userName,
                                  boolean mode,
                                  boolean autoCommit)
                           throws UserProfileCreateException
Deprecated. 
Creates a new UserProfile object for the specified userName and adds the object to the database table. All fields, except the userName, are initialized as empty. If a userName is not specified, the method returns null and does not create a new UserProfile object. If a UserProfile for this userName already exists, throws UserProfileCreateException.If readWrite mode is false, updating the fields won't get updated in database. if autoCommit is false user needs to call sync at end.
Parameters:
userName - The unique userName for this UserProfile object
mode - To specify whether it is read_only or read_write. true for read write mode and false for read only mode
autoCommit - To update immediately or user needs to call sync at end.Default is true.
Returns:
com.ibm.websphere.userprofile.UserProfile

addUserProfile

public UserProfile addUserProfile(java.lang.String userName,
                                  java.lang.String legacyKey)
                           throws UserProfileCreateException
Deprecated. 
Creates a new UserProfile object for the specified userName and adds the object to the database table. All fields, except the userName, are initialized as empty. If a userName is not specified, the method returns null and does not create a new UserProfile object. If a UserProfile for this userName already exists, the method does not update the existing UserProfile or create a new one.
Parameters:
userName - The unique userName for this UserProfile object
legacyKey - The key for UserProfile in legacy database. Useful when enterprise bean is extended in advanced edition to import existing userprofiles from legacy Systems.
Returns:
com.ibm.websphere.userprofile.UserProfile

addUserProfile

public UserProfile addUserProfile(java.lang.String userName,
                                  java.lang.String legacyKey,
                                  boolean mode)
                           throws UserProfileCreateException
Deprecated. 
Creates a new UserProfile object for the specified userName and adds the object to the database table. All fields, except the userName, are initialized as empty. If a userName is not specified, the method returns null and does not create a new UserProfile object. If a UserProfile for this userName already exists, the method throws UserProfileCreateException. If readWrite mode is false, updating the fields won't get updated in database.
Parameters:
userName - The unique userName for this UserProfile object
legacyKey - The key for UserProfile in legacy database. Useful when enterprise bean is extended in advanced edition to import existing userprofiles from legacy Systems.
mode - To specify whether it is read_only or read_write. true for read write mode and false for read only mode
Returns:
com.ibm.websphere.userprofile.UserProfile

addUserProfile

public UserProfile addUserProfile(java.lang.String userName,
                                  java.lang.String legacyKey,
                                  boolean mode,
                                  boolean autoCommit)
                           throws UserProfileCreateException
Deprecated. 
Creates a new UserProfile object for the specified userName and adds the object to the database table. All fields, except the userName, are initialized as empty. If a userName is not specified, the method returns null and does not create a new UserProfile object. If a UserProfile for this userName already exists, throws UserProfileCreateException.If readWrite mode is false, updating the fields won't get updated in database. if autoCommit is false user needs to call sync at end.
Parameters:
userName - The unique userName for this UserProfile object
legacyKey - The key for UserProfile in legacy database. Useful when enterprise bean is extended in advanced edition to import existing userprofiles from legacy Systems.
mode - To specify whether it is read_only or read_write. true for read write mode and false for read only mode
autoCommit - To update immediately or user needs to call sync at end.Default is true.
Returns:
com.ibm.websphere.userprofile.UserProfile

getUserProfile

public UserProfile getUserProfile(java.lang.String userName)
                           throws UserProfileFinderException
Deprecated. 
Returns the UserProfile object referenced by the specified userName in read Only mode
Parameters:
userName - Unique userName of the UserProfile object
Returns:
com.ibm.websphere.userprofile.UserProfile

getUserProfile

public UserProfile getUserProfile(java.lang.String userName,
                                  boolean mode)
                           throws UserProfileFinderException
Deprecated. 
Returns the UserProfile object referenced by the specified userName in specified mode
Parameters:
userName - Unique userName of the UserProfile object
mode - To specify whether it is read_only or read_write. true for read write mode and false for read only mode
Returns:
com.ibm.websphere.userprofile.UserProfile

getUserProfile

public UserProfile getUserProfile(java.lang.String userName,
                                  boolean mode,
                                  boolean autoCommit)
                           throws UserProfileFinderException
Deprecated. 
Returns the UserProfile object referenced by the specified userName in specified mode
Parameters:
userName - Unique userName of the UserProfile object
mode - To specify whether it is read_only or read_write. true for read write mode and false for read only mode
autoCommit - To update immediately or user needs to call sync at end. Default is true.This is effective only when read write mode is true
Returns:
com.ibm.websphere.userprofile.UserProfile

findUserProfilesByAddress1

public java.util.Enumeration findUserProfilesByAddress1(java.lang.String address1)
Deprecated. 
Returns an Enumeration of all the UserProfile objects that match the specified search criteria.
Parameters:
address1 - The first line of the street address to match
Returns:
java.util.Enumeration

findUserProfilesByAddress2

public java.util.Enumeration findUserProfilesByAddress2(java.lang.String address2)
Deprecated. 
Returns an Enumeration of all the UserProfile objects that match the specified search criteria.
Parameters:
address1 - The first line of the street address to match
Returns:
java.util.Enumeration

findUserProfilesByNation

public java.util.Enumeration findUserProfilesByNation(java.lang.String nation)
Deprecated. 
Returns an Enumeration of all the UserProfile objects that match the specified search criteria.
Parameters:
nation - The country name to match
Returns:
java.util.Enumeration

findUserProfilesByDayPhone

public java.util.Enumeration findUserProfilesByDayPhone(java.lang.String dayPhone)
Deprecated. 
Returns an Enumeration of all the UserProfile objects that match the specified search criteria.
Parameters:
dayPhone - The day time phone to match
Returns:
java.util.Enumeration

findUserProfilesByEMail

public java.util.Enumeration findUserProfilesByEMail(java.lang.String eMail)
Deprecated. 
Returns an Enumeration of all the UserProfile objects that match the specified search criteria.
Parameters:
e-mail - The email to match
Returns:
java.util.Enumeration

findUserProfilesByEmployer

public java.util.Enumeration findUserProfilesByEmployer(java.lang.String employer)
Deprecated. 
Returns an Enumeration of all the UserProfile objects that match the specified search criteria.
Parameters:
employer - The employer name to match
Returns:
java.util.Enumeration

findUserProfilesByFax

public java.util.Enumeration findUserProfilesByFax(java.lang.String fax)
Deprecated. 
Returns an Enumeration of all the UserProfile objects that match the specified search criteria.
Parameters:
fax - The fax name to match
Returns:
java.util.Enumeration

findUserProfilesByFirstName

public java.util.Enumeration findUserProfilesByFirstName(java.lang.String firstName)
Deprecated. 
Returns an Enumeration of all the UserProfile objects that match the specified search criteria.
Parameters:
firstName - The firstName to match
Returns:
java.util.Enumeration

findUserProfilesByLanguage

public java.util.Enumeration findUserProfilesByLanguage(java.lang.String language)
Deprecated. 
Returns an Enumeration of all the UserProfile objects that match the specified search criteria.
Parameters:
language - The language to match
Returns:
java.util.Enumeration

findUserProfilesBySurName

public java.util.Enumeration findUserProfilesBySurName(java.lang.String surName)
Deprecated. 
Returns an Enumeration of all the UserProfile objects that match the specified search criteria.
Parameters:
surName - The surname to match
Returns:
java.util.Enumeration

findUserProfilesByNightPhone

public java.util.Enumeration findUserProfilesByNightPhone(java.lang.String nightPhone)
Deprecated. 
Returns an Enumeration of all the UserProfile objects that match the specified search criteria.
Parameters:
nightPhone - The night phone to match
Returns:
java.util.Enumeration

findUserProfilesByStateOrProvince

public java.util.Enumeration findUserProfilesByStateOrProvince(java.lang.String province)
Deprecated. 
Returns an Enumeration of all the UserProfile objects that match the specified search criteria.
Parameters:
stateOrProvince - The state or Province to match
Returns:
java.util.Enumeration

findUserProfilesByCity

public java.util.Enumeration findUserProfilesByCity(java.lang.String city)
Deprecated. 
Returns an Enumeration of all the UserProfile objects that match the specified search criteria.
Parameters:
city - The city name to match
Returns:
java.util.Enumeration

findUserProfilesByPostalCode

public java.util.Enumeration findUserProfilesByPostalCode(java.lang.String postalCode)
Deprecated. 
Returns an Enumeration of all the UserProfile objects that match the specified search criteria.
Parameters:
postalCode - The postalCode to match
Returns:
java.util.Enumeration

findUserProfiles

public java.util.Enumeration findUserProfiles(java.lang.String column,
                                              java.lang.Object key)
Deprecated. 
Returns an Enumeration of all the UserProfile objects that match the specified search criteria.

For searching by columns added by extending datawrapper com.ibm.servlet.personlization.userprofile.UserProfile using com.ibm.websphere.userprofile.UserProfileExtender. For Example if column "cellPhone" is added and to search by value say "999-999" the code will be
          UserProfileManager manager = UserProfileManager.getUserProfileManager();
          Enumeration enum = manager.findUserProfiles("cellPhone","999-999");
Parameters:
column - The column name that is added by extending data wrapper
key - the value to match
Returns:
java.util.Enumeration

remove

public void remove(java.lang.String userName)
            throws UserProfileRemoveException
Deprecated. 
To remove the specified UserProfile from the database. If specified user name doesn't exist throws UserProfileRemoveException.
Parameters:
userName - The userName that is to be removed

releaseResources

public void releaseResources(UserProfile userprofile)
Deprecated. 
To Release the resources held by the UserProfile object and for object reuse. Once you are finished with using UserProfile object, use this method to freeup resources held by UserProfile object.
Parameters:
UserProfile -