Clearspace API (2.5.29) Core Javadocs

com.jivesoftware.community.user.profile
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
 Map<Long,com.jivesoftware.community.user.profile.ProfileFieldValue> getProfile(User user)
          Gets a map of user profile values for a particular user mapped to their corresponding ProfileField id.
 Collection<com.jivesoftware.community.user.profile.ProfileFieldValueCount> getProfileFieldTermsByFieldID(long fieldID, boolean enabledOnly)
          Gets a list of distinct terms and their count used for any given profile field.
 InputStream getProfileImage(User user)
          Returns the profile image for a user.
 boolean isAnonymousBrowsingPeoplePermitted()
          Returns true if anonymous users can browse the user directory, search users, and goto profiles.
 boolean isFullNameEnabled()
          Returns true if users' full names are to be displayed by default in the application and false if tehy are not.
 boolean isPersonalizedHomepageEnabled()
          Returns true if users can personalize their homepage, false if they cannot.
 boolean isProfileImageEnabled()
          Returns true if the profile image is enabled and false if it is not.
 void setAnonymousBrowsingPeoplePermitted(boolean isAnonymousBrowsingPeoplePermitted)
          Set to true to allow anonymous users to browse the user directory, search users, and goto profiles.
 void setFullNameEnabled(boolean isFullNameEnabled)
          Set to true if users' full names should be displayed by default and false if they should not.
 void setPersonalizedHomepageEnabled(boolean isPersonalizedHomepageEnabled)
          Set to true to enable the personalized homepage for user, false will disable it.
 void setProfile(User user, Collection<com.jivesoftware.community.user.profile.ProfileFieldValue> profile)
          Sets a list of profile values for a particular user.
 void setProfileImage(User user, InputStream in)
          Set a new profile page image for the specified user.
 void setProfileImageEnabled(boolean isEnabled)
          Enables or disables profile images.
 
Methods inherited from interface com.jivesoftware.community.JiveManager
destroy
 

Method Detail

getProfile

Map<Long,com.jivesoftware.community.user.profile.ProfileFieldValue> getProfile(User user)
                                                                               throws UnauthorizedException
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.
Throws:
UnauthorizedException - if can't see the user's profile.

setProfile

void setProfile(User user,
                Collection<com.jivesoftware.community.user.profile.ProfileFieldValue> 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.

isProfileImageEnabled

boolean isProfileImageEnabled()
Returns true if the profile image is enabled and false if it is not.

Returns:
true if the profile image is enabled and false if it is not.

setProfileImageEnabled

void setProfileImageEnabled(boolean isEnabled)
                            throws UnauthorizedException
Enables or disables profile images.

Parameters:
isEnabled - true to enabled profile images false to disable profile images.
Throws:
UnauthorizedException - if not the system admin.

setProfileImage

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

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

getProfileImage

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.

getProfileFieldTermsByFieldID

Collection<com.jivesoftware.community.user.profile.ProfileFieldValueCount> getProfileFieldTermsByFieldID(long fieldID,
                                                                                                         boolean enabledOnly)
Gets a list of distinct terms and their count used for any given profile field.

Parameters:
fieldID - the id for which distinct terms are being returned.
enabledOnly - Only count terms associated with enabled users?
Returns:
the listing of distinct terms and their count for the given profile field.

isFullNameEnabled

boolean isFullNameEnabled()
Returns true if users' full names are to be displayed by default in the application and false if tehy are not.

Returns:
true if users' full names are to be displayed by default in the application and false if tehy are not.

setFullNameEnabled

void setFullNameEnabled(boolean isFullNameEnabled)
                        throws UnauthorizedException
Set to true if users' full names should be displayed by default and false if they should not.

Parameters:
isFullNameEnabled - true if users' full names should be displayed by default and false if they should not.
Throws:
UnauthorizedException - if not the user or system admin.

isPersonalizedHomepageEnabled

boolean isPersonalizedHomepageEnabled()
Returns true if users can personalize their homepage, false if they cannot.

Returns:
true if users can personalize their homepage, false if they cannot.

setPersonalizedHomepageEnabled

void setPersonalizedHomepageEnabled(boolean isPersonalizedHomepageEnabled)
                                    throws UnauthorizedException
Set to true to enable the personalized homepage for user, false will disable it.

Parameters:
isPersonalizedHomepageEnabled - true will enable the personalized homepage for user, false will disable it.
Throws:
UnauthorizedException - if not the user or system admin.

isAnonymousBrowsingPeoplePermitted

boolean isAnonymousBrowsingPeoplePermitted()
Returns true if anonymous users can browse the user directory, search users, and goto profiles.

Returns:
true if anonymous users can browse the user directory, search users, and goto profiles and false if they cannot.

setAnonymousBrowsingPeoplePermitted

void setAnonymousBrowsingPeoplePermitted(boolean isAnonymousBrowsingPeoplePermitted)
                                         throws UnauthorizedException
Set to true to allow anonymous users to browse the user directory, search users, and goto profiles.

Parameters:
isAnonymousBrowsingPeoplePermitted - true to allow anonymous users to browse the user directory, search users, and goto profiles.
Throws:
UnauthorizedException - if not the user or system admin.

Clearspace Project Page

Copyright © 1999-2007 Jive Software.