com.google.gdata.model.atompub
Class ServiceDocument

java.lang.Object
  extended by com.google.gdata.model.Element
      extended by com.google.gdata.model.atompub.ServiceDocument
All Implemented Interfaces:
IServiceDocument

public class ServiceDocument
extends Element
implements IServiceDocument

Container for service information.


Field Summary
static ElementKey<java.lang.Void,ServiceDocument> KEY
          The key for this element.
 
Constructor Summary
ServiceDocument()
          Constructs an instance using the default key.
 
Method Summary
 Workspace addWorkspace(java.lang.String title)
          Add a new workspace to the service document, returning the newly created workspace to the caller.
 ServiceDocument addWorkspace(Workspace workspace)
          Adds a new workspace.
 void clearWorkspaces()
          Removes all existing workspace instances.
 java.util.List<Workspace> getWorkspaces()
          Returns the workspaces.
 boolean hasWorkspaces()
          Returns whether it has the workspaces.
 ServiceDocument lock()
          Locks this element.
static void registerMetadata(MetadataRegistry registry)
          Registers the metadata for this element.
 boolean removeWorkspace(Workspace workspace)
          Removes an existing workspace.
 
Methods inherited from class com.google.gdata.model.Element
addElement, addElement, addElement, clear, createElement, createElement, equals, getAttributeCount, getAttributeIterator, getAttributeIterator, getAttributeValue, getAttributeValue, getDefaultKey, getElement, getElement, getElementCount, getElementId, getElementIterator, getElementIterator, getElementKey, getElements, getElements, getElementSet, getElementSet, getElementValue, getElementValue, getTextValue, getTextValue, hasAttribute, hasAttribute, hasElement, hasElement, hashCode, hasTextValue, isLocked, removeAttribute, removeAttribute, removeAttributeValue, removeAttributeValue, removeElement, removeElement, removeElement, removeElement, replaceElement, resolve, resolve, setAttributeValue, setAttributeValue, setElement, setElement, setElement, setTextValue, toString, visit
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

KEY

public static final ElementKey<java.lang.Void,ServiceDocument> KEY
The key for this element.

Constructor Detail

ServiceDocument

public ServiceDocument()
Constructs an instance using the default key.

Method Detail

registerMetadata

public static void registerMetadata(MetadataRegistry registry)
Registers the metadata for this element.


lock

public ServiceDocument lock()
Description copied from class: Element
Locks this element. A locked element cannot have any changes made to its content or its attributes or child elements. This will also lock all attributes and child elements as well. Once this method has been called, this element can be safely published to other threads.

Overrides:
lock in class Element

getWorkspaces

public java.util.List<Workspace> getWorkspaces()
Returns the workspaces.

Specified by:
getWorkspaces in interface IServiceDocument
Returns:
workspaces

addWorkspace

public ServiceDocument addWorkspace(Workspace workspace)
Adds a new workspace.

Parameters:
workspace - workspace

removeWorkspace

public boolean removeWorkspace(Workspace workspace)
Removes an existing workspace.

Parameters:
workspace - workspace
Returns:
true if the workspace was removed

clearWorkspaces

public void clearWorkspaces()
Removes all existing workspace instances.


hasWorkspaces

public boolean hasWorkspaces()
Returns whether it has the workspaces.

Returns:
whether it has the workspaces

addWorkspace

public Workspace addWorkspace(java.lang.String title)
Description copied from interface: IServiceDocument
Add a new workspace to the service document, returning the newly created workspace to the caller.

Specified by:
addWorkspace in interface IServiceDocument