Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ifs.server
Class S_LibrarySessionContentStorageManager

    java.lang.Object
      oracle.ifs.server.S_LibrarySessionContentStorageManager

Direct Known Subclasses:
  S_TieLibrarySessionContentStorageManager

    public class S_LibrarySessionContentStorageManager

extends java.lang.Object

S_LibrarySessionContentStorageManager manages content storage.

An S_LibrarySessionContentStorageManager ("CSM") is created for and bound to each S_LibrarySession. CSM mediates access to the subsystem that stores, retrieves, and otherwise manages binary content. This subsystem includes:

- MEDIA and its subtypes
- the content storage tables
- content migration between MEDIAs
- read indication
- quota
- Oracle Text indexing
- Oracle Text themes, gists, and summaries

(Published)

Field Summary
`static java.lang.String` | `CONTEXTROUTERTABLE_TABLENAME` Name of the context router table.

Constructor Summary
`protected` | `S_LibrarySessionContentStorageManager(S_LibrarySession session)` Constructs a CSM.

Method Summary
`protected byte[]` | `acquireByteBuffer()` Acquires a byte buffer.
`protected void` | `deleteFromContextRouter(java.lang.Long coId)` Deletes a row from the context router table.
`protected int` | `deleteOldFilteredContent(S_LibrarySession session, long age)` Delete old filtered content entries.
`protected void` | `destroyContent(S_Media media, java.lang.Long cid, java.lang.Long coId, S_LibraryObjectDefinition sdef)` Destroys the content, if any, for the specified ContentObject.
`protected void` | `destroyTextRenditions(S_ContentObject co)`
`protected void` | `dispose()` Disposes this CSM.
`protected java.lang.Long` | `extractContentForIndexing(java.lang.Long previousContentObjectId, int batchSize)` Called by the ContentAgent, identifies rows in ODMZ_CONTEXT_ROUTER whose content is ready for indirect full-text indexing, and for each such row, sets the INDEXABLECONTENT BLOB column to the content.
`protected void` | `filterContent(S_ContentObject co, boolean plaintext)`
`protected void` | `generateSummary(S_ContentObject co, java.lang.String pointOfView, long sizeAsPercent, long sizeAsNumParagraphs, java.lang.String summaryLevel)`
`protected void` | `generateThemes(S_ContentObject co, boolean fullThemes)`
`protected int` | `getByteBufferSize()` Estimates the size, in bytes, of a buffer that would be returned by `acquireByteBuffer`.
`protected S_RandomAccessorImpl` | `getContentByRandomAccess(S_Document doc, S_ContentObject co)` Gets a RandomAccessor for randomly reading the content of the specified document.
`protected java.io.Reader` | `getContentReader(S_ContentObject co)` Gets the content of the specified ContentObject as a Reader.
`protected java.io.InputStream` | `getContentStream(S_ContentObject co)` Gets the content of the specified ContentObject as an InputStream.
`static ContextTable[]` | `getContextTables(S_LibrarySession sess)` Called by search.
`protected java.io.Reader` | `getFilteredContent(S_ContentObject co)`
`static java.lang.String` | `getIndexName()`
`protected java.util.Date` | `getLastAccessDate(java.lang.Long coId)` Gets the last access date for the specified ContentObject.
`protected java.lang.Long` | `getNewContentID()` get's a new id from the master sequence
`protected java.io.Reader` | `getSummary(S_ContentObject co, java.lang.String pointOfView)`
`protected ContextTheme[]` | `getThemes(S_ContentObject co)`
`protected void` | `insertIntoContextRouter(java.lang.Long coId, java.lang.String oracleCharacterSet, java.lang.String oracleLanguage, boolean text, boolean indirectFullTextIndexing)` Inserts a row in the context router table.
`protected void` | `invalidateFilteredContent(S_ContentObject co)`
`protected void` | `invalidateSummaries(S_ContentObject co)`
`protected void` | `invalidateThemes(S_ContentObject co)`
`protected boolean` | `isFullTextIndexingEnabled()` Gets whether full-text indexing is enabled.
`protected void` | `registerBfile(oracle.sql.BFILE bfile)` Binds the specified BFILE to this session.
`protected void` | `registerRandomAccessor(S_RandomAccessorImpl ra)` Binds the specified RandomAccessor to this session.
`protected void` | `releaseByteBuffer(byte[] buffer)` Releases a byte buffer previously acquired by `acquireByteBuffer`.
`protected java.lang.String` | `resolveCharacterSet(S_LibraryObjectDefinition def)` Gets the CHARACTERSET attribute of the specified ContentObject definition, setting a default CHARACTERSET attribute if one isn't set.
`protected java.io.Serializable` | `retrieveSerializedObject(S_LibrarySession session, java.lang.Long contentRef)` retrieveSerializedObject - retrieve serializable object in the default "Search" Media instance.
`protected S_Media` | `selectMedia(S_ContentObject co, S_LibraryObjectDefinition def)`
`protected void` | `setContentProperties(S_LibraryObjectDefinition sdef, S_ContentObject sco)` Cascades updates to a ContentObject to other on-disk structures.
`protected java.lang.Long` | `storeSerializedObject(S_LibrarySession session, java.io.Serializable obj)` storeSerializedObject - store serializable object in the default "Search" Media instance.
`protected void` | `syncIndex()` Sync's the index.
`protected void` | `unregisterBfile(oracle.sql.BFILE bfile)` Unbinds the specified BFILE from this session.
`protected void` | `unregisterRandomAccessor(S_RandomAccessorImpl ra)` Unbinds the specified RandomAccessor from this session.
`protected S_RandomAccessorImpl` | `updateContentByRandomAccess(S_Document doc, S_ContentObject co, S_LibraryObjectDefinition sdocdef, java.lang.Long expirationPeriod)` Gets a RandomAccessor for randomly writing and reading the content of the specified document.
`S_Media` | `validateMedia(S_ContentObject co, S_LibraryObjectDefinition def)` if media is specified in the def, it is validated.
`protected void` | `validateMediaAndSetContent(S_ContentObject co, S_LibraryObjectDefinition def)` Sets the content of the specified ContentObject.
`protected void` | `verifyCanDestroyContent(S_Media media, java.lang.Long cid)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### CONTEXTROUTERTABLE_TABLENAME

    public static final java.lang.String CONTEXTROUTERTABLE_TABLENAME

  Description copied from class: `S_LibrarySessionContentStorageManager`
  Name of the context router table.

  See Also:
    Constant Field Values
  (Unpublished)

Constructor Detail

### S_LibrarySessionContentStorageManager

    protected S_LibrarySessionContentStorageManager(S_LibrarySession session)
                                             throws IfsException

  Constructs a CSM.

  Parameters:
    `session` - the sesion to which this CSM belongs; required
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

Method Detail

### dispose

    protected void dispose()

  Description copied from class: `S_LibrarySessionContentStorageManager`
  Disposes this CSM.

  (Unpublished)

### getContentStream

    protected java.io.InputStream getContentStream(S_ContentObject co)
                                            throws IfsException

  Description copied from class: `S_LibrarySessionContentStorageManager`
  Gets the content of the specified ContentObject as an InputStream.

  Parameters:
    `co` - the ContentObject; required
  Returns:
    the content stream
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### getContentReader

    protected java.io.Reader getContentReader(S_ContentObject co)
                                       throws IfsException

  Description copied from class: `S_LibrarySessionContentStorageManager`
  Gets the content of the specified ContentObject as a Reader.

  Parameters:
    `co` - the ContentObject; required
  Returns:
    the content
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### validateMediaAndSetContent

    protected void validateMediaAndSetContent(S_ContentObject co,
                                              S_LibraryObjectDefinition def)
                                       throws IfsException

  Description copied from class: `S_LibrarySessionContentStorageManager`
  Sets the content of the specified ContentObject.

  The ContentObject may be existing or new. An existing ContentObject must not already have content (or `destroyContent` must be called prior to this method.)

  Parameters:
    `co` - the ContentObject; required
    `def` - the ContentObject definition; required
  Throws:
    `IfsException` - if the operation fails

### validateMedia

    public S_Media validateMedia(S_ContentObject co,
                                 S_LibraryObjectDefinition def)
                          throws IfsException

  Description copied from class: `S_LibrarySessionContentStorageManager`
  if media is specified in the def, it is validated. Otherwise a media is chosen and set in the def.

  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### selectMedia

    protected S_Media selectMedia(S_ContentObject co,
                                  S_LibraryObjectDefinition def)
                           throws IfsException

  Throws:
    `IfsException`

### getByteBufferSize

    protected int getByteBufferSize()
                             throws IfsException

  Description copied from class: `S_LibrarySessionContentStorageManager`
  Estimates the size, in bytes, of a buffer that would be returned by `acquireByteBuffer`.

  Returns:
    the estimated size, in bytes
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### acquireByteBuffer

    protected byte[] acquireByteBuffer()
                                throws IfsException

  Description copied from class: `S_LibrarySessionContentStorageManager`
  Acquires a byte buffer.

  `releaseByteBuffer` must be called to release the byte buffer when it is no longer needed.

  Returns:
    the buffer
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### releaseByteBuffer

    protected void releaseByteBuffer(byte[] buffer)
                              throws IfsException

  Description copied from class: `S_LibrarySessionContentStorageManager`
  Releases a byte buffer previously acquired by `acquireByteBuffer`.

  Parameters:
    `buffer` - the buffer
  Throws:
    `IfsException` - if the operation fails

### getNewContentID

    protected java.lang.Long getNewContentID()
                                      throws IfsException

  Description copied from class: `S_LibrarySessionContentStorageManager`
  get's a new id from the master sequence

  Throws:
    `IfsException`
  (Unpublished)

### setContentProperties

    protected void setContentProperties(S_LibraryObjectDefinition sdef,
                                        S_ContentObject sco)
                                 throws IfsException

  Description copied from class: `S_LibrarySessionContentStorageManager`
  Cascades updates to a ContentObject to other on-disk structures.

  Parameters:
    `sdef` - definition
    `sco` - the existing ContentObject
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### getContentByRandomAccess

    protected S_RandomAccessorImpl getContentByRandomAccess(S_Document doc,
                                                            S_ContentObject co)
                                                     throws IfsException

  Description copied from class: `S_LibrarySessionContentStorageManager`
  Gets a RandomAccessor for randomly reading the content of the specified document.

  Parameters:
    `doc` - the document
    `co` - the ContentObject of the document
  Returns:
    a RandomAccessor
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### updateContentByRandomAccess

    protected S_RandomAccessorImpl updateContentByRandomAccess(S_Document doc,
                                                               S_ContentObject co,
                                                               S_LibraryObjectDefinition sdocdef,
                                                               java.lang.Long expirationPeriod)
                                                        throws IfsException

  Description copied from class: `S_LibrarySessionContentStorageManager`
  Gets a RandomAccessor for randomly writing and reading the content of the specified document.

  Parameters:
    `doc` - the document
    `co` - the ContentObject of the document
    `sdocdef` - a DocumentDefinition, as a S_LibraryObjectDefinition
    `expirationPeriod` - the expiration period for the RandomAccessor, in seconds, or null for the default expiration period
  Returns:
    a RandomAccessor
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### registerRandomAccessor

    protected void registerRandomAccessor(S_RandomAccessorImpl ra)
                                   throws IfsException

  Description copied from class: `S_LibrarySessionContentStorageManager`
  Binds the specified RandomAccessor to this session.

  Parameters:
    `ra` - the random acccessor
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### unregisterRandomAccessor

    protected void unregisterRandomAccessor(S_RandomAccessorImpl ra)
                                     throws IfsException

  Description copied from class: `S_LibrarySessionContentStorageManager`
  Unbinds the specified RandomAccessor from this session.

  Parameters:
    `ra` - the random accessor
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### destroyContent

    protected void destroyContent(S_Media media,
                                  java.lang.Long cid,
                                  java.lang.Long coId,
                                  S_LibraryObjectDefinition sdef)
                           throws IfsException

  Description copied from class: `S_LibrarySessionContentStorageManager`
  Destroys the content, if any, for the specified ContentObject.

  Parameters:
    `media` - the media
    `cid` - the content id
    `coId` - the ContentObject id
    `sdef` - the ContentObject definition
  Throws:
    `IfsException` - if the operation fails

### verifyCanDestroyContent

    protected void verifyCanDestroyContent(S_Media media,
                                           java.lang.Long cid)
                                    throws IfsException

  Throws:
    `IfsException`

### storeSerializedObject

    protected java.lang.Long storeSerializedObject(S_LibrarySession session,
                                                   java.io.Serializable obj)
                                            throws IfsException

  Description copied from class: `S_LibrarySessionContentStorageManager`
  storeSerializedObject - store serializable object in the default "Search" Media instance.

  Returns:
    the handle for the newly stored piece of content
  Throws:
    `if` - operation fails
    `IfsException`
  (Unpublished)

### retrieveSerializedObject

    protected java.io.Serializable retrieveSerializedObject(S_LibrarySession session,
                                                            java.lang.Long contentRef)
                                                     throws IfsException

  Description copied from class: `S_LibrarySessionContentStorageManager`
  retrieveSerializedObject - retrieve serializable object in the default "Search" Media instance.

  Parameters:
    `contentRef` - the content reference
  Throws:
    `if` - operation fails
    `IfsException`
  (Unpublished)

### registerBfile

    protected void registerBfile(oracle.sql.BFILE bfile)
                          throws IfsException

  Description copied from class: `S_LibrarySessionContentStorageManager`
  Binds the specified BFILE to this session.

  Parameters:
    `bfile` - the BFILE
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### unregisterBfile

    protected void unregisterBfile(oracle.sql.BFILE bfile)
                            throws IfsException

  Description copied from class: `S_LibrarySessionContentStorageManager`
  Unbinds the specified BFILE from this session.

  Parameters:
    `bfile` - the BFILE
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### getLastAccessDate

    protected java.util.Date getLastAccessDate(java.lang.Long coId)
                                        throws IfsException

  Description copied from class: `S_LibrarySessionContentStorageManager`
  Gets the last access date for the specified ContentObject.

  Parameters:
    `coId` - the ContentObject id; required
  Returns:
    the last access date, or null if none
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### isFullTextIndexingEnabled

    protected boolean isFullTextIndexingEnabled()
                                         throws IfsException

  Description copied from class: `S_LibrarySessionContentStorageManager`
  Gets whether full-text indexing is enabled.

  Each invocation of this method queries the database. `S_LibrarySession.isFullTextIndexingEnabled()` caches the value returned by this method, and should almost always be used instead of this method.

  Returns:
    whether full-text indexing is enabled
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### getIndexName

    public static java.lang.String getIndexName()

  (Unpublished)

### getContextTables

    public static ContextTable[] getContextTables(S_LibrarySession sess)
                                           throws IfsException

  Description copied from class: `S_LibrarySessionContentStorageManager`
  Called by search.

  Throws:
    `IfsException`
  (Unpublished)

### syncIndex

    protected void syncIndex()
                      throws IfsException

  Description copied from class: `S_LibrarySessionContentStorageManager`
  Sync's the index. Note, this affects all context media.

  Throws:
    `IfsException`
  (Unpublished)

### insertIntoContextRouter

    protected void insertIntoContextRouter(java.lang.Long coId,
                                           java.lang.String oracleCharacterSet,
                                           java.lang.String oracleLanguage,
                                           boolean text,
                                           boolean indirectFullTextIndexing)
                                    throws IfsException

  Description copied from class: `S_LibrarySessionContentStorageManager`
  Inserts a row in the context router table.

  Parameters:
    `coId` - the ContentObject id; required
    `oracleCharacterSet` - the Oracle character set code
    `oracleLanguage` - the Oracle language code
    `text` - whether the context is a text format
    `indirectFullTextIndexing` - whether to perform indirect full-text indexing
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### deleteFromContextRouter

    protected void deleteFromContextRouter(java.lang.Long coId)
                                    throws IfsException

  Description copied from class: `S_LibrarySessionContentStorageManager`
  Deletes a row from the context router table.

  Parameters:
    `coId` - the ContentObject id; required
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### extractContentForIndexing

    protected java.lang.Long extractContentForIndexing(java.lang.Long previousContentObjectId,
                                                       int batchSize)
                                                throws IfsException

  Description copied from class: `S_LibrarySessionContentStorageManager`
  Called by the ContentAgent, identifies rows in ODMZ_CONTEXT_ROUTER whose content is ready for indirect full-text indexing, and for each such row, sets the INDEXABLECONTENT BLOB column to the content.

  To avoid long-running transactions, this method is repeatedly called to extract content in batches. Only rows in ODMZ_CONTEXT_ROUTER whose id is greater than `previousContentObjectId` are considered. Each invocation processes no more than `batchSize` rows in ODMZ_CONTEXT_ROUTER.

  Parameters:
    `previousContentObjectId` - the id of the last ODMZ_CONTEXT_ROUTER row processed in the previous batch, or null if this is the first batch
    `batchSize` - the maximum number of rows to process in this batch
  Returns:
    the id of the last ODMZ_CONTEXT_ROUTER row processed in this batch, or null if no rows were processed
  Throws:
    `IfsException` - 32385: if the operation fails
  (Unpublished)

### generateThemes

    protected void generateThemes(S_ContentObject co,
                                  boolean fullThemes)
                           throws IfsException

  Throws:
    `IfsException`

### getThemes

    protected ContextTheme[] getThemes(S_ContentObject co)
                                throws IfsException

  Throws:
    `IfsException`

### invalidateThemes

    protected void invalidateThemes(S_ContentObject co)
                             throws IfsException

  Throws:
    `IfsException`
  (Unpublished)

### generateSummary

    protected void generateSummary(S_ContentObject co,
                                   java.lang.String pointOfView,
                                   long sizeAsPercent,
                                   long sizeAsNumParagraphs,
                                   java.lang.String summaryLevel)
                            throws IfsException

  Throws:
    `IfsException`

### getSummary

    protected java.io.Reader getSummary(S_ContentObject co,
                                        java.lang.String pointOfView)
                                 throws IfsException

  Throws:
    `IfsException`

### invalidateSummaries

    protected void invalidateSummaries(S_ContentObject co)
                                throws IfsException

  Throws:
    `IfsException`
  (Unpublished)

### filterContent

    protected void filterContent(S_ContentObject co,
                                 boolean plaintext)
                          throws IfsException

  Throws:
    `IfsException`

### getFilteredContent

    protected java.io.Reader getFilteredContent(S_ContentObject co)
                                         throws IfsException

  Throws:
    `IfsException`

### invalidateFilteredContent

    protected void invalidateFilteredContent(S_ContentObject co)
                                      throws IfsException

  Throws:
    `IfsException`
  (Unpublished)

### destroyTextRenditions

    protected void destroyTextRenditions(S_ContentObject co)
                                  throws IfsException

  Throws:
    `IfsException`

### deleteOldFilteredContent

    protected int deleteOldFilteredContent(S_LibrarySession session,
                                           long age)
                                    throws IfsException

  Description copied from class: `S_LibrarySessionContentStorageManager`
  Delete old filtered content entries.

  Parameters:
    `session` - the S_LibrarySession
    `age` - the number of seconds that constitutes an "old" entry
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### resolveCharacterSet

    protected java.lang.String resolveCharacterSet(S_LibraryObjectDefinition def)
                                            throws IfsException

  Description copied from class: `S_LibrarySessionContentStorageManager`
  Gets the CHARACTERSET attribute of the specified ContentObject definition, setting a default CHARACTERSET attribute if one isn't set.

  The CHARACTERSET attribute, if set, should be a valid IANA charset (preferred) or the canonical name or alias of a valid Java charset. (In general, Java charset names follow the IANA charset conventions.) Although the CHARACTERSET attribute is not validated, some CMSDK operations (such as getting content as a Reader) will succeed only if the CHARACTERSET is a valid Java charset.

  If the specified definition has the CHARACTERSET attribute set (including set to null), then that CHARACTERSET is returned. Otherwise, gets the default character set from the session's Localizer, sets the definition's CHARACTERSET attribute to that value, and also returns that value.

  This method is called only if either the definition's FORMAT attribute has a BINARY value of false or content is set by Reader. In all other cases, no default CHARACTERSET is set on a ContentObject.

  Parameters:
    `def` - the ContentObject definition
  Returns:
    the character set
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD