|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gdata.model.Element
com.google.gdata.model.atompub.Workspace
public class Workspace
Server-defined groups of Collections. This is hand-written because it needs versioning support that allows us to hide the title attribute by default.
Field Summary | |
---|---|
static ElementKey<java.lang.Void,Workspace> |
KEY
The key for this element. |
static AttributeKey<java.lang.String> |
TITLE
The title attribute. |
Constructor Summary | |
---|---|
Workspace()
Default mutable constructor. |
|
Workspace(TextContent title)
Constructor with the title element. |
Method Summary | |
---|---|
void |
addCollection(Collection collection)
Adds a new collection. |
Collection |
addCollection(java.lang.String collectionUri,
java.lang.String title,
java.lang.String... acceptedTypes)
Add a new collection with the given title and accept types. |
java.util.List<Collection> |
getCollections()
Returns the collections. |
TextContent |
getTitle()
Returns the title. |
boolean |
hasCollections()
Returns whether it has the collections. |
boolean |
hasTitle()
Returns whether it has the title. |
static void |
registerMetadata(MetadataRegistry registry)
Registers the metadata for this element. |
boolean |
removeCollection(Collection collection)
Removes an existing collection. |
Element |
resolve(ElementMetadata<?,?> meta,
ValidationContext vc)
Resolve this element's state against the metadata. |
void |
setTitle(TextContent title)
Sets the title. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final ElementKey<java.lang.Void,Workspace> KEY
public static final AttributeKey<java.lang.String> TITLE
Constructor Detail |
---|
public Workspace()
public Workspace(TextContent title)
Method Detail |
---|
public static void registerMetadata(MetadataRegistry registry)
public java.util.List<Collection> getCollections()
getCollections
in interface IWorkspace
public void addCollection(Collection collection)
collection
- collectionpublic Collection addCollection(java.lang.String collectionUri, java.lang.String title, java.lang.String... acceptedTypes)
addCollection
in interface IWorkspace
public boolean removeCollection(Collection collection)
collection
- collection
public boolean hasCollections()
public TextContent getTitle()
public void setTitle(TextContent title)
title
- title or null
to resetpublic boolean hasTitle()
public Element resolve(ElementMetadata<?,?> meta, ValidationContext vc)
Element
resolve
in class Element
vc
- validation context
public java.lang.String toString()
toString
in class Element
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |