Package com.saperion.rmi.common
Interface SaRMIServerCommand
- All Superinterfaces:
Remote
Server-side Command interface representing the functionality of the core server.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addComment
(int token, String comment, String taskUID, int level) void
addHistory
(int token, String description, String taskUID) void
addToFolder
(int token, String folderTableDDC, String documentId, String documentDDC, String folderId) Adds the document to a given folder.cacheDocument
(int token, boolean isNew, int commitMode, String versionComment, String xhDoc, String ddcName, String acls) Caches the current document to the backend.void
changePassword
(String user, String oldPassword, String client, String newPassword) Changes the password of an existing user.void
checkoutDocument
(int token, String documentHdoc) Checkout the document with the given HDOC.void
checkoutDocument
(int token, String documentHdoc, boolean withCloudShare, int[] shareBaseDocIds) Checkout the document with filesystem/ShareBase for the given HDOC.checkSapUrl
(int clientToken, String url) Checks the given SAP URL on the R/Link server and returns, if successfull, the HDOC and the DDC.void
clearContent
(int token) Clears all content of the opened document.void
closeDocument
(int token, com.saperion.jni.SaJNIDocHandle handle) Manually closing of a open document.boolean
closeSession
(int token, com.saperion.connector.authentication.Session session) Close the givenSession
of the user identified by the given tokencopyFolder
(int token, String folderTableDDC, String folderId, String destinationId, String beforeChild, boolean withDocuments) Copies the given node and all it’s children to the destination.long
countTasks
(int token, int[] ids, String filter, Map<String, Object> filterParams) Counts the tasks that are contained in the specified inbox(es).createDocument
(int token, String ddcName, List<SaPropertyValue> values) Caches a new document with the given parameters.void
createExternalStorageFolderMapping
(int token, SaperionExternalStorageMappingInfo mappingInfo) Stores the mapping information about Saperion document and External Storage foldercreateFolder
(int token, SaFolderSaveInfo info) Creates a new node below a given node.createLink
(int token, LinkInfo link) Creates a SAPERION Link into one Archive for an existing Document.deleteDocument
(int token, int mode, String hdoc) Delete a document.int
deleteExternalStorageFolderMapping
(int token, Date expiryTime, List<ExternalStorageDocUploadStatus> statusList) Deletes external storage mappings for given status and older than the given timevoid
deleteFolder
(int token, String folderTableDDC, String folderId) Deletes a given node.boolean
deleteSetting
(int token, String name, String section, boolean isLong) Deletes a setting in the database.void
discardCheckout
(int token, String documentHdoc) Discard a checked out document.void
discardDocument
(int token) Discards the document identified by the tokens handle.executeCommand
(int token, ContextInfo contextInfo) Performs the given command.void
finishSQLTransaction
(int token, boolean commit, String ddcName) Finish SQL transaction.void
finishTransaction
(int token, boolean commit) Finish the transaction in the backend system.getACLNames
(int token, String hDoc) Reads the ACL's for the given document.getACLRights
(int token, String[] acls) Reads the rights for the given ACL's.getAcls
(int token) Reads all existing Acls.getAllACLs
(int token) Deprecated.getAnnotations
(int token, int indexOfContentElement, String hDoc, boolean currentRevision) Reads the annotations from the given document.int
getArchivedSize
(int clientToken, String hDoc) Returns the total document size in archive.getAuthorizedUsers
(int clientToken, String hDoc, String rights, MatchKind match) Returns the users, that have specific rights on a document.getBoxCount
(int token, int boxId, BoxCountType type, Map<String, Object> parameters) Returns the number of all elements and of all unread elements of the inbox identified by the given id.getBoxCounts
(int token, Set<Integer> boxId, BoxCountType type, Map<String, Object> parameters) Returns the number of all elements and of all unread elements of the inboxes identified by the given ids.getBoxDefinitions
(int token) Reads the box definitions.getCommandInfos
(int token, String docUID) Reads all possible transitions for this task.getCommandInfos
(int token, String docUID, boolean transitionsOnly) Reads all possible transitions for this task.getCommentInfos
(int token, String taskUID) Reads the comments for the given task.getCompleteHistoryInfos
(int token, String docUID) Reads the histories and comments for the given document.com.lexmark.saperion.administration.RoleType
getCurrentUserRole
(int token) Returns information about the specified DDC.long
getDocumentFolderCount
(int token, String folderTableDDC, String documentDDC, String sysRowId) Returns the total count over all folders from all users in which the specified document is contained in.getDocumentFolders
(int token, String folderTableDDC, String documentDDC, String sysRowId) Returns a list of folder properties which contains all nodes the document is contained in.boolean
getEventsEnabled
(int clientToken) Returns whether events (e.g.getExternalStorageFoldersForUpload
(int token) Fetches all folders of all External Storage services from where documents need to be uploadedgetExternalStorageFoldersForUpload
(int token, ExternalStorageType storageType) Fetches all folders of provided External Storage from where documents need to be uploadedgetExternalStorageMapping
(int token, String sysRowId) Fetches the external storage mapping for the provided SysRowIdgetFieldDescriptions
(int token, String ddcName) Reads the field descriptions for a given DDC.getFolderChildren
(int token, String folderTableDDC, String folderId, int depth, SaQueryInfo filter, int allowedMaxNrOfChildFolders) Returns a cursor with the children of the given node.getFolderClass
(int clientToken, String className) Reads the folder class with the given name.getFolderFromPath
(int token, String folderTableDDC, String startNodeId, String folderPath, boolean exact) Returns the node(s) which match to the given path.getFolderInfo
(int token, String folderTableDDC, String folderId, boolean forceLoadVariables) Reads the folder info object for the given folder.getFolderParent
(int token, String folderTableDDC, String folderId) Returns the parent of the given node.getFolderRights
(int token, String folderTableDDC, String folderId) Returns the rights mask for the given folder and user.getFolderUpdateInfo
(int clientToken, Map<String, Long> sysrowids) Calculates a cut set of folders that shall be refreshed on client side.getFulltext
(int token, String ddcName, String sysRowId, String hdoc, String fieldName, long length) Reads the fulltext information for the given document with the given SYSROWID in the given DDC.getFullTextFields
(int token, String ddcName, List<String> fullTextFields, String hdoc) Fetches values of Full text columnsgetHDocForSysRowId
(int token, String sysRowId, String ddcName) Searchs the HDOC for the given SysRowId.getHistoryInfos
(int token, String taskUID) Reads the history for the given task.getIdsFromQuery
(int token, String query, boolean isSQL) Executes a HQL query and returns the results as a string list.getInjector
(int clientToken) This method returns the injector for the given session.getInvolvedUsers
(int token, String hDoc) Reads all users involved in the set of ACL's.getLockInfo
(int token, String sysRowId) Gets the lock info for a given node.getMember
(int token, WorkflowMember member, int depth, String filter) Reads direct workflow member.getMembers
(int token) Reads the member.com.saperion.jni.SaJNIDocAccessData
getNodeAccessData
(int token, String hdoc) Opens the document identified by hdoc and returns an object containing all access right data information for the session user.boolean
getOutOfOffice
(int token) Get the out of office status for the logged on user.getParentTask
(int token, String taskID) Reads the parent task info for the given ID.Determine the RMI interface version.getSetting
(int token, String name, String section, boolean isLong) Reads the setting with the specified name and section.com.lexmark.saperion.remote.common.operations.document.content.stream.StreamingConfiguration
This method returns the currentstreaming configuration
.getStringQueryResult
(int token, SaQueryInfo queryInfo) Executes a given HQL string and returns the results as list.getSubstitute
(int token) Get the substitute for the logged on user.getSystemFiles
(int clientToken, SystemFileKind kind, String filter) Gets the system files of a specific kind.Reads the task info for the given ID.getTaskAuditList
(int token, int[] ids, String filter, Map<String, Object> parameter) Reads the task for this user.getTaskList
(int token, int[] ids, String filter, Map<String, Object> parameter) Reads the task for this user.byte[]
getThumbnail
(int token, String hDoc, int widthX, int widthY, boolean color) Reads the thumbnail of the given document.int[]
getUserIdsForQuery
(int token) Read the userids.Reads a list of filtered users.getUserSetting
(int token, String key) Reads the user-specific settings for the given key.getVersionList
(int token, String ddcName, String sysrowID) Reads the versionlist for the given document.getWorkflowDefinitions
(int token) Reads all available workflow definitions.getWorkflowDefinitions
(String ddcName, int token) Returns the workflow definitions that are allowed to be used for documents contained in the specified DDC.<T extends Serializable>
Tinvoke
(int clientToken, com.lexmark.saperion.remote.common.operations.Operation<T, SaBasicException, LegacyConnection> operation) This method invokes anOperation
on the server side.boolean
isAlive
(int token) Checks, if the token has minimum lifetime before timeout.boolean
isRevisionEnabled
(int token, String ddcName) Gets the information whether the provided ddc table contains the fields required for revisions.List<com.saperion.connector.authentication.Session>
listActiveSessions
(int token) List the active sessions of the user identified by given token.String[]
loadDDCNames
(int token) Retrieves the avaiable DDC names.String[]
loadFolderDDCNames
(int token) Retrieves the avaiable folder DDC names.byte[]
loadSystemFile
(int clientToken, SystemFileKind kind, String name) Loads a system file of a specific kind.Retrieves the workflow DDC name.boolean
Locks a node.void
logClientEvent
(int token, String hdoc, SaConstants.ProtoEvents event, String remark) Adds an audit log event.boolean
logoff
(int token) Logoff the user from the server instance.com.saperion.connector.authentication.Session
logon
(com.lexmark.saperion.remote.common.authentication.Credentials credentials) Logon with the passed credentials.com.saperion.connector.authentication.Session
logon
(com.lexmark.saperion.remote.common.authentication.Credentials credentials, com.saperion.connector.authentication.SessionInfo sessionInfo) Logon with the passed credentials and associate the given session information.void
moveFolder
(int token, String folderTableDDC, String folderId, String destinationId, String beforeChild) Moves the given node to a new destination.void
moveToFolder
(int token, String folderTableDDC, String documentId, String documentDDC, String folderId, String destinationId) Moves the document’s filing to the given node.<ResultType extends Serializable,
ExceptionType extends Exception>
ResultTypenewInvoke
(int clientToken, com.lexmark.saperion.remote.common.operations.Operation<ResultType, ExceptionType, com.lexmark.saperion.remote.common.Connection> operation) This method invokes anOperation
that throwsecm exceptions
on the server side.com.saperion.jni.SaJNIReadBuffer
readDocumentFirst
(int token, String hdoc, boolean currentRevision, int element) Opens an existing document with the given hdoc and returns a document handle for the specified element (= sub-document) as well as the buffer containing the content data of the element.com.saperion.jni.SaJNIReadBuffer
readDocumentFirst
(int token, String hdoc, boolean currentRevision, int element, boolean withAnnotations) Opens an existing document with the given hdoc and returns a document handle for the specified element (= sub-document) as well as the buffer containing the content data of the element.readDocumentMetadata
(int token, String documentHDOC, String ddcName, String[] fields) Reads the metadata of the document with the given ID.com.saperion.jni.SaJNIReadBuffer
readDocumentNext
(int token, com.saperion.jni.SaJNIDocHandle handle) Reads the next bytes from the open document, decribed in the handle.readVersionMetadata
(int token, String versionID) Reads the version metadata of the document with the given ID.readVersionMetadata
(int token, String versionID, boolean resolveLinks) Reads the version metadata of the document with the given ID.void
releaseDocument
(int token, String documentHdoc, String comment) Release the document with the given HDOC.void
removeElement
(int token, int element) Removes a existing content element.void
removeElement
(int token, Integer[] elements) Removes a series of existing content elements.void
removeFromFolder
(int token, String folderTableDDC, String documentSysRowId, String documentDDC, String folderId) Remove the document filing from the given node.resolveLatestHdoc
(int token, String oldHdoc) Resolves the hdoc of the latest version of the document identified by the given hdoc.restoreVersion
(int token, String versionID) Restores the given version to the actual version.saveDocument
(int token, String nodeHdoc, String ddcName, List<SaPropertyValue> values) Saves the document parameters to the document.saveDocument
(int token, String nodeHdoc, String ddcName, List<SaPropertyValue> values, boolean resolveLinks) Saves the document parameters to the document.searchFolderClass
(int clientToken, SaFolderClassSearchInfo searchInfo) Searches for folder classes with the specified properties.searchFolderDocuments
(int token, String folderTableDDC, String folderId, SaQueryInfo hqlFilter) HQL search extended with additional folder informations and depth.searchSettings
(int token, SettingSearchInfo searchInfo) Searches for settings.void
sendBarcode
(int clientToken, String indexMask, String docUid, String contentRep, String sid, String docType, String value, int mandant) Send barcode to SAP.setACLName
(int token, String ddcname, String hDoc, String acl, int commitMode, String versionComment) Sets the given ACL to the node.void
setAnnotations
(int token, String hDoc, int indexOfContentElement, String annotations) Sets the given annotations to the document.void
setDocumentState
(int clientToken, String ddcName, String hdoc, String value) Sets the SYSDOCUMENTSTATE value of a document to the specified value without creating a new revision.void
setElementMark
(int token, int element) Mark the content element.void
setEventsEnabled
(int clientToken, boolean enabled) Sets whether events (e.g.void
setFolderAcl
(int token, String folderTableDDC, String folderId, String aclName) Sets an ACL for the given folder.void
Set the locale for localization.void
setOutOfOffice
(int token, boolean isOutOfOffice) Set the out of office status for the logged on user.void
setSetting
(int token, Setting setting) Persists the setting in the database.void
setSubstitute
(int token, String name) Set the substitute for the logged on user.void
setUserSetting
(int token, SaUserSetting value) Persists user-specific settings to the saperion backend.void
setVariables
(int clientToken, int element, Map<String, String> variables) Method to set the Variables for an Content-Object or the Structure itself.void
startSQLTransaction
(int token, String ddcName) Start SQL transaction.void
startTransaction
(int token) Starts a transaction in the backend system.storeDocument
(int token, boolean isNew, int commitMode, String versionComment, String ddcName, String acls) Stores the actual document to the backend.storeDocument
(int token, boolean isNew, int commitMode, String versionComment, String ddcName, String acls, boolean checkin) Stores the actual document to the backend.void
storeSystemFile
(int clientToken, SystemFileKind kind, String name, byte[] data) Stores a system file of a specific kind.boolean
unlockNode
(int token, String sysRowId, String ddcName) Unlocks a node.void
updateExternalStorageUploadStatus
(int token, String folderId, ExternalStorageDocUploadStatus status, ExternalStorageType storageType) Updates the upload status of External Storage foldervoid
updateFolder
(int token, String folderTableDDC, String folderId, List<SaPropertyValue> values) Updates a given node with the given properties.long
writeDocument
(int token, SerializableStream stream) Write document.long
writeDocument
(int token, String filename, byte[] buffer, boolean isLast, int element) Writes given binary content to an existing document object.long
writeDocument
(int token, String filename, byte[] buffer, boolean isLast, int element, boolean doStreaming) Writes given binary content to an existing document object.
-
Method Details
-
isRevisionEnabled
Gets the information whether the provided ddc table contains the fields required for revisions.- Parameters:
token
- user token numberddcName
- table/jcr workspace name- Returns:
- true, if the revision fields are present. False otherwise.
- Throws:
RemoteException
- Remote exception
-
logon
com.saperion.connector.authentication.Session logon(com.lexmark.saperion.remote.common.authentication.Credentials credentials) throws RemoteException, com.lexmark.saperion.exceptions.EcmException Logon with the passed credentials.- Parameters:
credentials
- credentials which should be used for logon- Returns:
- the session information about the created one
- Throws:
RemoteException
- error on user logincom.lexmark.saperion.exceptions.EcmException
-
logon
com.saperion.connector.authentication.Session logon(com.lexmark.saperion.remote.common.authentication.Credentials credentials, com.saperion.connector.authentication.SessionInfo sessionInfo) throws RemoteException, com.lexmark.saperion.exceptions.EcmException Logon with the passed credentials and associate the given session information.- Parameters:
credentials
- The credentials which should be used for logonsessionInfo
- The session information- Returns:
- An instance of
Session
- Throws:
RemoteException
com.lexmark.saperion.exceptions.EcmException
-
listActiveSessions
List<com.saperion.connector.authentication.Session> listActiveSessions(int token) throws RemoteException List the active sessions of the user identified by given token.- Parameters:
token
-- Returns:
- List of
Session
- Throws:
RemoteException
-
closeSession
boolean closeSession(int token, com.saperion.connector.authentication.Session session) throws RemoteException Close the givenSession
of the user identified by the given token- Parameters:
token
-session
-- Returns:
- true if logged off successfully, false otherwise
- Throws:
RemoteException
-
getUserIdsForQuery
Read the userids.- Parameters:
token
- User token- Returns:
- User ids
- Throws:
RemoteException
- SaRMICommandException
-
logoff
Logoff the user from the server instance.- Parameters:
token
- User token- Returns:
- True, if done.
- Throws:
RemoteException
- error on user logoff
-
setLocale
Set the locale for localization.- Parameters:
token
- User tokenlocal
- Locale- Throws:
RemoteException
- Exception
-
getMembers
Reads the member.- Parameters:
token
- User token- Returns:
- Member tree
- Throws:
RemoteException
- Remote exception
-
getMember
WorkflowMember getMember(int token, WorkflowMember member, int depth, String filter) throws RemoteException Reads direct workflow member.- Parameters:
token
- User tokenmember
- workflow member, witch direct children will be returneddepth
- depth of the returned children.filter
- filter string- Returns:
- Member tree
- Throws:
RemoteException
- Remote exception
-
loadDDCNames
Retrieves the avaiable DDC names.- Parameters:
token
- User token- Returns:
- Array of DDC names
- Throws:
RemoteException
- Error on the saperion system
-
loadFolderDDCNames
Retrieves the avaiable folder DDC names.- Parameters:
token
- User token- Returns:
- Array of folder DDC names
- Throws:
RemoteException
- Error on the saperion system
-
loadWorkflowDDCName
Retrieves the workflow DDC name.- Returns:
- workflow DDC names
- Throws:
RemoteException
- Error on the saperion system
-
getFieldDescriptions
Reads the field descriptions for a given DDC.- Parameters:
token
- User tokenddcName
- DDC name- Returns:
- Array of field description objects
- Throws:
RemoteException
- Error on the saperion system
-
getUserSetting
Reads the user-specific settings for the given key.- Parameters:
token
- User tokenkey
- Dot-delimited key- Returns:
SaUserSetting
- Throws:
RemoteException
- Error on the saperion system
-
setUserSetting
Persists user-specific settings to the saperion backend.- Parameters:
token
- User tokenvalue
- user setting object- Throws:
RemoteException
- Error on the saperion system
-
getSetting
Reads the setting with the specified name and section.- Parameters:
token
- User tokenname
- the setting's namesection
- the setting's sectionisLong
- whether this is a setting with a long (>2KB) value or not- Returns:
- the setting or null if no setting with the given key and section was found
- Throws:
RemoteException
- Error when retrieving the setting
-
searchSettings
Searches for settings.- Parameters:
token
- User tokensearchInfo
-SettingSearchInfo
containing information about what to search- Returns:
- a
SettingSearchResult
- Throws:
RemoteException
- system error when searching
-
setSetting
Persists the setting in the database.- Parameters:
token
- User tokensetting
- the setting to persist- Throws:
RemoteException
- Error when persisting the setting
-
deleteSetting
boolean deleteSetting(int token, String name, String section, boolean isLong) throws RemoteException Deletes a setting in the database.- Parameters:
token
- User tokenname
- the name of the setting to deletesection
- the section of the setting to deleteisLong
- whether this is a setting with a long (>2KB) value or not- Returns:
- true if setting was deleted, false if there was no such setting
- Throws:
RemoteException
- Error when deleting the setting
-
getAllACLs
Deprecated.usegetAcls(int)
insteadReads all existing ACL names.- Parameters:
token
- User token- Returns:
- List of ACL names
- Throws:
RemoteException
- Remote exception
-
getAcls
Reads all existing Acls.- Parameters:
token
- User token- Returns:
- List of ACLs
- Throws:
RemoteException
- Remote exception
-
readDocumentFirst
com.saperion.jni.SaJNIReadBuffer readDocumentFirst(int token, String hdoc, boolean currentRevision, int element) throws RemoteException Opens an existing document with the given hdoc and returns a document handle for the specified element (= sub-document) as well as the buffer containing the content data of the element. If this was the last block, the document is automatically closed.- Parameters:
token
- User tokenhdoc
- Document HDOCcurrentRevision
- flag indicating that the current revision of the document should be retrieved by resolving hdocelement
- Element number, starting with 1- Returns:
- The document handle and the buffer with the content
- Throws:
RemoteException
- Error on the saperion system
-
readDocumentFirst
com.saperion.jni.SaJNIReadBuffer readDocumentFirst(int token, String hdoc, boolean currentRevision, int element, boolean withAnnotations) throws RemoteException Opens an existing document with the given hdoc and returns a document handle for the specified element (= sub-document) as well as the buffer containing the content data of the element. If this was the last block, the document is automatically closed.- Parameters:
token
- User tokenhdoc
- Document HDOCcurrentRevision
- flag indicating that the current revision of the document should be retrieved by resolving hdocelement
- Element number, starting with 1withAnnotations
- if true, annotations will be saved on the document- Returns:
- The document handle and the buffer with the content
- Throws:
RemoteException
- Error on the saperion system
-
readDocumentMetadata
SaPropertyValue[] readDocumentMetadata(int token, String documentHDOC, String ddcName, String[] fields) throws RemoteException, SaSystemException Reads the metadata of the document with the given ID.- Parameters:
token
- TokendocumentHDOC
- The ID of the document (SYSROWID)ddcName
- The name of the database definitionfields
- Fieldnames to be read. If empty or null, all fields will be read.- Returns:
- The Metadata of the document represented as an array of
SaPropertyValue
instances. - Throws:
RemoteException
- RemoteExceptionSaSystemException
-
getFulltext
String getFulltext(int token, String ddcName, String sysRowId, String hdoc, String fieldName, long length) throws RemoteException Reads the fulltext information for the given document with the given SYSROWID in the given DDC.- Parameters:
token
- TokenddcName
- DDC name of the documentsysRowId
- SYSROWID of the document. Can be null if hdoc is set. If both hdoc and sysRowId are set, hdoc will be used.hdoc
- HDOC of the document. Can be null if sysRowId is set. If both hdoc and sysRowId are set, hdoc will be used.fieldName
- name of the fulltext field to retrieve content from. If not set, the first fulltext field of the DDC will be usedlength
- maximum length of content to retrieve. If -1, the complete content will be returned.- Returns:
- Content of the fulltext for this document
- Throws:
RemoteException
- RemoteException
-
getThumbnail
byte[] getThumbnail(int token, String hDoc, int widthX, int widthY, boolean color) throws RemoteException Reads the thumbnail of the given document.- Parameters:
token
- TokenhDoc
- HDoc for the document.widthX
- Width XwidthY
- Width Ycolor
- True for colored- Returns:
- Thumbnail BMP as byte array
- Throws:
RemoteException
- RemoteException
-
readDocumentNext
com.saperion.jni.SaJNIReadBuffer readDocumentNext(int token, com.saperion.jni.SaJNIDocHandle handle) throws RemoteException Reads the next bytes from the open document, decribed in the handle. If this was the last block, the document is automatically closed.- Parameters:
token
- Usertokenhandle
- Document handle for a document, opend by readDocumentFirst- Returns:
- The document handle and the buffer with the content
- Throws:
RemoteException
- Error on the saperion system
-
readVersionMetadata
Reads the version metadata of the document with the given ID.- Parameters:
token
- User tokenversionID
- Version HDOC- Returns:
- Document revision data
- Throws:
RemoteException
- Remote exception
-
readVersionMetadata
SaVersionData readVersionMetadata(int token, String versionID, boolean resolveLinks) throws RemoteException Reads the version metadata of the document with the given ID.- Parameters:
token
- User tokenresolveLinks
- If false will not resolve the link and show the metadata associated with the link itself.versionID
- Version HDOC- Returns:
- Document revision data
- Throws:
RemoteException
- Remote exception
-
restoreVersion
Restores the given version to the actual version.- Parameters:
token
- User tokenversionID
- Version HDOC- Returns:
- Document save info
- Throws:
RemoteException
- Remote exception
-
closeDocument
Manually closing of a open document.- Parameters:
token
- Usertokenhandle
- Document handle for a document, opend by readDocumentFirst- Throws:
RemoteException
- Error on the saperion system
-
deleteDocument
Delete a document.- Parameters:
token
- Usertokenmode
- Delete mode may be set to the following values:- SaConstant.JNI_DELETECONTENT_MODE_DBSIMPLE = 0 Set status to 65002
- SaConstant.JNI_DELETECONTENT_MODE_DBCOMPLETE = 1 - remove from DB
- SaConstant.JNI_DELETECONTENT_MODE_PURGEDOCUMENT = 2 -Final delete
- SaConstant.DELETEMODE = "deletemode" -Deletemode entry in archief.ini;
hdoc
- Document HDOC- Returns:
- SaSaveInfo or null
- Throws:
RemoteException
- Error on the saperion system
-
cacheDocument
SaSaveInfo cacheDocument(int token, boolean isNew, int commitMode, String versionComment, String xhDoc, String ddcName, String acls) throws RemoteException Caches the current document to the backend.- Parameters:
token
- UsertokenisNew
- Is a new documentcommitMode
- Commit modeversionComment
- Version comment stringddcName
- DDC nameacls
- ACL name string, ifnull
it will be ignored, to delete existing ACLs set an empty stringxhDoc
- the document's hdoc- Returns:
- Node information object
- Throws:
RemoteException
- RMI Exception
-
createDocument
SaSaveInfo createDocument(int token, String ddcName, List<SaPropertyValue> values) throws RemoteException Caches a new document with the given parameters.- Parameters:
token
- User token (an int variable to authentificate an user)ddcName
- Node database table namevalues
- List of all values- Returns:
- Node information object
- Throws:
RemoteException
- RMI Exception
-
createLink
Creates a SAPERION Link into one Archive for an existing Document.- Parameters:
token
- User token (an int variable to authentificate an user)link
- Link for the existing Document- Returns:
- Save Info after the Link was created
- Throws:
RemoteException
- RMI Exception
-
saveDocument
SaSaveInfo saveDocument(int token, String nodeHdoc, String ddcName, List<SaPropertyValue> values) throws RemoteException Saves the document parameters to the document.- Parameters:
token
- UsertokennodeHdoc
- Node HDOCddcName
- Database table namevalues
- List of all values- Returns:
- written node informations
- Throws:
RemoteException
- RMI Exception
-
saveDocument
SaSaveInfo saveDocument(int token, String nodeHdoc, String ddcName, List<SaPropertyValue> values, boolean resolveLinks) throws RemoteException Saves the document parameters to the document.- Parameters:
token
- UsertokennodeHdoc
- Node HDOCddcName
- Database table namevalues
- List of all valuesresolveLinks
- Resolve links- Returns:
- written node informations
- Throws:
RemoteException
- RMI Exception
-
storeDocument
SaSaveInfo storeDocument(int token, boolean isNew, int commitMode, String versionComment, String ddcName, String acls) throws RemoteException Stores the actual document to the backend.- Parameters:
token
- UsertokenisNew
- Is a new documentcommitMode
- Commit modeversionComment
- Version comment stringddcName
- DDC nameacls
- ACL name string, ifnull
it will be ignored, to delete existing ACLs set an empty string- Returns:
- Node information object
- Throws:
RemoteException
- RMI Exception
-
storeDocument
SaSaveInfo storeDocument(int token, boolean isNew, int commitMode, String versionComment, String ddcName, String acls, boolean checkin) throws RemoteException Stores the actual document to the backend.- Parameters:
token
- UsertokenisNew
- Is a new documentcommitMode
- Commit modeversionComment
- Version comment stringddcName
- DDC nameacls
- ACL name string, ifnull
it will be ignored, to delete existing ACLs set an empty stringcheckin
- Checkin document (only valid for update)- Returns:
- Node information object
- Throws:
RemoteException
- RMI Exception
-
discardDocument
Discards the document identified by the tokens handle. Cleans up temporary document resources and open handles.- Parameters:
token
- Usertoken- Throws:
RemoteException
- RMI Exception
-
checkoutDocument
Checkout the document with the given HDOC. The document must be stored.- Parameters:
token
- User tokendocumentHdoc
- Document HDOC- Throws:
RemoteException
- RMI exception
-
checkoutDocument
void checkoutDocument(int token, String documentHdoc, boolean withCloudShare, int[] shareBaseDocIds) throws RemoteException Checkout the document with filesystem/ShareBase for the given HDOC. The document must be stored. Checkout a open document- Parameters:
token
- User tokendocumentHdoc
- * Document HDOCwithCloudShare
- true if open document is checked out with ShareBase else falseshareBaseDocIds
- Array of sharebase doc ids for open checkout docs- Throws:
RemoteException
- RMI exception
-
discardCheckout
Discard a checked out document.- Parameters:
token
- User tokendocumentHdoc
- Document HDOC- Throws:
RemoteException
- RMI exception
-
releaseDocument
Release the document with the given HDOC. The document must be stored. ACLs and SVRELEASE variable are set.- Parameters:
token
- User tokendocumentHdoc
- Document HDOCcomment
- the revision comment- Throws:
RemoteException
- RMI exception
-
writeDocument
long writeDocument(int token, String filename, byte[] buffer, boolean isLast, int element) throws RemoteException Writes given binary content to an existing document object.- Parameters:
token
- User tokenfilename
- File name of content, set on first invocationbuffer
- Buffer containing content dataisLast
- True if this is the last block of dataelement
- Element number or -1 for automatic- Returns:
- Actual element count
- Throws:
RemoteException
- Wrapped SaJNIException and SaRMIException
-
writeDocument
long writeDocument(int token, String filename, byte[] buffer, boolean isLast, int element, boolean doStreaming) throws RemoteException Writes given binary content to an existing document object.- Parameters:
token
- User tokenfilename
- File name of content, set on first invocationbuffer
- Buffer containing content dataisLast
- True if this is the last block of datadoStreaming
- True if streaming option of content data is activated.element
- Element number or -1 for automatic- Returns:
- Actual element count
- Throws:
RemoteException
- Wrapped SaJNIException and SaRMIException
-
writeDocument
Write document.- Parameters:
token
- the User tokenstream
- the stream to write- Returns:
- the Actual element count
- Throws:
RemoteException
- the remote exception
-
setElementMark
Mark the content element.- Parameters:
token
- User tokenelement
- Element number to mark- Throws:
RemoteException
- Wrapped SaJNIException and SaRMIException
-
removeElement
Removes a existing content element.- Parameters:
token
- User tokenelement
- Element number- Throws:
RemoteException
- Wrapped SaJNIException and SaRMIException
-
removeElement
Removes a series of existing content elements.- Parameters:
token
- User tokenelements
- Array of element number- Throws:
RemoteException
- Wrapped SaJNIException and SaRMIException
-
clearContent
Clears all content of the opened document.- Parameters:
token
- Usertoken- Throws:
RemoteException
- Wrapped SaJNIException and SaRMIException
-
lockNode
boolean lockNode(int token, String sysRowId, String ddcName, int lockType, boolean sessionScoped) throws RemoteException Locks a node.- Parameters:
token
- UsertokensysRowId
- SysRowIdddcName
- DDC namelockType
- locking mode can be one of the following constants:- SaConstant.LOCKING_LOCKTYPE_DEFAULT = 0;
- SaConstant.LOCKING_LOCKTYPE_JSRLOCK = 1;
- SaConstant.LOCKING_LOCKTYPE_JSRCHECKOUT = 2;
sessionScoped
- True, if session scoped- Returns:
- True, if ok
- Throws:
RemoteException
- Wrapped SaJNIException and SaRMIException
-
unlockNode
Unlocks a node.- Parameters:
token
- UsertokensysRowId
- SysRowIdddcName
- DDC name- Returns:
- True, if ok
- Throws:
RemoteException
- Wrapped SaJNIException and SaRMIException
-
getLockInfo
Gets the lock info for a given node.- Parameters:
token
- UsertokensysRowId
- SysRowId- Returns:
- Lockinfo
- Throws:
RemoteException
- Wrapped SaJNIException and SaRMIException
-
getNodeAccessData
com.saperion.jni.SaJNIDocAccessData getNodeAccessData(int token, String hdoc) throws RemoteException Opens the document identified by hdoc and returns an object containing all access right data information for the session user.- Parameters:
token
- User tokenhdoc
- Document HDOC- Returns:
- SaJNIDocAccessData Document access data for session user
- Throws:
RemoteException
- Wrapped SaJNIException and SaRMIException
-
startTransaction
Starts a transaction in the backend system.- Parameters:
token
- Usertoken- Throws:
RemoteException
- Wrapped SaJNIException and SaRMIException
-
finishTransaction
Finish the transaction in the backend system.- Parameters:
token
- Usertokencommit
- True, if commit this transaction, false to rollback- Throws:
RemoteException
- Wrapped SaJNIException and SaRMIException
-
getIdsFromQuery
Executes a HQL query and returns the results as a string list.- Parameters:
token
- User tokenquery
- HQL queryisSQL
- isSQL- Returns:
- List string result list
- Throws:
RemoteException
- Remote exception
-
getStringQueryResult
List<SaDocumentInfo> getStringQueryResult(int token, SaQueryInfo queryInfo) throws RemoteException, SaSystemException Executes a given HQL string and returns the results as list.- Parameters:
token
- User tokenqueryInfo
- HQL query info- Returns:
- Result list
- Throws:
RemoteException
- Remote exceptionSaSystemException
-
getVersionList
Reads the versionlist for the given document.- Parameters:
token
- User tokenddcName
- DDC namesysrowID
- SYSROWID- Returns:
- List of HDOC's
- Throws:
RemoteException
- Remote exception
-
getACLNames
Reads the ACL's for the given document.- Parameters:
token
- User tokenhDoc
- Document HDOC- Returns:
- ACL name string
- Throws:
RemoteException
- RemoteException
-
setACLName
SaSaveInfo setACLName(int token, String ddcname, String hDoc, String acl, int commitMode, String versionComment) throws RemoteException Sets the given ACL to the node.- Parameters:
token
- User tokenddcname
- implemented ddc in saperionhDoc
- Document HDOCacl
- ACL name stringcommitMode
- Commit modeversionComment
- Version comment string- Returns:
- save info object
- Throws:
RemoteException
- RemoteException
-
getACLRights
Reads the rights for the given ACL's.- Parameters:
token
- User tokenacls
- Array of ACL's- Returns:
- ACL rights
- Throws:
RemoteException
- Remote exception
-
getInvolvedUsers
Reads all users involved in the set of ACL's.- Parameters:
token
- User tokenhDoc
- Document HDOC- Returns:
- List of user names
- Throws:
RemoteException
- RemoteException
-
resolveLatestHdoc
Resolves the hdoc of the latest version of the document identified by the given hdoc.- Parameters:
token
- User tokenoldHdoc
- old document HDOC- Returns:
- the hdoc of the latest version of the document identified by the given hdoc.
- Throws:
RemoteException
- if an remote error occurs.
-
getHDocForSysRowId
Searchs the HDOC for the given SysRowId.- Parameters:
token
- User tokensysRowId
- SysRowIdddcName
- DDC name- Returns:
- Resultset for HDOC's
- Throws:
RemoteException
- Remoteexception
-
isAlive
Checks, if the token has minimum lifetime before timeout.- Parameters:
token
- Usertoken- Returns:
- True, if the token is alive
- Throws:
RemoteException
- Remote exception
-
getTaskList
List<TaskInfo> getTaskList(int token, int[] ids, String filter, Map<String, Object> parameter) throws RemoteExceptionReads the task for this user.- Parameters:
token
- user tokenids
- Box ID'sfilter
- HQL filter. Optional WHERE condition that might be added to the original query.
In order to add the pagination functionality like setMaxResults() and/or setFirstResult(), enhance filter with the following statements:
filter_stmt;MAXRESULTS=x ;FIRSTRESULT=y.
;MAXRESULTS=x - x means the limitation of the result set output.
;FIRSTRESULT=y - y means setting the result set cursor to the y-position.
Adding pagination is optional feature that can be used without filter statement as well. In other words filter might constist of ;MAXRESULTS=x ;FIRSTRESULT=y string only.
Examples:
1. LASTUSER ='Bolt';MAXRESULTS=50 ;FIRSTRESULT=1 - hql query's where condition is enhanced with restriction LASTUSER ='Bolt' and the pagination functionality setMaxResults() and setFirstResult() is used;
2. ;MAXRESULTS=50 - only setMaxResult() will be used.
using ; ist important for applying pagination.parameter
- Filter parameter- Returns:
- List of TaskInfo objects
- Throws:
RemoteException
- RemoteException
-
countTasks
long countTasks(int token, int[] ids, String filter, Map<String, Object> filterParams) throws RemoteException, SaSystemException, SaAuthenticationExceptionCounts the tasks that are contained in the specified inbox(es). UnlikegetBoxCount(int, int, BoxCountType, Map)
, this method allows to define a custom filter. It uses the same queries thangetTaskList(int, int[], String, Map)
.- Parameters:
token
- user-tokenids
- IDs of the inboxes to count tasks infilter
- optional filter-string in HQL that will be added to the WHERE clausefilterParams
-- Returns:
- Throws:
RemoteException
- RMI exception when invoking this callSaSystemException
- system error when counting workflow tasksSaAuthenticationException
- not authorized or not logged on
-
getTaskAuditList
List<TaskAuditInfo> getTaskAuditList(int token, int[] ids, String filter, Map<String, Object> parameter) throws RemoteExceptionReads the task for this user.- Parameters:
token
- user tokenids
- Box ID'sfilter
- HQL filter. Optional WHERE condition that will be added to the original query.
In order to add the pagination functionality like setMaxResults() and/or setFirstResult(), add the following statements to the filter:
filter_stmt;MAXRESULTS=x ;FIRSTRESULT=y.
;MAXRESULTS=x - x means the limitation of the result set output.
;FIRSTRESULT=y - y means setting the result set cursor to the y-position.
Adding pagination is optional feature that can be used without filter statement as well. In other words filter might consist of ;MAXRESULTS=x ;FIRSTRESULT=y string only.
Examples:
1. LASTUSER ='Bolt';MAXRESULTS=50 ;FIRSTRESULT=1 - hql query's where condition is enhanced with restriction LASTUSER ='Bolt' and the pagination functionality setMaxResults() and setFirstResult() is used;
2. ;MAXRESULTS=50 - only setMaxResult() will be used.
using ; ist important for applying pagination.parameter
- Filter parameter- Returns:
- List of
TaskAuditInfo
objects - Throws:
RemoteException
- RemoteException
-
getTask
Reads the task info for the given ID.- Parameters:
token
- user tokentaskID
- Task ID- Returns:
- Task info
- Throws:
RemoteException
- RemoteException
-
getParentTask
Reads the parent task info for the given ID.- Parameters:
token
- user tokentaskID
- Task ID- Returns:
- Task info
- Throws:
RemoteException
- RemoteException
-
getCommandInfos
Reads all possible transitions for this task.- Parameters:
token
- user tokendocUID
- Document UID- Returns:
- Command list
- Throws:
RemoteException
- RemoteException
-
getCommandInfos
Collection<CommandInfo> getCommandInfos(int token, String docUID, boolean transitionsOnly) throws RemoteException Reads all possible transitions for this task.- Parameters:
token
- user tokendocUID
- Document UIDtransitionsOnly
- if true, only transition commands will be returned- Returns:
- Command list
- Throws:
RemoteException
- RemoteException
-
getBoxDefinitions
Reads the box definitions.- Parameters:
token
- user token- Returns:
- Box definitions
- Throws:
RemoteException
- RemoteException
-
getBoxCounts
HashMap<Integer,BoxCount> getBoxCounts(int token, Set<Integer> boxId, BoxCountType type, Map<String, Object> parameters) throws RemoteExceptionReturns the number of all elements and of all unread elements of the inboxes identified by the given ids.- Parameters:
token
- user tokenboxId
- the workflow box idtype
- type of tasks to search forparameters
- parameters needed for query- Returns:
- number of all elements and of all unread elements
- Throws:
RemoteException
- if an error occurs.
-
getBoxCount
BoxCount getBoxCount(int token, int boxId, BoxCountType type, Map<String, Object> parameters) throws RemoteExceptionReturns the number of all elements and of all unread elements of the inbox identified by the given id.- Parameters:
token
- user tokenboxId
- the workflow box idtype
- type of tasks to search forparameters
- parameters needed for query- Returns:
- number of all elements and of all unread elements
- Throws:
RemoteException
- if an error occurs.
-
executeCommand
Performs the given command. The parameters must fit to the given parameter. Unneeded parameters can be set to null.- Parameters:
token
- user tokencontextInfo
- Context info- Returns:
- New TaskID
- Throws:
RemoteException
- RemoteException
-
getCommentInfos
Reads the comments for the given task.- Parameters:
token
- user tokentaskUID
- Task UID- Returns:
- List of comments
- Throws:
RemoteException
- RemoteException
-
getHistoryInfos
Reads the history for the given task.- Parameters:
token
- user tokentaskUID
- Task UID- Returns:
- History list
- Throws:
RemoteException
- RemoteException
-
getCompleteHistoryInfos
Reads the histories and comments for the given document.- Parameters:
token
- user tokendocUID
- document UID- Returns:
- CompleteHistoryInfo
- Throws:
RemoteException
- RemoteException
-
getWorkflowDefinitions
Reads all available workflow definitions.- Parameters:
token
- user token- Returns:
- Workflowdefinition list
- Throws:
RemoteException
- RemoteException
-
getWorkflowDefinitions
List<ProcessDefinitionDescriptor> getWorkflowDefinitions(String ddcName, int token) throws RemoteException, com.lexmark.saperion.exceptions.system.BackendSystemException Returns the workflow definitions that are allowed to be used for documents contained in the specified DDC. If no restrictions are configured, all workflow definitions will be returned.- Parameters:
ddcName
- name of the DDCtoken
- user token- Returns:
- Workflowdefinition list
- Throws:
RemoteException
- RemoteExceptioncom.lexmark.saperion.exceptions.system.BackendSystemException
-
addComment
- Parameters:
token
- user tokencomment
- CommenttaskUID
- Task UIDlevel
- Level- Throws:
RemoteException
- RemoteException
-
addHistory
- Parameters:
token
- user tokendescription
- CommenttaskUID
- Task UID- Throws:
RemoteException
- RemoteException
-
getSubstitute
Get the substitute for the logged on user.- Parameters:
token
- user token- Returns:
- Substitute name
- Throws:
RemoteException
- RemoteException
-
setSubstitute
Set the substitute for the logged on user.- Parameters:
token
- user tokenname
- Substitute name- Throws:
RemoteException
- RemoteException
-
getOutOfOffice
Get the out of office status for the logged on user.- Parameters:
token
- user token- Returns:
- is OutOfOffice
- Throws:
RemoteException
- RemoteException
-
setOutOfOffice
Set the out of office status for the logged on user.- Parameters:
token
- user tokenisOutOfOffice
- True, if is OutOfOffice- Throws:
RemoteException
- RemoteException
-
getUsers
Reads a list of filtered users.- Parameters:
token
- user tokenfilter
- Filter- Returns:
- List of users
- Throws:
RemoteException
- RemoteException
-
getAnnotations
String getAnnotations(int token, int indexOfContentElement, String hDoc, boolean currentRevision) throws RemoteException Reads the annotations from the given document.- Parameters:
token
- user tokenindexOfContentElement
- the index of the content element to accesshDoc
- document HDOCcurrentRevision
- true to get current revision- Returns:
- Annotation string
- Throws:
RemoteException
- RemoteException
-
setAnnotations
void setAnnotations(int token, String hDoc, int indexOfContentElement, String annotations) throws RemoteException Sets the given annotations to the document. This method creates a new revision.- Parameters:
token
- user tokenhDoc
- Document HDOCindexOfContentElement
- the index of the content element to accessannotations
- Annotation string- Throws:
RemoteException
- RemoteException
-
startSQLTransaction
Start SQL transaction.- Parameters:
token
- User tokenddcName
- the name of the ddc- Throws:
RemoteException
- RemoteException
-
finishSQLTransaction
Finish SQL transaction.- Parameters:
token
- User tokenddcName
- the ddc namecommit
- True, if commit, else rollback- Throws:
RemoteException
- RemoteException
-
getFolderChildren
List<SaDocumentInfo> getFolderChildren(int token, String folderTableDDC, String folderId, int depth, SaQueryInfo filter, int allowedMaxNrOfChildFolders) throws RemoteException Returns a cursor with the children of the given node. The function accepts a depth parameter. In case of a depth greater than one, the returned nodes are ordered in a depth-first order, and the caller must detect parent-child relationship with the appropriate fields (SysParentID, SysRowID). Note that searching with a depth greater than one is not a fast operation. It is recommended to use depth = 1 and only load further levels on demand if required. The allowedMaxNrOfChildFolders parameter is used to restrict the absolute number of hits loaded from the database. It is intended to be used to protect the system from overload problems caused by very large query-results. The depth-filtering is done after the query has returned from the database. So keep in mind that children found on deeper levels than specified in the depth-parameter are relevant for the total number of children found.
The default value for allowedMaxNrOfChildFolders can be configured with the setting rmi.getfolderchildren.maxresults in saperion.properties of JavaCoreServer. When this setting is set to a value > 0, it is not possible to search for an unlimited number of child nodes by passing a value of -1 for this parameter.- Parameters:
token
- user tokenfolderTableDDC
- Folder tablefolderId
- Folder IDdepth
- Depth (range: 1..n), if lower than 1 an exception is thrownfilter
- Additional HQL filter criteriaallowedMaxNrOfChildFolders
- allowed maximum number of results- Returns:
- List of folder information
- Throws:
RemoteException
- RemoteException
-
getFolderParent
SaDocumentInfo getFolderParent(int token, String folderTableDDC, String folderId) throws RemoteException Returns the parent of the given node. Please note that in case of a node to which another node links, the real parent is returned, not the parent of the link.- Parameters:
token
- user tokenfolderTableDDC
- Folder tablefolderId
- Folder ID- Returns:
- Properties of the folder or null, if not found
- Throws:
RemoteException
- RemoteException
-
getFolderFromPath
List<SaDocumentInfo> getFolderFromPath(int token, String folderTableDDC, String startNodeId, String folderPath, boolean exact) throws RemoteException Returns the node(s) which match to the given path. Path names are built using the SysFolderName field of each node. As path separator, the backslash ('\') is used. The path can be searched relative to a given node, to allow for searching within Personal folders and the like. If exact is set to false, the folderPath can contain wildcards (%). Searching with wildcards can be slow depending on the number of entries in the folder-table and the database in use.- Parameters:
token
- user tokenfolderTableDDC
- Folder tablestartNodeId
- Startnode ID or null/empty if no relative search is requiredfolderPath
- Search pathexact
- if true, the path will be matched using '='. If false, LIKE will be used.- Returns:
- Folder list
- Throws:
RemoteException
- RemoteException
-
createFolder
Creates a new node below a given node. The parent node can be the root node (empty id).- Parameters:
token
- user tokeninfo
- Folder save info- Returns:
- Save info object
- Throws:
RemoteException
- RemoteException
-
updateFolder
void updateFolder(int token, String folderTableDDC, String folderId, List<SaPropertyValue> values) throws RemoteException Updates a given node with the given properties.- Parameters:
token
- user tokenfolderTableDDC
- Folder tablefolderId
- Folder IDvalues
- Values- Throws:
RemoteException
- RemoteException
-
searchFolderDocuments
List<SaDocumentInfo> searchFolderDocuments(int token, String folderTableDDC, String folderId, SaQueryInfo hqlFilter) throws RemoteException HQL search extended with additional folder informations and depth.- Parameters:
token
- user tokenfolderTableDDC
- Folder tablefolderId
- Folder IDhqlFilter
- HQL query for document tables. The DDC name must be defined as $DDC$.- Returns:
- List of documents from each involved DDC's
- Throws:
RemoteException
- RemoteException
-
deleteFolder
Deletes a given node. It must not have children or filed document, i.e. the user must delete/remove all these before deleting the node.- Parameters:
token
- user tokenfolderTableDDC
- Folder tablefolderId
- Folder ID- Throws:
RemoteException
- RemoteException
-
copyFolder
String copyFolder(int token, String folderTableDDC, String folderId, String destinationId, String beforeChild, boolean withDocuments) throws RemoteException Copies the given node and all it’s children to the destination. Note that only real children are copied, so links are not followed. Document filings can optionally be copied too, however this is an expensive operation, as each document has to be updated.- Parameters:
token
- user tokenfolderTableDDC
- Folder tablefolderId
- Folder IDdestinationId
- Destination folder IDbeforeChild
- Child ID or empty for appendwithDocuments
- True, if documents should be copied- Returns:
- new folder id
- Throws:
RemoteException
- RemoteException
-
moveFolder
void moveFolder(int token, String folderTableDDC, String folderId, String destinationId, String beforeChild) throws RemoteException Moves the given node to a new destination. Document filings are always moved with the node. This is not a quick operation, as path and security information must be updated.- Parameters:
token
- user tokenfolderTableDDC
- Folder tablefolderId
- Folder IDdestinationId
- Destination folder IDbeforeChild
- Child ID or empty for append- Throws:
RemoteException
- RemoteException
-
addToFolder
void addToFolder(int token, String folderTableDDC, String documentId, String documentDDC, String folderId) throws RemoteException Adds the document to a given folder. A document can be filed in multiple folders, but each filing operation must be called separately.- Parameters:
token
- user tokenfolderTableDDC
- Folder tabledocumentId
- Document SysRowIddocumentDDC
- Document DDC namefolderId
- Destination folder ID- Throws:
RemoteException
- RemoteException
-
removeFromFolder
void removeFromFolder(int token, String folderTableDDC, String documentSysRowId, String documentDDC, String folderId) throws RemoteException Remove the document filing from the given node.- Parameters:
token
- user tokenfolderTableDDC
- Folder tabledocumentSysRowId
- Document SysRowIddocumentDDC
- Document DDC namefolderId
- Folder ID- Throws:
RemoteException
- RemoteException
-
moveToFolder
void moveToFolder(int token, String folderTableDDC, String documentId, String documentDDC, String folderId, String destinationId) throws RemoteException Moves the document’s filing to the given node. It is removed from the original folder. Both source node and destination node must exist.- Parameters:
token
- user tokenfolderTableDDC
- Folder tabledocumentId
- Document SysRowIddocumentDDC
- Document DDC namefolderId
- Source folder IDdestinationId
- Destination folder ID- Throws:
RemoteException
- RemoteException
-
getDocumentFolders
List<SaDocumentInfo> getDocumentFolders(int token, String folderTableDDC, String documentDDC, String sysRowId) throws RemoteException Returns a list of folder properties which contains all nodes the document is contained in. The list is returned only for one node table, so if the document is filed in multiple node tables, this must be queried separately.- Parameters:
token
- user tokenfolderTableDDC
- Folder tabledocumentDDC
- Document DDCsysRowId
- Document sysRowId- Returns:
- List of folder properties
- Throws:
RemoteException
- RemoteException
-
getDocumentFolderCount
long getDocumentFolderCount(int token, String folderTableDDC, String documentDDC, String sysRowId) throws RemoteException Returns the total count over all folders from all users in which the specified document is contained in.- Parameters:
token
- user tokenfolderTableDDC
- Folder tabledocumentDDC
- Document DDCsysRowId
- Document sysRowId- Returns:
- folder count
- Throws:
RemoteException
- RemoteException
-
getFolderInfo
SaDocumentInfo getFolderInfo(int token, String folderTableDDC, String folderId, boolean forceLoadVariables) throws RemoteException Reads the folder info object for the given folder.- Parameters:
token
- User tokenfolderTableDDC
- Folder tablefolderId
- Folder idforceLoadVariables
- if true, variables will be loaded from medium if the DDC does not contain the SYSPROPERTIES field- Returns:
- Folder info object
- Throws:
RemoteException
- Remote exception
-
setFolderAcl
void setFolderAcl(int token, String folderTableDDC, String folderId, String aclName) throws RemoteException Sets an ACL for the given folder. The node’s SysACLUserList is recalculated, and if the node has children, the same is true for all the node’s children.- Parameters:
token
- user tokenfolderTableDDC
- Folder tablefolderId
- Folder IDaclName
- ACL name- Throws:
RemoteException
- RemoteException
-
getFolderRights
SaDocAccessData getFolderRights(int token, String folderTableDDC, String folderId) throws RemoteException Returns the rights mask for the given folder and user. The effective rights are calculated by using ACL inheritance.- Parameters:
token
- user tokenfolderTableDDC
- Folder tablefolderId
- Folder ID- Returns:
- Folder access data
- Throws:
RemoteException
- RemoteException
-
getSystemFiles
List<String> getSystemFiles(int clientToken, SystemFileKind kind, String filter) throws RemoteException Gets the system files of a specific kind.- Parameters:
clientToken
- The current user token.kind
- the kind of systemfiles to read.filter
- A filter string. Only files will be returned, that match the filter. To get all systemfiles of a kind set filter to the empty string.- Returns:
- The system files of a specific kind.
- Throws:
RemoteException
- RemoteException
-
logClientEvent
void logClientEvent(int token, String hdoc, SaConstants.ProtoEvents event, String remark) throws RemoteException Adds an audit log event.- Parameters:
token
- user tokenhdoc
- Document HDOCevent
- Event typeremark
- Remark- Throws:
RemoteException
- Remote exception
-
changePassword
void changePassword(String user, String oldPassword, String client, String newPassword) throws RemoteException Changes the password of an existing user. This has to be done before a call tologon(Credentials)
was successfully invoked.- Parameters:
user
- The name of the user.oldPassword
- The old password. This parameter is required, since the password should only be changed by the user himselfclient
- The client of the actionsnewPassword
- The new password- Throws:
RemoteException
- exception
-
getAuthorizedUsers
List<UsersRights> getAuthorizedUsers(int clientToken, String hDoc, String rights, MatchKind match) throws RemoteException Returns the users, that have specific rights on a document.- Parameters:
clientToken
- The current user token.hDoc
- The id of the document.rights
- The rights the requested users should have.match
- How the rights are matched: MKONEOF - find all users that have one of the specified rights MKEXACT - find all users that have exactly the specified rights MKATLEAST - find all users that have at least the specified rights- Returns:
- The users, that have specific rights on the document or null if the document has no acl set. In this case everyone has every right on the document.
- Throws:
RemoteException
- exception
-
getArchivedSize
Returns the total document size in archive.- Parameters:
clientToken
- The current user token.hDoc
- The document whose size is wanted.- Returns:
- The total document size in archive.
- Throws:
RemoteException
- exception
-
getFolderClass
SaFolderClass getFolderClass(int clientToken, String className) throws RemoteException, com.lexmark.saperion.exceptions.system.BackendSystemException Reads the folder class with the given name.- Parameters:
clientToken
- The current user token.className
- Class name in dotted notation- Returns:
- Folder classs
- Throws:
RemoteException
- exception on reading folder classcom.lexmark.saperion.exceptions.system.BackendSystemException
-
searchFolderClass
Set<SaFolderClass> searchFolderClass(int clientToken, SaFolderClassSearchInfo searchInfo) throws RemoteException, com.lexmark.saperion.exceptions.system.BackendSystemException Searches for folder classes with the specified properties.- Parameters:
clientToken
- The current user token.searchInfo
- bean that contains properties to search for- Returns:
- set of classes that match the specified properties
- Throws:
RemoteException
- exception when searching for classescom.lexmark.saperion.exceptions.system.BackendSystemException
-
storeSystemFile
void storeSystemFile(int clientToken, SystemFileKind kind, String name, byte[] data) throws RemoteException Stores a system file of a specific kind.- Parameters:
clientToken
- The current user token.kind
- The kind of systemfile to store.name
- The name of the file. This has to be a filename without path and extension.data
- The content of the file to save.- Throws:
RemoteException
- exception
-
loadSystemFile
Loads a system file of a specific kind.- Parameters:
clientToken
- The current user token.kind
- The kind of system file to loadname
- The name of the file to load.- Returns:
- an InputStream that holds the content of the file.
- Throws:
RemoteException
- exception
-
getRMIVersion
Determine the RMI interface version.- Returns:
- RMI interface version.
- Throws:
RemoteException
- exception
-
getFolderUpdateInfo
Set<FolderUpdateInfo> getFolderUpdateInfo(int clientToken, Map<String, Long> sysrowids) throws RemoteExceptionCalculates a cut set of folders that shall be refreshed on client side. FolderUpdateInfo objects hold information for workflow folders and other types.- Parameters:
clientToken
- The current user token.sysrowids
- Map of SYSROWIDs with time stamps to check against the cache map of changed folders.- Returns:
- Cut set of given List of Folder SYSROWIDs and the ones laying in the cache.
- Throws:
RemoteException
- exception- See Also:
-
setVariables
void setVariables(int clientToken, int element, Map<String, String> variables) throws RemoteExceptionMethod to set the Variables for an Content-Object or the Structure itself.- Parameters:
clientToken
- The current user token.element
- Element Number where the Variables should be set to. (0 = Structure)variables
- Map of Key-Value Pairs for setting Variables- Throws:
RemoteException
- exception
-
checkSapUrl
Checks the given SAP URL on the R/Link server and returns, if successfull, the HDOC and the DDC. If not, null will be returned.- Parameters:
clientToken
- The current user token.url
- SAP URL- Returns:
- Document Info
- Throws:
RemoteException
- exception
-
newInvoke
<ResultType extends Serializable,ExceptionType extends Exception> ResultType newInvoke(int clientToken, com.lexmark.saperion.remote.common.operations.Operation<ResultType, ExceptionType, throws RemoteException, ExceptionTypecom.lexmark.saperion.remote.common.Connection> operation) This method invokes anOperation
that throwsecm exceptions
on the server side.- Type Parameters:
ResultType
- the type of the result of the operation- Parameters:
clientToken
- the used user tokenoperation
- the operation to invoke- Returns:
- the result of the operation
- Throws:
RemoteException
- on network errorsExceptionType
- when the operation threw an exception it will be thrown
-
invoke
<T extends Serializable> T invoke(int clientToken, com.lexmark.saperion.remote.common.operations.Operation<T, SaBasicException, throws RemoteException, SaBasicExceptionLegacyConnection> operation) This method invokes anOperation
on the server side.- Type Parameters:
T
- The return type- Parameters:
operation
- The operation to invokeclientToken
- The current user token.- Returns:
- The result of the invocation of the operation
- Throws:
RemoteException
SaBasicException
-
sendBarcode
void sendBarcode(int clientToken, String indexMask, String docUid, String contentRep, String sid, String docType, String value, int mandant) throws RemoteException Send barcode to SAP.- Parameters:
clientToken
- The current user token.indexMask
- Index mask namedocUid
- Document UIDcontentRep
- SAP Content repositorysid
- SAP IDdocType
- Document typevalue
- Valuemandant
- Mandant name- Throws:
RemoteException
- exception
-
setEventsEnabled
Sets whether events (e.g. for the IS) should be enabled for the current session.- Parameters:
clientToken
- The current user token.enabled
- true, if events should be enabled, otherwise false.- Throws:
RemoteException
-
getEventsEnabled
Returns whether events (e.g. for the IS) are enabled for the current session.- Parameters:
clientToken
- The current user token.- Returns:
- true, if events are enabled, otherwise false.
- Throws:
RemoteException
-
getDDC
Returns information about the specified DDC.- Parameters:
clientToken
- The current user token.ddcName
- the name of the DDC- Returns:
- DDC information
- Throws:
RemoteException
- system error when retrieving information about requested DDC
-
setDocumentState
void setDocumentState(int clientToken, String ddcName, String hdoc, String value) throws RemoteException Sets the SYSDOCUMENTSTATE value of a document to the specified value without creating a new revision.- Parameters:
clientToken
- the current user tokenddcName
- DDC name of the documenthdoc
- HDOC of the documentvalue
- value to set- Throws:
RemoteException
- system error when setting document state
-
getInjector
This method returns the injector for the given session. Internal use only.- Parameters:
clientToken
- the token of the session- Returns:
- the injector of the session
- Throws:
RemoteException
- rmi errors
-
getStreamingConfiguration
com.lexmark.saperion.remote.common.operations.document.content.stream.StreamingConfiguration getStreamingConfiguration() throws RemoteException, com.lexmark.saperion.exceptions.EcmExceptionThis method returns the currentstreaming configuration
.- Returns:
- the current
streaming configuration
- Throws:
RemoteException
com.lexmark.saperion.exceptions.EcmException
-
getFullTextFields
Map<String,String> getFullTextFields(int token, String ddcName, List<String> fullTextFields, String hdoc) throws RemoteException, com.lexmark.saperion.exceptions.EcmException Fetches values of Full text columns- Parameters:
token
- Rmi TokenddcName
- name of the DDCfullTextFields
- List of Fields which are of Text retrieval type. Make sure to prefixSaConstants.FULL_TEXT_COLUMN_PREFIX
hdoc
- hdoc of the document- Returns:
- Map full text coulmn and corresponding value
- Throws:
RemoteException
com.lexmark.saperion.exceptions.EcmException
-
getExternalStorageFoldersForUpload
List<SaperionExternalStorageMappingInfo> getExternalStorageFoldersForUpload(int token, ExternalStorageType storageType) throws RemoteException Fetches all folders of provided External Storage from where documents need to be uploaded- Parameters:
token
- RMI tokenstorageType
- external storage type- Returns:
- list of External Storage folder details
- Throws:
RemoteException
-
getExternalStorageFoldersForUpload
List<SaperionExternalStorageMappingInfo> getExternalStorageFoldersForUpload(int token) throws RemoteException Fetches all folders of all External Storage services from where documents need to be uploaded- Parameters:
token
- RMI token- Returns:
- list of External Storage folder details
- Throws:
RemoteException
-
getExternalStorageMapping
SaperionExternalStorageMappingInfo getExternalStorageMapping(int token, String sysRowId) throws RemoteException Fetches the external storage mapping for the provided SysRowId- Parameters:
token
-sysRowId
-- Returns:
- mapping object
- Throws:
RemoteException
-
createExternalStorageFolderMapping
void createExternalStorageFolderMapping(int token, SaperionExternalStorageMappingInfo mappingInfo) throws RemoteException Stores the mapping information about Saperion document and External Storage folder- Parameters:
token
- RMI tokenmappingInfo
- mapping information about Saperion document and External Storage folder- Throws:
RemoteException
-
updateExternalStorageUploadStatus
void updateExternalStorageUploadStatus(int token, String folderId, ExternalStorageDocUploadStatus status, ExternalStorageType storageType) throws RemoteException Updates the upload status of External Storage folder- Parameters:
token
- RMI tokenfolderId
- folderId whose status needs to be updatedstatus
-storageType
-- Throws:
RemoteException
-
deleteExternalStorageFolderMapping
int deleteExternalStorageFolderMapping(int token, Date expiryTime, List<ExternalStorageDocUploadStatus> statusList) throws RemoteException Deletes external storage mappings for given status and older than the given time- Parameters:
token
- RMI tokenexpiryTime
- all mappings older than this time will be deleted- Throws:
RemoteException
-
getCurrentUserRole
- Parameters:
token
- RMI token- Returns:
- the effective role (combined rights of all roles / profiles) of the current logged-in user
- Throws:
RemoteException
-
getAcls(int)
instead