Interface NavigationService
-
- All Superinterfaces:
Service
- All Known Implementing Classes:
NavigationClassicConnectorService
public interface NavigationService extends Service
Interface for navigation services.
-
-
Field Summary
Fields Modifier and Type Field Description static int
NO_LIMIT_MAX_NR_OF_NODES_PER_LEVEL
Constraint, which defines the max limit of nodes per level.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description FolderId
addFavoriteFolder(java.lang.String name, java.util.Properties props, java.lang.String content)
Adds a new node to the favorite folder with the given name, properties and content.NavigationNode
addFolder(NavigationNode node, java.lang.String childName, com.saperion.constants.SaFolderConstants.FOLDER_TYPE nodeType, java.util.Properties properties)
Adds a folder with the given name to the node and returns the result containing the new child.NavigationNode
addLinkFolder(NavigationNode node, java.lang.String childName, FolderId destination)
Adds a link folder with the given name to the node and returns the result containing the new child.void
addToFolder(java.util.Set<FolderId> folderIds, java.util.Set<DocumentId> documentIDs)
Adds documents to the specified folders.NavigationNode
addWebpartFolder(NavigationNode node, java.lang.String childName, java.lang.String destination)
Adds a webpart folder with the given name to the node and returns the result containing the new child.NavigationNode
copyFolder(FolderId folderId, NavigationNode destinationNode, FolderId beforeChildId, boolean withDocuments)
Copies a folder to the specified location.void
deleteFolder(NavigationNode node)
Deletes the given folder.void
deleteFolderById(FolderId id)
Deletes the folder identified by the specified id.java.lang.Long
getBoxCount(int boxId)
Deprecated.usegetBoxTotalAndUnreadCount(int, Filter)
insteadcom.saperion.wf.BoxCount
getBoxTotalAndUnreadCount(int boxId, WorkflowNodeInfo.Filter boxFilter)
Returns the count of all elements and of all unread elements in the given box.java.util.Map<java.lang.Integer,com.saperion.wf.BoxCount>
getBoxTotalAndUnreadCounts(java.util.Set<java.lang.Integer> boxId)
Returns the count of all elements and of all unread elements in the given boxes.long
getDocumentFolderCount(DocumentId id)
Retrieves the count over all folders the document is contained in.java.util.List<FolderId>
getDocumentFolders(DocumentId id)
Retrieves the folders that contain the specified document.java.util.List<java.lang.String>
getFolderAcl(FolderId folderId)
Gets ACL for folder.FolderNode
getFolderById(FolderId id)
Search a folder by id.FolderNode
getFolderByPath(java.lang.String ddc, java.lang.String path)
Search a folder by path.java.util.List<FolderInfo>
getFolderChildren(FolderId id)
Retrieves the children of the folder identified by the specified id.FolderClass
getFolderClass(java.lang.String className)
Returns the folder class with the specified name or null if no such class exists.java.util.Set<FolderClass>
getFolderClassesForDDC(java.lang.String ddcName, com.saperion.constants.SaFolderConstants.CLASS_TYPE classType)
Returns all folder classes of a certain type that can be used for the specified DDC.FolderInfo
getFolderInfo(FolderId id)
Retrieves information about the specified folder.java.util.List<java.lang.String>
getFolderTables()
Reads all folder table names.NavigationTree
getFolderTree(FolderId root, com.saperion.rmi.SaQueryInfo filter)
Generates a folder tree stated at. java.util.Set<com.saperion.folder.FolderUpdateInfo>
getFolderUpdateInfo(java.util.Map<java.lang.String,java.lang.Long> folderIds)
Get Set of folders to refresh on client side.int
getInboxId()
Reads the inbox id for the current user.com.saperion.ngc.iform.xml.Form
getMaskDefinition(java.lang.String maskName)
Retrieves the mask definition with the given name.com.saperion.ngc.iform.xml.Form
getMaskDefinition(java.lang.String maskName, boolean ignoreCompatibility)
Retrieves the mask definition with the given name.NavigationTree
getNavigationTree(java.lang.String folderDDC, com.saperion.rmi.SaQueryInfo filter)
Returns the navigation tree.NavigationNode
getNextLevelFolders(NavigationNode node, com.saperion.rmi.SaQueryInfo filter, int allowedMaxNrOfNodesPerLevel)
Returns the folders of the next level.com.saperion.wf.BoxCount
getTaskCounts()
Returns the number or read and unread tasks for the current user.NavigationNode
getWorkflowNodes(NavigationNode navigationNode)
Reads the workflow tree part.boolean
hasFolder(java.lang.String folderId)
void
moveFolder(FolderId folderId, FolderId targetFolderId, FolderId beforeFolderId)
Moves folder.void
removeFromFolder(java.util.Set<FolderId> folderIds, DocumentId documentId)
Removes the specified document from a folder.NavigationNode
renameFolder(NavigationNode node, java.lang.String name)
Renames folder.FolderId
resolveLink(FolderId linkId)
Resolves a link folder and returns the link destination.void
setFolderAcl(FolderId folderId, java.lang.String acl)
Sets ACL for folder.void
storeMaskDefinition(java.lang.String maskName, com.saperion.ngc.iform.xml.Form mask)
Stores the given form as mask with the given name.void
updateFolder(FolderId id, java.util.Properties nameValuePairs)
Updates the properties of a folder.
-
-
-
Field Detail
-
NO_LIMIT_MAX_NR_OF_NODES_PER_LEVEL
static final int NO_LIMIT_MAX_NR_OF_NODES_PER_LEVEL
Constraint, which defines the max limit of nodes per level.- See Also:
- Constant Field Values
-
-
Method Detail
-
getMaskDefinition
com.saperion.ngc.iform.xml.Form getMaskDefinition(java.lang.String maskName) throws SystemException, UnsupportedFormException, AuthenticationException
Retrieves the mask definition with the given name.- Parameters:
maskName
- Mask definition name- Returns:
- Form
- Throws:
SystemException
- system exceptionUnsupportedFormException
- when the form can not be used in WebClientAuthenticationException
- authentication exception
-
getMaskDefinition
com.saperion.ngc.iform.xml.Form getMaskDefinition(java.lang.String maskName, boolean ignoreCompatibility) throws SystemException, UnsupportedFormException, AuthenticationException
Retrieves the mask definition with the given name. If ignoreCompatibility is set to true, masks that are not compatible with web client are returened, too.- Parameters:
maskName
- Mask definition nameignoreCompatibility
- if true, masks that are not compatible with the web client are returned- Returns:
- Form
- Throws:
SystemException
- system exceptionUnsupportedFormException
- when the form can not be used in WebClientAuthenticationException
- authentication exception
-
storeMaskDefinition
void storeMaskDefinition(java.lang.String maskName, com.saperion.ngc.iform.xml.Form mask) throws javax.xml.bind.JAXBException
Stores the given form as mask with the given name.- Parameters:
maskName
- Mask namemask
- Mask form- Throws:
javax.xml.bind.JAXBException
- JAXBException
-
getInboxId
int getInboxId() throws AuthenticationException, SystemException
Reads the inbox id for the current user.- Returns:
- Inbox id
- Throws:
SystemException
- system exceptionAuthenticationException
- authentication exception
-
getNavigationTree
NavigationTree getNavigationTree(java.lang.String folderDDC, com.saperion.rmi.SaQueryInfo filter) throws NavigationException, AuthenticationException, SystemException, DocumentIdentificationException, DatabaseException, UnknownFolderTypeException
Returns the navigation tree.- Parameters:
folderDDC
- Folder DDCfilter
- Filter object- Returns:
NavigationTree
object- Throws:
NavigationException
- navigation exceptionAuthenticationException
- Authentication exceptionSystemException
- system exceptionDocumentIdentificationException
- if the root node of the tree cannot be identifiedDatabaseException
- database exception when trying to resolve folder propertiesUnknownFolderTypeException
- when a folder with an unknown type is found
-
getWorkflowNodes
NavigationNode getWorkflowNodes(NavigationNode navigationNode) throws NavigationException, AuthenticationException, SystemException, DatabaseException
Reads the workflow tree part.- Parameters:
navigationNode
- parent node- Returns:
- Workflow tree
- Throws:
NavigationException
- navigation exceptionAuthenticationException
- Authentication exceptionSystemException
- system exceptionDatabaseException
- database exception
-
getFolderTree
NavigationTree getFolderTree(FolderId root, com.saperion.rmi.SaQueryInfo filter) throws NavigationException, AuthenticationException, SystemException, DatabaseException, UnknownFolderTypeException
Generates a folder tree stated at. - Parameters:
root
- Root nodefilter
- Filter object- Returns:
- Folder tree
- Throws:
NavigationException
- navigation exceptionAuthenticationException
- Authentication exceptionSystemException
- system exceptionDatabaseException
- database exceptionUnknownFolderTypeException
- when a folder with an unknown type is found
-
getFolderByPath
FolderNode getFolderByPath(java.lang.String ddc, java.lang.String path) throws NavigationException, AuthenticationException, SystemException, DatabaseException, UnknownFolderTypeException
Search a folder by path.- Parameters:
ddc
- folder ddcpath
- Absolute path- Returns:
- FolderNode or null, if not found.
- Throws:
NavigationException
- navigation exceptionAuthenticationException
- Authentication exceptionSystemException
- system exceptionDatabaseException
- database exceptionUnknownFolderTypeException
- when a folder with an unknown type is found
-
getFolderById
FolderNode getFolderById(FolderId id) throws AuthenticationException, SystemException, NavigationException, DatabaseException, UnknownFolderTypeException
Search a folder by id.- Parameters:
id
- folder id- Returns:
- folder node or null, if not found
- Throws:
AuthenticationException
- Authentication exceptionSystemException
- system exceptionNavigationException
- navigation exceptionDatabaseException
- database exceptionUnknownFolderTypeException
- when a folder with an unknown type is found
-
resolveLink
FolderId resolveLink(FolderId linkId) throws NavigationException, AuthenticationException
Resolves a link folder and returns the link destination.- Parameters:
linkId
- Link folder id- Returns:
- Destination folder id
- Throws:
NavigationException
- navigation exceptionAuthenticationException
- Authentication exception
-
getNextLevelFolders
NavigationNode getNextLevelFolders(NavigationNode node, com.saperion.rmi.SaQueryInfo filter, int allowedMaxNrOfNodesPerLevel) throws NavigationException, AuthenticationException, SystemException, DatabaseException, UnknownFolderTypeException
Returns the folders of the next level.- Parameters:
node
- nodefilter
- filterallowedMaxNrOfNodesPerLevel
- allowedMaxNrOfNodesPerLevel- Returns:
- navigation node containing next level child nodes
- Throws:
SystemException
- system exceptionAuthenticationException
- authentication exceptionNavigationException
- navigation exceptionDatabaseException
- database exceptionUnknownFolderTypeException
- when a folder with an unknown type is found
-
deleteFolder
void deleteFolder(NavigationNode node) throws AuthenticationException, SystemException
Deletes the given folder.- Parameters:
node
- navigation node- Throws:
SystemException
- system exceptionAuthenticationException
- authentication exception
-
addFolder
NavigationNode addFolder(NavigationNode node, java.lang.String childName, com.saperion.constants.SaFolderConstants.FOLDER_TYPE nodeType, java.util.Properties properties) throws SystemException, AuthenticationException, NavigationException, DatabaseException, UnknownFolderTypeException
Adds a folder with the given name to the node and returns the result containing the new child.- Parameters:
node
- parent nodechildName
- name of new child node to addnodeType
- node typeproperties
- node properties- Returns:
- node containing new child
- Throws:
AuthenticationException
- authentication exceptionSystemException
- system exceptionNavigationException
- navigation exceptionDatabaseException
- database exceptionUnknownFolderTypeException
- when a folder with an unknown type is found
-
addLinkFolder
NavigationNode addLinkFolder(NavigationNode node, java.lang.String childName, FolderId destination) throws SystemException, AuthenticationException, DatabaseException, UnknownFolderTypeException, InvalidFolderNameException
Adds a link folder with the given name to the node and returns the result containing the new child.- Parameters:
node
- parent nodechildName
- name of new child node to adddestination
- Destination folder id- Returns:
- node containing new child
- Throws:
AuthenticationException
- authentication exceptionSystemException
- system exceptionDatabaseException
- database exceptionUnknownFolderTypeException
- when a folder with an unknown type is foundInvalidFolderNameException
- when the folder name contained an invalid character
-
addWebpartFolder
NavigationNode addWebpartFolder(NavigationNode node, java.lang.String childName, java.lang.String destination) throws SystemException, AuthenticationException, DatabaseException, UnknownFolderTypeException, InvalidFolderNameException
Adds a webpart folder with the given name to the node and returns the result containing the new child.- Parameters:
node
- parent nodechildName
- name of new child node to adddestination
- Destination webpart id- Returns:
- node containing new child
- Throws:
AuthenticationException
- authentication exceptionSystemException
- system exceptionDatabaseException
- database exceptionUnknownFolderTypeException
- when a folder with an unknown type is foundInvalidFolderNameException
- when the folder name contained an invalid character
-
renameFolder
NavigationNode renameFolder(NavigationNode node, java.lang.String name) throws SystemException, NavigationException
Renames folder.- Parameters:
node
- Nodename
- Name- Returns:
- renamed folder
- Throws:
SystemException
- system exceptionNavigationException
- navigation exception
-
moveFolder
void moveFolder(FolderId folderId, FolderId targetFolderId, FolderId beforeFolderId) throws FolderMoveException, DuplicateFolderException
Moves folder.- Parameters:
folderId
- folder idtargetFolderId
- target folderbeforeFolderId
- before folder- Throws:
FolderMoveException
- if moving failed or is not allowedDuplicateFolderException
- if a node with the same name already exists
-
copyFolder
NavigationNode copyFolder(FolderId folderId, NavigationNode destinationNode, FolderId beforeChildId, boolean withDocuments) throws SystemException, AuthenticationException, NavigationException, DatabaseException, UnknownFolderTypeException
Copies a folder to the specified location.- Parameters:
folderId
- id of the folder to copydestinationNode
- the destination folderbeforeChildId
- id of the child to insert the copied folder beforewithDocuments
- documents will be copied, too- Returns:
- the new child
- Throws:
SystemException
- system exceptionAuthenticationException
- authentication exceptionNavigationException
- navigation exceptionDatabaseException
- database exceptionUnknownFolderTypeException
- when a folder with an unknown type is found
-
addFavoriteFolder
FolderId addFavoriteFolder(java.lang.String name, java.util.Properties props, java.lang.String content) throws AuthenticationException, SystemException, DatabaseException, UnknownFolderTypeException, InvalidFolderNameException
Adds a new node to the favorite folder with the given name, properties and content.- Parameters:
name
- Folder nameprops
- Propertiescontent
- Content- Returns:
- Folder id
- Throws:
SystemException
- system exceptionAuthenticationException
- authentication exceptionDatabaseException
- database exceptionUnknownFolderTypeException
- when a folder with an unknown type is foundInvalidFolderNameException
- when the folder name contained an invalid character
-
addToFolder
void addToFolder(java.util.Set<FolderId> folderIds, java.util.Set<DocumentId> documentIDs) throws SystemException, AuthenticationException, DatabaseException, NavigationException
Adds documents to the specified folders.- Parameters:
folderIds
- folder idsdocumentIDs
- ids of documents- Throws:
SystemException
- system exceptionAuthenticationException
- authentication exceptionNavigationException
- navigation exceptionDatabaseException
- database exception
-
removeFromFolder
void removeFromFolder(java.util.Set<FolderId> folderIds, DocumentId documentId) throws SystemException, AuthenticationException
Removes the specified document from a folder.- Parameters:
folderIds
- folders to remove fromdocumentId
- ID of document to remove- Throws:
SystemException
- system exceptionAuthenticationException
- authentication exception
-
getBoxCount
@Deprecated java.lang.Long getBoxCount(int boxId) throws com.saperion.exception.SaAuthenticationException, com.saperion.exception.SaSystemException
Deprecated.usegetBoxTotalAndUnreadCount(int, Filter)
insteadLoads and returns the box count for the given box.- Parameters:
boxId
- The if of the box to get the cout from.- Returns:
- the number of box workflow items.
- Throws:
com.saperion.exception.SaAuthenticationException
- If an authentication exception occurs.com.saperion.exception.SaSystemException
- If a system exception occurs.
-
getBoxTotalAndUnreadCount
com.saperion.wf.BoxCount getBoxTotalAndUnreadCount(int boxId, WorkflowNodeInfo.Filter boxFilter) throws com.saperion.exception.SaAuthenticationException, com.saperion.exception.SaSystemException
Returns the count of all elements and of all unread elements in the given box.- Parameters:
boxId
- The if of the box to get the cout from.boxFilter
- filter type of the workflow box to get count for- Returns:
- the number of all elements and of all unread element
- Throws:
com.saperion.exception.SaAuthenticationException
- If an authentication exception occurs.com.saperion.exception.SaSystemException
- If a system exception occurs.
-
getBoxTotalAndUnreadCounts
java.util.Map<java.lang.Integer,com.saperion.wf.BoxCount> getBoxTotalAndUnreadCounts(java.util.Set<java.lang.Integer> boxId) throws com.saperion.exception.SaAuthenticationException, com.saperion.exception.SaSystemException
Returns the count of all elements and of all unread elements in the given boxes.- Parameters:
boxId
- The if of the box to get the cout from.- Returns:
- the number of all elements and of all unread element
- Throws:
com.saperion.exception.SaAuthenticationException
- If an authentication exception occurs.com.saperion.exception.SaSystemException
- If a system exception occurs.
-
getDocumentFolders
java.util.List<FolderId> getDocumentFolders(DocumentId id) throws SystemException, AuthenticationException
Retrieves the folders that contain the specified document.- Parameters:
id
- document's id- Returns:
- list of folder document infos
- Throws:
SystemException
- system exceptionAuthenticationException
- authentication exception
-
getDocumentFolderCount
long getDocumentFolderCount(DocumentId id) throws SystemException, AuthenticationException
Retrieves the count over all folders the document is contained in.- Parameters:
id
- document's id- Returns:
- folder count
- Throws:
SystemException
- system exceptionAuthenticationException
- authentication exception
-
setFolderAcl
void setFolderAcl(FolderId folderId, java.lang.String acl) throws SystemException, AuthenticationException
Sets ACL for folder.- Parameters:
folderId
- folderIdacl
- set of ACL names- Throws:
SystemException
- system exceptionAuthenticationException
- authentication exception
-
getFolderAcl
java.util.List<java.lang.String> getFolderAcl(FolderId folderId) throws SystemException, AuthenticationException
Gets ACL for folder.- Parameters:
folderId
- folderId- Returns:
- list of ACL names
- Throws:
SystemException
- system exceptionAuthenticationException
- authentication exception
-
getFolderTables
java.util.List<java.lang.String> getFolderTables() throws SystemException, AuthenticationException
Reads all folder table names.- Returns:
- List of folder table names
- Throws:
SystemException
- System exceptionAuthenticationException
- authentication exception
-
hasFolder
boolean hasFolder(java.lang.String folderId) throws SystemException, AuthenticationException
- Parameters:
folderId
- Folder ID- Returns:
- True, if folder exists.
- Throws:
SystemException
- System exceptionAuthenticationException
- authentication exception
-
getFolderInfo
FolderInfo getFolderInfo(FolderId id) throws SystemException, AuthenticationException, DatabaseException, NavigationException
Retrieves information about the specified folder.- Parameters:
id
- folder id- Returns:
- folder info
- Throws:
SystemException
- system exceptionAuthenticationException
- authentication exceptionDatabaseException
- database exceptionNavigationException
- navigation exception
-
updateFolder
void updateFolder(FolderId id, java.util.Properties nameValuePairs) throws SystemException, AuthenticationException, DatabaseException
Updates the properties of a folder.- Parameters:
id
- id of the folder to updatenameValuePairs
- properties to update- Throws:
SystemException
- system exceptionAuthenticationException
- authentication exceptionDatabaseException
- database exception
-
getFolderClass
FolderClass getFolderClass(java.lang.String className) throws SystemException, AuthenticationException, DatabaseException
Returns the folder class with the specified name or null if no such class exists.- Parameters:
className
- class name- Returns:
- folder class or null if not found
- Throws:
SystemException
- system exceptionAuthenticationException
- authentication exceptionDatabaseException
- database exception
-
getFolderClassesForDDC
java.util.Set<FolderClass> getFolderClassesForDDC(java.lang.String ddcName, com.saperion.constants.SaFolderConstants.CLASS_TYPE classType) throws SystemException, AuthenticationException
Returns all folder classes of a certain type that can be used for the specified DDC.- Parameters:
ddcName
- DDC nameclassType
- the type of class to search for- Returns:
- set of folder classes
- Throws:
SystemException
- system exceptionAuthenticationException
- authentication exception
-
deleteFolderById
void deleteFolderById(FolderId id) throws SystemException, AuthenticationException, DatabaseException, NavigationException
Deletes the folder identified by the specified id.- Parameters:
id
- folder id- Throws:
NavigationException
- navigation exceptionDatabaseException
- database exceptionAuthenticationException
- authentication exceptionSystemException
- system exception
-
getFolderChildren
java.util.List<FolderInfo> getFolderChildren(FolderId id) throws SystemException, AuthenticationException, DatabaseException, NavigationException
Retrieves the children of the folder identified by the specified id. Only the direct descendants of the node are returned.- Parameters:
id
- folder id- Returns:
- list of children
- Throws:
SystemException
- system exceptionAuthenticationException
- authentication exceptionDatabaseException
- database exceptionNavigationException
- navigation exception
-
getFolderUpdateInfo
java.util.Set<com.saperion.folder.FolderUpdateInfo> getFolderUpdateInfo(java.util.Map<java.lang.String,java.lang.Long> folderIds) throws SystemException, AuthenticationException
Get Set of folders to refresh on client side.- Parameters:
folderIds
- Map of SYSROWIDs with time stamps of last refresh to check.- Returns:
- Set of folders that shall be refreshed.
- Throws:
AuthenticationException
- error on the authentification / insufficient rightsSystemException
- general error
-
getTaskCounts
com.saperion.wf.BoxCount getTaskCounts() throws AuthenticationException, SystemException
Returns the number or read and unread tasks for the current user. The count is created by summing up the counts of all workflow boxes.- Returns:
- global count
- Throws:
AuthenticationException
- not logged in or not allowedSystemException
- system error when checking for tasks
-
-