|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.domain.DomainObject
com.arsdigita.domain.ObservableDomainObject
com.arsdigita.kernel.ACSObject
com.arsdigita.versioning.VersionedACSObject
com.arsdigita.cms.ContentItem
com.arsdigita.cms.Asset
com.arsdigita.cms.BinaryAsset
An abstract class for an asset which represents some binary data,
such as an image, an audio clip, etc. Contains utility methods for
reading and writing bytes. Child classes must override the getBaseDataObjectType()
, getContent()
and setContent(byte[])
methods.
Field Summary | |
static String |
versionId
|
Fields inherited from class com.arsdigita.cms.Asset |
BASE_DATA_OBJECT_TYPE, DESCRIPTION, MIME_TYPE, NAME |
Fields inherited from class com.arsdigita.cms.ContentItem |
ANCESTORS, AUDITING, CHILDREN, CONTENT_SECTION, CONTENT_TYPE, DRAFT, DRAFT_VERSION, LANGUAGE, LIVE, PARENT, PENDING, VERSION, VERSIONS |
Fields inherited from class com.arsdigita.versioning.VersionedACSObject |
IS_DELETED, MASTER |
Fields inherited from class com.arsdigita.kernel.ACSObject |
CONTAINER, DEFAULT_DOMAIN_CLASS, DISPLAY_NAME, ID, OBJECT_TYPE |
Constructor Summary | |
|
BinaryAsset(com.arsdigita.persistence.DataObject obj)
|
protected |
BinaryAsset(com.arsdigita.persistence.OID oid)
|
protected |
BinaryAsset(String type)
|
Method Summary | |
abstract String |
getBaseDataObjectType()
|
protected abstract byte[] |
getContent()
All derived classes must implement this method. |
long |
getSize()
Fetch the size of the content. |
long |
readBytes(InputStream is)
Reads a stream of data into the content object. |
protected abstract void |
setContent(byte[] content)
All derived classes must implement this method. |
long |
writeBytes(OutputStream os)
Writes data from the content object to the specified output stream. |
Methods inherited from class com.arsdigita.cms.Asset |
getDescription, getMimeType, setDescription, setMimeType, writeToFile |
Methods inherited from class com.arsdigita.versioning.VersionedACSObject |
applyTag, applyUniqueTag, autoPropagateMaster, getMaster, getRolledBackTo, getTransactions, getTransactions, isMaster, isRolledBack, isSubtype, permanentlyDelete, propagateMaster, recordAttributeChange, rollBackTo, rollBackTo, rollForward, save, setMaster, trackChanges |
Methods inherited from class com.arsdigita.kernel.ACSObject |
assertPrivilege, checkPrivilege, doCreateCheck, doWriteCheck, getContainer, getDefaultDomainClass, getID, getSpecificObjectType, getSpecificOID, gimmeContainer, isContainerModified, setID, setID |
Methods inherited from class com.arsdigita.domain.ObservableDomainObject |
addObserver, getObservers |
Methods inherited from class com.arsdigita.domain.DomainObject |
add, add, addToAssociation, afterDelete, clear, delete, disconnect, equals, getObjectType, getOID, getSession, hashCode, isDeleted, isDisconnected, isModified, isNew, isPropertyModified, isValid, remove, remove, remove, removeFromAssociation, save, setAssociation, setAssociation, specializeDataObject, specializeDataObject, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String versionId
Constructor Detail |
protected BinaryAsset(com.arsdigita.persistence.OID oid) throws com.arsdigita.domain.DataObjectNotFoundException
protected BinaryAsset(String type)
public BinaryAsset(com.arsdigita.persistence.DataObject obj)
Method Detail |
public abstract String getBaseDataObjectType()
getBaseDataObjectType
in class Asset
public long readBytes(InputStream is) throws IOException
is
- A input stream
IOException
public long writeBytes(OutputStream os) throws IOException
os
- The output stream
IOException
protected abstract byte[] getContent()
protected abstract void setContent(byte[] content)
content
- the binary data to be put into the Blobpublic long getSize()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |