public class

GphotoDataImpl

extends Object
implements GphotoData
java.lang.Object
   ↳ com.google.gdata.data.photos.impl.GphotoDataImpl
Known Direct Subclasses

Class Overview

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.

Summary

Fields
private final Class<? extends ExtensionPoint> extClass
private final ExtensionPoint extPoint
Public Constructors
GphotoDataImpl(ExtensionPoint extensionPoint)
Construct a new GphotoData implementation based on the given extension.
Public Methods
void addExtension(Extension extension)
Add an extension.
void addRepeatingExtension(Extension extension)
Add a repeating extension.
void declareExtensions(ExtensionProfile extProfile)
Declares the set of expected Extension types for an Extensible within the target extension profile.
String getGphotoId()
Gets the gphoto:id of the data object.
void removeExtension(Extension extension)
Remove an extension.
void removeExtension(Class<? extends Extension> extensionClass)
Remove an extension by class.
void removeRepeatingExtension(Extension ext)
Removes a repeating extension object.
void setExtension(Extension extension)
Set an extension.
void setGphotoId(String id)
Sets the id of this entry.
void setGphotoId(Long id)
Sets the id of this entry.
Protected Methods
void declare(ExtensionProfile extProfile, ExtensionDescription description)
Helper method to declare an extension as available only on the local entry class.
<T extends Extension> T getExtension(Class<T> extClass)
Get an extension by class.
<T extends Extension> List<T> getRepeatingExtension(Class<T> extClass)
Get a repeating extension by class.
String getSimpleValue(Class<? extends ValueConstruct> extClass)
Protected helper to get the simple value from a construct extension.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.google.gdata.data.photos.Extensible
From interface com.google.gdata.data.photos.GphotoData

Fields

private final Class<? extends ExtensionPoint> extClass

private final ExtensionPoint extPoint

Public Constructors

public GphotoDataImpl (ExtensionPoint extensionPoint)

Construct a new GphotoData implementation based on the given extension.

Parameters
extensionPoint

Public Methods

public void addExtension (Extension extension)

Add an extension.

Parameters
extension

public void addRepeatingExtension (Extension extension)

Add a repeating extension.

Parameters
extension

public void declareExtensions (ExtensionProfile extProfile)

Declares the set of expected Extension types for an Extensible within the target extension profile. Forwards to declareExtensions(ExtensionProfile).

Parameters
extProfile The ExtensionProfile to initialize.

public String getGphotoId ()

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.

Returns
  • the Gphoto id.

public void removeExtension (Extension extension)

Remove an extension.

Parameters
extension

public void removeExtension (Class<? extends Extension> extensionClass)

Remove an extension by class.

Parameters
extensionClass

public void removeRepeatingExtension (Extension ext)

Removes a repeating extension object. Forwards to removeRepeatingExtension(Extension).

Parameters
ext

public void setExtension (Extension extension)

Set an extension.

Parameters
extension

public void setGphotoId (String id)

Sets the id of this entry.

Parameters
id The string version of the id of this feed or entry.

public void setGphotoId (Long id)

Sets the id of this entry.

Parameters
id The long version of the id of this feed or entry.

Protected Methods

protected void declare (ExtensionProfile extProfile, ExtensionDescription description)

Helper method to declare an extension as available only on the local entry class.

Parameters
extProfile
description

protected T getExtension (Class<T> extClass)

Get an extension by class.

Parameters
extClass

protected List<T> getRepeatingExtension (Class<T> extClass)

Get a repeating extension by class.

Parameters
extClass

protected String getSimpleValue (Class<? extends ValueConstruct> extClass)

Protected helper to get the simple value from a construct extension.

Parameters
extClass