public class

UserEntry

extends GphotoEntry<E extends GphotoEntry<E>>
implements AtomData UserData
java.lang.Object
   ↳ com.google.gdata.data.AbstractExtension
     ↳ com.google.gdata.data.ExtensionPoint
       ↳ com.google.gdata.data.BaseEntry<E extends com.google.gdata.data.BaseEntry>
         ↳ com.google.gdata.data.media.MediaEntry<E extends com.google.gdata.data.BaseEntry<E>>
           ↳ com.google.gdata.data.photos.GphotoEntry<E extends com.google.gdata.data.photos.GphotoEntry<E>>
             ↳ com.google.gdata.data.photos.UserEntry

Class Overview

Entry for user kinds, contains user metadata.

Summary

Constants
String KIND User kind term value.
[Expand]
Inherited Constants
From interface com.google.gdata.data.photos.UserData
Fields
public static final Category CATEGORY User kind category.
[Expand]
Inherited Fields
From class com.google.gdata.data.photos.GphotoEntry
From class com.google.gdata.data.BaseEntry
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
From interface com.google.gdata.data.photos.UserData
Public Constructors
UserEntry()
Default mutable constructor.
UserEntry(BaseEntry<?> sourceEntry)
Constructs a new instance by doing a shallow copy of data from an existing BaseEntry instance.
Public Methods
void declareExtensions(ExtensionProfile extProfile)
Declares the set of expected Extension types for an ExtensionPoint within the target extension profile.
UserFeed getFeed(String... kinds)
Retrieve the user feed and associated entries.
Integer getMaxPhotos()
The number of photos a user can have in a single album.
GphotoMaxPhotos getMaxPhotosExt()
Returns the maximum number of photos allowed per album.
String getNickname()
The nickname of the user.
GphotoNickname getNicknameExt()
Returns the display nickname of the user.
Long getQuotaLimit()
The quota limit of the user.
GphotoQuotaLimit getQuotaLimitExt()
Returns the limit in bytes of the storage space for the user.
Long getQuotaUsed()
The quota in bytes that the user has used.
GphotoQuotaUsed getQuotaUsedExt()
Returns the currently used quota of the user account.
String getThumbnail()
A url to the user's portrait.
GphotoThumbnail getThumbnailExt()
Returns the user portrait thumbnail.
String getUsername()
The username of the user.
GphotoUsername getUsernameExt()
Returns the username or currently selected persona.
boolean hasMaxPhotosExt()
Returns whether it has the maximum number of photos allowed per album.
boolean hasNicknameExt()
Returns whether it has the display nickname of the user.
boolean hasQuotaLimitExt()
Returns whether it has the limit in bytes of the storage space for the user.
boolean hasQuotaUsedExt()
Returns whether it has the currently used quota of the user account.
boolean hasThumbnailExt()
Returns whether it has the user portrait thumbnail.
boolean hasUsernameExt()
Returns whether it has the username or currently selected persona.
void setMaxPhotos(Integer max)
Set the maximum number of photos the user is allowed.
void setMaxPhotosExt(GphotoMaxPhotos maxPhotosExt)
Sets the maximum number of photos allowed per album.
void setNickname(String nickname)
Set the nickname of the user this data represents.
void setNicknameExt(GphotoNickname nicknameExt)
Sets the display nickname of the user.
void setQuotaLimit(Long quota)
Set the quota limit for the user this data represents.
void setQuotaLimitExt(GphotoQuotaLimit quotaLimitExt)
Sets the limit in bytes of the storage space for the user.
void setQuotaUsed(Long quota)
Set the used quota for the user.
void setQuotaUsedExt(GphotoQuotaUsed quotaUsedExt)
Sets the currently used quota of the user account.
void setThumbnail(String thumbnail)
Set the thumbnail for the user portrait.
void setThumbnailExt(GphotoThumbnail thumbnailExt)
Sets the user portrait thumbnail.
void setUsername(String username)
Set the username for the user this data represents.
void setUsernameExt(GphotoUsername usernameExt)
Sets the username or currently selected persona.
String toString()
Protected Methods
void validate()
Checks the attributes to see if there are any problems.
[Expand]
Inherited Methods
From class com.google.gdata.data.photos.GphotoEntry
From class com.google.gdata.data.media.MediaEntry
From class com.google.gdata.data.BaseEntry
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
From class java.lang.Object
From interface com.google.gdata.data.Extension
From interface com.google.gdata.data.IAtom
From interface com.google.gdata.data.IEntry
From interface com.google.gdata.data.Kind.Adaptable
From interface com.google.gdata.data.Kind.Adaptor
From interface com.google.gdata.data.media.IMediaEntry
From interface com.google.gdata.data.photos.AtomData
From interface com.google.gdata.data.photos.Extensible
From interface com.google.gdata.data.photos.GphotoData
From interface com.google.gdata.data.photos.UserData

Constants

public static final String KIND

User kind term value.

Constant Value: "http://schemas.google.com/photos/2007#user"

Fields

public static final Category CATEGORY

User kind category.

Public Constructors

public UserEntry ()

Default mutable constructor.

public UserEntry (BaseEntry<?> sourceEntry)

Constructs a new instance by doing a shallow copy of data from an existing BaseEntry instance.

Parameters
sourceEntry Source entry

Public Methods

public void declareExtensions (ExtensionProfile extProfile)

Declares the set of expected Extension types for an ExtensionPoint within the target extension profile. The base implementation does not declare any extensions, but can be overridden by specific types of ExtensionPoints that always contain a well-defined set of extensions.

Parameters
extProfile The ExtensionProfile to initialize.

public UserFeed getFeed (String... kinds)

Retrieve the user feed and associated entries. The kinds parameter is a list of the associated entries to return. For example UserFeed userAndPhotos = userEntry.getFeed(PhotoData.KIND, TagData.KIND); If no kind parameters are passed, the default of KIND will be used.

Parameters
kinds The kinds of entries to retrieve, or empty to use the default.
Returns
  • a feed of the album and the requested kinds.
Throws
IOException
ServiceException
See Also

public Integer getMaxPhotos ()

The number of photos a user can have in a single album. Calculated on the server.

Returns
  • the maximum number of photos the user can have in an album.

public GphotoMaxPhotos getMaxPhotosExt ()

Returns the maximum number of photos allowed per album.

Returns
  • maximum number of photos allowed per album

public String getNickname ()

The nickname of the user. This is the display name of the user, defined by editing the user information through the UI.

Returns
  • the nickname of the user this data represents.

public GphotoNickname getNicknameExt ()

Returns the display nickname of the user.

Returns
  • display nickname of the user

public Long getQuotaLimit ()

The quota limit of the user. Set on the server, only modifiable by purchasing more storage through the UI.

Returns
  • the quota limit for the user in bytes.

public GphotoQuotaLimit getQuotaLimitExt ()

Returns the limit in bytes of the storage space for the user.

Returns
  • limit in bytes of the storage space for the user

public Long getQuotaUsed ()

The quota in bytes that the user has used. This is calculated on the server.

Returns
  • the quota used for this user in bytes.

public GphotoQuotaUsed getQuotaUsedExt ()

Returns the currently used quota of the user account.

Returns
  • currently used quota of the user account

public String getThumbnail ()

A url to the user's portrait.

Returns
  • the thumbnail for the user this data represents.

public GphotoThumbnail getThumbnailExt ()

Returns the user portrait thumbnail.

Returns
  • user portrait thumbnail

public String getUsername ()

The username of the user. The username is the user's current persona, and is not a valid email address but is instead a unique name of the user on the server.

Returns
  • the username of the user this data represents.

public GphotoUsername getUsernameExt ()

Returns the username or currently selected persona.

Returns
  • username or currently selected persona

public boolean hasMaxPhotosExt ()

Returns whether it has the maximum number of photos allowed per album.

Returns
  • whether it has the maximum number of photos allowed per album

public boolean hasNicknameExt ()

Returns whether it has the display nickname of the user.

Returns
  • whether it has the display nickname of the user

public boolean hasQuotaLimitExt ()

Returns whether it has the limit in bytes of the storage space for the user.

Returns
  • whether it has the limit in bytes of the storage space for the user

public boolean hasQuotaUsedExt ()

Returns whether it has the currently used quota of the user account.

Returns
  • whether it has the currently used quota of the user account

public boolean hasThumbnailExt ()

Returns whether it has the user portrait thumbnail.

Returns
  • whether it has the user portrait thumbnail

public boolean hasUsernameExt ()

Returns whether it has the username or currently selected persona.

Returns
  • whether it has the username or currently selected persona

public void setMaxPhotos (Integer max)

Set the maximum number of photos the user is allowed. Used by the server to set the field, has no effect on the client.

Parameters
max The number of photos the user is allowed.

public void setMaxPhotosExt (GphotoMaxPhotos maxPhotosExt)

Sets the maximum number of photos allowed per album.

Parameters
maxPhotosExt Maximum number of photos allowed per album or null to reset

public void setNickname (String nickname)

Set the nickname of the user this data represents. Used on the server to set the field of the entry or feed, this will have no effect on the client.

Parameters
nickname The nickname of the user.

public void setNicknameExt (GphotoNickname nicknameExt)

Sets the display nickname of the user.

Parameters
nicknameExt Display nickname of the user or null to reset

public void setQuotaLimit (Long quota)

Set the quota limit for the user this data represents. Used by the server to set the field in the response, has no effect on the client.

Parameters
quota The quota in bytes for the user.

public void setQuotaLimitExt (GphotoQuotaLimit quotaLimitExt)

Sets the limit in bytes of the storage space for the user.

Parameters
quotaLimitExt Limit in bytes of the storage space for the user or null to reset

public void setQuotaUsed (Long quota)

Set the used quota for the user. Has no effect on the client.

Parameters
quota The quota usage in bytes for this user.

public void setQuotaUsedExt (GphotoQuotaUsed quotaUsedExt)

Sets the currently used quota of the user account.

Parameters
quotaUsedExt Currently used quota of the user account or null to reset

public void setThumbnail (String thumbnail)

Set the thumbnail for the user portrait. This is used on the server and does not yet have the effect of changing the portrait when set on the client.

Parameters
thumbnail The url to the user portrait image.

public void setThumbnailExt (GphotoThumbnail thumbnailExt)

Sets the user portrait thumbnail.

Parameters
thumbnailExt User portrait thumbnail or null to reset

public void setUsername (String username)

Set the username for the user this data represents. This is used by the server and setting it on the client will have no effect.

Parameters
username The username of the user.

public void setUsernameExt (GphotoUsername usernameExt)

Sets the username or currently selected persona.

Parameters
usernameExt Username or currently selected persona or null to reset

public String toString ()

Protected Methods

protected void validate ()

Checks the attributes to see if there are any problems. Default implementation does nothing, though generally this is discouraged unless there really are no restrictions.