Clearspace API (1.10.16) Core Javadocs

com.jivesoftware.community
Interface ProfileManager

All Superinterfaces:
JiveManager

public interface ProfileManager
extends JiveManager

Manages user profile data. Defines methods used to create, access, update, and remove user profile data.


Method Summary
 void deleteProfileByID(long fieldID)
          Removes all user profile data associated with a particular profile field.
 void deleteProfileByUserID(long userID)
          Removes all user profile data associated with a particular user.
 void deleteProfileImage(User user)
          Deletes the users profile image
 java.util.Map<java.lang.Long,com.jivesoftware.community.UserProfile> getProfile(User user)
          Gets a map of user profile values for a particular user mapped to their corresponding ProfileField id.
 java.io.InputStream getProfileImage(User user)
          Returns the profile image for a user.
 void setProfile(User user, java.util.List<com.jivesoftware.community.UserProfile> profile)
          Sets a list of profile values for a particular user.
 void setProfileImage(User user, java.lang.String mimeType, java.io.InputStream in)
          Set a new profile page image for the specified user.
 
Methods inherited from interface com.jivesoftware.community.JiveManager
destroy, initialize
 

Method Detail

getProfile

java.util.Map<java.lang.Long,com.jivesoftware.community.UserProfile> getProfile(User user)
Gets a map of user profile values for a particular user mapped to their corresponding ProfileField id.

Parameters:
user - get the profile for this user
Returns:
a map of user profile values for the specified user.

setProfile

void setProfile(User user,
                java.util.List<com.jivesoftware.community.UserProfile> profile)
                throws UnauthorizedException
Sets a list of profile values for a particular user.

Parameters:
user - the user that represents the profile list
profile - the list of user profile values to save
Throws:
UnauthorizedException - if not the user or system admin.

deleteProfileByUserID

void deleteProfileByUserID(long userID)
                           throws UnauthorizedException
Removes all user profile data associated with a particular user. This method is generally called when a user is removed from the system.

Parameters:
userID - remove all user profile data associated with this userID.
Throws:
UnauthorizedException - if not the user or system admin.

deleteProfileByID

void deleteProfileByID(long fieldID)
                       throws UnauthorizedException
Removes all user profile data associated with a particular profile field. This method is generally called when a profile field is removed from the system.

Parameters:
fieldID - remove all user profile data associated with this profile field id.
Throws:
UnauthorizedException - if not the system admin.

setProfileImage

void setProfileImage(User user,
                     java.lang.String mimeType,
                     java.io.InputStream in)
                     throws AttachmentException,
                            UnauthorizedException
Set a new profile page image for the specified user.

Parameters:
user - The user to add an image for.
mimeType - The mime type of the image.
in - The content for the image.
Throws:
AttachmentException - Thrown if the image cannot be added.
UnauthorizedException - if not the user or system admin.

getProfileImage

java.io.InputStream getProfileImage(User user)
Returns the profile image for a user.

Parameters:
user - The user to get an image for.
Returns:
The content of the image.

deleteProfileImage

void deleteProfileImage(User user)
                        throws UnauthorizedException
Deletes the users profile image

Parameters:
user - The user to delete image for.
Throws:
UnauthorizedException - if not the user or system admin.

Clearspace Project Page

Copyright © 1999-2007 Jive Software.