|
Jive Forums API (5.5.20.2-oracle) 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 null if no avatar exists for this user |
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 |
java.util.Iterator |
getAvatars(User user)
Returns a collection of avatars for a user |
java.util.Iterator |
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. |
java.util.Iterator |
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 |
setAvatarsEnabled(boolean enabled)
Used to disable or enable the avatars feature |
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. |
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) throws AvatarNotFoundException
id
- unique id of the avatar
AvatarNotFoundException
- thrown if the avatar does not existjava.util.Iterator getAvatars(User user)
user
- user to find an avatar for
Collection
of Avatar
objectsAvatar getActiveAvatar(User user)
user
- user to acquire an avatar for
java.util.Iterator getGlobalAvatars()
void deleteAvatar(Avatar avatar) throws UnauthorizedException
avatar
- the avatar for the user
UnauthorizedException
void setAvatarsEnabled(boolean enabled) throws UnauthorizedException
enabled
- true to enable, false to disable
UnauthorizedException
boolean 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 adminjava.util.Iterator getModerationAvatars() throws UnauthorizedException
UnauthorizedException
- if not admin or moderatorint getModerationAvatarCount()
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |