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
public abstract class AbstractFolderRMIClientCommand extends AbstractRMIClientCommand
Class representing the folder operations of the backend.
-
-
Field Summary
-
Fields inherited from class com.saperion.connector.rmi.AbstractRMIClientCommand
APPEND_CONTENT, appl, credentials, LOGGER, props, session, sessionInfo, sysConnector, writeBufferSize
-
-
Constructor Summary
Constructors Constructor Description AbstractFolderRMIClientCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addToFolder(java.lang.String folderTableDDC, java.lang.String documentId, java.lang.String documentDDC, java.lang.String folderId)
Adds the document to a given folder.java.lang.String
copyFolder(java.lang.String folderTableDDC, java.lang.String folderId, java.lang.String destinationId, java.lang.String beforeChild, boolean withDocuments)
Copies the given node and all it’s children to the destination.java.lang.String
createFolder(SaFolderSaveInfo info)
Creates a new node below a given node.void
deleteFolder(java.lang.String folderTableDDC, java.lang.String folderId)
Deletes a given node.long
getDocumentFolderCount(java.lang.String folderTableDDC, java.lang.String documentDDC, java.lang.String sysRowId)
Returns the total count over all folders from all users in which the specified document is countained in.java.util.List<SaDocumentInfo>
getDocumentFolders(java.lang.String folderTableDDC, java.lang.String documentDDC, java.lang.String sysRowId)
Returns a list of folder properties which contains all nodes the document is contained in.java.util.List<SaDocumentInfo>
getFolderChildren(java.lang.String folderTableDDC, java.lang.String folderId, int depth, SaQueryInfo filter, int allowedMaxNrOfChildFoldersPerLevel)
Returns a cursor with the children of the given node.SaFolderClass
getFolderClass(java.lang.String className)
Reads the folder class with the given name.java.util.List<SaDocumentInfo>
getFolderFromPath(java.lang.String folderTableDDC, java.lang.String startNodeId, java.lang.String folderPath, boolean exact)
Returns the node(s) which match to the given path.SaDocumentInfo
getFolderInfo(java.lang.String folderTableDDC, java.lang.String folderId, boolean forceLoadVariables)
Reads the folder info object for the given folder.SaDocumentInfo
getFolderParent(java.lang.String folderTableDDC, java.lang.String folderId)
Returns the parent of the given node.SaDocAccessData
getFolderRights(java.lang.String folderTableDDC, java.lang.String folderId)
Returns the rights mask for the given folder and user.java.util.Set<FolderUpdateInfo>
getFolderUpdateInfo(java.util.Map<java.lang.String,java.lang.Long> folderIds)
Get the Set of folders that shall be refreshed.void
moveFolder(java.lang.String folderTableDDC, java.lang.String folderId, java.lang.String destinationId, java.lang.String beforeChild)
Moves the given node to a new destination.void
moveToFolder(java.lang.String folderTableDDC, java.lang.String documentId, java.lang.String documentDDC, java.lang.String folderId, java.lang.String destinationId)
Moves the document’s filing to the given node.void
removeFromFolder(java.lang.String folderTableDDC, java.lang.String documentSysRowId, java.lang.String documentDDC, java.lang.String folderId)
Remove the document filing from the given node.java.util.Set<SaFolderClass>
searchFolderClass(SaFolderClassSearchInfo searchInfo)
Searches for folder classes with the specified properties.java.util.List<SaDocumentInfo>
searchFolderDocuments(java.lang.String folderTableDDC, java.lang.String folderId, SaQueryInfo hqlFilter)
HQL search extended with additional folder informations and depth.void
setFolderAcl(java.lang.String folderTableDDC, java.lang.String folderId, java.lang.String aclName)
Sets an ACL for the given folder.void
updateFolder(java.lang.String folderTableDDC, java.lang.String folderId, java.util.List<SaPropertyValue> values)
Updates a given node with the given properties.-
Methods inherited from class com.saperion.connector.rmi.AbstractRMIClientCommand
getRemoteCommand, init, reLogon, reLogonAfterConnectionFailure
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.saperion.connector.rmi.SaRMIClientCommand
addComment, 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
-
-
-
-
Method Detail
-
addToFolder
public void addToFolder(java.lang.String folderTableDDC, java.lang.String documentId, java.lang.String documentDDC, java.lang.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 tabledocumentId
- Document SysRowIddocumentDDC
- Document DDC namefolderId
- Destination folder ID- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exceptionSaSetNodeException
- Document is not fileable- See Also:
SaRMIClientCommand.addToFolder(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
-
copyFolder
public java.lang.String copyFolder(java.lang.String folderTableDDC, java.lang.String folderId, java.lang.String destinationId, java.lang.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 tablefolderId
- Folder IDdestinationId
- Destination folder IDbeforeChild
- Child ID or empty for appendwithDocuments
- True, if documents should be copied- Returns:
- new folder id
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception- See Also:
SaRMIClientCommand.copyFolder(java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean)
-
createFolder
public java.lang.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 exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception- See Also:
SaRMIClientCommand.createFolder(com.saperion.intf.SaFolderSaveInfo)
-
deleteFolder
public void deleteFolder(java.lang.String folderTableDDC, java.lang.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 tablefolderId
- Folder ID- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception
-
getDocumentFolders
public java.util.List<SaDocumentInfo> getDocumentFolders(java.lang.String folderTableDDC, java.lang.String documentDDC, java.lang.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 tabledocumentDDC
- Document DDCsysRowId
- Document sysrowid- Returns:
- List of folder properties
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exceptionSaSetNodeException
- Document is not fileable- See Also:
SaRMIClientCommand.getDocumentFolders(java.lang.String, java.lang.String, java.lang.String)
-
getDocumentFolderCount
public long getDocumentFolderCount(java.lang.String folderTableDDC, java.lang.String documentDDC, java.lang.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 tabledocumentDDC
- Document DDCsysRowId
- Document sysrowid- Returns:
- folder count
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exceptionSaSetNodeException
- Document is not fileable- See Also:
SaRMIClientCommand.getDocumentFolderCount(java.lang.String, java.lang.String, java.lang.String)
-
getFolderChildren
public java.util.List<SaDocumentInfo> getFolderChildren(java.lang.String folderTableDDC, java.lang.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 tablefolderId
- Folder IDdepth
- Depthfilter
- Additional HQL filter criteriaallowedMaxNrOfChildFoldersPerLevel
- allowed maximum number of results- Returns:
- List of folder information
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDBException
- Database exceptionSaFolderException
- Folder Exception- See Also:
SaRMIClientCommand.getFolderChildren(String, String, int, SaQueryInfo, int)
-
getFolderInfo
public SaDocumentInfo getFolderInfo(java.lang.String folderTableDDC, java.lang.String folderId, boolean forceLoadVariables) throws SaSystemException, SaAuthenticationException, SaDBException, SaFolderException
Reads the folder info object for the given folder.- Parameters:
forceLoadVariables
-folderTableDDC
- Folder tablefolderId
- Folder id- Returns:
- Folder info object
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDBException
- Database exceptionSaFolderException
- Folder Exception- See Also:
SaRMIClientCommand.getFolderInfo(java.lang.String, java.lang.String, boolean)
-
getFolderFromPath
public java.util.List<SaDocumentInfo> getFolderFromPath(java.lang.String folderTableDDC, java.lang.String startNodeId, java.lang.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 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:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDBException
- Database exception- See Also:
SaRMIClientCommand.getFolderFromPath(java.lang.String, java.lang.String, java.lang.String, boolean)
-
getFolderParent
public SaDocumentInfo getFolderParent(java.lang.String folderTableDDC, java.lang.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 tablefolderId
- Folder ID- Returns:
- Properties of the folder or null, if not found
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDBException
- Database exception- See Also:
SaRMIClientCommand.getFolderParent(java.lang.String, java.lang.String)
-
getFolderRights
public SaDocAccessData getFolderRights(java.lang.String folderTableDDC, java.lang.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 tablefolderId
- Folder ID- Returns:
- Folder access data
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception- See Also:
SaRMIClientCommand.getFolderRights(java.lang.String, java.lang.String)
-
moveFolder
public void moveFolder(java.lang.String folderTableDDC, java.lang.String folderId, java.lang.String destinationId, java.lang.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 tablefolderId
- Folder IDdestinationId
- Destination folder IDbeforeChild
- Child ID or empty for append- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception- See Also:
SaRMIClientCommand.moveFolder(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
-
moveToFolder
public void moveToFolder(java.lang.String folderTableDDC, java.lang.String documentId, java.lang.String documentDDC, java.lang.String folderId, java.lang.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 tabledocumentId
- Document SysRowIddocumentDDC
- Document DDC namefolderId
- Source folder IDdestinationId
- Destination folder ID- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception- See Also:
SaRMIClientCommand.moveToFolder(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
-
removeFromFolder
public void removeFromFolder(java.lang.String folderTableDDC, java.lang.String documentSysRowId, java.lang.String documentDDC, java.lang.String folderId) throws SaSystemException, SaAuthenticationException, SaDDCException
Remove the document filing from the given node.- Parameters:
folderTableDDC
- Folder tabledocumentSysRowId
- Document SysRowIddocumentDDC
- Document DDC namefolderId
- Folder ID- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception- See Also:
SaRMIClientCommand.removeFromFolder(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
-
searchFolderDocuments
public java.util.List<SaDocumentInfo> searchFolderDocuments(java.lang.String folderTableDDC, java.lang.String folderId, SaQueryInfo hqlFilter) throws SaSystemException, SaAuthenticationException, SaDDCException
HQL search extended with additional folder informations and depth.- Parameters:
folderTableDDC
- 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:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception- See Also:
SaRMIClientCommand.searchFolderDocuments(java.lang.String, java.lang.String, com.saperion.rmi.SaQueryInfo)
-
setFolderAcl
public void setFolderAcl(java.lang.String folderTableDDC, java.lang.String folderId, java.lang.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 tablefolderId
- Folder IDaclName
- ACL name- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception- See Also:
SaRMIClientCommand.setFolderAcl(java.lang.String, java.lang.String, java.lang.String)
-
updateFolder
public void updateFolder(java.lang.String folderTableDDC, java.lang.String folderId, java.util.List<SaPropertyValue> values) throws SaSystemException, SaAuthenticationException, SaDDCException
Updates a given node with the given properties.- Parameters:
folderTableDDC
- Folder tablefolderId
- Folder IDvalues
- Values- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception- See Also:
SaRMIClientCommand.updateFolder(java.lang.String, java.lang.String, java.util.List)
-
getFolderClass
public SaFolderClass getFolderClass(java.lang.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 exceptionSaAuthenticationException
- authentication errorSaDDCException
- Database exception- See Also:
SaRMIClientCommand.getFolderClass(java.lang.String)
-
searchFolderClass
public java.util.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 exceptionSaAuthenticationException
- authentication error- See Also:
SaRMIClientCommand.searchFolderClass(com.saperion.rmi.SaFolderClassSearchInfo)
-
getFolderUpdateInfo
public java.util.Set<FolderUpdateInfo> getFolderUpdateInfo(java.util.Map<java.lang.String,java.lang.Long> folderIds) throws SaSystemException, SaAuthenticationException
Get 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 errorSaAuthenticationException
- error on the authentification / insufficient rights- See Also:
SaRMIClientCommand.getFolderUpdateInfo(Map)
-
-