|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.senn.magic.util.DFCUtils
public final class DFCUtils
This class contains useful methods for DFC (Documentum Foundation Classes)
actions.
You need to include the necessary DFC jars in your classpath to be able to use these methods.
Method Summary | |
---|---|
static Object |
callService(String serviceName,
String method,
com.documentum.fc.client.IDfSession session,
Object... args)
Method to call an SBO (Service-Based Business Object) without having to: add the interface jar to your Java classpath import the SBO interface in your class |
static void |
closeCollection(com.documentum.fc.client.IDfCollection collection)
Tries to close a collection if the collection is not null and the state of the
collection is not equal to IDfCollection.DF_CLOSED_STATE . |
static com.documentum.fc.client.IDfSession |
createSession(String userName,
String password,
String docbase,
String domain)
This method creates a Documentum session for the provided credentials. |
static String |
decryptPassword(String encryptedPassword)
Decrypts a password using RegistryPasswordUtils . |
static String |
encryptPassword(String password)
Encrypts a password using RegistryPasswordUtils . |
static com.documentum.fc.client.IDfCollection |
executeExecQuery(String dql,
com.documentum.fc.client.IDfSession session)
This method executes a DQL query (DfQuery.DF_EXEC_QUERY) with the provided session |
static com.documentum.fc.client.IDfCollection |
executeReadQuery(String dql,
com.documentum.fc.client.IDfSession session)
This method executes a DQL query (DfQuery.DF_EXECREAD_QUERY) with the provided session |
static void |
forceSave(com.documentum.fc.client.IDfSysObject sysObj,
com.documentum.fc.client.IDfSession session)
Try to force a save() operation on a sysobject. |
static com.documentum.fc.client.IDfFolder |
getParent(com.documentum.fc.client.IDfSysObject sysObj,
com.documentum.fc.client.IDfSession session)
Gets the first parent of the provided IDfSysObject (= at position 0). |
static com.documentum.fc.client.IDfFolder |
getParentAt(com.documentum.fc.client.IDfSysObject sysObj,
int index,
com.documentum.fc.client.IDfSession session)
Gets the parent of the provided IDfSysObject at the provided position. |
static List<com.documentum.fc.client.IDfFolder> |
getParents(com.documentum.fc.client.IDfSysObject sysObj,
com.documentum.fc.client.IDfSession session)
Gets all parents associated with the IDfSysObject . |
static boolean |
objectExists(com.documentum.fc.common.IDfId objectId,
com.documentum.fc.client.IDfSession session)
This method checks if an object with the specified objectId exists |
static boolean |
objectExists(String objectId,
com.documentum.fc.client.IDfSession session)
This method checks if an object with the specified objectId exists |
static void |
replacePrimaryRendition(File newPrimRend,
String newContentType,
com.documentum.fc.client.IDfDocument doc,
com.documentum.fc.client.IDfSession session)
Sets the primary rendition of a document to the new file and adds the old primary rendition as a normal rendition. |
static void |
replacePrimaryRendition(String newPrimRendPath,
String newContentType,
com.documentum.fc.client.IDfDocument doc,
com.documentum.fc.client.IDfSession session)
Sets the primary rendition of a document to the new file and adds the old primary rendition as a normal rendition. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static com.documentum.fc.client.IDfCollection executeReadQuery(String dql, com.documentum.fc.client.IDfSession session) throws com.documentum.fc.common.DfException
DQL query (DfQuery.DF_EXECREAD_QUERY)
with the provided session
dql
- the DQL query to be executedsession
- the current Documentum session
IDfCollection
a collection with the results
com.documentum.fc.common.DfException
public static com.documentum.fc.client.IDfCollection executeExecQuery(String dql, com.documentum.fc.client.IDfSession session) throws com.documentum.fc.common.DfException
DQL query (DfQuery.DF_EXEC_QUERY)
with the provided session
dql
- the DQL query to be executedsession
- the current Documentum session
IDfCollection
a collection with the results
com.documentum.fc.common.DfException
public static com.documentum.fc.client.IDfSession createSession(String userName, String password, String docbase, String domain) throws com.documentum.fc.common.DfException
userName
- the Documentum usernamepassword
- the Documentum passworddocbase
- the Documentum docbase/repositorydomain
- the Documentum domain, may be left null
if not needed
IDfSession
a Documentum session for the provided credentials
com.documentum.fc.common.DfException
public static boolean objectExists(String objectId, com.documentum.fc.client.IDfSession session) throws com.documentum.fc.common.DfException
objectId
exists
objectId
- the objectId as a stringsession
- the Documentum session
boolean
true
if the object exists, false
if it doesn't
com.documentum.fc.common.DfException
objectExists(IDfId, IDfSession)
public static boolean objectExists(com.documentum.fc.common.IDfId objectId, com.documentum.fc.client.IDfSession session) throws com.documentum.fc.common.DfException
objectId
exists
objectId
- the objectId as an implementation of IDfIdsession
- the Documentum session
boolean
true
if the object exists, false
if it doesn't
com.documentum.fc.common.DfException
objectExists(String, IDfSession)
public static Object callService(String serviceName, String method, com.documentum.fc.client.IDfSession session, Object... args) throws com.documentum.fc.common.DfException
serviceName
- the name of the SBO servicemethod
- the name of the methodsession
- a valid Documentum sessionargs
- the arguments to pass to the SBO-method
Object
- the return value as an object.
null
is returned when the method has no return value.
com.documentum.fc.common.DfException
ReflectionUtils.invoke(Object, String, Object...)
public static com.documentum.fc.client.IDfFolder getParent(com.documentum.fc.client.IDfSysObject sysObj, com.documentum.fc.client.IDfSession session) throws com.documentum.fc.common.DfException
IDfSysObject
(= at position 0).
sysObj
- the sysobjectsession
- a valid Documentum session
IDfFolder
- the parent folder of the sysobject
com.documentum.fc.common.DfException
getParentAt(IDfSysObject, int, IDfSession)
public static com.documentum.fc.client.IDfFolder getParentAt(com.documentum.fc.client.IDfSysObject sysObj, int index, com.documentum.fc.client.IDfSession session) throws com.documentum.fc.common.DfException
IDfSysObject
at the provided position.
sysObj
- the sysobjectindex
- the index to get the parentsession
- a valid Documentum session
IDfFolder
- the parent folder of the sysobject
com.documentum.fc.common.DfException
public static List<com.documentum.fc.client.IDfFolder> getParents(com.documentum.fc.client.IDfSysObject sysObj, com.documentum.fc.client.IDfSession session) throws com.documentum.fc.common.DfException
IDfSysObject
.
sysObj
- the sysobjectsession
- a valid Documentum session
List
- a list of IDfFolder
instances
com.documentum.fc.common.DfException
public static void replacePrimaryRendition(File newPrimRend, String newContentType, com.documentum.fc.client.IDfDocument doc, com.documentum.fc.client.IDfSession session) throws com.documentum.fc.common.DfException
newPrimRend
- the new primary renditiondoc
- the documentsession
- a valid Documentum session
com.documentum.fc.common.DfException
replacePrimaryRendition(String, String, IDfDocument, IDfSession)
public static void replacePrimaryRendition(String newPrimRendPath, String newContentType, com.documentum.fc.client.IDfDocument doc, com.documentum.fc.client.IDfSession session) throws com.documentum.fc.common.DfException
newPrimRendPath
- the path to the new primary renditiondoc
- the documentsession
- a valid Documentum session
com.documentum.fc.common.DfException
replacePrimaryRendition(File, String, IDfDocument, IDfSession)
public static void forceSave(com.documentum.fc.client.IDfSysObject sysObj, com.documentum.fc.client.IDfSession session) throws com.documentum.fc.common.DfException
save()
operation on a sysobject.
sysObj
- the sysobjectsession
- a valid Documentum session
com.documentum.fc.common.DfException
public static void closeCollection(com.documentum.fc.client.IDfCollection collection) throws com.documentum.fc.common.DfException
null
and the state of the
collection is not equal to IDfCollection.DF_CLOSED_STATE
.
collection
- the collection to close
com.documentum.fc.common.DfException
public static String encryptPassword(String password) throws com.documentum.fc.common.DfException
RegistryPasswordUtils
.
password
- the password to encrypt
String
- the encrypted password
com.documentum.fc.common.DfException
public static String decryptPassword(String encryptedPassword) throws com.documentum.fc.common.DfException
RegistryPasswordUtils
.
encryptedPassword
- the password to decrypt
String
- the decrypted password
com.documentum.fc.common.DfException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |