|
Clearspace API (2.0.15) Web Services Client Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AvatarService
| Method Summary | |
|---|---|
WSAvatar |
createAvatar(long ownerID,
java.lang.String name,
java.lang.String contentType,
byte[] data)
Creates a new avatar for a user allowing the user to specify byte array for the image. |
void |
deleteAvatar(long avatarID)
Deletes an avatar from the system. |
WSAvatar |
getActiveAvatar(long userID)
Returns an avatar for a user, else the SystemDefaultAvatar if the user does not have
an active avatar specified. |
WSAvatar |
getAvatar(long avatarID)
Used to acquire an avatar by its id |
int |
getAvatarCount(long userID)
Used to acquire a count of all the avatars for a specific user |
java.util.List<WSAvatar> |
getAvatars(long userID)
Returns a collection of avatars for a user |
java.util.List<WSAvatar> |
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.List<WSAvatar> |
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(long userID,
long avatarID)
Used to make a user use a global avatar, to set no active avatar pass -1 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. |
| Method Detail |
|---|
WSAvatar createAvatar(long ownerID,
java.lang.String name,
java.lang.String contentType,
byte[] data)
throws UserNotFoundException,
AvatarException
ownerID - the user ID to create the avatar forname - image name of the avatarcontentType - mime type of the imagedata - byte array of the image
UserNotFoundException - if the specified user does not exist
AvatarException - if there is problem creating the avatar
UnauthorizedException - if the user doesn't have permission to create avatars
void setActiveAvatar(long userID,
long avatarID)
throws UnauthorizedException,
UserNotFoundException
userID - the user ID to set an avatar foravatarID - the avatar ID to make active
UnauthorizedException - if the avatar does not belong to the user or it is not global
UserNotFoundException - if the specified user does not exist
WSAvatar getAvatar(long avatarID)
throws AttachmentNotFoundException
avatarID - unique id of the avatar
AttachmentNotFoundException - it there is a problem loading the avatar's image
java.util.List<WSAvatar> getAvatars(long userID)
throws UserNotFoundException
userID - user ID to find an avatar for
List of WSAvatar objects
UserNotFoundException - if the specified user does not exist
WSAvatar getActiveAvatar(long userID)
throws UserNotFoundException,
AttachmentNotFoundException
SystemDefaultAvatar if the user does not have
an active avatar specified.
userID - user ID to acquire an avatar for
UserNotFoundException - if the specified user does not exist
AttachmentNotFoundException - it there is a problem loading the avatar's imagejava.util.List<WSAvatar> getGlobalAvatars()
void deleteAvatar(long avatarID)
throws UnauthorizedException
avatarID - the avatar ID to delete
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 admin
int getAvatarCount(long userID)
throws UserNotFoundException
userID - user to count avatars for
UserNotFoundException - if the specified user does not existboolean isModerateUserAvatars()
void setModerateUserAvatars(boolean moderateUserAvatars)
throws UnauthorizedException
moderateUserAvatars - whether or not user avatars will be moderated
UnauthorizedException - if not system admin
java.util.List<WSAvatar> 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 | |||||||||