|
Clearspace API (1.7.0) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AvatarManager
Manages the avatar feature. Avatars give a user the ability to specify an image that will be displayed alongside their username throughout the application.
| Method Summary | |
|---|---|
Avatar |
createAvatar(User owner,
java.lang.String name,
java.lang.String contentType,
java.io.InputStream in)
Creates a new avatar for a user allowing the user to specify an inputstream for the image. |
void |
deleteAvatar(Avatar avatar)
Deletes an avatar from the system. |
Avatar |
getActiveAvatar(User user)
Returns an avatar for a user, else the SystemDefaultAvatar if the user does not have
an active avatar specified. |
Avatar |
getAvatar(long id)
Used to acquire an avatar by its id |
int |
getAvatarCount(User user)
Used to acquire a count of all the avatars for a specific user |
JiveIterator<Avatar> |
getAvatars(User user)
Returns a collection of avatars for a user |
JiveIterator<Avatar> |
getGlobalAvatars()
Returns a collection of all of the global avatars |
int |
getMaxAllowableHeight()
Returns the maximum allowable height for an avatar image |
int |
getMaxAllowableWidth()
Returns the maximum allowable width for an avatar image |
int |
getMaxUserAvatars()
Returns the maximum amount of avatars a user is allowed to have, -1 for limitless |
int |
getModerationAvatarCount()
Used to acquire a count of all the avatars that require moderation. |
JiveIterator<Avatar> |
getModerationAvatars()
Returns a collection of all of the avatars that require moderation. |
boolean |
isAllowImageResize()
Returns true if the system should attempt to resize images |
boolean |
isAvatarsEnabled()
Returns true if the avatars feature is enabled, else false |
boolean |
isModerateUserAvatars()
Returns whether or not user avatars will be moderated. |
boolean |
isUserAvatarsEnabled()
Returns true if users can create their own avatars, false otherwise. |
void |
setActiveAvatar(User user,
Avatar avatar)
Used to make a user use a global avatar, to set no active avatar pass null for the avatar value. |
void |
setAllowImageResize(boolean isAllowImageResize)
Used to set whether the system should attempt to resize images |
void |
setMaxAllowableHeight(int height)
Sets the maximum allowable height for an avatar image |
void |
setMaxAllowableWidth(int width)
Sets the maximum allowable width for an avatar image |
void |
setMaxUserAvatars(int max)
Sets the maximum number of avatars a user can have |
void |
setModerateUserAvatars(boolean moderateUserAvatars)
Sets whether or not user avatars will be moderated. |
void |
setUserAvatarsEnabled(boolean enableCustomAvatars)
Sets whether or not users can create their own custom avatars. |
| Methods inherited from interface com.jivesoftware.community.JiveManager |
|---|
destroy, initialize |
| Method Detail |
|---|
Avatar createAvatar(User owner,
java.lang.String name,
java.lang.String contentType,
java.io.InputStream in)
throws UnauthorizedException,
AvatarException
owner - user to create the avatar forname - image name of the avatarcontentType - mime type of the imagein - input stream of the image
UnauthorizedException
AvatarException
void setActiveAvatar(User user,
Avatar avatar)
throws UnauthorizedException
user - user to set an avatar foravatar - avatar to make active
UnauthorizedException - if the avatar does not belong to the user or it is not globalAvatar getAvatar(long id)
id - unique id of the avatar
JiveIterator<Avatar> getAvatars(User user)
user - user to find an avatar for
Collection of Avatar objectsAvatar getActiveAvatar(User user)
SystemDefaultAvatar if the user does not have
an active avatar specified.
user - user to acquire an avatar for
JiveIterator<Avatar> getGlobalAvatars()
void deleteAvatar(Avatar avatar)
throws UnauthorizedException
avatar - the avatar for the user
UnauthorizedExceptionboolean isAvatarsEnabled()
int getMaxAllowableHeight()
void setMaxAllowableHeight(int height)
throws UnauthorizedException
height - the maximum allowable height for an avatar image
UnauthorizedException - thrown if not system adminint getMaxAllowableWidth()
void setMaxAllowableWidth(int width)
throws UnauthorizedException
width - the maximum allowable width for an avatar image
UnauthorizedException - thrown if not system adminboolean isAllowImageResize()
void setAllowImageResize(boolean isAllowImageResize)
throws UnauthorizedException
isAllowImageResize - whether the system should attempt to resize images
UnauthorizedException - thrown if not system adminboolean isUserAvatarsEnabled()
void setUserAvatarsEnabled(boolean enableCustomAvatars)
enableCustomAvatars - true if custom user avatars are enabled, false otherwiseint getMaxUserAvatars()
void setMaxUserAvatars(int max)
throws UnauthorizedException
max - the maximum number of avatars a user can have
UnauthorizedException - if not system adminint getAvatarCount(User user)
user - user to count avatars for
boolean isModerateUserAvatars()
void setModerateUserAvatars(boolean moderateUserAvatars)
throws UnauthorizedException
moderateUserAvatars - whether or not user avatars will be moderated
UnauthorizedException - if not system admin
JiveIterator<Avatar> getModerationAvatars()
throws UnauthorizedException
UnauthorizedException - if not admin or moderatorint getModerationAvatarCount()
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||