Oracle Content Management SDK

oracle.ifs.beans
Class SearchObject

java.lang.Object
  |
  +--oracle.ifs.beans.LibraryObject
        |
        +--oracle.ifs.beans.TieLibraryObject
              |
              +--oracle.ifs.beans.PublicObject
                    |
                    +--oracle.ifs.beans.TiePublicObject
                          |
                          +--oracle.ifs.beans.SearchObject
All Implemented Interfaces:
IfsEventHandler, LibraryObjectInterface, PublicObjectInterface, Traceable
Direct Known Subclasses:
TieSearchObject

public class SearchObject
extends TiePublicObject

The SearchObject class provides a facility to store searches persistently across sessions. A SearchObject is a serialized version of the SearchSpecification that is saved in iFS.

An example when using a SearchObject would applicable would be modeling a "Search Folder". This search is defined by the user and should be executed each time the user "clicks" on the "folder". The search is dymamic so the user can modify it at any time, but also needs to be persist across sessions.

Another example when to use a SearchObject is if a search is very complex to build each time. It can be saved as a SearchObject avoiding the task of rebuilding it.

Since SearchObjects are PublicObjects, any action performed on a PublicObject can be also be performed on a SearchObject. They can be foldered, versioned, and be secured by an AccessControlList (ACL).


Field Summary
static java.lang.String CLASS_NAME
          This class name for this class.
static java.lang.String SEARCHCONTENT_ATTRIBUTE
          The serialized form of a search used for persistent storage is stored in this attribute.
 
Fields inherited from class oracle.ifs.beans.PublicObject
ACL_ATTRIBUTE, ADMINISTRATIONGROUP_ATTRIBUTE, CREATEDATE_ATTRIBUTE, CREATOR_ATTRIBUTE, DELETOR_ATTRIBUTE, DESCRIPTION_ATTRIBUTE, EXPIRATIONDATE_ATTRIBUTE, FAMILY_ATTRIBUTE, FLAGS_ATTRIBUTE, LASTMODIFIER_ATTRIBUTE, LASTMODIFYDATE_ATTRIBUTE, LOCKEDFORSESSION_ATTRIBUTE, LOCKOBJECT_ATTRIBUTE, LOCKSTATE_ATTRIBUTE, LOCKSTATE_HARDLOCK, LOCKSTATE_SESSIONLOCK, LOCKSTATE_SOFTLOCK, LOCKSTATE_UNLOCK, LOCKSTATE_USERLOCK, NAME_ATTRIBUTE, OWNER_ATTRIBUTE, POLICYBUNDLE_ATTRIBUTE, PROPERTYBUNDLE_ATTRIBUTE, RESOLVEDPUBLICOBJECT_ATTRIBUTE, SECURINGPUBLICOBJECT_ATTRIBUTE
 
Method Summary
 Search getSearch()
          Returns a Search from the SearchObject.
 SearchSpecification getSearchSpecification()
          Returns the SearchSpecification.
 void handleEvent(IfsEvent event)
          Handles the specified event.
 void setSearchSpecification(SearchSpecification spec)
          Sets the search specification for the SearchObject.
 
Methods inherited from class oracle.ifs.beans.PublicObject
addCategory, addRelationship, checkEffectiveAccess, checkEffectiveAccess, copy, getAcl, getAllFolderPaths, getAllFolderPaths, getAnyFolderPath, getAnyFolderPath, getCategories, getCategories, getCategories, getCategories, getCreateDate, getCreator, getDefaultAccessLevel, getDescription, getEffectiveAccessLevel, getEffectiveAccessLevel, getExpirationDate, getFamily, getFlags, getFolderReferences, getFolderReferencesSortSpecification, getLastModifier, getLastModifyDate, getLeftwardRelationshipObjects, getLeftwardRelationshipObjects, getLeftwardRelationships, getLeftwardRelationships, getLockObject, getLockState, getLockStateLabel, getOwner, getPolicyBundle, getPropertyBundle, getResolvedPublicObject, getRightwardRelationshipObjects, getRightwardRelationshipObjects, getRightwardRelationships, getRightwardRelationships, getSecuringPublicObject, grantAccess, hasNameAttribute, isLocked, isLockedForSession, isLockedForSessionByCurrentSession, isVersionable, isVersioned, lock, lock, lock, putPolicy, putProperty, putProperty, removeAllPolicies, removeAllProperties, removePolicy, removePolicy, removeProperty, removeRelationship, revokeAccess, revokeAllAccess, setAcl, setDescription, setExpirationDate, setFlags, setFolderReferencesSortSpecification, setOwner, setPolicyBundle, setPropertyBundle, setSecuringPublicObject, toLockStateLabel, toLockStateLabel, toLockStateLabel, unlock, updateLock
 
Methods inherited from class oracle.ifs.beans.LibraryObject
equals, free, free, getAttribute, getAttributeByUpperCaseName, getAttributes, getAttributesByUpperCaseNames, getClassId, getClassObject, getDefinition, getId, getLabel, getName, getSession, invokeServerMethod, isInstanceOf, isTraced, lookupInstanceLabel, postEvent, postEvent, renderAsReader, renderAsStream, setAttribute, setAttribute, setAttributes, setAttributes, setName, toString, trace, update
 
Methods inherited from interface oracle.ifs.common.LibraryObjectInterface
getId
 
Methods inherited from interface oracle.ifs.common.Traceable
getTraceLogger, isTraced, trace
 

Field Detail


CLASS_NAME

public static final java.lang.String CLASS_NAME
This class name for this class. Useful for methods that take a class name argument.

SEARCHCONTENT_ATTRIBUTE

public static final java.lang.String SEARCHCONTENT_ATTRIBUTE
The serialized form of a search used for persistent storage is stored in this attribute.
Method Detail

setSearchSpecification

public void setSearchSpecification(SearchSpecification spec)
                            throws IfsException
Sets the search specification for the SearchObject.
Throws:
IfsException - if the operation fails

getSearchSpecification

public SearchSpecification getSearchSpecification()
                                           throws IfsException
Returns the SearchSpecification.
Returns:
SearchSpecification of the SearchObject
Throws:
IfsException - if retrival fails.

getSearch

public Search getSearch()
                 throws IfsException
Returns a Search from the SearchObject. The Search returned is lightweight. It just has a reference to the SearchObject. This facilitates the SearchSpecification not being transferred to beans side until explicitly requested by user. When executing Saved Searches, call Search.getSearchSpecification() only when needed. The Search execution will work without the SearchSpecification being transported to the beans side.
Returns:
Search that corresponds to the persistent SearchObject.
Throws:
IfsException - if Search Object creation fails

handleEvent

public void handleEvent(IfsEvent event)
                 throws IfsException
Handles the specified event.
Overrides:
handleEvent in class PublicObject
Parameters:
event - the event
Throws:
IfsException - if the operation fails

Oracle Content Management SDK

(c) 2002 Copyright Oracle Corporation. All rights reserved.