Constructor and Description |
---|
DfClient()
We had to leave this public for backward compatibility with earlier DFC versions.
|
Modifier and Type | Method and Description |
---|---|
void |
addUnavailableAcsServer(java.lang.String urlString)
Add the specified accelerated content store (ACS) server
to the list of unavailable ACS servers.
|
IDfSession |
adoptDMCLSession(java.lang.String dmclSessionId)
Returns a DFC session that uses an existing DMCL session ID.
|
void |
authenticate(java.lang.String docbaseName,
IDfLoginInfo loginInfo)
Validates a username/password combination without returning a new session.
|
java.lang.String |
decryptText(java.lang.String s1,
java.lang.String s2)
This method is not supported.
|
java.lang.String |
encryptPassword(java.lang.String password)
Encrypts a password.
|
java.lang.String |
encryptText(java.lang.String s1,
java.lang.String s2)
This method is not supported.
|
java.util.Enumeration |
enumSharedSessions(java.lang.String key)
Returns an enumeration of all the shared sessions created with a user-specified key.
|
IDfSession |
findSession(java.lang.String sessionId)
Returns an existing DFC session using a DFC session ID.
|
IDfEnumeration |
getAllNetworkLocations(java.lang.String locale)
Returns an
IDfEnumeration object that lists all IDfNetworkLocationEntry objects. |
java.lang.String |
getApplicationTokenDiagnostics(java.lang.String applicationToken)
Return details extracted from an applicationToken.
|
IDfTypedObject |
getClientConfig()
Returns information about DFC.
|
IDfEnumeration |
getClientNetworkLocations(java.lang.String clientIPAddress,
java.lang.String locale)
Returns an
IDfEnumeration object that lists all IDfNetworkLocationEntry objects. |
IDfProperties |
getContext(java.lang.String contextId)
Returns the
IDfProperties object associated with a particular client. |
IDfDbor |
getDbor()
Factory method that instantiates an
IDfDbor business objects registry management object. |
static java.lang.String |
getDFCVersion()
Returns the DFC version string.
|
IDfDocbaseMap |
getDocbaseMap()
Returns information about the repositories that are known to a connection broker.
|
IDfDocbaseMap |
getDocbaseMapEx(java.lang.String protocol,
java.lang.String hostName,
java.lang.String portNumber)
Returns information about the repositories that are known to a connection broker.
|
java.lang.String |
getDocbaseNameFromDocbaseId(long docbaseId)
Returns the name of the repository with the specified numeric docbase id.
|
java.lang.String |
getDocbaseNameFromId(IDfId objectId)
Returns the name of the repository from where the object and its
IDfId originated. |
IDfTypedObject |
getDocbrokerMap()
Returns information about the connection brokers known to the DFC.
|
static IDfClient |
getInstance()
Returns the
IDfClient interface for a singleton instance of DfClient. |
com.documentum.fc.client.license.ILicenseManager |
getLicenseManager() |
static IDfClient |
getLocalClient()
Returns the
IDfClient interface for a singleton instance of DfClient. |
static IDfClient |
getLocalClient32()
Deprecated.
Please use
getLocalClient() instead |
static IDfClient |
getLocalClientEx()
Returns the
IDfClient interface for a singleton instance of DfClient. |
java.lang.String |
getLoginTicketDiagnostics(java.lang.String loginTicket)
Return details extracted from a login ticket.
|
java.lang.Class |
getModuleClass(java.lang.String moduleName,
IDfSession session) |
IDfGlobalModuleRegistry |
getModuleRegistry()
Factory method that instantiates an
IDfGlobalModuleRegistry global module registry object. |
IDfNetworkLocationEntry |
getNetworkLocation(java.lang.String locationId,
java.lang.String locale)
Returns an
IDfNetworkLocationEntry object by location identifier. |
IDfTypedObject |
getServerMap(java.lang.String docbaseName)
Returns information about the servers that are known to a connection broker.
|
IDfTypedObject |
getServerMapEx(java.lang.String docbaseName,
java.lang.String protocol,
java.lang.String hostName,
java.lang.String portNumber)
Returns information about the servers known to a connection broker.
|
IDfSession |
getSharedSession(java.lang.String docbaseName,
IDfLoginInfo loginInfo,
java.lang.String key)
This method retrieves an existing shared session if the shared session is created with the same key and the same
repository name and login information.
|
com.documentum.fc.client.transaction.IDfTransactionManager |
getTransactionManager()
Returns the transaction manager.
|
void |
ignoreFilePathLengthErrors(boolean value) |
void |
initCrypto(java.lang.String keyFile)
Initializes the key store for password encryption.
|
void |
initCryptoEx(java.lang.String keyFile,
java.lang.String passphrase)
Initializes the key store for password encryption.
|
boolean |
isACS() |
IDfModule |
newModule(java.lang.String hostingDocbase,
java.lang.String moduleName,
IDfSessionManager sessionMgr)
Factory method that constructs and instantiates the specified Module.
|
com.documentum.operations.IDfOperationManager |
newOperationManager()
Returns operation manager.
|
IDfRetentionService |
newRetentionService()
Factory method to create a new instance of the retention service.
|
IDfSearchService |
newSearchService(IDfSessionManager sessionManager)
Factory method to create a new instance of the search service.
|
IDfSearchService |
newSearchService(IDfSessionManager sessionManager,
java.lang.String defaultMetadataDocbase)
Factory method to create a new instance of the search service.
|
IDfService |
newService(java.lang.String name,
IDfSessionManager sessionMgr)
Factory method that constructs and instantiates the specified business object service.
|
IDfSession |
newSession(java.lang.String docbaseName,
IDfLoginInfo loginInfo)
Factory method that always constructs a new
IDfSession object and establishes a new session with the
specified Documentum server. |
IDfSessionManager |
newSessionManager()
Factory method that constructs a new
IDfSessionManager object for managing sessions and transactions
with one or more repositories. |
boolean |
removeContext(java.lang.String contextId)
Deletes a
IDfProperties object containing client information. |
void |
setACS(boolean isACS) |
void |
setPrincipalSupport(IDfPrincipalSupport support)
Changes the session manager mode from "identity" mode to "Principal Support" mode in order to support single sign
in.
|
boolean |
shouldIgnoreFilePathLengthErrors() |
void |
unadoptDMCLSession(java.lang.String dmclSessionId)
Releases the DFC session created with the
IDfClient.adoptDMCLSession(java.lang.String) method. |
public DfClient()
public static IDfClient getInstance()
IDfClient
interface for a singleton instance of DfClient.
This variation does not declare (or throw) any checked exceptions and is therefore more convenient than getLocalClient()
in many contexts.public static IDfClient getLocalClient() throws DfException
IDfClient
interface for a singleton instance of DfClient.DfException
public static IDfClient getLocalClientEx()
IDfClient
interface for a singleton instance of DfClient.
This is a synonym for getInstance()
that exists for historical reasons.public static IDfClient getLocalClient32() throws DfException
getLocalClient()
insteadgetLocalClient()
that exists for historical reasons.DfException
getInstance()
public static java.lang.String getDFCVersion()
public IDfSession newSession(java.lang.String docbaseName, IDfLoginInfo loginInfo) throws DfException
IDfClient
IDfSession
object and establishes a new session with the
specified Documentum server.
Since DFC 5.1, it is recommended that you use IDfSessionManager.newSession(java.lang.String)
method instead of this
one.
Note that a DFC session created with this method is not shared. Use IDfClient.getSharedSession(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 an IDfSession
interface to a new DFC session:
IDfClient client = DfClient.getLocalClient(); IDfLoginInfo login = new IDfLoginInfo(); login.setUser( "username" ); login.setPassword( "password" ); login.setDomain( null ); IDfSession session = client.newSession(docbaseName, login);
newSession
in interface IDfClient
docbaseName
- identifies the repository with which you want to establish a session. Specify the name of the
repository in one of the following formats:loginInfo
- An IDfLoginInfo
object that contains the required user validation information.
You can pass in null to use the Windows NT Unified Login.IDfSession
interface to the new DFC session.DfException
- if a server error occurs.IDfClient.getSharedSession(java.lang.String, com.documentum.fc.common.IDfLoginInfo, java.lang.String)
,
IDfSession.disconnect()
,
IDfSessionManager.newSession(java.lang.String)
public IDfSession getSharedSession(java.lang.String docbaseName, IDfLoginInfo loginInfo, java.lang.String key) throws DfException
IDfClient
The following code example demonstrates how to obtain an interface to a non-shared session, then obtain an interface to the shared session:
IDfClient client = DfClient.getLocalClient(); IDfLoginInfo li = new IDfLoginInfo(); li.setUser("tuser"); li.setPassword("somePass"); // Here's a brand new session. IDfSession sess1 = client.getSharedSession("docbaseName", li, "uniqueKey"); // Here's a second session shared with sess1. IDfSession sess2 = client.getSharedSession("docbaseName", li, "uniqueKey");
getSharedSession
in interface IDfClient
docbaseName
- the repository with which you want to establish a DFC session: Specify the name of the
repository in one of the following formats:
loginInfo
- an IDfLoginInfo
interface containing the required user validation information. You may
leave this parameter empty if you want to use a unified login. Unified logins are specific to
Windows NT.key
- an application-defined string. Note that for security purposes, there is no DFC method that
returns this key. You must remember it if you wish to locate and use the shared session
created or returned by this method.IDfSession
interface to the new shared DFC session.DfException
- if a server error occurs.IDfClient.newSession(java.lang.String, com.documentum.fc.common.IDfLoginInfo)
,
IDfSession.disconnect()
,
IDfClient.enumSharedSessions(java.lang.String)
public IDfSession adoptDMCLSession(java.lang.String dmclSessionId) throws DfException
IDfClient
connect
server
API, or is obtained from an existing DFC IDfSession
object via the method IDfSession.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 an IDfSession
interface by adopting a DMCL
session obtained from another DFC session interface:
IDfClient client = DfClient.getLocalClient(); IDfSession sess2 = client.adoptDMCLSession(sess1.getDMCLSessionId());
adoptDMCLSession
in interface IDfClient
dmclSessionId
- the DMCL session ID.IDfSession
interface to the DMCL session. Note
that you cannot call the IDfSession.disconnect()
method on the
returned IDfSession
interface. Use the
disconnect
DMCL server API instead.DfException
- if a server error occurs.IDfClient.unadoptDMCLSession(java.lang.String)
,
IDfSession.isAdopted()
,
IDfSession.getDMCLSessionId()
public void unadoptDMCLSession(java.lang.String dmclSessionId) throws DfException
IDfClient
IDfClient.adoptDMCLSession(java.lang.String)
method.
A DMCL session is a session that is established by a direct call to the DMCL's connect
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 the disconnect
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... }
unadoptDMCLSession
in interface IDfClient
dmclSessionId
- the DMCL session IDDfException
- if a server error occursIDfClient.adoptDMCLSession(java.lang.String)
,
IDfSession.isAdopted()
public java.util.Enumeration enumSharedSessions(java.lang.String key) throws DfException
IDfClient
enumSharedSessions
in interface IDfClient
key
- an application-defined string that identifies the shared session. Note that there is no DFC method
that returns this key. This is the same string you passed to IDfClient.getSharedSession(java.lang.String, com.documentum.fc.common.IDfLoginInfo, java.lang.String)
.Enumeration
object containing all the shared sessions corresponding to the key.
Will return an empty enumeration if no session is shared using the key passed.DfException
- if a server error occurs.IDfClient.getSharedSession(java.lang.String, com.documentum.fc.common.IDfLoginInfo, java.lang.String)
public IDfSession findSession(java.lang.String sessionId) throws DfException
IDfClient
IDfSession
instance where both instances share the same underlying session id.
The following code example demonstrates how to obtain a second IDfSession
interface from another IDfSession
interface:
IDfSession sess2 = client.findSession(sess1.getSessionId());
findSession
in interface IDfClient
sessionId
- the DFC session ID obtained by calling IDfSession.getSessionId()
IDfSession
interface to the DFC session.DfException
- if a server error occurs.IDfSession.getSessionId()
public IDfTypedObject getClientConfig() throws DfException
IDfClient
getClientConfig
in interface IDfClient
IDfTypedObject
interface to the client configuration informationDfException
- if a server error occurspublic IDfDocbaseMap getDocbaseMap() throws DfException
IDfClient
getDocbaseMap
in interface IDfClient
DfException
- if a server error occursIDfClient.getDocbaseMapEx(java.lang.String, java.lang.String, java.lang.String)
,
IDfClient.getServerMap(java.lang.String)
,
IDfClient.getDocbrokerMap()
public IDfDocbaseMap getDocbaseMapEx(java.lang.String protocol, java.lang.String hostName, java.lang.String portNumber) throws DfException
IDfClient
getDocbaseMapEx
in interface IDfClient
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 communicationsIDfDocbaseMap
interface to the extended information about the repositories that are known to a
connection brokerDfException
- if a server error occursIDfClient.getDocbaseMap()
public IDfTypedObject getDocbrokerMap() throws DfException
IDfClient
getDocbrokerMap
in interface IDfClient
DfException
- if a server error occursIDfClient.getDocbaseMap()
,
IDfClient.getServerMap(java.lang.String)
public IDfTypedObject getServerMap(java.lang.String docbaseName) throws DfException
IDfClient
getServerMap
in interface IDfClient
docbaseName
- the name of the repository associated with the servers for which you are requesting informationDfException
- if a server error occursIDfClient.getDocbaseMap()
,
IDfClient.getDocbrokerMap()
public IDfTypedObject getServerMapEx(java.lang.String docbaseName, java.lang.String protocol, java.lang.String hostName, java.lang.String portNumber) throws DfException
IDfClient
getServerMapEx
in interface IDfClient
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 communicationsIDfDocbaseMap
interface to the extended information about the servers that are known to a
connection brokerDfException
- if a server error occursIDfClient.getServerMap(java.lang.String)
public java.lang.String getDocbaseNameFromId(IDfId objectId) throws DfException
IDfClient
IDfId
originated.getDocbaseNameFromId
in interface IDfClient
objectId
- an IDfId
interface containing an object IDDfException
- if a server error occurspublic java.lang.String getDocbaseNameFromDocbaseId(long docbaseId) throws DfException
IDfClient
getDocbaseNameFromDocbaseId
in interface IDfClient
docbaseId
- the numeric docbase id.DfException
- if a server error occurs or if the docbase name is unknown.public IDfProperties getContext(java.lang.String contextId) throws DfException
IDfClient
IDfProperties
object associated with a particular client.
IDfProperties
objects are non-persistent objects used to store arbitrary information about a client.getContext
in interface IDfClient
contextId
- an application-defined key to the Properties object; Note that for security purposes, there is
no DFC method that returns this key.IDfProperties
interface to the client objectDfException
- if the specified IDfProperties
object doesn't exist and an attempt to create it
failsIDfClient.removeContext(java.lang.String)
public boolean removeContext(java.lang.String contextId) throws DfException
IDfClient
IDfProperties
object containing client information.
Property objects are non-persistent objects that store arbitrary information about a client used at runtime.removeContext
in interface IDfClient
contextId
- an application-defined key to the Properties object; Note that for security purposes, there is
no DFC method that returns this key.DfException
- if the method failsIDfClient.getContext(java.lang.String)
public IDfService newService(java.lang.String name, IDfSessionManager sessionMgr) throws DfServiceException
IDfClient
IDfClient client = DfClient.getLocalClient(); IDfSessionManager sMgr = client.newSessionManager(); String strService = IAutoNumber.class.getName(); IAutoNumber autonumber = (IAutoNumber)client.newService( strService, sMgr ); int iNextNumber = autonumber.getUniqueNumber();
newService
in interface IDfClient
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 type IDfSessionManager
.IDfService
interface that can be downcasted to the specific service
interface.DfServiceInstantiationException
- Cannot create service due to class loading issues.DfServiceException
- Cannot create serviceDfDborNotFoundException
- Cannot find DBO RegistryDfServiceNotFoundException
- Cannot find service in DBORIDfDbor.lookupService(java.lang.String)
public IDfModule newModule(java.lang.String hostingDocbase, java.lang.String moduleName, IDfSessionManager sessionMgr) throws DfServiceException
IDfClient
newModule
in interface IDfClient
hostingDocbase
- the repository frommoduleName
- the logical module name. IDfSessionManager
.sessionMgr
- the session handle of typeIDfModule
interfaceDfServiceException
- Cannot create modulepublic java.lang.Class getModuleClass(java.lang.String moduleName, IDfSession session) throws DfException
getModuleClass
in interface com.documentum.fc.client.impl.IClientInternal
DfException
public IDfSessionManager newSessionManager()
IDfClient
IDfSessionManager
object for managing sessions and transactions
with one or more repositories. Since DFC 5.1, using this method instead of newSession is recommended.
The IDfSessionManager
object encapsulates one or more "managed" DFC session objects and dynamically
manages the session pool.
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 );
newSessionManager
in interface IDfClient
IDfSessionManager
object.public void setPrincipalSupport(IDfPrincipalSupport support)
IDfClient
IDfPrincipalSupport
object must be a custom class that
implements IDfPrincipalSupport
and overrides its IDfPrincipalSupport.getSession(java.lang.String, java.lang.String)
method.setPrincipalSupport
in interface IDfClient
support
- IDfPrincipalSupport
public IDfDbor getDbor()
IDfClient
IDfDbor
business objects registry management object.
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 );
getDbor
in interface IDfClient
IDfDbor
management object.IDfDborEntry
public java.lang.String encryptPassword(java.lang.String password) throws DfException
IDfClient
encryptPassword
in interface IDfClient
password
- unencrypted passwordDfException
public void initCrypto(java.lang.String keyFile) throws DfException
IDfClient
initCrypto
in interface IDfClient
DfException
public void initCryptoEx(java.lang.String keyFile, java.lang.String passphrase) throws DfException
IDfClient
initCryptoEx
in interface IDfClient
passphrase
- The passphrase used to encrypt the AEK file.DfException
public java.lang.String getApplicationTokenDiagnostics(java.lang.String applicationToken) throws DfException
IDfClient
getApplicationTokenDiagnostics
in interface IDfClient
DfException
IDfSession.getApplicationToken(String, String, int, String, boolean).
public java.lang.String getLoginTicketDiagnostics(java.lang.String loginTicket) throws DfException
IDfClient
getLoginTicketDiagnostics
in interface IDfClient
DfException
IDfSession.getLoginTicketEx(String, String, int, boolean, String)
public java.lang.String encryptText(java.lang.String s1, java.lang.String s2) throws DfException
IDfClient
encryptText
in interface IDfClient
DfException
public java.lang.String decryptText(java.lang.String s1, java.lang.String s2) throws DfException
IDfClient
decryptText
in interface IDfClient
DfException
public void authenticate(java.lang.String docbaseName, IDfLoginInfo loginInfo) throws DfException
IDfClient
authenticate
in interface IDfClient
docbaseName
- identifies the repository with which you want to authenticate. Specify the name of the
repository in one of the following formats:loginInfo
- An IDfLoginInfo
object that contains the required user validation information.DfException
- if a server error occurs.public IDfGlobalModuleRegistry getModuleRegistry() throws DfException
IDfClient
IDfGlobalModuleRegistry
global module registry object.getModuleRegistry
in interface IDfClient
DfException
public IDfSearchService newSearchService(IDfSessionManager sessionManager)
IDfClient
newSearchService
in interface IDfClient
sessionManager
- A session manager to be used for authentication against search sourcespublic IDfSearchService newSearchService(IDfSessionManager sessionManager, java.lang.String defaultMetadataDocbase)
IDfClient
newSearchService
in interface IDfClient
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 to null
if the search service
is configured to search only on repositories and not on any external source. This
parameter must not be null
if external sources are selected through
the search service. This repository must have a corresponding login information in
the session manager.public IDfRetentionService newRetentionService()
IDfClient
newRetentionService
in interface IDfClient
public IDfNetworkLocationEntry getNetworkLocation(java.lang.String locationId, java.lang.String locale) throws DfException
IDfClient
IDfNetworkLocationEntry
object by location identifier.getNetworkLocation
in interface IDfClient
locationId
- network location identifierlocale
- identifies the locale (currently not supported)DfException
public IDfEnumeration getClientNetworkLocations(java.lang.String clientIPAddress, java.lang.String locale) throws DfException
IDfClient
IDfEnumeration
object that lists all IDfNetworkLocationEntry
objects.getClientNetworkLocations
in interface IDfClient
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)IDfNetworkLocationEntry
objectsDfException
public IDfEnumeration getAllNetworkLocations(java.lang.String locale) throws DfException
IDfClient
IDfEnumeration
object that lists all IDfNetworkLocationEntry
objects.getAllNetworkLocations
in interface IDfClient
locale
- identifies the locale (currently not supported)IDfNetworkLocationEntry
objectsDfException
public void addUnavailableAcsServer(java.lang.String urlString) throws DfException
IDfClient
addUnavailableAcsServer
in interface IDfClient
urlString
- URL for the unavailable ACS server, expressed as a StringDfException
public com.documentum.fc.client.transaction.IDfTransactionManager getTransactionManager()
IDfClient
getTransactionManager
in interface IDfClient
public com.documentum.operations.IDfOperationManager newOperationManager() throws DfException
IDfClient
newOperationManager
in interface IDfClient
DfException
public com.documentum.fc.client.license.ILicenseManager getLicenseManager() throws DfException
getLicenseManager
in interface IDfClient
DfException
public void setACS(boolean isACS)
setACS
in interface com.documentum.fc.client.impl.IClientInternal
public boolean isACS()
isACS
in interface com.documentum.fc.client.impl.IClientInternal
public void ignoreFilePathLengthErrors(boolean value)
ignoreFilePathLengthErrors
in interface com.documentum.fc.client.impl.IClientInternal
public boolean shouldIgnoreFilePathLengthErrors()
shouldIgnoreFilePathLengthErrors
in interface com.documentum.fc.client.impl.IClientInternal
Copyright 1994-2023 OpenText Corporation. All rights reserved.