Clearspace API (1.10.14) Web Services Client Javadocs

com.jivesoftware.community.webservices
Interface ProfileService


public interface ProfileService

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

Since:
1.9

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.
 UserProfile[] getProfile(long userID)
          Gets a map of user profile values for a particular user mapped to their corresponding ProfileField id.
 byte[] getProfileImage(long userID)
          Returns the profile image for a user.
 void setProfile(long userID, UserProfile[] profiles)
          Sets a array of profile values for a particular user.
 void setProfileImage(long userID, java.lang.String mimeType, byte[] data)
          Set a new profile page image for the specified user.
 

Method Detail

getProfile

UserProfile[] getProfile(long userID)
                         throws UserNotFoundException
Gets a map of user profile values for a particular user mapped to their corresponding ProfileField id.

Parameters:
userID - get the profile for the user with this id.
Returns:
a map of user profile values for the specified user.
Throws:
UserNotFoundException - If the user with the specified id does not exist.

setProfile

void setProfile(long userID,
                UserProfile[] profiles)
                throws UserNotFoundException
Sets a array of profile values for a particular user.

Parameters:
userID - the user that represents the profile list
profiles - the array of user profile values to save
Throws:
UserNotFoundException - Thrown if the specified user does not exist.

deleteProfileByUserID

void deleteProfileByUserID(long userID)
                           throws UserNotFoundException
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:
UserNotFoundException - Thrown if the user with the specified id does not exist.

deleteProfileByID

void deleteProfileByID(long fieldID)
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.

setProfileImage

void setProfileImage(long userID,
                     java.lang.String mimeType,
                     byte[] data)
                     throws UserNotFoundException,
                            AttachmentException
Set a new profile page image for the specified user.

Parameters:
userID - The id of the user to add an image for.
mimeType - The mime type of the image.
data - The content for the image.
Throws:
AttachmentException - Thrown if the image cannot be added.
UserNotFoundException - Thrown if the user with the specified id was not exist.

getProfileImage

byte[] getProfileImage(long userID)
                       throws UserNotFoundException
Returns the profile image for a user.

Parameters:
userID - The id of the user to get an image for.
Returns:
The content of the image.
Throws:
UserNotFoundException - Thrown if the user with the specified id does not exist.

Clearspace Project Page

Copyright © 1999-2007 Jive Software.