# Google Data APIs Client Library (1.43.0)

## com.google.gdata.data.photos
Class UserEntry

    java.lang.Object
      com.google.gdata.data.AbstractExtension
          com.google.gdata.data.ExtensionPoint
              com.google.gdata.data.BaseEntry<E>
                  com.google.gdata.data.media.MediaEntry<E>
                      com.google.gdata.data.photos.GphotoEntry<UserEntry>
                          com.google.gdata.data.photos.UserEntry

All Implemented Interfaces:
  Extension, IAtom, IEntry, Kind.Adaptable, Kind.Adaptor, IMediaEntry, AtomData, Extensible, GphotoData, UserData

    public class UserEntry

extends GphotoEntry<UserEntry>
implements AtomData, UserData

Entry for user kinds, contains user metadata.

Nested Class Summary

Nested classes/interfaces inherited from class com.google.gdata.data.BaseEntry
`BaseEntry.AtomHandler, BaseEntry.EntryState`

Nested classes/interfaces inherited from class com.google.gdata.data.ExtensionPoint
`ExtensionPoint.CumulativeBlobHandler, ExtensionPoint.ExtensionHandler`

Nested classes/interfaces inherited from class com.google.gdata.data.AbstractExtension
`AbstractExtension.AttributesHandler`

Field Summary
`static Category` `CATEGORY` User kind category.
`static java.lang.String` `KIND` User kind term value.

Fields inherited from class com.google.gdata.data.BaseEntry
`state`

Fields inherited from class com.google.gdata.data.ExtensionPoint
`xmlBlob`

Fields inherited from class com.google.gdata.data.AbstractExtension
`localName, namespace`

Fields inherited from interface com.google.gdata.data.photos.UserData
`USER_CATEGORY, USER_KIND`

Constructor Summary
`UserEntry()` Default mutable constructor.
`UserEntry(BaseEntry<?> sourceEntry)` Constructs a new instance by doing a shallow copy of data from an existing `BaseEntry` instance.

Method Summary
`void` `declareExtensions(ExtensionProfile extProfile)` Declares the set of expected Extension types for an ExtensionPoint within the target extension profile.
`UserFeed` `getFeed(java.lang.String... kinds)` Retrieve the user feed and associated entries.
`java.lang.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.
`java.lang.String` `getNickname()` The nickname of the user.
`GphotoNickname` `getNicknameExt()` Returns the display nickname of the user.
`java.lang.Long` `getQuotaLimit()` The quota limit of the user.
`GphotoQuotaLimit` `getQuotaLimitExt()` Returns the limit in bytes of the storage space for the user.
`java.lang.Long` `getQuotaUsed()` The quota in bytes that the user has used.
`GphotoQuotaUsed` `getQuotaUsedExt()` Returns the currently used quota of the user account.
`java.lang.String` `getThumbnail()` A url to the user's portrait.
`GphotoThumbnail` `getThumbnailExt()` Returns the user portrait thumbnail.
`java.lang.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(java.lang.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(java.lang.String nickname)` Set the nickname of the user this data represents.
`void` `setNicknameExt(GphotoNickname nicknameExt)` Sets the display nickname of the user.
`void` `setQuotaLimit(java.lang.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(java.lang.Long quota)` Set the used quota for the user.
`void` `setQuotaUsedExt(GphotoQuotaUsed quotaUsedExt)` Sets the currently used quota of the user account.
`void` `setThumbnail(java.lang.String thumbnail)` Set the thumbnail for the user portrait.
`void` `setThumbnailExt(GphotoThumbnail thumbnailExt)` Sets the user portrait thumbnail.
`void` `setUsername(java.lang.String username)` Set the username for the user this data represents.
`void` `setUsernameExt(GphotoUsername usernameExt)` Sets the username or currently selected persona.
`java.lang.String` `toString()`
`protected void` `validate()` Checks the attributes to see if there are any problems.

Methods inherited from class com.google.gdata.data.photos.GphotoEntry
`generateRss, getAdaptedEntry, getDescription, getFeed, getFeedLink, getGphotoId, setDescription, setGphotoId, setGphotoId`

Methods inherited from class com.google.gdata.data.media.MediaEntry
`getContentHandlerInfo, getMediaEditLink, getMediaSource, setMediaSource, setService, updateMedia`

Methods inherited from class com.google.gdata.data.BaseEntry

`addAdaptor, addHtmlLink, addLink, addLink, delete, generate, generateAtom, getAdaptor, getAdaptors, getAuthors, getCanEdit, getCategories, getContent, getContributors, getEdited, getEditLink, getEtag, getHandler, getHtmlLink, getId, getKind, getLink, getLinks, getLinks, getPlainTextContent, getPubControl, getPublished, getResumableEditMediaLink, getRights, getSelectedFields, getSelf, getSelfLink, getService, getSource, getSummary, getTextContent, getTitle, getUpdated, getVersionId, isDraft, parseAtom, parseAtom, parseAtom, readEntry, readEntry, removeLinks, removeLinks, setCanEdit, setContent, setContent, setDraft, setEdited, setEtag, setId, setKind, setPubControl, setPublished, setRights, setSelectedFields, setSource, setSummary, setTitle, setUpdated, setVersionId, update, visitChildren`

Methods inherited from class com.google.gdata.data.ExtensionPoint

`addExtension, addExtension, addRepeatingExtension, addRepeatingExtension, checkRequiredExtensions, createExtensionInstance, generate, generateCumulativeXmlBlob, generateExtensions, generateStartElement, getExtension, getExtensionDescription, getExtensionHandler, getExtensions, getManifest, getRepeatingExtension, getRepeatingExtensions, getXmlBlob, hasExtension, hasRepeatingExtension, initializeArbitraryXml, parseCumulativeXmlBlob, removeExtension, removeExtension, removeRepeatingExtension, setExtension, setXmlBlob, visit, visitChild`

Methods inherited from class com.google.gdata.data.AbstractExtension
`consumeAttributes, disableStrictValidation, enableStrictValidation, eq, generateAttributes, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, putAttributes, sameClassAs, setImmutable, throwExceptionForMissingAttribute, throwExceptionIfImmutable`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface com.google.gdata.data.photos.AtomData
`getAuthors, getCategories, getContributors, getDescription, getId, getLinks, getRights, getTitle, getUpdated, setDescription, setId, setRights, setTitle, setUpdated`

Methods inherited from interface com.google.gdata.data.photos.GphotoData
`getGphotoId, setGphotoId, setGphotoId`

Methods inherited from interface com.google.gdata.data.photos.Extensible
`addExtension, addRepeatingExtension, removeExtension, removeExtension, removeRepeatingExtension, setExtension`

Methods inherited from interface com.google.gdata.data.IEntry
`getCanEdit, getContent, getEdited, getEditLink, getPublished, getResumableEditMediaLink, getSelectedFields, getSummary, setCanEdit, setEdited, setPublished, setSelectedFields`

Methods inherited from interface com.google.gdata.data.IAtom
`addLink, getAuthors, getCategories, getEtag, getId, getKind, getLink, getLinks, getSelfLink, getTitle, getUpdated, getVersionId, removeLinks, removeLinks, setEtag, setId, setKind, setUpdated, setVersionId`

Field Detail

### KIND

    public static final java.lang.String KIND

  User kind term value.

  See Also:
    Constant Field Values

### CATEGORY

    public static final Category CATEGORY

  User kind category.

Constructor Detail

### UserEntry

    public UserEntry()

  Default mutable constructor.

### UserEntry

    public UserEntry(BaseEntry<?> sourceEntry)

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

  Parameters:
    `sourceEntry` - source entry

Method Detail

### declareExtensions

    public void declareExtensions(ExtensionProfile extProfile)

  Description copied from class: `ExtensionPoint`
  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.

  Specified by:
    `declareExtensions` in interface `Kind.Adaptor`
  Specified by:
    `declareExtensions` in interface `Extensible`
  Overrides:
    `declareExtensions` in class `GphotoEntry<UserEntry>`
  Parameters:
    `extProfile` - the ExtensionProfile to initialize.
  See Also:
    `ExtensionProfile.addDeclarations(Kind.Adaptor)`

### getMaxPhotosExt

    public GphotoMaxPhotos getMaxPhotosExt()

  Returns the maximum number of photos allowed per album.

  Returns:
    maximum number of photos allowed per album

### setMaxPhotosExt

    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

### hasMaxPhotosExt

    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

### getNicknameExt

    public GphotoNickname getNicknameExt()

  Returns the display nickname of the user.

  Returns:
    display nickname of the user

### setNicknameExt

    public void setNicknameExt(GphotoNickname nicknameExt)

  Sets the display nickname of the user.

  Parameters:
    `nicknameExt` - display nickname of the user or `null` to reset

### hasNicknameExt

    public boolean hasNicknameExt()

  Returns whether it has the display nickname of the user.

  Returns:
    whether it has the display nickname of the user

### getQuotaLimitExt

    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

### setQuotaLimitExt

    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

### hasQuotaLimitExt

    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

### getQuotaUsedExt

    public GphotoQuotaUsed getQuotaUsedExt()

  Returns the currently used quota of the user account.

  Returns:
    currently used quota of the user account

### setQuotaUsedExt

    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

### hasQuotaUsedExt

    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

### getThumbnailExt

    public GphotoThumbnail getThumbnailExt()

  Returns the user portrait thumbnail.

  Returns:
    user portrait thumbnail

### setThumbnailExt

    public void setThumbnailExt(GphotoThumbnail thumbnailExt)

  Sets the user portrait thumbnail.

  Parameters:
    `thumbnailExt` - user portrait thumbnail or `null` to reset

### hasThumbnailExt

    public boolean hasThumbnailExt()

  Returns whether it has the user portrait thumbnail.

  Returns:
    whether it has the user portrait thumbnail

### getUsernameExt

    public GphotoUsername getUsernameExt()

  Returns the username or currently selected persona.

  Returns:
    username or currently selected persona

### setUsernameExt

    public void setUsernameExt(GphotoUsername usernameExt)

  Sets the username or currently selected persona.

  Parameters:
    `usernameExt` - username or currently selected persona or `null` to reset

### hasUsernameExt

    public boolean hasUsernameExt()

  Returns whether it has the username or currently selected persona.

  Returns:
    whether it has the username or currently selected persona

### validate

    protected void validate()

  Description copied from class: `AbstractExtension`
  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.

  Overrides:
    `validate` in class `AbstractExtension`

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### getFeed

    public UserFeed getFeed(java.lang.String... kinds)
                     throws java.io.IOException,
                            ServiceException

  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 `AlbumData.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:
    `java.io.IOException`
    `ServiceException`
  See Also:
    `AlbumData.KIND`, `PhotoData.KIND`, `TagData.KIND`

### getMaxPhotos

    public java.lang.Integer getMaxPhotos()

  Description copied from interface: `UserData`
  The number of photos a user can have in a single album. Calculated on the server.

  Specified by:
    `getMaxPhotos` in interface `UserData`
  Returns:
    the maximum number of photos the user can have in an album.

### getNickname

    public java.lang.String getNickname()

  Description copied from interface: `UserData`
  The nickname of the user. This is the display name of the user, defined by editing the user information through the UI.

  Specified by:
    `getNickname` in interface `UserData`
  Returns:
    the nickname of the user this data represents.

### getQuotaLimit

    public java.lang.Long getQuotaLimit()

  Description copied from interface: `UserData`
  The quota limit of the user. Set on the server, only modifiable by purchasing more storage through the UI.

  Specified by:
    `getQuotaLimit` in interface `UserData`
  Returns:
    the quota limit for the user in bytes.

### getQuotaUsed

    public java.lang.Long getQuotaUsed()

  Description copied from interface: `UserData`
  The quota in bytes that the user has used. This is calculated on the server.

  Specified by:
    `getQuotaUsed` in interface `UserData`
  Returns:
    the quota used for this user in bytes.

### getThumbnail

    public java.lang.String getThumbnail()

  Description copied from interface: `UserData`
  A url to the user's portrait.

  Specified by:
    `getThumbnail` in interface `UserData`
  Returns:
    the thumbnail for the user this data represents.

### getUsername

    public java.lang.String getUsername()

  Description copied from interface: `UserData`
  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.

  Specified by:
    `getUsername` in interface `UserData`
  Returns:
    the username of the user this data represents.

### setMaxPhotos

    public void setMaxPhotos(java.lang.Integer max)

  Description copied from interface: `UserData`
  Set the maximum number of photos the user is allowed. Used by the server to set the field, has no effect on the client.

  Specified by:
    `setMaxPhotos` in interface `UserData`
  Parameters:
    `max` - the number of photos the user is allowed.

### setNickname

    public void setNickname(java.lang.String nickname)

  Description copied from interface: `UserData`
  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.

  Specified by:
    `setNickname` in interface `UserData`
  Parameters:
    `nickname` - the nickname of the user.

### setQuotaLimit

    public void setQuotaLimit(java.lang.Long quota)

  Description copied from interface: `UserData`
  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.

  Specified by:
    `setQuotaLimit` in interface `UserData`
  Parameters:
    `quota` - the quota in bytes for the user.

### setQuotaUsed

    public void setQuotaUsed(java.lang.Long quota)

  Description copied from interface: `UserData`
  Set the used quota for the user. Has no effect on the client.

  Specified by:
    `setQuotaUsed` in interface `UserData`
  Parameters:
    `quota` - the quota usage in bytes for this user.

### setThumbnail

    public void setThumbnail(java.lang.String thumbnail)

  Description copied from interface: `UserData`
  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.

  Specified by:
    `setThumbnail` in interface `UserData`
  Parameters:
    `thumbnail` - the url to the user portrait image.

### setUsername

    public void setUsername(java.lang.String username)

  Description copied from interface: `UserData`
  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.

  Specified by:
    `setUsername` in interface `UserData`
  Parameters:
    `username` - the username of the user.