Clearspace API (1.7.0) Core Javadocs

com.jivesoftware.community
Interface Avatar

All Superinterfaces:
JiveObject

public interface Avatar
extends JiveObject

An object that represents a user's avatar. Avatars give a user the ability to specify an image that will be displayed alongside their username throughout the application.


Method Summary
 Attachment getAttachment()
          Returns the attachment for this avatar
 int getModValue()
          Returns the moderation value for this Avatar
 User getOwner()
          Returns user who created this avatar, if the user is null then this is a global avatar
 java.util.Map<java.lang.String,java.lang.String> getProperties()
          Retrieve a map of all the extended properties for the avatar.
 boolean isSystemDefault()
          Returns true if this is an instance of SystemDefaultAvatar, meaning the user has not selected an avatar or they are a guest user.
 void setModValue(int modValue)
          Modifies the moderation value of this specific avatar
 
Methods inherited from interface com.jivesoftware.community.JiveObject
getID, getObjectType
 

Method Detail

getModValue

int getModValue()
Returns the moderation value for this Avatar

Returns:
the moderation value for this Avatar

getAttachment

Attachment getAttachment()
                         throws AttachmentNotFoundException
Returns the attachment for this avatar

Returns:
the attachment for this avatar
Throws:
AttachmentNotFoundException - if we could not find an attachment for this avatar

getProperties

java.util.Map<java.lang.String,java.lang.String> getProperties()
Retrieve a map of all the extended properties for the avatar. Each avatar can have an arbitrary number of extended properties. This allows for enhanced functionality that is not part of the base interface. The map is alterable if the user is authorized to modify the avatar. Null keys and values are not allowed.

If the user is not authorized to modify the avatar any method which modifies the map will fail with a UnsupportedOperationException;

Returns:
a map of avatar extended properties.

getOwner

User getOwner()
Returns user who created this avatar, if the user is null then this is a global avatar

Returns:
user who created the avatar

setModValue

void setModValue(int modValue)
                 throws UnauthorizedException
Modifies the moderation value of this specific avatar

Parameters:
modValue - change the moderation value
Throws:
UnauthorizedException - thrown if the user does not have moderation privileges

isSystemDefault

boolean isSystemDefault()
Returns true if this is an instance of SystemDefaultAvatar, meaning the user has not selected an avatar or they are a guest user.

Returns:
true if this is an instance of SystemDefaultAvatar.

Clearspace Project Page

Copyright © 1999-2007 Jive Software.