|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectfedora.server.StdoutLogging
fedora.server.storage.SimpleDOReader
fedora.server.storage.SimpleDOWriter
Title: SimpleDOWriter.java
Description: A DOWriter that uses a DigitalObject
under the hood.
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.
-----------------------------------------------------------------------------License and Copyright: The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/.
Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
The entire file consists of original code. Copyright © 2002-2005 by The Rector and Visitors of the University of Virginia and Cornell University. All rights reserved.
-----------------------------------------------------------------------------
| Field Summary |
| Fields inherited from class fedora.server.StdoutLogging |
CONFIG, FINE, FINER, FINEST, INFO, SEVERE, WARNING |
| Constructor Summary | |
SimpleDOWriter(Context context,
DefaultDOManager mgr,
fedora.server.storage.translation.DOTranslator translator,
java.lang.String exportFormat,
java.lang.String encoding,
DigitalObject obj,
Logging logTarget)
|
|
| Method Summary | |
void |
addDatastream(Datastream datastream)
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). |
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 |
setState(java.lang.String state)
Sets the state of the entire digital object. |
| Methods inherited from class fedora.server.StdoutLogging |
logConfig, logFine, logFiner, logFinest, loggingConfig, loggingFine, loggingFiner, loggingFinest, loggingInfo, loggingSevere, loggingWarning, logInfo, logSevere, logWarning, setLogLevel |
| 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,
fedora.server.storage.translation.DOTranslator translator,
java.lang.String exportFormat,
java.lang.String encoding,
DigitalObject obj,
Logging logTarget)
| Method Detail |
public void setState(java.lang.String state)
throws ObjectIntegrityException
DOWriter
setState in interface DOWriterstate - The state.
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)
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 DOWriter
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||