Package com.documentum.fc.client
Interface IDfClient
- All Known Subinterfaces:
IDfAdminClient
- All Known Implementing Classes:
DfClient
public interface IDfClient
This interface provides functionality to establish and manage sessions with a Documentum server, and provides
information about the server before a session is established.
The
IDfClient
interface provides methods for:
- Constructing session managers.
- Setting Principal Support mode, when "single login" is required.
- Querying the connection broker
- Obtaining a DBOR management object
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addUnavailableAcsServer
(String urlString) Deprecated.use IDfAcsClient.addUnavailableAcsServer()adoptDMCLSession
(String dmclSessionId) Deprecated.session adoption is no longer useful without a separate DMCLvoid
authenticate
(String docbaseName, IDfLoginInfo loginInfo) Validates a username/password combination without returning a new session.decryptText
(String s1, String s2) Deprecated.encryptPassword
(String password) Encrypts a password.encryptText
(String s1, String s2) Deprecated.enumSharedSessions
(String key) Deprecated.useIDfSessionManager
instead for session sharingfindSession
(String sessionId) Returns an existing DFC session using a DFC session ID.getAllNetworkLocations
(String locale) Deprecated.use IDfAcsClient.getAllNetworkLocations()getApplicationTokenDiagnostics
(String applicationToken) Return details extracted from an applicationToken.Returns information about DFC.getClientNetworkLocations
(String clientIPAddress, String locale) Deprecated.use IDfAcsClient.getClientNetworkLocations()getContext
(String contextId) Returns theIDfProperties
object associated with a particular client.getDbor()
Deprecated.Please usegetModuleRegistry()
insteadReturns information about the repositories that are known to a connection broker.getDocbaseMapEx
(String protocol, String hostName, String portNumber) Returns information about the repositories that are known to a connection broker.getDocbaseNameFromDocbaseId
(long docbaseId) Returns the name of the repository with the specified numeric docbase id.getDocbaseNameFromId
(IDfId objectId) Returns the name of the repository from where the object and itsIDfId
originated.Returns information about the connection brokers known to the DFC.com.documentum.fc.client.license.ILicenseManager
getLoginTicketDiagnostics
(String loginTicket) Return details extracted from a login ticket.Factory method that instantiates anIDfGlobalModuleRegistry
global module registry object.getNetworkLocation
(String locationId, String locale) Deprecated.use IDfAcsClient.getNetworkLocation()getServerMap
(String docbaseName) Returns information about the servers that are known to a connection broker.getServerMapEx
(String docbaseName, String protocol, String hostName, String portNumber) Returns information about the servers known to a connection broker.getSharedSession
(String docbaseName, IDfLoginInfo loginInfo, String key) Deprecated.useIDfSessionManager
instead for session sharingcom.documentum.fc.client.transaction.IDfTransactionManager
Returns the transaction manager.void
initCrypto
(String keyFile) Initializes the key store for password encryption.void
initCryptoEx
(String keyFile, String passphrase) Initializes the key store for password encryption.newModule
(String hostingDocbase, String moduleName, IDfSessionManager sessionMgr) Factory method that constructs and instantiates the specified Module.com.documentum.operations.IDfOperationManager
Returns operation manager.Factory method to create a new instance of the retention service.newSearchService
(IDfSessionManager sessionManager) Deprecated.Replaced by newSearchService(IDfSessionManager, String)newSearchService
(IDfSessionManager sessionManager, String defaultMetadataDocbase) Factory method to create a new instance of the search service.newService
(String name, IDfSessionManager sessionMgr) Factory method that constructs and instantiates the specified business object service.newSession
(String docbaseName, IDfLoginInfo loginInfo) Factory method that always constructs a newIDfSession
object and establishes a new session with the specified Documentum server.Factory method that constructs a newIDfSessionManager
object for managing sessions and transactions with one or more repositories.boolean
removeContext
(String contextId) Deletes aIDfProperties
object containing client information.void
setPrincipalSupport
(IDfPrincipalSupport support) Changes the session manager mode from "identity" mode to "Principal Support" mode in order to support single sign in.void
unadoptDMCLSession
(String dmclSessionId) Deprecated.session adoption is no longer useful without a separate DMCL
-
Method Details
-
newSession
Factory method that always constructs a newIDfSession
object and establishes a new session with the specified Documentum server. Since DFC 5.1, it is recommended that you useIDfSessionManager.newSession(java.lang.String)
method instead of this one. Note that a DFC session created with this method is not shared. UsegetSharedSession(java.lang.String, com.documentum.fc.common.IDfLoginInfo, java.lang.String)
to establish a shared session with a server. The following code example demonstrates how to obtain anIDfSession
interface to a new DFC session:
Java:IDfClient client = DfClient.getLocalClient(); IDfLoginInfo login = new IDfLoginInfo(); login.setUser( "username" ); login.setPassword( "password" ); login.setDomain( null ); IDfSession session = client.newSession(docbaseName, login);
- Parameters:
docbaseName
- identifies the repository with which you want to establish a session. Specify the name of the repository in one of the following formats:
- repository
- repository.documentum_server_name
- repository@host_name
- repository.documentum_server_name@host_name
- repository is the name or ID of the repository
- documentum_server_name is the name of the server that you want to use
- host_name is the name of the machine on which the repository resides
loginInfo
- AnIDfLoginInfo
object that contains the required user validation information. You can pass in null to use the Windows NT Unified Login.- Returns:
- an
IDfSession
interface to the new DFC session. - Throws:
DfException
- if a server error occurs.- See Also:
-
adoptDMCLSession
Deprecated.session adoption is no longer useful without a separate DMCLReturns a DFC session that uses an existing DMCL session ID. A DMCL session is a session that is established by a direct call to the DMCL'sconnect
server API, or is obtained from an existing DFCIDfSession
object via the methodIDfSession.getDMCLSessionId()
. The purpose of this function is to allow an application that already has a DMCL session to use DFC. In some cases, application developers may decide to call the DMCL directly when migrating pre-DFC customizations. When possible, however, developers are encouraged to establish sessions through the DFC. The following code example demonstrates how to obtain anIDfSession
interface by adopting a DMCL session obtained from another DFC session interface:IDfClient client = DfClient.getLocalClient(); IDfSession sess2 = client.adoptDMCLSession(sess1.getDMCLSessionId());
- Parameters:
dmclSessionId
- the DMCL session ID.- Returns:
- an
IDfSession
interface to the DMCL session. Note that you cannot call theIDfSession.disconnect()
method on the returnedIDfSession
interface. Use thedisconnect
DMCL server API instead. - Throws:
DfException
- if a server error occurs.- See Also:
-
unadoptDMCLSession
Deprecated.session adoption is no longer useful without a separate DMCLReleases the DFC session created with theadoptDMCLSession(java.lang.String)
method. A DMCL session is a session that is established by a direct call to the DMCL'sconnect
server API, rather than through the DFC. Note that this method does not disconnect a DMCL session. Sessions established through the DMCL must also be disconnected through the DMCL with a call to thedisconnect
server API. The following code example demonstrates how to adopt a DMCL session then release the session by unadopting the DMCL session:IDfClient client = DfClient.getLocalClient(); IDfSession sess2 = client.adoptDMCLSession(sess1.getDMCLSessionId()); client.unadoptDMCLSession(sess2.getDMCLSessionId()); if (!sess2.isConnected()) { // This is what we expect... }
- Parameters:
dmclSessionId
- the DMCL session ID- Throws:
DfException
- if a server error occurs- See Also:
-
findSession
Returns an existing DFC session using a DFC session ID. The purpose of this method is in cases where it may be desirable to obtain a secondIDfSession
instance where both instances share the same underlying session id. The following code example demonstrates how to obtain a secondIDfSession
interface from anotherIDfSession
interface:IDfSession sess2 = client.findSession(sess1.getSessionId());
- Parameters:
sessionId
- the DFC session ID obtained by callingIDfSession.getSessionId()
- Returns:
- an
IDfSession
interface to the DFC session. - Throws:
DfException
- if a server error occurs.- See Also:
-
getClientConfig
Returns information about DFC. Client configuration information is stored in a client Config object and is intended for use by system administrators. Refer to the EMC Documentum Object Reference Manual for more information on what properties are available through the client object. It is STRONGLY recommended that applications only read the data returned in the typed object, because writes will affect all other Documentum sessions in the process space. If applications do write to the returned object, they are responsible handling all concurrency issues associated with those writes.- Returns:
- an
IDfTypedObject
interface to the client configuration information - Throws:
DfException
- if a server error occurs
-
getDocbaseMap
Returns information about the repositories that are known to a connection broker. This method returns an object that contains the repository IDs, repository names, and verbose repository descriptions.- Throws:
DfException
- if a server error occurs- See Also:
-
getDocbaseMapEx
IDfDocbaseMap getDocbaseMapEx(String protocol, String hostName, String portNumber) throws DfException Returns information about the repositories that are known to a connection broker. Use this function to specify extended information such as protocol, host name, and port number. This method returns repository IDs, repository names, and verbose repository descriptions. The parameters uniquely identify the connection broker that responds to this method. If you do not pass any parameters, the primary connection broker defined in the dmcl.ini file responds. If the primary connection broker is not available, the request is sent to each backup connection broker in turn, until one responds. You will receive error messages for any connection brokers that do not respond. A docbaselocator object contains three attributes that identify which connection broker responded. Refer to the EMC Documentum Object Reference Manual for more information about docbase locator objects and list of protocols to communicate with a connection broker. Note that the protocol parameter is null in most cases.- Parameters:
protocol
- the protocol used to talk to the connection broker (not used in most cases)hostName
- the host machine on which the connection broker residesportNumber
- the port number which the connection broker is using for communications- Returns:
- an
IDfDocbaseMap
interface to the extended information about the repositories that are known to a connection broker - Throws:
DfException
- if a server error occurs- See Also:
-
getDocbrokerMap
Returns information about the connection brokers known to the DFC.- Returns:
- information about the connection brokers known by the DFC
- Throws:
DfException
- if a server error occurs- See Also:
-
getServerMap
Returns information about the servers that are known to a connection broker.- Parameters:
docbaseName
- the name of the repository associated with the servers for which you are requesting information- Throws:
DfException
- if a server error occurs- See Also:
-
getServerMapEx
IDfTypedObject getServerMapEx(String docbaseName, String protocol, String hostName, String portNumber) throws DfException Returns information about the servers known to a connection broker. Use this method to specify extended information such as protocol, host name, and port number. The parameters uniquely identify the responding connection broker. If you do not pass any parameters, the primary connection broker defined in the dmcl.ini file responds. If the primary connection broker is not available, the request is sent to each backup connection broker, in turn, until a connection broker responds. You will receive error messages for any connection brokers that do not respond. A docbaselocator object contains three attributes that identify which connection broker responded. Refer to the EMC Documentum Object Reference Manual for more information about docbase locator objects.- Parameters:
docbaseName
- the name of the repositoryprotocol
- the protocol used to talk to the connection brokerhostName
- the host machine on which the connection broker residesportNumber
- the port number which the connection broker is using for communications- Returns:
- an
IDfDocbaseMap
interface to the extended information about the servers that are known to a connection broker - Throws:
DfException
- if a server error occurs- See Also:
-
getDocbaseNameFromId
Returns the name of the repository from where the object and itsIDfId
originated.- Parameters:
objectId
- anIDfId
interface containing an object ID- Returns:
- a string containing the name of the repository from which the object ID originates
- Throws:
DfException
- if a server error occurs
-
getDocbaseNameFromDocbaseId
Returns the name of the repository with the specified numeric docbase id.- Parameters:
docbaseId
- the numeric docbase id.- Returns:
- a string containing the name for the requested id.
- Throws:
DfException
- if a server error occurs or if the docbase name is unknown.
-
getContext
Returns theIDfProperties
object associated with a particular client.IDfProperties
objects are non-persistent objects used to store arbitrary information about a client.- Parameters:
contextId
- an application-defined key to the Properties object; Note that for security purposes, there is no DFC method that returns this key.- Returns:
- an
IDfProperties
interface to the client object - Throws:
DfException
- if the specifiedIDfProperties
object doesn't exist and an attempt to create it fails- See Also:
-
removeContext
Deletes aIDfProperties
object containing client information. Property objects are non-persistent objects that store arbitrary information about a client used at runtime.- Parameters:
contextId
- an application-defined key to the Properties object; Note that for security purposes, there is no DFC method that returns this key.- Returns:
- TRUE if the Properties object is deleted; FALSE if not.
- Throws:
DfException
- if the method fails- See Also:
-
newService
Factory method that constructs and instantiates the specified business object service. It returns a new instance of the requested service. A service implementation should save this reference so the service can later use its methods to retrieve a concrete DFC session handle. The factory method returns a service interface that can then be downcasted to the specific service interface.
Java:IDfClient client = DfClient.getLocalClient(); IDfSessionManager sMgr = client.newSessionManager(); String strService = IAutoNumber.class.getName(); IAutoNumber autonumber = (IAutoNumber)client.newService( strService, sMgr ); int iNextNumber = autonumber.getUniqueNumber();
- Parameters:
name
- the logical service name. The business objects framework recommends use of the fully qualified interface name of the service interface as a logical service name. This prevents naming conflicts. Example:IAutoNumber.class.getName()
might return "com.accelera.autonumber.IAutoNumber
" as the fully qualified name.sessionMgr
- the session handle of typeIDfSessionManager
.- Returns:
- a generalized
IDfService
interface that can be downcasted to the specific service interface. - Throws:
DfServiceInstantiationException
- Cannot create service due to class loading issues.DfServiceException
- Cannot create serviceDfDborNotFoundException
- Cannot find DBO RegistryDfServiceNotFoundException
- Cannot find service in DBOR- Since:
- 5.1
- See Also:
-
newModule
IDfModule newModule(String hostingDocbase, String moduleName, IDfSessionManager sessionMgr) throws DfServiceException Factory method that constructs and instantiates the specified Module. It returns a new instance of the requested module.- Parameters:
hostingDocbase
- the repository frommoduleName
- the logical module name.IDfSessionManager
.sessionMgr
- the session handle of type- Returns:
- a generalized
IDfModule
interface - Throws:
DfServiceException
- Cannot create module- Since:
- 5.3
-
newSessionManager
IDfSessionManager newSessionManager()Factory method that constructs a newIDfSessionManager
object for managing sessions and transactions with one or more repositories. Since DFC 5.1, using this method instead of newSession is recommended. TheIDfSessionManager
object encapsulates one or more "managed" DFC session objects and dynamically manages the session pool.
Java:IDfClient client = DfClient.getLocalClient(); IDfSessionManager sMgr = client.newSessionManager(); IDfLoginInfo login = new DfLoginInfo(); login.setUser( strUserName ); login.setPassword( strPassword ); login.setDomain( null ); sMgr.setIdentity( strDocbase1, login ); sMgr.setIdentity( strDocbase2, login );
- Returns:
- a new
IDfSessionManager
object. - Since:
- 5.1
-
setPrincipalSupport
Changes the session manager mode from "identity" mode to "Principal Support" mode in order to support single sign in. This method allows a client to define a handler that creates sessions on behalf of principal users. In order to use principal support, theIDfPrincipalSupport
object must be a custom class that implementsIDfPrincipalSupport
and overrides itsIDfPrincipalSupport.getSession(java.lang.String, java.lang.String)
method.- Parameters:
support
-IDfPrincipalSupport
- Since:
- 5.1
-
getDbor
IDfDbor getDbor()Deprecated.Please usegetModuleRegistry()
insteadFactory method that instantiates anIDfDbor
business objects registry management object.
Java:IDfDbor dbor = m_client.getDbor(); IDfDborEntry entry = new DfDborEntry(); entry.setName( strDocbaseTypeName ); entry.setServiceBased( bDborService ); entry.setJavaClass( strJavaClass );// AutoNumberType.class.getName() ); entry.setVersion( "1.0" ); dbor.register( entry );
- Returns:
- an instance of an
IDfDbor
management object. - Since:
- 5.1
- See Also:
-
encryptPassword
Encrypts a password.- Parameters:
password
- unencrypted password- Returns:
- encrypted password
- Throws:
DfException
- Since:
- 5.2
-
getApplicationTokenDiagnostics
Return details extracted from an applicationToken.- Parameters:
applicationToken
-- Throws:
DfException
- Since:
- 6.0
-
getLoginTicketDiagnostics
Return details extracted from a login ticket.- Parameters:
loginTicket
-- Throws:
DfException
- Since:
- 6.0
- See Also:
-
initCrypto
Initializes the key store for password encryption.- Parameters:
keyFile
-- Throws:
DfException
- Since:
- 5.2
-
initCryptoEx
Initializes the key store for password encryption.- Parameters:
keyFile
-passphrase
- The passphrase used to encrypt the AEK file.- Throws:
DfException
- Since:
- 6.0
-
encryptText
Deprecated.This method is not supported.- Throws:
DfException
-
decryptText
Deprecated.This method is not supported.- Throws:
DfException
-
authenticate
Validates a username/password combination without returning a new session.- Parameters:
docbaseName
- identifies the repository with which you want to authenticate. Specify the name of the repository in one of the following formats:
- repository
- repository.documentum_server_name
- repository@host_name
- repository.documentum_server_name@host_name
- repository is the name or ID of the repository
- documentum_server_name is the name of the server that you want to use
- host_name is the name of the machine on which the repository resides
loginInfo
- AnIDfLoginInfo
object that contains the required user validation information.- Throws:
DfException
- if a server error occurs.- Since:
- 5.2
-
getModuleRegistry
Factory method that instantiates anIDfGlobalModuleRegistry
global module registry object.- Throws:
DfException
- Since:
- 5.3
-
newSearchService
Deprecated.Replaced by newSearchService(IDfSessionManager, String)Factory method to create a new instance of the search service. This instance is itself a factory that can be used to create the different search objects.- Parameters:
sessionManager
- A session manager to be used for authentication against search sources- Since:
- 5.3
-
newSearchService
Factory method to create a new instance of the search service. This instance is itself a factory that can be used to create the different search objects.- Parameters:
sessionManager
- A session manager to be used for authentication against search sourcesdefaultMetadataDocbase
- The default repository to pick the metadata information from (e.g. information on types). This parameter can be safely set tonull
if the search service is configured to search only on repositories and not on any external source. This parameter must not benull
if external sources are selected through the search service. This repository must have a corresponding login information in the session manager.- Since:
- 5.3
-
newRetentionService
IDfRetentionService newRetentionService()Factory method to create a new instance of the retention service. This instance can be used to create new retainer objects.- Since:
- 5.3
-
getNetworkLocation
Deprecated.use IDfAcsClient.getNetworkLocation()Returns anIDfNetworkLocationEntry
object by location identifier.- Parameters:
locationId
- network location identifierlocale
- identifies the locale (currently not supported)- Returns:
- IDfNetworkLocationEntry client network location object, or null if the location is not found.
- Throws:
DfException
-
getClientNetworkLocations
Deprecated.use IDfAcsClient.getClientNetworkLocations()Returns anIDfEnumeration
object that lists allIDfNetworkLocationEntry
objects.- Parameters:
clientIPAddress
- client IP address If this argument is null, all IDfNetworkLocationEntry objects that can be used as a client network location for a given locale are returned.locale
- identifies the locale (currently not supported)- Returns:
- IDfEnumeration of
IDfNetworkLocationEntry
objects - Throws:
DfException
-
getAllNetworkLocations
Deprecated.use IDfAcsClient.getAllNetworkLocations()Returns anIDfEnumeration
object that lists allIDfNetworkLocationEntry
objects.- Parameters:
locale
- identifies the locale (currently not supported)- Returns:
- IDfEnumeration of
IDfNetworkLocationEntry
objects - Throws:
DfException
-
getTransactionManager
com.documentum.fc.client.transaction.IDfTransactionManager getTransactionManager()Returns the transaction manager.- Since:
- 5.4
-
newOperationManager
Returns operation manager.- Throws:
DfException
-
getLicenseManager
- Throws:
DfException
-