|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfedora.server.storage.SimpleDOReader
fedora.server.storage.SimpleDOWriter
public class SimpleDOWriter
A DigitalObject-backed DOWriter.
This interface supports transaction behavior with the commit(String) and rollBack() methods. When a DOWriter is instantiated, there is an implicit transaction. Write methods may be called, but they won't affect the the underlying data store until commit(String) is invoked. This also has the effect of creating another implicit transaction. If temporary changes are no longer wanted, rollBack() may be called to return the object to it's original form. rollBack() is only valid for the current transaction.
The read methods of DOWriter reflect on the composition of the object in the context of the current transaction.
| Constructor Summary | |
|---|---|
SimpleDOWriter(Context context,
DefaultDOManager mgr,
DOTranslator translator,
java.lang.String exportFormat,
java.lang.String encoding,
DigitalObject obj)
|
|
| Method Summary | |
|---|---|
void |
addDatastream(Datastream datastream,
boolean addNewVersion)
Adds a datastream to the object. |
void |
addDisseminator(Disseminator disseminator)
Adds a disseminator to the object. |
void |
commit(java.lang.String logMessage)
Saves the changes thus far to the permanent copy of the digital object. |
void |
invalidate()
Marks this DOWriter handle invalid (unusable). |
boolean |
isCommitted()
Marks whether the object has been successfully committed. |
boolean |
isNew()
Marks whether the object is new. |
java.lang.String |
newAuditRecordID()
Generate a unique id for an audit record. |
java.lang.String |
newDatastreamBindingMapID()
Generate a unique id for a datastreamBindingMap. |
java.lang.String |
newDatastreamID()
Generate a unique id for a datastream. |
java.lang.String |
newDatastreamID(java.lang.String dsID)
Generate a unique id for a datastream version. |
java.lang.String |
newDisseminatorID()
Generate a unique id for a disseminator. |
java.lang.String |
newDisseminatorID(java.lang.String dissID)
Generate a unique id for a disseminator version. |
void |
remove()
Removes the entire digital object. |
java.util.Date[] |
removeDatastream(java.lang.String id,
java.util.Date start,
java.util.Date end)
Removes a datastream from the object. |
java.util.Date[] |
removeDisseminator(java.lang.String id,
java.util.Date start,
java.util.Date end)
Removes a disseminator from the object. |
void |
setDatastreamState(java.lang.String datastreamID,
java.lang.String dsState)
Sets the state for all versions of the specified datastream. |
void |
setDatastreamVersionable(java.lang.String datastreamID,
boolean versionable)
Sets the indicator as to whether the datastream is subject to versioning. |
void |
setDisseminatorState(java.lang.String disseminatorID,
java.lang.String dissState)
Sets the state for all versions of the specified disseminator. |
void |
setLabel(java.lang.String label)
Sets the label of the digital object. |
void |
setOwnerId(java.lang.String ownerId)
Sets the ownerId for the digital object. |
void |
setState(java.lang.String state)
Sets the state of the entire digital object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface fedora.server.storage.DOReader |
|---|
ExportObject, getAuditRecords, GetBehaviorDefs, getContentModelId, getCreateDate, GetDatastream, getDatastream, GetDatastreams, getDatastreamVersions, getDisseminationBindingInfo, GetDisseminator, GetDisseminators, getDisseminatorVersions, GetDSBindingMaps, getFedoraObjectType, getLastModDate, getObjectHistory, GetObjectLabel, getObjectMethodParms, GetObjectPID, GetObjectState, GetObjectXML, getOwnerId, ListDatastreamIDs, ListDisseminatorIDs, listMethods, listMethods |
| Constructor Detail |
|---|
public SimpleDOWriter(Context context,
DefaultDOManager mgr,
DOTranslator translator,
java.lang.String exportFormat,
java.lang.String encoding,
DigitalObject obj)
| Method Detail |
|---|
public void setState(java.lang.String state)
throws ObjectIntegrityException
DOWriter
setState in interface DOWriterstate - The state.
ObjectIntegrityException
public void setOwnerId(java.lang.String ownerId)
throws ObjectIntegrityException
DOWriter
setOwnerId in interface DOWriterownerId - The ownerId.
ObjectIntegrityException
public void setDatastreamState(java.lang.String datastreamID,
java.lang.String dsState)
throws ServerException
DOWriter
setDatastreamState in interface DOWriterdatastreamID - The datastream id.dsState - The state.
ServerException - If any type of error occurred fulfilling the
request.
public void setDatastreamVersionable(java.lang.String datastreamID,
boolean versionable)
throws ServerException
DOWriter
setDatastreamVersionable in interface DOWriterdatastreamID - The datastream id.versionable - a boolean indicating if versionable
ServerException - If any type of error occurred fulfilling the
request.
public void setDisseminatorState(java.lang.String disseminatorID,
java.lang.String dissState)
throws ServerException
DOWriter
setDisseminatorState in interface DOWriterdisseminatorID - The disseminator id.dissState - The state.
ServerException - If any type of error occurred fulfilling the
request.
public void setLabel(java.lang.String label)
throws ObjectIntegrityException
DOWriter
setLabel in interface DOWriterlabel - The label.
ObjectIntegrityException
public void remove()
throws ObjectIntegrityException
remove in interface DOWriterServerException - If any type of error occurred fulfilling the
request.
ObjectIntegrityException
public void addDatastream(Datastream datastream,
boolean addNewVersion)
throws ServerException
addDatastream in interface DOWriterdatastream - The datastream.
ServerException - If any type of error occurred fulfilling the
request.
public void addDisseminator(Disseminator disseminator)
throws ServerException
addDisseminator in interface DOWriterdisseminator - The disseminator.
ServerException - If any type of error occurred fulfilling the
request.
public java.util.Date[] removeDatastream(java.lang.String id,
java.util.Date start,
java.util.Date end)
throws ServerException
removeDatastream in interface DOWriterid - The id of the datastream.start - The start date (inclusive) of versions to remove. If
null, this is taken to be the smallest possible
value.end - The end date (inclusive) of versions to remove. If
null, this is taken to be the greatest possible
value.
ServerException - If any type of error occurred fulfilling the
request.
public java.util.Date[] removeDisseminator(java.lang.String id,
java.util.Date start,
java.util.Date end)
throws ServerException
removeDisseminator in interface DOWriterid - The id of the datastream.start - The start date (inclusive) of versions to remove. If
null, this is taken to be the smallest possible
value.end - The end date (inclusive) of versions to remove. If
null, this is taken to be the greatest possible
value.
ServerException - If any type of error occurred fulfilling the
request.
public void commit(java.lang.String logMessage)
throws ServerException
commit in interface DOWriterlogMessage - An explanation of the change(s).
ServerException - If any type of error occurred fulfilling the
request.public void invalidate()
DOWriter
invalidate in interface DOWriterpublic java.lang.String newDatastreamID()
newDatastreamID in interface DOWriterpublic java.lang.String newDatastreamID(java.lang.String dsID)
newDatastreamID in interface DOWriterpublic java.lang.String newDisseminatorID()
newDisseminatorID in interface DOWriterpublic java.lang.String newDisseminatorID(java.lang.String dissID)
newDisseminatorID in interface DOWriterpublic java.lang.String newDatastreamBindingMapID()
newDatastreamBindingMapID in interface DOWriterpublic java.lang.String newAuditRecordID()
newAuditRecordID in interface DOWriterpublic boolean isCommitted()
DOWriter
isCommitted in interface DOWriterpublic boolean isNew()
DOWriter
isNew in interface DOWriter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||