org.gcube.contentmanagement.contentmanager.plugin.defaultplugin
Class DefaultWriter
java.lang.Object
org.gcube.contentmanagement.contentmanager.plugin.delegates.ManagerDelegate
org.gcube.contentmanagement.contentmanager.plugin.delegates.WriteDelegate
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
Methods inherited from class org.gcube.contentmanagement.contentmanager.plugin.delegates.WriteDelegate |
add, update |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultWriter
public DefaultWriter()
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