|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.ifs.beans.LibrarySession
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:
create[ObjectName]
method, and take a definition object containing creation parameters.
LibraryService
,
LibraryService.connect(java.lang.String, java.lang.String, java.lang.String)
,
free(oracle.ifs.beans.PublicObject[])
,
disconnect()
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. |
Collection |
getClassObjectCollection()
Gets a reference to the ClassObject collection. |
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. |
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 |
getServerName()
Returns the name of the iFS service name specified during the last call to connect(). |
boolean |
getServerProperty(java.lang.String key,
boolean defaultValue)
Gets the boolean value for the specified key in the server properties file. |
int |
getServerProperty(java.lang.String key,
int defaultValue)
Gets the integer value for the specified key in the server properties file. |
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. |
java.lang.Long |
getServiceId()
Gets the id of this session's service. |
Collection |
getSharedAccessControlListCollection()
Gets a reference to the SharedAccessControlList collection. |
Collection |
getSystemAccessControlListCollection()
Gets a reference to the SystemAccessControlList 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 |
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 |
public java.lang.String getServerName() throws IfsException
IfsException
- if the operation failspublic final Localizer getLocalizer() throws IfsException
getLocalizer
in interface LibrarySessionInterface
IfsException
- if the operation failspublic java.lang.Long getId() throws IfsException
IfsException
- if the operation failspublic java.lang.Long getServiceId() throws IfsException
IfsException
- if the operation failspublic final TraceLogger getTraceLogger() throws IfsException
getTraceLogger
in interface Traceable
IfsException
- if the operation failspublic boolean disconnect() throws IfsException
IfsException
- if operation fails.public DirectoryUser getUser() throws IfsException
IfsException
- if operation fails.public final java.lang.String getVersionString() throws IfsException
This value is potentially different from the other two version Strings for the server-side software and the iFS schema.
public final long getVersionNumber() throws IfsException
This value is potentially different from the other two version Strings for the server-side software and the iFS schema.
public long getServerVersionNumber() throws IfsException
This value is potentially different from the other two version Strings for the bean-side software and the iFS schema.
IfsException
- if operation fails.public java.lang.String getServerVersionString() throws IfsException
This value is potentially different from the other two version Strings for the bean-side software and the iFS schema.
IfsException
- if operation fails.public java.lang.String getSchemaVersionString() throws IfsException
This value is potentially different from the other two version Strings for the bean-side software and the server-side software.
IfsException
- (IFS-20001) if the operation failspublic long getSchemaVersionNumber() throws IfsException
This value is potentially different from the other two version Strings for the bean-side software and the server-side software.
IfsException
- (IFS-20001) if the operation failspublic java.lang.String getDefaultFolderRelationshipClassname() throws IfsException
IfsException
- if operation fails.public void setDefaultFolderRelationshipClassName(java.lang.String classname) throws IfsException
classname
- name of the default FolderRelationship
class to be used in
Folder selection operations.IfsException
- if operation fails.public SortSpecification getDefaultFolderSortSpecification() throws IfsException
IfsException
- if operation fails.public void setDefaultFolderSortSpecification(SortSpecification sort) throws IfsException
sort
- default SortSpecification used for Folder
select operations.IfsException
- if operation fails.public void setFolderPathDelimiter(java.lang.String delim) throws IfsException
delim
- the delimiterIfsException
- if delim is illeagalpublic java.lang.String getFolderPathDelimiter() throws IfsException
IfsException
- if the operation failspublic boolean isAdministrationMode()
public void setAdministrationMode(boolean mode) throws IfsException
mode
- new state of administrator mode;
true to enable administration modeIfsException
- if operation fails.public void impersonateUser(DirectoryUser newuser) throws IfsException
newuser
- new User to impersonate, or null to
cancel a previous impersonation.IfsException
- if operation fails.public Folder getRootFolder() throws IfsException
IfsException
- if operation fails.public java.lang.String lookupInverseInstanceLabel(java.lang.String classname, java.lang.String label) throws IfsException
classname
- The class name of the requested instancelabel
- The labelIfsException
- if operation fails.public final Collection getClassObjectCollection() throws IfsException
getClassObjectCollection
in interface LibrarySessionInterface
IfsException
- if the operation failspublic final Collection getClassDomainCollection() throws IfsException
getClassDomainCollection
in interface LibrarySessionInterface
IfsException
- if the operation failspublic final Collection getValueDefaultCollection() throws IfsException
getValueDefaultCollection
in interface LibrarySessionInterface
IfsException
- if the operation failspublic final Collection getValueDomainCollection() throws IfsException
getValueDomainCollection
in interface LibrarySessionInterface
IfsException
- if the operation failspublic final Collection getExtendedUserProfileCollection() throws IfsException
getExtendedUserProfileCollection
in interface LibrarySessionInterface
IfsException
- if the operation failspublic final Collection getFormatCollection() throws IfsException
getFormatCollection
in interface LibrarySessionInterface
IfsException
- if the operation failspublic final Collection getFormatExtensionCollection() throws IfsException
Unlike the FormatCollection, this collection is organizaed by EXTENSION, not NAME.
getFormatExtensionCollection
in interface LibrarySessionInterface
IfsException
- if the operation failspublic final Collection getSharedAccessControlListCollection() throws IfsException
getSharedAccessControlListCollection
in interface LibrarySessionInterface
IfsException
- if the operation failspublic final Collection getSystemAccessControlListCollection() throws IfsException
getSystemAccessControlListCollection
in interface LibrarySessionInterface
IfsException
- if the operation failspublic final Collection getClassAccessControlListCollection() throws IfsException
getClassAccessControlListCollection
in interface LibrarySessionInterface
IfsException
- if the operation failspublic final Collection getDirectoryUserCollection() throws IfsException
getDirectoryUserCollection
in interface LibrarySessionInterface
IfsException
- if the operation failspublic final Collection getExtendedPermissionCollection() throws IfsException
getExtendedPermissionCollection
in interface LibrarySessionInterface
IfsException
- if the operation failspublic final Collection getPermissionBundleCollection() throws IfsException
getPermissionBundleCollection
in interface LibrarySessionInterface
IfsException
- if the operation failspublic final Collection getPolicyCollection() throws IfsException
getPolicyCollection
in interface LibrarySessionInterface
IfsException
- if the operation failspublic PublicObject createPublicObject(PublicObjectDefinition def) throws IfsException
def
- the PublicObjectDefinition
for the new public objectIfsException
- if operation fails.public SchemaObject createSchemaObject(SchemaObjectDefinition def) throws IfsException
def
- the SchemaObjectDefinition
for the new system objectIfsException
- if operation fails.public SystemObject createSystemObject(SystemObjectDefinition def) throws IfsException
def
- the SystemObjectDefinition
for the new system objectIfsException
- if operation fails.public final boolean isTraced(int channel, int level) throws IfsException
isTraced
in interface Traceable
channel
- the channel numberlevel
- the levelIfsException
- (IFS-11201) if the channel is invalidpublic final void trace(int channel, int level, java.lang.String payload)
trace
in interface Traceable
channel
- the channel numberlevel
- the levelpayload
- a string containing any additional information to
be placed in the trace logpublic final java.lang.String getServerProperty(java.lang.String key, java.lang.String defaultValue) throws IfsException
key
- the keydefaultValue
- the default value if the key is invalidIfsException
- if an error occurspublic final boolean getServerProperty(java.lang.String key, boolean defaultValue) throws IfsException
key
- the keydefaultValue
- the default value if the key is invalidIfsException
- if an error occurspublic final int getServerProperty(java.lang.String key, int defaultValue) throws IfsException
key
- the keydefaultValue
- the default value if the key is invalidIfsException
- if an error occurspublic final void processEvents() throws IfsException
IfsException
- if the operation failspublic final void registerEventHandler(LibraryObject lo, IfsEventHandler handler) throws IfsException
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.
lo
- the LibraryObject of interesthandler
- the IfsEventHandlerIfsException
- (IFS-11000) if the operation failspublic final void deregisterEventHandler(LibraryObject lo, IfsEventHandler handler) throws IfsException
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.IfsException
- (IFS-11001) if the operation failspublic final void registerClassEventHandler(ClassObject co, boolean includeSubclasses, IfsEventHandler handler) throws IfsException
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.
co
- the ClassObject of interestincludeSubclasses
- 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 classhandler
- the IfsEventHandlerIfsException
- (IFS-11000) if the operation failspublic final void deregisterClassEventHandler(ClassObject co, boolean includeSubclasses, IfsEventHandler handler) throws IfsException
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.IfsException
- (IFS-11001) if the operation failspublic boolean isConnected()
public DirectoryObject getDirectoryObject(java.lang.Long id) throws IfsException
id
- identifier for the objectIfsException
- if operation fails.public SchemaObject getSchemaObject(java.lang.Long id) throws IfsException
id
- identifier for the objectIfsException
- if operation fails.public SystemObject getSystemObject(java.lang.Long id) throws IfsException
id
- identifier for the objectIfsException
- if operation fails.public PublicObject getPublicObject(java.lang.Long id) throws IfsException
id
- identifier for the objectIfsException
- if operation fails.public PublicObject[] getObjectsLockedForSession() throws IfsException
IfsException
- if operation fails.public void unlockForSession(PublicObject[] items) throws IfsException
The objects are unlocked in a single transaction; any failure will rollback the entire operation.
items
- the PublicObjects to be unlocked.IfsException
- if operation fails.public DirectoryGroup getWorldDirectoryGroup() throws IfsException
IfsException
- if operation fails.public void grantAdministration(DirectoryUser user) throws IfsException
user
- the user to receive the admin grantIfsException
- if operation fails.public final Transaction beginTransaction() throws IfsException
completeTransaction
or
abortTransaction
IfsException
- (IFS-10651) if the operation failspublic final void completeTransaction(Transaction transaction) throws IfsException
transaction
- the transaction to completeIfsException
- (IFS-10652) if the operation failspublic final void abortTransaction(Transaction transaction) throws IfsException
transaction
- the transaction to abortIfsException
- (IFS-10653) if the operation failspublic java.io.Serializable invokeServerMethod(java.lang.String methodName, java.io.Serializable payload) throws IfsException
methodName
- the method name.payload
- the method argumentIfsException
- if operation fails.public void createView(ViewSpecification vsp) throws IfsException
vsp
- the view specificationIfsException
- if operation fails
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |