public class S_MediaBlob extends S_TieMediaLob
S_LibraryObject.MapInfo
CONTENTTABLE_EXPIRATIONDATE_COLUMN, CONTENTTABLE_MEDIAID_COLUMN, CONTENTTABLE_PARTITIONVALUE_COLUMN, CONTENTTABLE_TABLENAME_PREFIX
CASCADE_OP_COPY_PUBLICOBJECT_TO_CATEGORY, CASCADE_OP_COPY_PUBLICOBJECT_TO_RIGHT_RELATIONSHIP, CASCADE_OP_DELETE_FAMILY_TO_VERSIONSERIES, CASCADE_OP_DELETE_PUBLICOBJECT_TO_LEFT_RELATIONSHIP, CASCADE_OP_DELETE_PUBLICOBJECT_TO_RIGHT_RELATIONSHIP, CASCADE_OP_DELETE_PUBLICOBJECT_TO_VERSIONDESCRIPTION, CASCADE_OP_DELETE_RELATIONSHIP_TO_LEFT_PUBLICOBJECT, CASCADE_OP_DELETE_RELATIONSHIP_TO_RIGHT_PUBLICOBJECT, CASCADE_OP_DELETE_VERSIONDESCRIPTION_TO_PUBLICOBJECT, CASCADE_OP_DELETE_VERSIONDESCRIPTION_TO_VERSIONSERIES, CASCADE_OP_DELETE_VERSIONSERIES_TO_FAMILY, CASCADE_OP_DELETE_VERSIONSERIES_TO_VERSIONDESCRIPTION, CASCADE_OP_FREE_CATEGORY_TO_PUBLICOBJECT, CASCADE_OP_FREE_CATEGORY_TO_SCHEMAOBJECT, CASCADE_OP_FREE_CATEGORY_TO_SYSTEMOBJECT, CASCADE_OP_FREE_FAMILY_TO_VERSIONSERIES, CASCADE_OP_FREE_PUBLICOBJECT_TO_CATEGORY, CASCADE_OP_FREE_PUBLICOBJECT_TO_LEFT_RELATIONSHIP, CASCADE_OP_FREE_PUBLICOBJECT_TO_RIGHT_RELATIONSHIP, CASCADE_OP_FREE_PUBLICOBJECT_TO_VERSIONDESCRIPTION, CASCADE_OP_FREE_RELATIONSHIP_TO_LEFT_PUBLICOBJECT, CASCADE_OP_FREE_RELATIONSHIP_TO_RIGHT_PUBLICOBJECT, CASCADE_OP_FREE_SCHEMAOBJECT_TO_CATEGORY, CASCADE_OP_FREE_SYSTEMOBJECT_TO_CATEGORY, CASCADE_OP_FREE_VERSIONDESCRIPTION_TO_PUBLICOBJECT, CASCADE_OP_FREE_VERSIONDESCRIPTION_TO_VERSIONSERIES, CASCADE_OP_FREE_VERSIONSERIES_TO_FAMILY, CASCADE_OP_FREE_VERSIONSERIES_TO_VERSIONDESCRIPTION, CASCADE_OP_UNDEFINED, CASCADE_OP_UNDELETE_FAMILY_TO_VERSIONSERIES, CASCADE_OP_UNDELETE_PUBLICOBJECT_TO_LEFT_RELATIONSHIP, CASCADE_OP_UNDELETE_PUBLICOBJECT_TO_RIGHT_RELATIONSHIP, CASCADE_OP_UNDELETE_PUBLICOBJECT_TO_VERSIONDESCRIPTION, CASCADE_OP_UNDELETE_RELATIONSHIP_TO_LEFT_PUBLICOBJECT, CASCADE_OP_UNDELETE_RELATIONSHIP_TO_RIGHT_PUBLICOBJECT, CASCADE_OP_UNDELETE_VERSIONDESCRIPTION_TO_PUBLICOBJECT, CASCADE_OP_UNDELETE_VERSIONDESCRIPTION_TO_VERSIONSERIES, CASCADE_OP_UNDELETE_VERSIONSERIES_TO_FAMILY, CASCADE_OP_UNDELETE_VERSIONSERIES_TO_VERSIONDESCRIPTION, CASCADE_OP_UPDATE_CATEGORY_TO_PUBLICOBJECT, CASCADE_OP_UPDATE_CATEGORY_TO_SCHEMAOBJECT, CASCADE_OP_UPDATE_CATEGORY_TO_SYSTEMOBJECT, CASCADE_OP_UPDATE_PUBLICOBJECT_TO_CATEGORY, CASCADE_OP_UPDATE_SCHEMAOBJECT_TO_CATEGORY, CASCADE_OP_UPDATE_SYSTEMOBJECT_TO_CATEGORY, DEFAULT_RENDERER, m_ClassId, m_Id, m_Session
Modifier | Constructor and Description |
---|---|
protected |
S_MediaBlob(S_LibrarySession session,
Long classId)
Constructs an S_MediaBlob instance for the case where the object has
not been created in the database yet.
|
protected |
S_MediaBlob(S_LibrarySession session,
S_LibraryObjectData data)
Constructs an S_MediaBlob instance.
|
Modifier and Type | Method and Description |
---|---|
protected void |
copyContent(S_Media srcMedia,
Long srcCid,
Long dstCid,
Long partitionValue,
AttributeValue[] mediaOptions)
Stores a copy of existing content as the content for the specified
content id.
|
protected void |
destroyContent(Long cid,
AttributeValue[] mediaOptions)
Destroys the content with the specified content id.
|
Serializable |
DYNCreateContentIndexProcedure(Serializable payload)
DYN wrapper for
createContentIndexProcedure . |
protected void |
extendedPostFree(OperationState opState,
S_LibraryObjectDefinition def)
Operations to be performed after freeing
an object.
|
protected void |
extendedPostInsert(OperationState opState,
S_LibraryObjectDefinition sdef)
Operations to be performed after creating an object.
|
protected void |
extendedPreFree(OperationState opState,
S_LibraryObjectDefinition sdef)
Operations to be performed before freeing
an object.
|
protected void |
extendedPreInsert(OperationState opState,
S_LibraryObjectDefinition sdef)
Performs pre-insert actions.
|
protected InputStream |
getContent(Long cid)
Gets the content stream for the specified content id.
|
protected long |
getContentSize(Long cid)
Gets the size of the content stream for the specified content id.
|
MediaBlobHelper |
getMediaBlobHelper()
Gets the MediaBlobHelper being employed by this instance.
|
protected RandomAccessDriver |
getRandomAccessDriver(Long cid)
Gets a RandomAccessDriver for the specified content id.
|
protected void |
setContent(Long cid,
InputStream is,
Long partitionValue,
AttributeValue[] mediaOptions)
Stores content read from the specified InputStream using the specified
content id.
|
protected void |
setContentReference(Long cid,
String contentReference,
Long partitionValue,
AttributeValue[] mediaOptions)
Stores content determined from a specified content reference for the
specified content id.
|
protected void |
setEmptyContent(Long cid,
Long partitionValue,
AttributeValue[] mediaOptions)
Stores zero-length content for the specified content id.
|
acquireContentTableLock, destroyExpiredContent, DYNDestroyExpiredContent, ensureContentTableExists, getColumnName, getContentIndexProcedure, getContentTableName, getPartitionValue, getTableName, isReadOnly, setExpirationDate, setPartitionValue
addCategory, cascadeFree, createCategories, deriveDefinition, extendedPostUpdate, extendedPreUpdate, getCategories, getCategories, getCategories, handleCascade, removeCategories, updateCategories, verifyCanCreate, verifyCanFree, verifyCanUpdate
added, applyValueDefault, associatedPostFree, associatedPostInsert, associatedPreInsert, canPurge, cascadeCopy, cascadeUpdate, checkRequiredForInsert, checkSettable, clearArrayTypeAttributeValues, clearMapTypeAttributeValues, clonePublicObjectAttribute, constructIdArray, constructIdArray, copy, copy, copyVectorToLibraryObjectArray, createDefaultPolicyPropertyBundle, createDefaultPropertyBundle, createDefaultPropertyBundle, createInstance, deleteRows, deriveOwnerUniqueName, deriveOwnerUniqueName, deriveUppercasedAttribute, determineClassDomain, determinePolicy, determinePolicy, determineValueDefault, determineValueDomain, dispose, DYNInvalidateState, DYNLockRows, equals, equals, executePolicyOperation, extendedPreCopy, findPolicyFromPropertyBundleAv, free, free, getAttribute, getAttributeByUpperCaseName, getAuditCertificateName, getAuditDomainContext, getAuditEventFolderContext, getClassData, getClassId, getClassName, getClassObject, getContentStorageManager, getData, getDefinition, getEffectivePolicyActionContexts, getEffectivePolicyListElements, getEventualAttributeByUpperCaseName, getId, getLibraryConnection, getName, getObjectReferenceAttribute, getPropertyBundle, getPropertyValue, getResourceString, getResourceString, getService, getSession, getSessionInterface, getTraceLogger, handleEvent, hashCode, hasNameAttribute, insertReferenceAttributes, insertRow, insertRows, invalidateState, invokeOperation, invokePolicyMethod, isAuditCertificateSecured, isBroadcastCreateEventEnabled, isInstanceOf, isPersistent, issueCascade, isTraced, lockRows, postEvent, postEvent, postFree, postInsert, postUpdate, preFree, preInsert, preUpdate, privilegedUpdate, removed, renderAsReader, renderAsStream, setAttribute, setAttribute, setAttributes, toString, trace, update, updateRows, validateStringArray, verifyCanGetContent, verifyCanSetContent, verifyCanSetPolicy, verifyPersistent, verifyWriteableTransactionInProgress
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getAttributeByUpperCaseName, getClassId, getId, getSessionInterface
getTraceLogger, isTraced, trace
protected S_MediaBlob(S_LibrarySession session, S_LibraryObjectData data) throws IfsException
session
- the session contextdata
- the data componentIfsException
- if the operation failsprotected S_MediaBlob(S_LibrarySession session, Long classId) throws IfsException
session
- the session contextclassId
- the id of the classIfsException
- if the operation failspublic MediaBlobHelper getMediaBlobHelper()
protected void extendedPreInsert(OperationState opState, S_LibraryObjectDefinition sdef) throws IfsException
extendedPreInsert
in class S_Media
opState
- current operation statesdef
- the definition for the insert operationIfsException
- if the operation failsprotected void extendedPostInsert(OperationState opState, S_LibraryObjectDefinition sdef) throws IfsException
This is overridden by classes that need to perform operations after successfully creating the rows for the new instance.
extendedPostInsert
in class S_Media
opState
- current operation statesdef
- object definitionIfsException
- if operation fails.protected void extendedPreFree(OperationState opState, S_LibraryObjectDefinition sdef) throws IfsException
extendedPreFree
in class S_Media
opState
- current operation statesdef
- object definitionIfsException
- if operation fails.protected void extendedPostFree(OperationState opState, S_LibraryObjectDefinition def) throws IfsException
extendedPostFree
in class S_LibraryObject
opState
- current operation statedef
- object definitionIfsException
- if operation fails.public Serializable DYNCreateContentIndexProcedure(Serializable payload) throws IfsException
createContentIndexProcedure
.payload
- ignoredIfsException
- if the operation failsprotected InputStream getContent(Long cid) throws IfsException
getContent
in class S_Media
cid
- the content id; requiredIfsException
- if the operation failsprotected long getContentSize(Long cid) throws IfsException
getContentSize
in class S_Media
cid
- the content id; requiredIfsException
- if the operation failsprotected void setContent(Long cid, InputStream is, Long partitionValue, AttributeValue[] mediaOptions) throws IfsException
The implementation of this method is responsible for inserting a row into
the content table whose ID column is cid
, storing content
read from the InputStream, and closing the InputStream.
setContent
in class S_Media
cid
- the content id; requiredis
- the InputStream from which content is readpartitionValue
- the value for the PARTITIONVALUE column in the
content table, or null if nonemediaOptions
- a set of name/value pairs whose semantics are
Media determined, or null for no media optionsIfsException
- if the operation failsprotected void setEmptyContent(Long cid, Long partitionValue, AttributeValue[] mediaOptions) throws IfsException
The implementation of this method is responsible for inserting a row into
the content table whose ID column is cid
.
Althrough a concrete implementation is provided here (by calling
setContent
and immediately closing the returned
OutputStream), subclasses should override this method with a more
performant implementation, if possible.
setEmptyContent
in class S_Media
cid
- the content id; requiredpartitionValue
- the value for the PARTITIONVALUE column in the
content table, or null if nonemediaOptions
- a set of name/value pairs whose semantics are
Media determined, or null for no media optionsIfsException
- if the operation failsprotected void copyContent(S_Media srcMedia, Long srcCid, Long dstCid, Long partitionValue, AttributeValue[] mediaOptions) throws IfsException
The implementation of this method is responsible for inserting a row into
the content table whose ID column is dstCid
.
Although a concrete implementation is provided here (by copying the
InputStream returned by srcMedia.getContent(srcCid)
to the
OutputStream returned by setContent
), subclasses should
override this method with a more performant implementation, if possible.
copyContent
in class S_Media
srcMedia
- the source media; requiredsrcCid
- the source content id; requireddstCid
- the destination content id; requiredpartitionValue
- the value for the PARTITIONVALUE column in the
content table, or null if nonemediaOptions
- a set of name/value pairs whose semantics are
Media determined, or null for no media optionsIfsException
- if the operation failsprotected void setContentReference(Long cid, String contentReference, Long partitionValue, AttributeValue[] mediaOptions) throws IfsException
The implementation of this method is responsible for inserting a row into
the content table whose ID column is cid
.
The interpretation of contentReference
varies by subtype.
Some Media subtypes may store its value, while others may resolve its
value (in a subtype-determined fashion) to other content and store that
content instead.
setContentReference
in class S_Media
cid
- the content id; requiredcontentReference
- the content reference; requiredpartitionValue
- the value for the PARTITIONVALUE column in the
content table, or null if nonemediaOptions
- a set of name/value pairs whose semantics are
Media determined, or null for no media optionsIfsException
- if the operation failsprotected RandomAccessDriver getRandomAccessDriver(Long cid) throws IfsException
getRandomAccessDriver
in class S_Media
cid
- the content idIfsException
- 13623: if the operation failsprotected void destroyContent(Long cid, AttributeValue[] mediaOptions) throws IfsException
The implementation of this method is responsible for deleting the
content table row whose ID column is cid
.
destroyContent
in class S_Media
cid
- the content id; requiredmediaOptions
- a set of name/value pairs whose semantics are
Media determined, or null for no media optionsIfsException
- if the operation failsCopyright © 2023. All rights reserved.