|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xiruss.repository.server.RepositoryObjectBase
org.xiruss.repository.server.VersionBase
org.xiruss.repository.server.CompoundDocumentBase
org.xiruss.repository.server.StorageObjectBase
public class StorageObjectBase
Implements the base methods for storage objects. Specializations are normally created to handling the setting of additional storage object type properties, i.e., TextStorageObject, XmlStorageObject, WordStorageObject, as well as to simply enable version-type-level distinction of different data formats (which could also be captured as version properties).
| Field Summary | |
|---|---|
protected long |
length
|
(package private) static org.apache.log4j.Logger |
logger
|
| Fields inherited from class org.xiruss.repository.server.CompoundDocumentBase |
|---|
membersCache |
| Fields inherited from class org.xiruss.repository.server.VersionBase |
|---|
isFixed, nextVersions, previousVersions, resource |
| Fields inherited from class org.xiruss.repository.server.RepositoryObjectBase |
|---|
id, name, objectTypeConstant, properties, rep |
| Constructor Summary | |
|---|---|
StorageObjectBase()
|
|
| Method Summary | |
|---|---|
boolean |
canWrite()
Checks if the storage object can be written to (because it is not fixed and is not already open). |
void |
close()
Closes the storage object if it has been opened for writing via getWriter(); |
protected void |
closeWriter()
Subclasses must implement the appropriate close action for their implementation-specific writer. |
byte[] |
getBytes()
Gets the bytes of the storage object's content (as distinct from its other properties). |
java.lang.String |
getMimeType()
Returns the MIME type of the storage object. |
java.lang.String |
getOriginalSystemId()
Gets the value of the original system ID property. |
protected java.io.Writer |
getWriterForImpl()
Returns an implementation-specific Writer instance that allows the storage object's content to be written. |
long |
length()
Returns the length, in bytes, of the storage object content |
java.io.InputStream |
openInputStream()
|
java.io.OutputStream |
openOutputStream()
Open a writer for writing to the storage object. |
void |
setStorageObjectData(StorageObjectData data)
Sets the storage object data object that provides access to the data as managed by the repository's storage manager. |
| Methods inherited from class org.xiruss.repository.server.CompoundDocumentBase |
|---|
accept, getMemberVersions |
| Methods inherited from class org.xiruss.repository.server.VersionBase |
|---|
addDependency, addNextVersion, addPreviousVersion, checkIsNotFixed, collectTargetVersions, compareTo, dependsOn, dependsOn, getDependencies, getDependenciesByType, getNext, getPrevious, getResource, initialize, initialize, isFixed, setAsFixed, setPrevious, setResource |
| Methods inherited from class org.xiruss.repository.server.RepositoryObjectBase |
|---|
getId, getName, getProperties, getProperty, getPropertyNames, getRepository, getType, hasProperty, initialize, initialize, isNull, setId, setName, setProperties, setProperty, setRepository, setType, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.xiruss.snapcm.api.Version |
|---|
addDependency, addNextVersion, addPreviousVersion, checkIsNotFixed, collectTargetVersions, dependsOn, dependsOn, getDependencies, getDependenciesByType, getNext, getPrevious, getResource, initialize, initialize, isFixed, setAsFixed, setPrevious |
| Methods inherited from interface org.xiruss.snapcm.api.RepositoryObject |
|---|
accept, compareTo, getId, getName, getProperties, getProperty, getPropertyNames, getRepository, getType, hasProperty, initialize, isNull, setId, setName, setProperty, toString |
| Field Detail |
|---|
static org.apache.log4j.Logger logger
protected long length
| Constructor Detail |
|---|
public StorageObjectBase()
| Method Detail |
|---|
public byte[] getBytes()
throws java.io.IOException
StorageObject
getBytes in interface StorageObjectjava.io.IOExceptionpublic java.lang.String getOriginalSystemId()
getOriginalSystemId in interface StorageObjectpublic long length()
length in interface StorageObjectpublic java.lang.String getMimeType()
StorageObject
getMimeType in interface StorageObject
public java.io.OutputStream openOutputStream()
throws java.io.IOException
openOutputStream in interface StorageObjectjava.io.IOException
protected java.io.Writer getWriterForImpl()
throws java.io.IOException
java.io.IOException
public void close()
throws java.io.IOException
StorageObject
close in interface StorageObjectjava.io.IOException
protected void closeWriter()
throws java.io.IOException
java.io.IOExceptionpublic boolean canWrite()
StorageObject
canWrite in interface StorageObjectpublic void setStorageObjectData(StorageObjectData data)
StorageObject
setStorageObjectData in interface StorageObjectdata - StorageObjectData instance
public java.io.InputStream openInputStream()
throws java.io.IOException
openInputStream in interface StorageObjectjava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||