public final class ConcreteStorageProxy extends java.lang.Object implements StorageProxy
| Constructor and Description |
|---|
ConcreteStorageProxy(Storage storage,
java.lang.String repositoryID,
java.lang.String objectID,
HeaderSet txnMetadata)
Construct a storage accessor/proxy object that uses the given
storage mechanism and restricts access to the given objectID based
on the permissions granted to the given callerIDs.
|
| Modifier and Type | Method and Description |
|---|---|
void |
appendDataElement(java.lang.String elementID,
java.io.InputStream input)
Appends the bytes from the given input stream to the given data element
for the object.
|
java.lang.String |
createObject(java.lang.String newObjectID)
Creates a new digital object with the given ID, if one does not already exist.
|
java.lang.String |
createObject(java.lang.String newObjectID,
java.lang.String newObjectName)
Creates a new digital object with the given ID, if one does not already exist.
|
void |
deleteAttributes(java.lang.String[] attributeKeys)
Remove the attributes with the given keys from the object.
|
boolean |
deleteDataElement(java.lang.String elementID)
Deletes the specified data element from the current object.
|
void |
deleteElementAttributes(java.lang.String elementID,
java.lang.String[] attributeKeys)
Remove the attributes with the given keys from the element.
|
void |
deleteObject()
Deletes the digital object along with all data elements or files that are associated
with it.
|
void |
deserializeObject(java.lang.String format,
java.io.InputStream in)
Reset the object's state and re-initialize it with the data in the
given InputStream in the given format.
|
boolean |
doesDataElementExist(java.lang.String elementID)
Returns true if the given data element exists
|
boolean |
doesObjectExist()
Returns true if the given digital object exists.
|
HeaderSet |
getAttributes(HeaderSet container)
Get all of the key-value attributes that are associated with the object.
|
java.io.InputStream |
getDataElement(java.lang.String elementID)
Returns the identified data element for this object.
|
HeaderSet |
getElementAttributes(java.lang.String elementID,
HeaderSet container)
Get all of the key-value attributes that are associated with the given
element in the object.
|
java.io.File |
getFileForDataElement(java.lang.String elementID)
Returns the File in which the given data element is stored, if any.
|
StorageProxy |
getObjectAccessor(java.lang.String objectID)
Returns a StorageProxy for a different object in this Repository.
|
java.lang.String |
getObjectID()
Get the object identifier of the given object.
|
java.lang.String |
getRepoID()
Get the repository identifier of the repository for the given object.
|
java.util.Enumeration |
listDataElements()
Returns a list of the data elements associated with the current object.
|
java.util.Enumeration |
listObjects()
Returns an Enumeration of all of the objects in the repository.
|
void |
serializeObject(java.lang.String format,
java.io.OutputStream out)
Serialize the entire object using the given format to the given stream
|
void |
setAttributes(HeaderSet attributes)
Set the given key-value attributes in the object, replacing any existing
attributes that have the same keys.
|
void |
setElementAttributes(java.lang.String elementID,
HeaderSet attributes)
Set the given key-value attributes for the given element in the object,
replacing any existing attributes that have the same keys.
|
void |
storeDataElement(java.lang.String elementID,
java.io.InputStream input)
Stores the bytes from the given input stream into the given data element
for the object.
|
public ConcreteStorageProxy(Storage storage, java.lang.String repositoryID, java.lang.String objectID, HeaderSet txnMetadata)
public java.lang.String getObjectID()
getObjectID in interface StorageProxypublic java.lang.String getRepoID()
getRepoID in interface StorageProxypublic StorageProxy getObjectAccessor(java.lang.String objectID)
getObjectAccessor in interface StorageProxypublic boolean doesObjectExist()
throws DOException
doesObjectExist in interface StorageProxyDOExceptionpublic boolean doesDataElementExist(java.lang.String elementID)
throws DOException
doesDataElementExist in interface StorageProxyDOExceptionpublic java.io.File getFileForDataElement(java.lang.String elementID)
throws DOException
getFileForDataElement in interface StorageProxyDOExceptionpublic java.lang.String createObject(java.lang.String newObjectID)
throws DOException
createObject in interface StorageProxyDOExceptionpublic void deleteObject()
throws DOException
deleteObject in interface StorageProxyDOExceptionpublic java.lang.String createObject(java.lang.String newObjectID,
java.lang.String newObjectName)
throws DOException
createObject in interface StorageProxyDOExceptionpublic java.util.Enumeration listObjects()
throws DOException
listObjects in interface StorageProxyDOExceptionpublic java.util.Enumeration listDataElements()
throws DOException
listDataElements in interface StorageProxyDOExceptionpublic java.io.InputStream getDataElement(java.lang.String elementID)
throws DOException
getDataElement in interface StorageProxyDOExceptionpublic void storeDataElement(java.lang.String elementID,
java.io.InputStream input)
throws java.lang.Exception
storeDataElement in interface StorageProxyjava.lang.Exceptionpublic void appendDataElement(java.lang.String elementID,
java.io.InputStream input)
throws java.lang.Exception
appendDataElement in interface StorageProxyjava.lang.Exceptionpublic boolean deleteDataElement(java.lang.String elementID)
throws DOException
deleteDataElement in interface StorageProxyDOExceptionpublic HeaderSet getAttributes(HeaderSet container) throws DOException
getAttributes in interface StorageProxyDOExceptionpublic HeaderSet getElementAttributes(java.lang.String elementID, HeaderSet container) throws DOException
getElementAttributes in interface StorageProxyDOExceptionpublic void setAttributes(HeaderSet attributes) throws DOException
setAttributes in interface StorageProxyDOExceptionpublic void setElementAttributes(java.lang.String elementID,
HeaderSet attributes)
throws DOException
setElementAttributes in interface StorageProxyDOExceptionpublic void deleteAttributes(java.lang.String[] attributeKeys)
throws DOException
deleteAttributes in interface StorageProxyDOExceptionpublic void deleteElementAttributes(java.lang.String elementID,
java.lang.String[] attributeKeys)
throws DOException
deleteElementAttributes in interface StorageProxyDOExceptionpublic void serializeObject(java.lang.String format,
java.io.OutputStream out)
throws DOException
serializeObject in interface StorageProxyDOExceptionpublic void deserializeObject(java.lang.String format,
java.io.InputStream in)
throws DOException
deserializeObject in interface StorageProxyDOException