Oracle Content Management SDK

oracle.ifs.beans
Class LibraryService

java.lang.Object
  |
  +--oracle.ifs.beans.LibraryService
All Implemented Interfaces:
LibraryConstants

public final class LibraryService
extends java.lang.Object
implements LibraryConstants

A LibraryService represents an iFS service in the iFS application development API.

iFS services are uniquely identified by name within each process. This class provides static methods to determine whether a specified service has been started, to find a service by name, and to start a new service in this process.

To connect to an iFS service, thereby creating a new iFS session, call the connect(Credential, ConnectOptions) method.


Field Summary
static java.lang.String JDBCDRIVERTYPE_OCI8
          The JDBC OCI8 driver.
static java.lang.String JDBCDRIVERTYPE_THIN
          The JDBC Thin driver.
 
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
 LibrarySession connect(Credential credential, ConnectOptions options)
          Connects to this iFS service, creating a new iFS session.
 void dispose(java.lang.String schemaPassword)
          Disposes this iFS service.
static LibraryService findService(java.lang.String serviceName)
          Finds an existing iFS service with the specified name.
 CredentialNameTokenizer getCredentialNameTokenizer()
          Gets the CredentialNameTokenizer for this iFS service.
 TokenCredential getTokenCredential(java.lang.String token, java.util.Hashtable parameters)
          Gets the previously-created TokenCredential for the specified token.
static long getVersionNumber()
          Gets the software version as a long.
static java.lang.String getVersionString()
          Gets the software version as a string.
 void invalidateTokenCredential(java.lang.String token, java.util.Hashtable parameters)
          Invalidates the previously-created TokenCredential for the specified token.
static boolean isServiceStarted(java.lang.String serviceName)
          Determines whether there exists an iFS service with the specified name.
static LibraryService startService(java.lang.String serviceName, java.lang.String schemaPassword)
          Deprecated. iFS 9.0.3: use startService(String, String, String, String)
static LibraryService startService(java.lang.String serviceName, java.lang.String schemaPassword, AttributeValue[] serviceConfiguration)
          Deprecated. iFS 9.0.3: use startService(String, String, String, String)
static LibraryService startService(java.lang.String serviceName, java.lang.String schemaPassword, java.lang.String serviceConfigurationName, java.lang.String domainName)
          Starts a new iFS service.
 

Field Detail


JDBCDRIVERTYPE_THIN

public static final java.lang.String JDBCDRIVERTYPE_THIN
The JDBC Thin driver.

JDBCDRIVERTYPE_OCI8

public static final java.lang.String JDBCDRIVERTYPE_OCI8
The JDBC OCI8 driver.
Method Detail

findService

public static LibraryService findService(java.lang.String serviceName)
                                  throws IfsException
Finds an existing iFS service with the specified name.

If there is no service with that name, an exception is thrown.

Parameters:
serviceName - the name of the service
Returns:
the service
Throws:
IfsException - (IFS-20100) if the operation fails

isServiceStarted

public static boolean isServiceStarted(java.lang.String serviceName)
                                throws IfsException
Determines whether there exists an iFS service with the specified name.
Parameters:
serviceName - the name of the service
Returns:
whether there is a service with that name
Throws:
IfsException - (IFS-20101) if the operation fails

startService

public static LibraryService startService(java.lang.String serviceName,
                                          java.lang.String schemaPassword,
                                          java.lang.String serviceConfigurationName,
                                          java.lang.String domainName)
                                   throws IfsException
Starts a new iFS service.

To start a service, you must specify three things:

Parameters:
serviceName - the name to assign to the service
schemaPassword - the password of the iFS schema
serviceConfigurationName - the service configuration (see above); if null a default configuration is used
domainName - the domain name (see above)
Returns:
the new service
Throws:
IfsException - (IFS-20102) if the operation fails

startService

public static LibraryService startService(java.lang.String serviceName,
                                          java.lang.String schemaPassword,
                                          AttributeValue[] serviceConfiguration)
                                   throws IfsException
Deprecated. iFS 9.0.3: use startService(String, String, String, String)

Starts a new iFS service with the specified name.

Throws an exception if there is already a service with that name.

Parameters:
serviceName - the name of the service
schemaPassword - the password for the database schema specified by the service configuration
serviceConfiguration - the service configuration properties
Returns:
the new service
Throws:
IfsException - (IFS-20102) if the operation fails

startService

public static LibraryService startService(java.lang.String serviceName,
                                          java.lang.String schemaPassword)
                                   throws IfsException
Deprecated. iFS 9.0.3: use startService(String, String, String, String)

Starts a new iFS service with the specified name.

iFS calls ResourceBundle.getBundle("oracle.ifs.server.properties.serviceName") to obtain a ResourceBundle containing the service configuration properties for the new service.

Throws an exception if there is already a service with that name.

Parameters:
serviceName - the name of the service
schemaPassword - the password for the database schema specified by the service configuration
Returns:
the new service
Throws:
IfsException - (IFS-20102) if the operation fails

getVersionString

public static java.lang.String getVersionString()
                                         throws IfsException
Gets the software version as a string.

"1.0.8.3.1" would be returned for version 1.0.8.3.1.

Returns:
the version
Throws:
IfsException - if the operation fails

getVersionNumber

public static long getVersionNumber()
                             throws IfsException
Gets the software version as a long.

Each element in the version number is represented by two digits in the long value.

0100080301L would be returned for version 1.0.8.3.1.

Returns:
the version
Throws:
IfsException - if the operation fails

getTokenCredential

public TokenCredential getTokenCredential(java.lang.String token,
                                          java.util.Hashtable parameters)
                                   throws IfsException
Gets the previously-created TokenCredential for the specified token.
Parameters:
token - the token
parameters - the required parameters. For this method to return a TokenCredential, this hashtable must contain a matching entry for every required parameter that was specified in creating the TokenCredential.
Returns:
the TokenCredential
Throws:
IfsException - (IFS-10192) if the operation fails

invalidateTokenCredential

public void invalidateTokenCredential(java.lang.String token,
                                      java.util.Hashtable parameters)
                               throws IfsException
Invalidates the previously-created TokenCredential for the specified token.

Once invalidated, the token can no longer be used to authenticate.

Parameters:
token - the token
parameters - the required parameters. For this method to invalidate a TokenCredential, this hashtable must contain a matching entry for every required parameter that was specified in creating the TokenCredential.
Throws:
IfsException - (IFS-10189) if the operation fails

getCredentialNameTokenizer

public CredentialNameTokenizer getCredentialNameTokenizer()
                                                   throws IfsException
Gets the CredentialNameTokenizer for this iFS service.
Returns:
the CredentialNameTokenizer
Throws:
IfsException - (IFS-12790) if the operation fails

connect

public LibrarySession connect(Credential credential,
                              ConnectOptions options)
                       throws IfsException
Connects to this iFS service, creating a new iFS session.
Parameters:
credential - the user's credentials
options - connect options; may be null
Returns:
the new session
Throws:
IfsException - (IFS-21008) if the operation fails

dispose

public void dispose(java.lang.String schemaPassword)
             throws IfsException
Disposes this iFS service.
Parameters:
schemaPassword - the password for the database schema
Throws:
IfsException - (IFS-20105) if the operation fails

Oracle Content Management SDK

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