org.gcube.contentmanagement.contentmanager.plugin.defaultplugin
Class DefaultWriter

java.lang.Object
  extended by org.gcube.contentmanagement.contentmanager.plugin.delegates.ManagerDelegate
      extended by org.gcube.contentmanagement.contentmanager.plugin.delegates.WriteDelegate
          extended by org.gcube.contentmanagement.contentmanager.plugin.defaultplugin.DefaultWriter
All Implemented Interfaces:
java.io.Serializable

public class DefaultWriter
extends WriteDelegate

Author:
Fabio Simeoni (University of Strathclyde)
See Also:
Serialized Form

Constructor Summary
DefaultWriter()
           
 
Method Summary
 java.lang.String add(GDoc doc)
          Adds a gDoc document.
 DefaultCollection getCollection()
          Returns the Collection.
 void update(GDoc delta)
          Updates a gDoc document.
 
Methods inherited from class org.gcube.contentmanagement.contentmanager.plugin.delegates.WriteDelegate
add, update
 
Methods inherited from class org.gcube.contentmanagement.contentmanager.plugin.delegates.ManagerDelegate
setCollection
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultWriter

public DefaultWriter()
Method Detail

add

public java.lang.String add(GDoc doc)
                     throws InvalidDocumentException,
                            java.lang.Exception
Adds a gDoc document.

Specified by:
add in class WriteDelegate
Parameters:
doc - the document.
Returns:
the document's identifier.
Throws:
InvalidDocumentException - if the document is invalid.
java.lang.Exception - if the document is valid but could not be added.

update

public void update(GDoc delta)
            throws UnknownDocumentException,
                   InvalidDocumentException,
                   java.lang.Exception
Updates a gDoc document.

Specified by:
update in class WriteDelegate
Parameters:
delta - the updated document.
Throws:
UnknownDocumentException - if the document is unknown.
InvalidDocumentException - if the document is invalid.
java.lang.Exception - if the document is known and valid but could not be updated.

getCollection

public DefaultCollection getCollection()
Returns the Collection.

Overrides:
getCollection in class ManagerDelegate
Returns:
the collection