Oracle Content Management SDK

oracle.ifs.beans
Class LibrarySession

java.lang.Object
  |
  +--oracle.ifs.beans.LibrarySession
All Implemented Interfaces:
oracle.ifs.common.CollectionResolver, IfsEventHandler, LibraryConstants, LibrarySessionInterface, oracle.ifs.common.SessionCallbackInterface, Traceable

public final class LibrarySession
extends java.lang.Object
implements LibrarySessionInterface, oracle.ifs.common.CollectionResolver, IfsEventHandler, Traceable, oracle.ifs.common.SessionCallbackInterface, LibraryConstants

A LibrarySession is used to represent a connection-based Session with the iFS server.

A LibrarySession (also known as a "session") object is created by calling the connect method on LibraryService. All other persistent objects (that is, objects that are stored in the iFS server) are created from this class.

The public methods on this class can be divided into the following categories:

See Also:
LibraryService, LibraryService.connect(oracle.ifs.common.Credential, oracle.ifs.common.ConnectOptions), free(oracle.ifs.beans.LibraryObject[]), disconnect()

Fields inherited from interface oracle.ifs.beans.resources.LibraryConstants
IFS_DOMAIN_ACLINDEX_EVENTTARGET, IFS_DOMAIN_AUDIT_AUDITINGENABLED, IFS_DOMAIN_AUDITRULEEVALUATORCLASS, IFS_DOMAIN_CREDENTIALMANAGER_ANONYMOUSUSERNAME, IFS_DOMAIN_DOMAINREGISTRY_PASSWORDREQUIRED, IFS_DOMAIN_FOLDERINDEX_EVENTTARGET, IFS_DOMAIN_LIBRARYOBJECT_CLASSACCESSCONTROLLIST_CLASSPRIVATE, IFS_DOMAIN_LIBRARYOBJECT_CLASSACCESSCONTROLLIST_CLASSPUBLIC, IFS_DOMAIN_LIBRARYOBJECT_CLASSACCESSCONTROLLIST_CLASSRESTRICTCREATION, IFS_DOMAIN_LIBRARYOBJECT_MEDIA_DEFAULTCONTENTMEDIA, IFS_DOMAIN_LIBRARYOBJECT_MEDIA_NONCONTENTMEDIA, IFS_DOMAIN_LIBRARYOBJECT_MEDIA_READMODEGETBYTES, IFS_DOMAIN_LIBRARYOBJECT_SERVICECONFIGURATION_DEFAULTSERVICECONFIGURATION, IFS_DOMAIN_LIBRARYOBJECT_SYSTEMACCESSCONTROLLIST_PRIVATE, IFS_DOMAIN_LIBRARYOBJECT_SYSTEMACCESSCONTROLLIST_PUBLIC, IFS_DOMAIN_LIBRARYOBJECT_SYSTEMACCESSCONTROLLIST_PUBLISHED, IFS_DOMAIN_LIBRARYOBJECT_SYSTEMLOCKOBJECT_SYSTEMHARDLOCK, IFS_DOMAIN_LIBRARYOBJECT_SYSTEMLOCKOBJECT_SYSTEMSOFTLOCK, IFS_DOMAIN_PROPERTYBUNDLE_NAME, IFS_SERVICE_ACLCACHE_EMERGENCYTRIGGER, IFS_SERVICE_ACLCACHE_NORMALTRIGGER, IFS_SERVICE_ACLCACHE_PURGETARGET, IFS_SERVICE_ACLCACHE_SIZE, IFS_SERVICE_ACLCACHE_URGENTTRIGGER, IFS_SERVICE_AUDITINGENABLED, IFS_SERVICE_CASESENSITIVEAUTHENTICATION, IFS_SERVICE_CHECKFORORPHANSESSIONSPERIOD, IFS_SERVICE_CONNECTIONPOOL_READONLY_MAXIMUMSIZE, IFS_SERVICE_CONNECTIONPOOL_READONLY_MAXIMUMSIZETIMEOUT, IFS_SERVICE_CONNECTIONPOOL_READONLY_MINIMUMSIZE, IFS_SERVICE_CONNECTIONPOOL_READONLY_TARGETSIZE, IFS_SERVICE_CONNECTIONPOOL_READONLY_TARGETSIZETIMEOUT, IFS_SERVICE_CONNECTIONPOOL_WRITEABLE_MAXIMUMSIZE, IFS_SERVICE_CONNECTIONPOOL_WRITEABLE_MAXIMUMSIZETIMEOUT, IFS_SERVICE_CONNECTIONPOOL_WRITEABLE_MINIMUMSIZE, IFS_SERVICE_CONNECTIONPOOL_WRITEABLE_TARGETSIZE, IFS_SERVICE_CONNECTIONPOOL_WRITEABLE_TARGETSIZETIMEOUT, IFS_SERVICE_CREDENTIALMANAGER_CREDENTIALNAMETOKENIZER, IFS_SERVICE_CREDENTIALMANAGER_NAMES, IFS_SERVICE_DATACACHE_EMERGENCYTRIGGER, IFS_SERVICE_DATACACHE_NORMALTRIGGER, IFS_SERVICE_DATACACHE_PURGETARGET, IFS_SERVICE_DATACACHE_SIZE, IFS_SERVICE_DATACACHE_URGENTTRIGGER, IFS_SERVICE_DEFAULTCHARACTERSET, IFS_SERVICE_DEFAULTLANGUAGE, IFS_SERVICE_EVENTEXCHANGER, IFS_SERVICE_JDBC_DATABASEURL, IFS_SERVICE_JDBC_DEFAULTROWPREFETCH, IFS_SERVICE_JDBC_DRIVER, IFS_SERVICE_JDBC_DRIVERTYPE, IFS_SERVICE_JDBC_SCHEMA, IFS_SERVICE_JDBC_TRACINGENABLED, IFS_SERVICE_MAXIMUMCONCURRENTSESSIONS, IFS_SERVICE_MAXIMUMCONCURRENTSESSIONSPERUSER, IFS_SERVICE_ORPHANSESSIONTIMEOUTPERIOD, IFS_SERVICE_POLLFOREVENTSFROMOTHERSERVICESPERIOD, IFS_SERVICE_SERVICEKEEPALIVEEVENTPERIOD, IFS_SERVICE_SESSION_BEANSOBJECTCACHE_SIZE, IFS_SERVICE_SESSION_BEANSSESSION, IFS_SERVICE_SESSION_DATACACHE_EMERGENCYTRIGGER, IFS_SERVICE_SESSION_DATACACHE_NORMALTRIGGER, IFS_SERVICE_SESSION_DATACACHE_PURGETARGET, IFS_SERVICE_SESSION_DATACACHE_SIZE, IFS_SERVICE_SESSION_DATACACHE_URGENTTRIGGER, IFS_SERVICE_SESSION_DEFAULTSEARCHTIMEOUTPERIOD, IFS_SERVICE_SESSION_EVENTPOLLER, IFS_SERVICE_SESSION_EVENTPOLLERPERIOD, IFS_SERVICE_SESSION_FOLDERPATHCACHE_ENABLED, IFS_SERVICE_SESSION_FOLDERPATHCACHE_NORMALTRIGGER, IFS_SERVICE_SESSION_FOLDERPATHCACHE_PURGETARGET, IFS_SERVICE_SESSION_FOLDERPATHCACHE_SIZE, IFS_SERVICE_SESSION_FOLDERPATHCACHE_URGENTTRIGGER, IFS_SERVICE_SESSION_SERVEROBJECTCACHE_EMERGENCYTRIGGER, IFS_SERVICE_SESSION_SERVEROBJECTCACHE_ISUNBOUNDED, IFS_SERVICE_SESSION_SERVEROBJECTCACHE_NORMALTRIGGER, IFS_SERVICE_SESSION_SERVEROBJECTCACHE_PURGETARGET, IFS_SERVICE_SESSION_SERVEROBJECTCACHE_SIZE, IFS_SERVICE_SESSION_SERVEROBJECTCACHE_URGENTTRIGGER, IFS_SERVICE_SESSION_SERVERSESSION, IFS_SERVICE_SESSION_TRANSACTIONSTACKSIZE, IFS_SERVICE_SESSIONOPERATIONTIMEOUTPERIOD, IFS_SERVICE_TRACING_BEANSSESSIONTRACETYPE, IFS_SERVICE_TRACING_CHANNELCOUNT, IFS_SERVICE_TRACING_CHANNELLEVEL, IFS_SERVICE_TRACING_DEFAULTTRACELEVEL, IFS_SERVICE_TRACING_SERVERSESSIONTRACETYPE, IFS_SERVICE_TRACING_SERVICETRACETYPE, IFS_SERVICE_TRANSPORTEVENTSTOOTHERSERVICESPERIOD
 
Method Summary
 void abortTransaction(Transaction transaction)
          Aborts a transaction.
 Transaction beginTransaction()
          Starts a writeable transaction.
 void completeTransaction(Transaction transaction)
          Completes a transaction.
 PublicObject createPublicObject(PublicObjectDefinition def)
          Create a new public object.
 SchemaObject createSchemaObject(SchemaObjectDefinition def)
          Create a new schema object.
 SystemObject createSystemObject(SystemObjectDefinition def)
          Create a new system object.
 void createView(ViewSpecification vsp)
          Creates a database view from a View specification.
 void deregisterClassEventHandler(ClassObject co, boolean includeSubclasses, IfsEventHandler handler)
          Deregisters the specified IfsEventHandler for the specified class.
 void deregisterEventHandler(LibraryObject lo, IfsEventHandler handler)
          Deregisters the specified IfsEventHandler for the specified LibraryObject.
 boolean disconnect()
          Disconnects the session, effectively disposing the instance.
 Collection getClassAccessControlListCollection()
          Gets a reference to the ClassAccessControlList collection.
 Collection getClassDomainCollection()
          Gets a reference to the ClassDomain collection.
 ClassObject getClassObjectByName(java.lang.String classname)
          Returns a class object given a class name.
 Collection getClassObjectCollection()
          Gets a reference to the ClassObject collection.
 ContentQuota getDefaultContentQuota()
          Gets the session's default ContentQuota, set via setDefaultContentQuota().
 java.lang.String getDefaultFolderRelationshipClassname()
          Gets the default class name of the subclass of FolderRelationship, that is used by default for all Folder selection operations.
 SortSpecification getDefaultFolderSortSpecification()
          get the default SortSpecification that is used by default for all Folder selection operations.
 DirectoryObject getDirectoryObject(java.lang.Long id)
          Lookup a DirectoryObject by its id.
 Collection getDirectoryUserCollection()
          Gets a reference to the DirectoryUser collection.
 AttributeValue getDomainPropertyValue(java.lang.String name)
          Gets the value of a domain property, by name.
 Collection getExtendedPermissionCollection()
          Gets a reference to the ExtendedPermission collection.
 Collection getExtendedUserProfileCollection()
          Gets a reference to the ExtendedUserProfile collection.
 java.lang.String getFolderPathDelimiter()
          Gets the current session's folder path delimiter.
 Collection getFormatCollection()
          Gets a reference to the Format collection.
 Collection getFormatExtensionCollection()
          Gets a reference to the FormatExtension collection.
 java.lang.Long getId()
          Gets the id of this session.
 Localizer getLocalizer()
          Gets the localizer used by this session.
 PublicObject[] getObjectsLockedForSession()
          Gets the array of PublicObjects that the current session holds session locks on.
 Collection getPermissionBundleCollection()
          Gets a reference to the PermissionBundle collection.
 Collection getPolicyCollection()
          Gets a reference to the Policy collection.
 PublicObject getPublicObject(java.lang.Long id)
          Lookup a PublicObject by its id.
 Folder getRootFolder()
          Return the top-most Folder in the iFS folder hierarchy.
 SchemaObject getSchemaObject(java.lang.Long id)
          Lookup a SchemaObject by its id.
 long getSchemaVersionNumber()
          Returns the version number for the iFS schema on which this session is connected.
 java.lang.String getSchemaVersionString()
          Returns the version String for the iFS schema on which this session is connected.
 java.lang.String getServerProperty(java.lang.String key, java.lang.String defaultValue)
          Gets the String value for the specified key in the server properties file.
 long getServerVersionNumber()
          Returns the iFS server-side version number, as a long value.
 java.lang.String getServerVersionString()
          Returns the version String for the iFS server-side software.
 AttributeValue getServiceConfigurationProperty(java.lang.String name)
          Gets the specified service configuration property.
 boolean getServiceConfigurationProperty(java.lang.String name, boolean defaultValue)
          Gets the value of the specified service configuration property, as a boolean.
 int getServiceConfigurationProperty(java.lang.String name, int defaultValue)
          Gets the value of the specified service configuration property, as an integer.
 java.lang.String getServiceConfigurationProperty(java.lang.String name, java.lang.String defaultValue)
          Gets the value of the specified service configuration property, as a string.
 java.lang.Long getServiceId()
          Gets the id of this session's service.
 java.lang.String getServiceName()
          Gets the name of the iFS service to which this session is connected.
 Collection getSharedAccessControlListCollection()
          Gets a reference to the SharedAccessControlList collection.
 Collection getSystemAccessControlListCollection()
          Gets a reference to the SystemAccessControlList collection.
 DirectoryUser getSystemDirectoryUser()
          Gets the DirectoryUser who is the permanent admin user.
 Collection getSystemLockObjectCollection()
          Gets a reference to the SystemLockObject collection.
 SystemObject getSystemObject(java.lang.Long id)
          Lookup a SystemObject by its id.
 TraceLogger getTraceLogger()
          Gets the trace logger used by this session.
 DirectoryUser getUser()
          Return the user associated with the current session.
 Collection getValueDefaultCollection()
          Gets a reference to the ValueDefault collection.
 Collection getValueDomainCollection()
          Gets a reference to the ValueDomain collection.
 long getVersionNumber()
          Returns the iFS bean-side software version number, as a long value.
 java.lang.String getVersionString()
          Returns the version String for the iFS bean-side software.
 DirectoryGroup getWorldDirectoryGroup()
          Gets the DirectoryGroup that represents World access.
 void grantAdministration(DirectoryUser user)
          Grant the Administrator Mode state for the specified Directory User.
 void impersonateUser(DirectoryUser newuser)
          Assume the identity of another user.
 java.io.Serializable invokeServerMethod(java.lang.String methodName, java.io.Serializable payload)
          Invokes a custom server-side method.
 boolean isAdministrationMode()
          Return indication as to whether this session has enabled administrator mode.
 boolean isConnected()
          Return connection state of this LibrarySession
 boolean isTraced(int channel, int level)
          Gets whether tracing is enabled for the specified channel and level.
 java.lang.String lookupInverseInstanceLabel(java.lang.String classname, java.lang.String label)
          Gets the name of an uniquely-named instance by its label.
 void processEvents()
          Polls the server for any events queued for transport to this LibrarySession and immediately processes them.
 void registerClassEventHandler(ClassObject co, boolean includeSubclasses, IfsEventHandler handler)
          Registers the specified IfsEventHandler to receive events for all objects in the specified class.
 void registerEventHandler(LibraryObject lo, IfsEventHandler handler)
          Registers the specified IfsEventHandler to receive events for the specified LibraryObject.
 void setAdministrationMode(boolean mode)
          Set the administrator mode state for this session.
 void setDefaultContentQuota(ContentQuota quota)
          Sets the session's default ContentQuota.
 void setDefaultFolderRelationshipClassName(java.lang.String classname)
          Sets the default class name of the subclass of FolderRelationship, that is used by default for all Folder selection operations.
 void setDefaultFolderSortSpecification(SortSpecification sort)
          Sets the default SortSpecification that is used by default for all Folder selection operations.
 void setFolderPathDelimiter(java.lang.String delim)
          Sets the current session's Folder path delimiter.
 void trace(int channel, int level, java.lang.String payload)
          Issues a trace request to the trace logger.
 void unlockForSession(PublicObject[] items)
          Release session locks on a set of PublicObjects.
 

Method Detail


getServiceName

public java.lang.String getServiceName()
                                throws IfsException
Gets the name of the iFS service to which this session is connected.
Returns:
the service name
Throws:
IfsException - if the operation fails

getLocalizer

public final Localizer getLocalizer()
                             throws IfsException
Gets the localizer used by this session.
Specified by:
getLocalizer in interface LibrarySessionInterface
Returns:
the localizer
Throws:
IfsException - if the operation fails

getId

public java.lang.Long getId()
                     throws IfsException
Gets the id of this session.
Throws:
IfsException - if the operation fails

getServiceId

public java.lang.Long getServiceId()
                            throws IfsException
Gets the id of this session's service.
Throws:
IfsException - if the operation fails

getTraceLogger

public final TraceLogger getTraceLogger()
                                 throws IfsException
Gets the trace logger used by this session.
Specified by:
getTraceLogger in interface Traceable
Throws:
IfsException - if the operation fails

disconnect

public boolean disconnect()
                   throws IfsException
Disconnects the session, effectively disposing the instance.
Returns:
status of the disconnect operation (always true)
Throws:
IfsException - if operation fails.

getUser

public DirectoryUser getUser()
                      throws IfsException
Return the user associated with the current session. If this session is impersonating a user that is not the same user who authenticated, this method returns the impersonating user.
Returns:
the current user
Throws:
IfsException - if operation fails.

getVersionString

public final java.lang.String getVersionString()
                                        throws IfsException
Returns the version String for the iFS bean-side software. For example, version 1.0.8.3.2 would be returned as the string "1.0.8.3.2".

This value is potentially different from the other two version Strings for the server-side software and the iFS schema.

Returns:
the bean-side software version String.

getVersionNumber

public final long getVersionNumber()
                            throws IfsException
Returns the iFS bean-side software version number, as a long value. Each digit in the version string is represented by two digits in the long value. For example, version 1.0.8.4.18 would be returned as the long value 0100080418L.

This value is potentially different from the other two version Strings for the server-side software and the iFS schema.

Returns:
the bean-side software version number.

getServerVersionNumber

public long getServerVersionNumber()
                            throws IfsException
Returns the iFS server-side version number, as a long value. Each digit in the version string is represented by two digits in the long value. For example, version 1.0.8.4.18 would be returned as the long value 0100080418L.

This value is potentially different from the other two version Strings for the bean-side software and the iFS schema.

Returns:
the server-side software version number.
Throws:
IfsException - if operation fails.

getServerVersionString

public java.lang.String getServerVersionString()
                                        throws IfsException
Returns the version String for the iFS server-side software. For example, version 1.0.8.3.2 would be returned as the string "1.0.8.3.2".

This value is potentially different from the other two version Strings for the bean-side software and the iFS schema.

Returns:
the server-side software version String.
Throws:
IfsException - if operation fails.

getSchemaVersionString

public java.lang.String getSchemaVersionString()
                                        throws IfsException
Returns the version String for the iFS schema on which this session is connected. For example, version 1.0.8.3.2 would be returned as the string "1.0.8.3.2".

This value is potentially different from the other two version Strings for the bean-side software and the server-side software.

Returns:
the schema version string
Throws:
IfsException - (IFS-20001) if the operation fails

getSchemaVersionNumber

public long getSchemaVersionNumber()
                            throws IfsException
Returns the version number for the iFS schema on which this session is connected. Each digit in the version string is represented by two digits in the long value. For example, version 1.0.8.4.18 would be returned as the long value 0100080418L.

This value is potentially different from the other two version Strings for the bean-side software and the server-side software.

Returns:
the schema version number.
Throws:
IfsException - (IFS-20001) if the operation fails

getDefaultFolderRelationshipClassname

public java.lang.String getDefaultFolderRelationshipClassname()
                                                       throws IfsException
Gets the default class name of the subclass of FolderRelationship, that is used by default for all Folder selection operations. By default, this is "FOLDERPATHRELATIONSHIP".
Returns:
the default FolderRelationship subclass name
Throws:
IfsException - if operation fails.

setDefaultFolderRelationshipClassName

public void setDefaultFolderRelationshipClassName(java.lang.String classname)
                                           throws IfsException
Sets the default class name of the subclass of FolderRelationship, that is used by default for all Folder selection operations. If null is passed, "FOLDERPATHRELATIONSHIP" is used. If non-null, the ClassObject must be a subclass of the FolderRelationship class.
Parameters:
classname - name of the default FolderRelationship class to be used in Folder selection operations.
Throws:
IfsException - if operation fails.

getDefaultFolderSortSpecification

public SortSpecification getDefaultFolderSortSpecification()
                                                    throws IfsException
get the default SortSpecification that is used by default for all Folder selection operations. Returns null if no default has been set.
Returns:
default SortSpecification used for Folder select operations.
Throws:
IfsException - if operation fails.

setDefaultFolderSortSpecification

public void setDefaultFolderSortSpecification(SortSpecification sort)
                                       throws IfsException
Sets the default SortSpecification that is used by default for all Folder selection operations.
Parameters:
sort - default SortSpecification used for Folder select operations.
Throws:
IfsException - if operation fails.

setFolderPathDelimiter

public void setFolderPathDelimiter(java.lang.String delim)
                            throws IfsException
Sets the current session's Folder path delimiter. By default, this is set to "/".
Parameters:
delim - the delimiter
Throws:
IfsException - if delim is illeagal

getFolderPathDelimiter

public java.lang.String getFolderPathDelimiter()
                                        throws IfsException
Gets the current session's folder path delimiter. The value will be "/" unless changed by a call to setFolderPathDelimiter.
Returns:
the delimiter
Throws:
IfsException - if the operation fails

setDefaultContentQuota

public void setDefaultContentQuota(ContentQuota quota)
                            throws IfsException
Sets the session's default ContentQuota. This ContentQuota object will be used for every Document that this session creates. If the specified value is null, then the user's ContentQuota object will be used by default.
Parameters:
quota - the quota object to use by default
Throws:
IfsException - if the current user cannot use the specified quota

getDefaultContentQuota

public ContentQuota getDefaultContentQuota()
                                    throws IfsException
Gets the session's default ContentQuota, set via setDefaultContentQuota().
Returns:
the quota object being used by the session, or null if the user's quota is being used.
Throws:
IfsException - if the operation fails

isAdministrationMode

public boolean isAdministrationMode()
Return indication as to whether this session has enabled administrator mode. By default, a session is not in Administrator mode, unless explicitly set by invoking the setAdministrationMode(true) method.
Returns:
whether this session is in administrator mode.

setAdministrationMode

public void setAdministrationMode(boolean mode)
                           throws IfsException
Set the administrator mode state for this session.
Parameters:
mode - new state of administrator mode; true to enable administration mode
Throws:
IfsException - if operation fails.

impersonateUser

public void impersonateUser(DirectoryUser newuser)
                     throws IfsException
Assume the identity of another user. New objects created will be owned by this impersonated user. This operation requires that the authenticated user has the ability to enable administration mode, but will also work if the user is currently in not in administration mode. In this case, the impersonation will also not be in administration mode. Also note that since admin mode is required for this operation, admin mode can be enabled while impersonating the new user (who may not normally have admin privileges).
Parameters:
newuser - new User to impersonate, or null to cancel a previous impersonation.
Throws:
IfsException - if operation fails.

getRootFolder

public Folder getRootFolder()
                     throws IfsException
Return the top-most Folder in the iFS folder hierarchy.
Returns:
the top-most root folder
Throws:
IfsException - if operation fails.

lookupInverseInstanceLabel

public java.lang.String lookupInverseInstanceLabel(java.lang.String classname,
                                                   java.lang.String label)
                                            throws IfsException
Gets the name of an uniquely-named instance by its label. Return null if no inverse Label is specified in the ResourceBundle or extended ResourceBundles.
Parameters:
classname - The class name of the requested instance
label - The label
Returns:
the name registered as an inverse to the specified label
Throws:
IfsException - if operation fails.

getClassObjectCollection

public final Collection getClassObjectCollection()
                                          throws IfsException
Gets a reference to the ClassObject collection.
Specified by:
getClassObjectCollection in interface LibrarySessionInterface
Returns:
the CachedSelectorCollection
Throws:
IfsException - if the operation fails

getClassDomainCollection

public final Collection getClassDomainCollection()
                                          throws IfsException
Gets a reference to the ClassDomain collection.
Specified by:
getClassDomainCollection in interface LibrarySessionInterface
Returns:
the CachedSelectorCollection
Throws:
IfsException - if the operation fails

getValueDefaultCollection

public final Collection getValueDefaultCollection()
                                           throws IfsException
Gets a reference to the ValueDefault collection.
Specified by:
getValueDefaultCollection in interface LibrarySessionInterface
Returns:
the CachedSelectorCollection
Throws:
IfsException - if the operation fails

getValueDomainCollection

public final Collection getValueDomainCollection()
                                          throws IfsException
Gets a reference to the ValueDomain collection.
Specified by:
getValueDomainCollection in interface LibrarySessionInterface
Returns:
the CachedSelectorCollection
Throws:
IfsException - if the operation fails

getExtendedUserProfileCollection

public final Collection getExtendedUserProfileCollection()
                                                  throws IfsException
Gets a reference to the ExtendedUserProfile collection.
Specified by:
getExtendedUserProfileCollection in interface LibrarySessionInterface
Returns:
the CachedSelectorCollection
Throws:
IfsException - if the operation fails

getFormatCollection

public final Collection getFormatCollection()
                                     throws IfsException
Gets a reference to the Format collection.
Specified by:
getFormatCollection in interface LibrarySessionInterface
Returns:
the CachedResolverCollection
Throws:
IfsException - if the operation fails

getFormatExtensionCollection

public final Collection getFormatExtensionCollection()
                                              throws IfsException
Gets a reference to the FormatExtension collection.

Unlike the FormatCollection, this collection is organizaed by EXTENSION, not NAME.

Specified by:
getFormatExtensionCollection in interface LibrarySessionInterface
Returns:
the CachedResolverCollection
Throws:
IfsException - if the operation fails

getSharedAccessControlListCollection

public final Collection getSharedAccessControlListCollection()
                                                      throws IfsException
Gets a reference to the SharedAccessControlList collection.
Specified by:
getSharedAccessControlListCollection in interface LibrarySessionInterface
Returns:
the UncachedSelectorCollection
Throws:
IfsException - if the operation fails

getSystemAccessControlListCollection

public final Collection getSystemAccessControlListCollection()
                                                      throws IfsException
Gets a reference to the SystemAccessControlList collection.
Specified by:
getSystemAccessControlListCollection in interface LibrarySessionInterface
Returns:
the CachedSelectorCollection
Throws:
IfsException - if the operation fails

getClassAccessControlListCollection

public final Collection getClassAccessControlListCollection()
                                                     throws IfsException
Gets a reference to the ClassAccessControlList collection.
Specified by:
getClassAccessControlListCollection in interface LibrarySessionInterface
Returns:
the CachedSelectorCollection
Throws:
IfsException - if the operation fails

getSystemLockObjectCollection

public final Collection getSystemLockObjectCollection()
                                               throws IfsException
Gets a reference to the SystemLockObject collection.
Returns:
the CachedSelectorCollection
Throws:
IfsException - if the operation fails

getDirectoryUserCollection

public final Collection getDirectoryUserCollection()
                                            throws IfsException
Gets a reference to the DirectoryUser collection.
Specified by:
getDirectoryUserCollection in interface LibrarySessionInterface
Returns:
the UncachedSelectorCollection
Throws:
IfsException - if the operation fails

getExtendedPermissionCollection

public final Collection getExtendedPermissionCollection()
                                                 throws IfsException
Gets a reference to the ExtendedPermission collection.
Specified by:
getExtendedPermissionCollection in interface LibrarySessionInterface
Returns:
the CachedSelectorCollection
Throws:
IfsException - if the operation fails

getPermissionBundleCollection

public final Collection getPermissionBundleCollection()
                                               throws IfsException
Gets a reference to the PermissionBundle collection.
Specified by:
getPermissionBundleCollection in interface LibrarySessionInterface
Returns:
the CachedSelectorCollection
Throws:
IfsException - if the operation fails

getPolicyCollection

public final Collection getPolicyCollection()
                                     throws IfsException
Gets a reference to the Policy collection.
Specified by:
getPolicyCollection in interface LibrarySessionInterface
Returns:
the CachedSelectorCollection
Throws:
IfsException - if the operation fails

getDomainPropertyValue

public final AttributeValue getDomainPropertyValue(java.lang.String name)
                                            throws IfsException
Gets the value of a domain property, by name. If no property exists for the name specified, a null is returned.
Parameters:
name - the property name
Returns:
the property value, or null if no property exists for the name specified
Throws:
IfsException - if the operation fails

createPublicObject

public PublicObject createPublicObject(PublicObjectDefinition def)
                                throws IfsException
Create a new public object.
Parameters:
def - the PublicObjectDefinition for the new public object
Returns:
the newly created PublicObject.
Throws:
IfsException - if operation fails.

createSchemaObject

public SchemaObject createSchemaObject(SchemaObjectDefinition def)
                                throws IfsException
Create a new schema object.
Parameters:
def - the SchemaObjectDefinition for the new system object
Returns:
the newly created SystemObject.
Throws:
IfsException - if operation fails.

createSystemObject

public SystemObject createSystemObject(SystemObjectDefinition def)
                                throws IfsException
Create a new system object.
Parameters:
def - the SystemObjectDefinition for the new system object
Returns:
the newly created SystemObject
Throws:
IfsException - if operation fails.

isTraced

public final boolean isTraced(int channel,
                              int level)
                       throws IfsException
Gets whether tracing is enabled for the specified channel and level.
Specified by:
isTraced in interface Traceable
Parameters:
channel - the channel number
level - the level
Returns:
whether tracing is enabled
Throws:
IfsException - (IFS-11201) if the channel is invalid

trace

public final void trace(int channel,
                        int level,
                        java.lang.String payload)
Issues a trace request to the trace logger.
Specified by:
trace in interface Traceable
Parameters:
channel - the channel number
level - the level
payload - a string containing any additional information to be placed in the trace log

getServiceConfigurationProperty

public AttributeValue getServiceConfigurationProperty(java.lang.String name)
                                               throws IfsException
Gets the specified service configuration property.
Parameters:
name - the property name
Returns:
the property, or null if there is no such property
Throws:
IfsException - (IFS-20004) if the operation fails

getServiceConfigurationProperty

public java.lang.String getServiceConfigurationProperty(java.lang.String name,
                                                        java.lang.String defaultValue)
                                                 throws IfsException
Gets the value of the specified service configuration property, as a string.
Parameters:
name - the property name
defaultValue - the default value
Returns:
the property value
Throws:
IfsException - (IFS-20004) if the operation fails

getServiceConfigurationProperty

public boolean getServiceConfigurationProperty(java.lang.String name,
                                               boolean defaultValue)
                                        throws IfsException
Gets the value of the specified service configuration property, as a boolean.
Parameters:
name - the property name
defaultValue - the default value
Returns:
the property value
Throws:
IfsException - (IFS-20004) if the operation fails

getServiceConfigurationProperty

public int getServiceConfigurationProperty(java.lang.String name,
                                           int defaultValue)
                                    throws IfsException
Gets the value of the specified service configuration property, as an integer.
Parameters:
name - the property name
defaultValue - the default value
Returns:
the property value
Throws:
IfsException - (IFS-20004) if the operation fails

processEvents

public final void processEvents()
                         throws IfsException
Polls the server for any events queued for transport to this LibrarySession and immediately processes them.
Throws:
IfsException - if the operation fails

registerEventHandler

public final void registerEventHandler(LibraryObject lo,
                                       IfsEventHandler handler)
                                throws IfsException
Registers the specified IfsEventHandler to receive events for the specified LibraryObject.

This method allows any object implementing the IfsEventHandler interface to receive notification of events for any LibraryObject. This could be used, for example, to automatically refresh a window displaying the items in a Folder whenever the Folder's contents change.

Parameters:
lo - the LibraryObject of interest
handler - the IfsEventHandler
Throws:
IfsException - (IFS-11000) if the operation fails

deregisterEventHandler

public final void deregisterEventHandler(LibraryObject lo,
                                         IfsEventHandler handler)
                                  throws IfsException
Deregisters the specified IfsEventHandler for the specified LibraryObject.
Parameters:
lo - the LibraryObject. If null, all LibraryObjects previously registered for the IfsEventHandler using registerEventHandler are deregistered.
handler - the IfsEventHandler. If null, all IfsEventHandlers previously registered for the LibraryObject using registerEventHandler are deregistered.
Throws:
IfsException - (IFS-11001) if the operation fails

registerClassEventHandler

public final void registerClassEventHandler(ClassObject co,
                                            boolean includeSubclasses,
                                            IfsEventHandler handler)
                                     throws IfsException
Registers the specified IfsEventHandler to receive events for all objects in the specified class.

This method allows any object implementing the IfsEventHandler interface to receive notification of events for any LibraryObject. This could be used, for example, to automatically refresh a window displaying the items in a Folder whenever the Folder's contents change.

Parameters:
co - the ClassObject of interest
includeSubclasses - whether to include current subclasses of co; if a new subclass is subsequently created, it must be explicitly registered for IfsEventHandler to receive events on LibraryObjects of that new class
handler - the IfsEventHandler
Throws:
IfsException - (IFS-11000) if the operation fails

deregisterClassEventHandler

public final void deregisterClassEventHandler(ClassObject co,
                                              boolean includeSubclasses,
                                              IfsEventHandler handler)
                                       throws IfsException
Deregisters the specified IfsEventHandler for the specified class.
Parameters:
co - the ClassObject. If null, all ClassObjects previously registered for the IfsEventHandler using registerClassEventHandler are deregistered.
includeSubclasses - whether to include current subclasses of co
handler - the IfsEventHandler. If null, all IfsEventHandlers previously registered for the ClassObject using registerClassEventHandler are deregistered.
Throws:
IfsException - (IFS-11001) if the operation fails

isConnected

public boolean isConnected()
Return connection state of this LibrarySession
Returns:
the connection state; true if connected.

getClassObjectByName

public final ClassObject getClassObjectByName(java.lang.String classname)
                                       throws IfsException
Returns a class object given a class name. This uses the ClassObjectCollection and is simply a convenience method.
Parameters:
classname - the name of a class
Returns:
the ClassObject matching the specified name
Throws:
IfsException - if the operation fails

getDirectoryObject

public DirectoryObject getDirectoryObject(java.lang.Long id)
                                   throws IfsException
Lookup a DirectoryObject by its id.
Parameters:
id - identifier for the object
Returns:
the DirectoryObject
Throws:
IfsException - if operation fails.

getSchemaObject

public SchemaObject getSchemaObject(java.lang.Long id)
                             throws IfsException
Lookup a SchemaObject by its id.
Parameters:
id - identifier for the object
Returns:
the SchemaObject
Throws:
IfsException - if operation fails.

getSystemObject

public SystemObject getSystemObject(java.lang.Long id)
                             throws IfsException
Lookup a SystemObject by its id.
Parameters:
id - identifier for the object
Returns:
the SystemObject
Throws:
IfsException - if operation fails.

getPublicObject

public PublicObject getPublicObject(java.lang.Long id)
                             throws IfsException
Lookup a PublicObject by its id.
Parameters:
id - identifier for the object
Returns:
the PublicObject
Throws:
IfsException - if operation fails.

getObjectsLockedForSession

public PublicObject[] getObjectsLockedForSession()
                                          throws IfsException
Gets the array of PublicObjects that the current session holds session locks on.
Returns:
the PublicObjects currently session locked by this session.
Throws:
IfsException - if operation fails.

unlockForSession

public void unlockForSession(PublicObject[] items)
                      throws IfsException
Release session locks on a set of PublicObjects. This method is convenient for releasing session locks explicitly on all objects that are locked by this session; use this method in conjunction with the getObjectsLockedForSession() method.

The objects are unlocked in a single transaction; any failure will rollback the entire operation.

Parameters:
items - the PublicObjects to be unlocked.
Throws:
IfsException - if operation fails.

getWorldDirectoryGroup

public DirectoryGroup getWorldDirectoryGroup()
                                      throws IfsException
Gets the DirectoryGroup that represents World access.
Returns:
the World group.
Throws:
IfsException - if operation fails.

getSystemDirectoryUser

public DirectoryUser getSystemDirectoryUser()
                                     throws IfsException
Gets the DirectoryUser who is the permanent admin user.
Returns:
the system user
Throws:
IfsException - if operation fails.

grantAdministration

public void grantAdministration(DirectoryUser user)
                         throws IfsException
Grant the Administrator Mode state for the specified Directory User.
Parameters:
user - the user to receive the admin grant
Throws:
IfsException - if operation fails.

beginTransaction

public final Transaction beginTransaction()
                                   throws IfsException
Starts a writeable transaction.
Returns:
a token that can be passed to either completeTransaction or abortTransaction
Throws:
IfsException - (IFS-21000) if not connected; (IFS-10651) if the operation fails

completeTransaction

public final void completeTransaction(Transaction transaction)
                               throws IfsException
Completes a transaction.
Parameters:
transaction - the transaction to complete
Throws:
IfsException - (IFS-21000) if not connected; (IFS-10652) if the operation fails

abortTransaction

public final void abortTransaction(Transaction transaction)
                            throws IfsException
Aborts a transaction.
Parameters:
transaction - the transaction to abort
Throws:
IfsException - (IFS-21000) if not connected; (IFS-10653) if the operation fails

invokeServerMethod

public java.io.Serializable invokeServerMethod(java.lang.String methodName,
                                               java.io.Serializable payload)
                                        throws IfsException
Invokes a custom server-side method. The payload and return are arbitrary Serializable objects. There must be a method with the specified name on the server-side S_LibrarySession class.
Parameters:
methodName - the method name.
payload - the method argument
Returns:
the method result
Throws:
IfsException - if operation fails.

createView

public void createView(ViewSpecification vsp)
                throws IfsException
Creates a database view from a View specification.
Parameters:
vsp - the view specification
Throws:
IfsException - if operation fails

getServerProperty

public final java.lang.String getServerProperty(java.lang.String key,
                                                java.lang.String defaultValue)
                                         throws IfsException
Gets the String value for the specified key in the server properties file.
Parameters:
key - the key
defaultValue - the default value if the key is invalid
Returns:
the value
Throws:
IfsException - if an error occurs

Oracle Content Management SDK

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