Google Data APIs Client Library (1.41.1)
com.google.gdata.data.appsforyourdomain.generic
Class GenericEntry
java.lang.Object
com.google.gdata.data.AbstractExtension
com.google.gdata.data.ExtensionPoint
com.google.gdata.data.BaseEntry<GenericEntry>
com.google.gdata.data.appsforyourdomain.generic.GenericEntry
- All Implemented Interfaces:
- Extension, IAtom, IEntry, Kind.Adaptable, Kind.Adaptor
public class GenericEntry
- extends BaseEntry<GenericEntry>
GData entry class that models a generic feed entry which contains only
name-value pairs of data.
- See Also:
GenericFeed
Method Summary |
void |
addProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Convenience method to add multiple name-value pairs to this entry. |
void |
addProperty(java.lang.String name,
java.lang.String value)
Add a new name-value pair to this entry. |
void |
declareExtensions(ExtensionProfile extProfile)
Declares the set of expected Extension types for an ExtensionPoint within
the target extension profile. |
java.util.Map<java.lang.String,java.lang.String> |
getAllProperties()
|
java.lang.String |
getProperty(java.lang.String name)
Retrieve the value for a name. |
boolean |
removeProperty(java.lang.String name)
Remove the property with the given name (if it exists). |
void |
validate()
A GenericEntry is valid if it satisfies the following conditions:
All Properties have a non-null names (values can be null)
No two properties have the same name
This method is called by the GData framework on the server side. |
Methods inherited from class com.google.gdata.data.BaseEntry |
addAdaptor, addHtmlLink, addLink, addLink, delete, generate, generateAtom, generateRss, getAdaptedEntry, getAdaptor, getAdaptors, getAuthors, getCanEdit, getCategories, getContent, getContentHandlerInfo, getContributors, getEdited, getEditLink, getEtag, getHandler, getHtmlLink, getId, getKind, getLink, getLinks, getLinks, getMediaEditLink, 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, setService, 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, toString, wait, wait, wait |
GenericEntry
public GenericEntry()
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
- Overrides:
declareExtensions
in class ExtensionPoint
- Parameters:
extProfile
- the ExtensionProfile to initialize.- See Also:
ExtensionProfile.addDeclarations(Kind.Adaptor)
addProperty
public void addProperty(java.lang.String name,
java.lang.String value)
- Add a new name-value pair to this entry.
addProperties
public void addProperties(java.util.Map<java.lang.String,java.lang.String> properties)
- Convenience method to add multiple name-value pairs to this entry.
- Parameters:
properties
- the Map
of name-value pairs to add
getProperty
public java.lang.String getProperty(java.lang.String name)
- Retrieve the value for a name.
Note: If you want all the properties in this entry, use
getAllProperties()
- Returns:
- null if entry does not contain any value for the given name.
removeProperty
public boolean removeProperty(java.lang.String name)
- Remove the property with the given
name
(if it exists).
- Returns:
- true if a property with this name was found and removed, false
otherwise
getAllProperties
public java.util.Map<java.lang.String,java.lang.String> getAllProperties()
- Returns:
- Map containing all the name-value pairs in this entry.
validate
public void validate()
throws java.lang.IllegalStateException
- A GenericEntry is valid if it satisfies the following conditions:
- All Properties have a non-null names (values can be null)
- No two properties have the same name
This method is called by the GData framework on the server side.
- Overrides:
validate
in class AbstractExtension
- Throws:
java.lang.IllegalStateException
- If the current state of this entry is
invalid.