|
Jive Forums API (5.5.20.2-oracle) Developer Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jivesoftware.forum.proxy.AvatarManagerProxy
public class AvatarManagerProxy
Constructor Summary | |
---|---|
AvatarManagerProxy(AvatarManager avatarManager,
AuthToken authToken,
Permissions permissions)
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AvatarManagerProxy(AvatarManager avatarManager, AuthToken authToken, Permissions permissions)
Method Detail |
---|
public Avatar createAvatar(User owner, java.lang.String name, java.lang.String contentType, java.io.InputStream in) throws UnauthorizedException, AvatarException
AvatarManager
createAvatar
in interface AvatarManager
owner
- user to create the avatar forname
- image name of the avatarcontentType
- mime type of the imagein
- input stream of the image
UnauthorizedException
AvatarException
public void setActiveAvatar(User user, Avatar avatar) throws UnauthorizedException
AvatarManager
setActiveAvatar
in interface AvatarManager
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 globalpublic Avatar getAvatar(long id) throws AvatarNotFoundException
AvatarManager
getAvatar
in interface AvatarManager
id
- unique id of the avatar
AvatarNotFoundException
- thrown if the avatar does not existpublic java.util.Iterator getAvatars(User user)
AvatarManager
getAvatars
in interface AvatarManager
user
- user to find an avatar for
Collection
of Avatar
objectspublic Avatar getActiveAvatar(User user)
AvatarManager
getActiveAvatar
in interface AvatarManager
user
- user to acquire an avatar for
public java.util.Iterator getGlobalAvatars()
AvatarManager
getGlobalAvatars
in interface AvatarManager
public void deleteAvatar(Avatar avatar) throws UnauthorizedException
AvatarManager
deleteAvatar
in interface AvatarManager
avatar
- the avatar for the user
UnauthorizedException
public void setAvatarsEnabled(boolean enabled) throws UnauthorizedException
AvatarManager
setAvatarsEnabled
in interface AvatarManager
enabled
- true to enable, false to disable
UnauthorizedException
public boolean isAvatarsEnabled()
AvatarManager
isAvatarsEnabled
in interface AvatarManager
public int getMaxAllowableHeight()
AvatarManager
getMaxAllowableHeight
in interface AvatarManager
public void setMaxAllowableHeight(int height) throws UnauthorizedException
AvatarManager
setMaxAllowableHeight
in interface AvatarManager
height
- the maximum allowable height for an avatar image
UnauthorizedException
- thrown if not system adminpublic int getMaxAllowableWidth()
AvatarManager
getMaxAllowableWidth
in interface AvatarManager
public int getAvatarCount(User user)
AvatarManager
getAvatarCount
in interface AvatarManager
user
- user to count avatars for
public boolean isModerateUserAvatars()
AvatarManager
isModerateUserAvatars
in interface AvatarManager
public void setModerateUserAvatars(boolean moderateUserAvatars) throws UnauthorizedException
AvatarManager
setModerateUserAvatars
in interface AvatarManager
moderateUserAvatars
- whether or not user avatars will be moderated
UnauthorizedException
- if not system adminpublic java.util.Iterator getModerationAvatars() throws UnauthorizedException
AvatarManager
getModerationAvatars
in interface AvatarManager
UnauthorizedException
- if not admin or moderatorpublic int getModerationAvatarCount()
AvatarManager
getModerationAvatarCount
in interface AvatarManager
public void setMaxAllowableWidth(int width) throws UnauthorizedException
AvatarManager
setMaxAllowableWidth
in interface AvatarManager
width
- the maximum allowable width for an avatar image
UnauthorizedException
- thrown if not system adminpublic boolean isAllowImageResize()
AvatarManager
isAllowImageResize
in interface AvatarManager
public void setAllowImageResize(boolean isAllowImageResize) throws UnauthorizedException
AvatarManager
setAllowImageResize
in interface AvatarManager
isAllowImageResize
- whether the system should attempt to resize images
UnauthorizedException
- thrown if not system adminpublic boolean isUserAvatarsEnabled()
AvatarManager
isUserAvatarsEnabled
in interface AvatarManager
public void setUserAvatarsEnabled(boolean enableCustomAvatars)
AvatarManager
setUserAvatarsEnabled
in interface AvatarManager
enableCustomAvatars
- true if custom user avatars are enabled, false otherwisepublic int getMaxUserAvatars()
AvatarManager
getMaxUserAvatars
in interface AvatarManager
public void setMaxUserAvatars(int max) throws UnauthorizedException
AvatarManager
setMaxUserAvatars
in interface AvatarManager
max
- the maximum number of avatars a user can have
UnauthorizedException
- if not system admin
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |