Google Data APIs Client Library (1.41.1)



com.google.gdata.data.photos.impl
Class GphotoDataImpl

java.lang.Object
  extended by com.google.gdata.data.photos.impl.GphotoDataImpl
All Implemented Interfaces:
Extensible, GphotoData
Direct Known Subclasses:
AlbumDataImpl, CommentDataImpl, PhotoDataImpl, TagDataImpl, UserDataImpl

public class GphotoDataImpl
extends java.lang.Object
implements GphotoData

Basic implementation class for all of the GphotoData objects. This provides basic implementations of the standard methods that GphotoData specifies as well as helper methods for subclasses to use when implementing particular data interfaces.


Constructor Summary
GphotoDataImpl(ExtensionPoint extensionPoint)
          Construct a new GphotoData implementation based on the given extension.
 
Method Summary
 void addExtension(Extension extension)
          Add an extension.
 void addRepeatingExtension(Extension extension)
          Add a repeating extension.
protected  void declare(ExtensionProfile extProfile, ExtensionDescription description)
          Helper method to declare an extension as available only on the local entry class.
 void declareExtensions(ExtensionProfile extProfile)
          Declares the set of expected Extension types for an Extensible within the target extension profile.
protected
<T extends Extension>
T
getExtension(java.lang.Class<T> extClass)
          Get an extension by class.
 java.lang.String getGphotoId()
          Gets the gphoto:id of the data object.
protected
<T extends Extension>
java.util.List<T>
getRepeatingExtension(java.lang.Class<T> extClass)
          Get a repeating extension by class.
protected  java.lang.String getSimpleValue(java.lang.Class<? extends ValueConstruct> extClass)
          Protected helper to get the simple value from a construct extension.
 void removeExtension(java.lang.Class<? extends Extension> extensionClass)
          Remove an extension by class.
 void removeExtension(Extension extension)
          Remove an extension.
 void removeRepeatingExtension(Extension ext)
          Removes a repeating extension object.
 void setExtension(Extension extension)
          Set an extension.
 void setGphotoId(java.lang.Long id)
          Sets the id of this entry.
 void setGphotoId(java.lang.String id)
          Sets the id of this entry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GphotoDataImpl

public GphotoDataImpl(ExtensionPoint extensionPoint)
Construct a new GphotoData implementation based on the given extension.

Method Detail

declareExtensions

public void declareExtensions(ExtensionProfile extProfile)
Description copied from interface: Extensible
Declares the set of expected Extension types for an Extensible within the target extension profile. Forwards to ExtensionPoint.declareExtensions(ExtensionProfile).

Specified by:
declareExtensions in interface Extensible
Parameters:
extProfile - the ExtensionProfile to initialize.

declare

protected void declare(ExtensionProfile extProfile,
                       ExtensionDescription description)
Helper method to declare an extension as available only on the local entry class.


getGphotoId

public java.lang.String getGphotoId()
Description copied from interface: GphotoData
Gets the gphoto:id of the data object. The gphoto:id is the photos-specific system id of the object, provided by the server at object creation time.

Specified by:
getGphotoId in interface GphotoData
Returns:
the Gphoto id.

setGphotoId

public void setGphotoId(java.lang.Long id)
Sets the id of this entry.

Specified by:
setGphotoId in interface GphotoData
Parameters:
id - the long version of the id of this feed or entry.

setGphotoId

public void setGphotoId(java.lang.String id)
Sets the id of this entry.

Specified by:
setGphotoId in interface GphotoData
Parameters:
id - the string version of the id of this feed or entry.

getSimpleValue

protected java.lang.String getSimpleValue(java.lang.Class<? extends ValueConstruct> extClass)
Protected helper to get the simple value from a construct extension.


getExtension

protected <T extends Extension> T getExtension(java.lang.Class<T> extClass)
Get an extension by class.

See Also:
ExtensionPoint.getExtension(Class)

getRepeatingExtension

protected <T extends Extension> java.util.List<T> getRepeatingExtension(java.lang.Class<T> extClass)
Get a repeating extension by class.

See Also:
ExtensionPoint.getRepeatingExtension(Class)

setExtension

public void setExtension(Extension extension)
Set an extension.

Specified by:
setExtension in interface Extensible
See Also:
ExtensionPoint.setExtension(Extension)

addExtension

public void addExtension(Extension extension)
Add an extension.

Specified by:
addExtension in interface Extensible
See Also:
ExtensionPoint.addExtension(Extension)

addRepeatingExtension

public void addRepeatingExtension(Extension extension)
Add a repeating extension.

Specified by:
addRepeatingExtension in interface Extensible
See Also:
ExtensionPoint.addRepeatingExtension(Extension)

removeExtension

public void removeExtension(java.lang.Class<? extends Extension> extensionClass)
Remove an extension by class.

Specified by:
removeExtension in interface Extensible
See Also:
ExtensionPoint.removeExtension(Class)

removeExtension

public void removeExtension(Extension extension)
Remove an extension.

Specified by:
removeExtension in interface Extensible
See Also:
ExtensionPoint.removeExtension(Extension)

removeRepeatingExtension

public void removeRepeatingExtension(Extension ext)
Description copied from interface: Extensible
Removes a repeating extension object. Forwards to ExtensionPoint.removeRepeatingExtension(Extension).

Specified by:
removeRepeatingExtension in interface Extensible