Package com.saperion.connector.rmi
Class AbstractFolderRMIClientCommand
java.lang.Object
com.saperion.connector.rmi.AbstractRMIClientCommand
com.saperion.connector.rmi.AbstractFolderRMIClientCommand
- All Implemented Interfaces:
- SaRMIClientCommand
- Direct Known Subclasses:
- AbstractDocRMIClientCommand
Class representing the folder operations of the backend.
- 
Field SummaryFields inherited from class com.saperion.connector.rmi.AbstractRMIClientCommandAPPEND_CONTENT, appl, credentials, LOGGER, props, session, sessionInfo, sysConnector, writeBufferSize
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddToFolder(String folderTableDDC, String documentId, String documentDDC, String folderId) Adds the document to a given folder.copyFolder(String folderTableDDC, String folderId, String destinationId, String beforeChild, boolean withDocuments) Copies the given node and all it’s children to the destination.createFolder(SaFolderSaveInfo info) Creates a new node below a given node.voiddeleteFolder(String folderTableDDC, String folderId) Deletes a given node.longgetDocumentFolderCount(String folderTableDDC, String documentDDC, String sysRowId) Returns the total count over all folders from all users in which the specified document is countained in.getDocumentFolders(String folderTableDDC, String documentDDC, String sysRowId) Returns a list of folder properties which contains all nodes the document is contained in.getFolderChildren(String folderTableDDC, String folderId, int depth, SaQueryInfo filter, int allowedMaxNrOfChildFoldersPerLevel) Returns a cursor with the children of the given node.getFolderClass(String className) Reads the folder class with the given name.getFolderFromPath(String folderTableDDC, String startNodeId, String folderPath, boolean exact) Returns the node(s) which match to the given path.getFolderInfo(String folderTableDDC, String folderId, boolean forceLoadVariables) Reads the folder info object for the given folder.getFolderParent(String folderTableDDC, String folderId) Returns the parent of the given node.getFolderRights(String folderTableDDC, String folderId) Returns the rights mask for the given folder and user.getFolderUpdateInfo(Map<String, Long> folderIds) Get the Set of folders that shall be refreshed.voidmoveFolder(String folderTableDDC, String folderId, String destinationId, String beforeChild) Moves the given node to a new destination.voidmoveToFolder(String folderTableDDC, String documentId, String documentDDC, String folderId, String destinationId) Moves the document’s filing to the given node.voidremoveFromFolder(String folderTableDDC, String documentSysRowId, String documentDDC, String folderId) Remove the document filing from the given node.searchFolderClass(SaFolderClassSearchInfo searchInfo) Searches for folder classes with the specified properties.searchFolderDocuments(String folderTableDDC, String folderId, SaQueryInfo hqlFilter) HQL search extended with additional folder informations and depth.voidsetFolderAcl(String folderTableDDC, String folderId, String aclName) Sets an ACL for the given folder.voidupdateFolder(String folderTableDDC, String folderId, List<SaPropertyValue> values) Updates a given node with the given properties.Methods inherited from class com.saperion.connector.rmi.AbstractRMIClientCommandgetRemoteCommand, init, reLogon, reLogonAfterConnectionFailureMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.saperion.connector.rmi.SaRMIClientCommandaddComment, addHistory, cacheDocument, changePassword, checkoutDocument, checkoutDocument, checkSapUrl, clearContent, closeDocument, closeSession, createDocument, createExternalStorageFolderMapping, createLink, deleteDocument, deleteExternalStorageFolderMapping, deleteSetting, discardDocument, dsicardCheckout, executeCommand, finishSQLTransaction, finishTransaction, getACLNames, getACLRights, getAcls, getAllACLs, getAnnotations, getArchivedSize, getAuthorizedUsers, getBoxCount, getBoxDefinitions, getCommandInfos, getCommandInfos, getCommentInfos, getCommitMode, getCompleteHistoryInfos, getCurrentUserRole, getDDC, getDeleteMode, getEventsEnabled, getExternalStorageFoldersForUpload, getExternalStorageFoldersForUpload, getExternalStorageMapping, getFeatures, getFieldDescriptions, getFieldDescriptions, getFulltext, getFullTextFields, getHDocForSysRowId, getHistoryInfos, getIdsFromQuery, getInvolvedUsers, getLicenseCount, getLockInfo, getLocks, getLocks, getMandant, getMember, getMembers, getNodeAccessData, getOutOfOffice, getParentTask, getRealDBName, getRMIVersion, getServerInfos, getSession, getSetting, getStringQueryResult, getSubstitute, getSystemConnector, getSystemFiles, getSystemInfo, getSystemSetting, getTask, getTaskAuditList, getTaskList, getThumbnail, getToken, getUserIdsForQuery, getUsers, getUserSetting, getVersionList, getWorkflowDefinitions, invoke, isAlive, isRevisionEnabled, listActiveSessions, loadDDCNames, loadFolderDDCNames, loadSettings, loadSystemFile, loadWorkflowDDCName, lockNode, logClientEvent, logoff, logon, logon, logon, newInvoke, readDocumentFirst, readDocumentFirst, readDocumentMetadata, readDocumentNext, readVersionMetadata, readVersionMetadata, releaseDocument, removeElement, removeElement, resolveLatestHdoc, restoreVersion, saveDocument, saveDocument, searchSettings, sendBarcode, setACLName, setAnnotations, setElementMark, setEventsEnabled, setLocale, setOutOfOffice, setSetting, setSubstitute, setUsedLicense, setUserSetting, setVariables, startSQLTransaction, startTransaction, storeDocument, storeDocument, storeSystemFile, unlockNode, updateExternalStorageUploadStatus, writeContent, writeContent, writeContent, writeContent
- 
Constructor Details- 
AbstractFolderRMIClientCommandpublic AbstractFolderRMIClientCommand()
 
- 
- 
Method Details- 
addToFolderpublic void addToFolder(String folderTableDDC, String documentId, String documentDDC, String folderId) throws SaSystemException, SaAuthenticationException, SaDDCException, SaSetNodeException Adds the document to a given folder. A document can be filed in multiple folders, but each filing operation must be called separately.- Parameters:
- folderTableDDC- Folder table
- documentId- Document SysRowId
- documentDDC- Document DDC name
- folderId- Destination folder ID
- Throws:
- SaSystemException- Remote exception
- SaAuthenticationException- Authentication error
- SaDDCException- Database exception
- SaSetNodeException- Document is not fileable
- See Also:
 
- 
copyFolderpublic String copyFolder(String folderTableDDC, String folderId, String destinationId, String beforeChild, boolean withDocuments) throws SaSystemException, SaAuthenticationException, SaDDCException 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:
- folderTableDDC- Folder table
- folderId- Folder ID
- destinationId- Destination folder ID
- beforeChild- Child ID or empty for append
- withDocuments- True, if documents should be copied
- Returns:
- new folder id
- Throws:
- SaSystemException- Remote exception
- SaAuthenticationException- Authentication error
- SaDDCException- Database exception
- See Also:
 
- 
createFolderpublic String createFolder(SaFolderSaveInfo info) throws SaSystemException, SaAuthenticationException, SaDDCException Creates a new node below a given node. The parent node can be the root node (empty id).- Parameters:
- info- Folder save info
- Returns:
- Folder ID
- Throws:
- SaSystemException- Remote exception
- SaAuthenticationException- Authentication error
- SaDDCException- Database exception
- See Also:
 
- 
deleteFolderpublic void deleteFolder(String folderTableDDC, String folderId) throws SaSystemException, SaAuthenticationException, SaDDCException 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:
- folderTableDDC- Folder table
- folderId- Folder ID
- Throws:
- SaSystemException- Remote exception
- SaAuthenticationException- Authentication error
- SaDDCException- Database exception
 
- 
getDocumentFolderspublic List<SaDocumentInfo> getDocumentFolders(String folderTableDDC, String documentDDC, String sysRowId) throws SaSystemException, SaAuthenticationException, SaDDCException, SaSetNodeException 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:
- folderTableDDC- Folder table
- documentDDC- Document DDC
- sysRowId- Document sysrowid
- Returns:
- List of folder properties
- Throws:
- SaSystemException- Remote exception
- SaAuthenticationException- Authentication error
- SaDDCException- Database exception
- SaSetNodeException- Document is not fileable
- See Also:
 
- 
getDocumentFolderCountpublic long getDocumentFolderCount(String folderTableDDC, String documentDDC, String sysRowId) throws SaSystemException, SaAuthenticationException, SaDDCException, SaSetNodeException Returns the total count over all folders from all users in which the specified document is countained in.- Parameters:
- folderTableDDC- Folder table
- documentDDC- Document DDC
- sysRowId- Document sysrowid
- Returns:
- folder count
- Throws:
- SaSystemException- Remote exception
- SaAuthenticationException- Authentication error
- SaDDCException- Database exception
- SaSetNodeException- Document is not fileable
- See Also:
 
- 
getFolderChildrenpublic List<SaDocumentInfo> getFolderChildren(String folderTableDDC, String folderId, int depth, SaQueryInfo filter, int allowedMaxNrOfChildFoldersPerLevel) throws SaSystemException, SaAuthenticationException, SaDBException, SaFolderException 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:
- folderTableDDC- Folder table
- folderId- Folder ID
- depth- Depth
- filter- Additional HQL filter criteria
- allowedMaxNrOfChildFoldersPerLevel- allowed maximum number of results
- Returns:
- List of folder information
- Throws:
- SaSystemException- Remote exception
- SaAuthenticationException- Authentication error
- SaDBException- Database exception
- SaFolderException- Folder Exception
- See Also:
 
- 
getFolderInfopublic SaDocumentInfo getFolderInfo(String folderTableDDC, String folderId, boolean forceLoadVariables) throws SaSystemException, SaAuthenticationException, SaDBException, SaFolderException Reads the folder info object for the given folder.- Parameters:
- forceLoadVariables-
- folderTableDDC- Folder table
- folderId- Folder id
- Returns:
- Folder info object
- Throws:
- SaSystemException- Remote exception
- SaAuthenticationException- Authentication error
- SaDBException- Database exception
- SaFolderException- Folder Exception
- See Also:
 
- 
getFolderFromPathpublic List<SaDocumentInfo> getFolderFromPath(String folderTableDDC, String startNodeId, String folderPath, boolean exact) throws SaSystemException, SaAuthenticationException, SaDBException 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:
- folderTableDDC- Folder table
- startNodeId- Startnode ID or null/empty if no relative search is required
- folderPath- Search path
- exact- if true, the path will be matched using '='. If false, LIKE will be used.
- Returns:
- Folder list
- Throws:
- SaSystemException- Remote exception
- SaAuthenticationException- Authentication error
- SaDBException- Database exception
- See Also:
 
- 
getFolderParentpublic SaDocumentInfo getFolderParent(String folderTableDDC, String folderId) throws SaSystemException, SaAuthenticationException, SaDBException 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:
- folderTableDDC- Folder table
- folderId- Folder ID
- Returns:
- Properties of the folder or null, if not found
- Throws:
- SaSystemException- Remote exception
- SaAuthenticationException- Authentication error
- SaDBException- Database exception
- See Also:
 
- 
getFolderRightspublic SaDocAccessData getFolderRights(String folderTableDDC, String folderId) throws SaSystemException, SaAuthenticationException, SaDDCException Returns the rights mask for the given folder and user. The effective rights are calculated by using ACL inheritance.- Parameters:
- folderTableDDC- Folder table
- folderId- Folder ID
- Returns:
- Folder access data
- Throws:
- SaSystemException- Remote exception
- SaAuthenticationException- Authentication error
- SaDDCException- Database exception
- See Also:
 
- 
moveFolderpublic void moveFolder(String folderTableDDC, String folderId, String destinationId, String beforeChild) throws SaSystemException, SaAuthenticationException, SaDDCException 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:
- folderTableDDC- Folder table
- folderId- Folder ID
- destinationId- Destination folder ID
- beforeChild- Child ID or empty for append
- Throws:
- SaSystemException- Remote exception
- SaAuthenticationException- Authentication error
- SaDDCException- Database exception
- See Also:
 
- 
moveToFolderpublic void moveToFolder(String folderTableDDC, String documentId, String documentDDC, String folderId, String destinationId) throws SaSystemException, SaAuthenticationException, SaDDCException 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:
- folderTableDDC- Folder table
- documentId- Document SysRowId
- documentDDC- Document DDC name
- folderId- Source folder ID
- destinationId- Destination folder ID
- Throws:
- SaSystemException- Remote exception
- SaAuthenticationException- Authentication error
- SaDDCException- Database exception
- See Also:
 
- 
removeFromFolderpublic void removeFromFolder(String folderTableDDC, String documentSysRowId, String documentDDC, String folderId) throws SaSystemException, SaAuthenticationException, SaDDCException Remove the document filing from the given node.- Parameters:
- folderTableDDC- Folder table
- documentSysRowId- Document SysRowId
- documentDDC- Document DDC name
- folderId- Folder ID
- Throws:
- SaSystemException- Remote exception
- SaAuthenticationException- Authentication error
- SaDDCException- Database exception
- See Also:
 
- 
searchFolderDocumentspublic List<SaDocumentInfo> searchFolderDocuments(String folderTableDDC, String folderId, SaQueryInfo hqlFilter) throws SaSystemException, SaAuthenticationException, SaDDCException HQL search extended with additional folder informations and depth.- Parameters:
- folderTableDDC- Folder table
- folderId- Folder ID
- hqlFilter- HQL query for document tables. The DDC name must be defined as $DDC$.
- Returns:
- List of documents from each involved DDC's
- Throws:
- SaSystemException- Remote exception
- SaAuthenticationException- Authentication error
- SaDDCException- Database exception
- See Also:
 
- 
setFolderAclpublic void setFolderAcl(String folderTableDDC, String folderId, String aclName) throws SaSystemException, SaAuthenticationException, SaDDCException 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:
- folderTableDDC- Folder table
- folderId- Folder ID
- aclName- ACL name
- Throws:
- SaSystemException- Remote exception
- SaAuthenticationException- Authentication error
- SaDDCException- Database exception
- See Also:
 
- 
updateFolderpublic void updateFolder(String folderTableDDC, String folderId, List<SaPropertyValue> values) throws SaSystemException, SaAuthenticationException, SaDDCException Updates a given node with the given properties.- Parameters:
- folderTableDDC- Folder table
- folderId- Folder ID
- values- Values
- Throws:
- SaSystemException- Remote exception
- SaAuthenticationException- Authentication error
- SaDDCException- Database exception
- See Also:
 
- 
getFolderClasspublic SaFolderClass getFolderClass(String className) throws SaSystemException, SaAuthenticationException, SaDDCException Reads the folder class with the given name.- Parameters:
- className- Class name in dotted notation
- Returns:
- Folder classs
- Throws:
- SaSystemException- Remote exception
- SaAuthenticationException- authentication error
- SaDDCException- Database exception
- See Also:
 
- 
searchFolderClasspublic Set<SaFolderClass> searchFolderClass(SaFolderClassSearchInfo searchInfo) throws SaSystemException, SaAuthenticationException Searches for folder classes with the specified properties.- Parameters:
- searchInfo- bean with properties to search for
- Returns:
- set of classes that match the specified properties
- Throws:
- SaSystemException- system exception
- SaAuthenticationException- authentication error
- See Also:
 
- 
getFolderUpdateInfopublic Set<FolderUpdateInfo> getFolderUpdateInfo(Map<String, Long> folderIds) throws SaSystemException, SaAuthenticationExceptionGet the Set of folders that shall be refreshed.- Parameters:
- folderIds- Map of SYSROWIDs with time stamps of last refresh to check.
- Returns:
- Set of folders that shall be refreshed.
- Throws:
- SaSystemException- general error
- SaAuthenticationException- error on the authentification / insufficient rights
- See Also:
 
 
-