Package com.saperion.ngc.navigation
Class NavigationPresenter
- java.lang.Object
-
- com.saperion.ngc.navigation.NavigationPresenter
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
NavigationPresenter(NavigationView navigationView)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NavigationNode
copyNode(FolderId folderId, NavigationNode parentNode, FolderId beforeChildId, boolean withDocuments)
Copies a node.NavigationNode
createLinkNode(NavigationNode parentNode, java.lang.String name, FolderId destination)
NavigationNode
createNode(NavigationNode parentNode, java.lang.String name, com.saperion.constants.SaFolderConstants.FOLDER_TYPE nodeType, java.util.Properties properties)
NavigationNode
createWebpartNode(NavigationNode parentNode, java.lang.String name, java.lang.String destination)
void
deleteNode(NavigationNode node)
void
deleteNodeById(FolderId id)
Deletes the specified folder.java.util.Set<FolderClass>
filterNonCompatibleClassesForCreate(com.saperion.constants.SaFolderConstants.CLASS_TYPE type, java.util.Set<FolderClass> folderClassesForDDC)
Returns a set of folder classes that can be used in the web client to create a new file or register.com.saperion.wf.BoxCount
getBoxCount(int boxId, WorkflowNodeInfo.Filter boxFilter)
Returns the count of workflow items of the given box.java.util.Map<java.lang.Integer,com.saperion.wf.BoxCount>
getBoxCounts(java.util.Set<java.lang.Integer> boxIds)
Returns the count of workflow items of the given box.FolderNode
getFolderById(FolderId id)
Returns the folder with the specified id.FolderNode
getFolderByPath(java.lang.String ddc, java.lang.String path)
Returns the folder with the specified path.FolderClass
getFolderClass(java.lang.String className)
Returns the folder class for the specified name or null if no such class was found.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.com.saperion.ngc.iform.xml.Form
getFolderEditForm(java.lang.String formName)
Returns the mask definition needed to open the edit mask for the folder.FolderInfo
getFolderInfo(FolderId id)
Returns infos about the specified folder.com.saperion.ngc.iform.xml.Form
getForm(java.lang.String name)
Returns the mask definition for the specified mask name.org.zkoss.zul.Treeitem
getInboxInfo()
java.lang.String
getPathById(FolderId id)
Returns the absolute path of the node with the specified id.com.saperion.wf.BoxCount
getTaskCounts()
boolean
isLookupTable(java.lang.String ddcName)
void
lockFolder(FolderId id)
Locks the specified folder.NavigationNode
renameNode(NavigationNode node, java.lang.String name)
void
setInboxInfo(org.zkoss.zul.Treeitem wfInfo)
void
unlockFolder(FolderId id)
Unlocks the specified folder.void
updateFolder(FolderId id, java.util.Properties nameValuePairs, java.util.List<com.saperion.bean.ContentStream> thumbnails, int selectedImage)
Updates a folder's properties.
-
-
-
Constructor Detail
-
NavigationPresenter
protected NavigationPresenter(NavigationView navigationView)
- Parameters:
navigationView
- Navigation view
-
-
Method Detail
-
deleteNode
public void deleteNode(NavigationNode node) throws AuthenticationException, NgcUiException
- Parameters:
node
- Node to delete- Throws:
AuthenticationException
- authentication exceptionNgcUiException
- exception to be handled by view
-
createNode
public NavigationNode createNode(NavigationNode parentNode, java.lang.String name, com.saperion.constants.SaFolderConstants.FOLDER_TYPE nodeType, java.util.Properties properties) throws NgcUiException, AuthenticationException
- Parameters:
parentNode
- Parent nodename
- NamenodeType
- node typeproperties
- node properties- Returns:
- created node
- Throws:
AuthenticationException
- authentication exceptionNgcUiException
- exception to be handled by view
-
createLinkNode
public NavigationNode createLinkNode(NavigationNode parentNode, java.lang.String name, FolderId destination) throws NgcUiException, AuthenticationException
- Parameters:
parentNode
- Parent nodename
- Namedestination
- Destination folder if- Returns:
- created node
- Throws:
AuthenticationException
- authentication exceptionNgcUiException
- system exception
-
createWebpartNode
public NavigationNode createWebpartNode(NavigationNode parentNode, java.lang.String name, java.lang.String destination) throws NgcUiException, AuthenticationException
- Parameters:
parentNode
- Parent nodename
- Namedestination
- Destination webpart if- Returns:
- created node
- Throws:
AuthenticationException
- authentication exceptionNgcUiException
- exception to be handled by view
-
copyNode
public NavigationNode copyNode(FolderId folderId, NavigationNode parentNode, FolderId beforeChildId, boolean withDocuments) throws NgcUiException, AuthenticationException
Copies a node.- Parameters:
folderId
- id of the node to copyparentNode
- destination nodebeforeChildId
- id of the child to insert the copied node beforewithDocuments
- true if the documents should be contained in the new folder- Returns:
- the new node
- Throws:
AuthenticationException
- authentication exceptionNgcUiException
- exception to be handled by view
-
renameNode
public NavigationNode renameNode(NavigationNode node, java.lang.String name) throws NgcUiException
- Parameters:
node
- Nodename
- New name- Returns:
- Renamed node
- Throws:
NgcUiException
- exception to be handled by view
-
getInboxInfo
public org.zkoss.zul.Treeitem getInboxInfo()
- Returns:
- Inbox leaf
-
setInboxInfo
public void setInboxInfo(org.zkoss.zul.Treeitem wfInfo)
- Parameters:
wfInfo
- Inbox info
-
getBoxCount
public com.saperion.wf.BoxCount getBoxCount(int boxId, WorkflowNodeInfo.Filter boxFilter) throws NgcUiException
Returns the count of workflow items of the given box.- Parameters:
boxId
- The id of the workflow box in question.boxFilter
- filter type of the workflow box to get count for- Returns:
- the count of workflow items of the given box.
- Throws:
NgcUiException
- if an error occurs.
-
getBoxCounts
public java.util.Map<java.lang.Integer,com.saperion.wf.BoxCount> getBoxCounts(java.util.Set<java.lang.Integer> boxIds) throws NgcUiException
Returns the count of workflow items of the given box.- Parameters:
boxIds
- The id of the workflow box in question.- Returns:
- the count of workflow items of the given box.
- Throws:
NgcUiException
- if an error occurs.
-
getFolderEditForm
public com.saperion.ngc.iform.xml.Form getFolderEditForm(java.lang.String formName) throws NgcUiException, AuthenticationException
Returns the mask definition needed to open the edit mask for the folder.- Parameters:
formName
- form name- Returns:
- mask definition
- Throws:
NgcUiException
- exception to be handled by viewAuthenticationException
- re-logon required
-
getFolderClass
public FolderClass getFolderClass(java.lang.String className) throws NgcUiException, AuthenticationException
Returns the folder class for the specified name or null if no such class was found.- Parameters:
className
- folder class name- Returns:
- folder class or null
- Throws:
NgcUiException
- exception to be handled by viewAuthenticationException
- re-logon required
-
getFolderClassesForDDC
public java.util.Set<FolderClass> getFolderClassesForDDC(java.lang.String ddcName, com.saperion.constants.SaFolderConstants.CLASS_TYPE classType) throws NgcUiException, AuthenticationException
Returns all folder classes of a certain type that can be used for the specified DDC.- Parameters:
ddcName
- DDC nameclassType
- class type to search for- Returns:
- set of folder classes
- Throws:
NgcUiException
- exception to be handled by viewAuthenticationException
- re-logon required
-
filterNonCompatibleClassesForCreate
public java.util.Set<FolderClass> filterNonCompatibleClassesForCreate(com.saperion.constants.SaFolderConstants.CLASS_TYPE type, java.util.Set<FolderClass> folderClassesForDDC) throws NgcUiException, AuthenticationException
Returns a set of folder classes that can be used in the web client to create a new file or register.- Parameters:
type
- class type (file or register)folderClassesForDDC
- classes for the efile ddc- Returns:
- set of compatible classes
- Throws:
NgcUiException
- exception to be handled by viewAuthenticationException
- re-logon required
-
getFolderInfo
public FolderInfo getFolderInfo(FolderId id) throws NgcUiException, AuthenticationException
Returns infos about the specified folder.- Parameters:
id
- folder id- Returns:
- folder infos
- Throws:
NgcUiException
- exception to be handled by viewAuthenticationException
- re-logon required
-
updateFolder
public void updateFolder(FolderId id, java.util.Properties nameValuePairs, java.util.List<com.saperion.bean.ContentStream> thumbnails, int selectedImage) throws NgcUiException, AuthenticationException
Updates a folder's properties.- Parameters:
id
- id of the folder to updatenameValuePairs
- properties to updatethumbnails
- list of streams containing thumbnailsselectedImage
- selected thumbnail- Throws:
NgcUiException
- exception to be handled by viewAuthenticationException
- re-logon required
-
getFolderByPath
public FolderNode getFolderByPath(java.lang.String ddc, java.lang.String path) throws NgcUiException, AuthenticationException
Returns the folder with the specified path.- Parameters:
ddc
- folder ddcpath
- folder path- Returns:
- folder node
- Throws:
NgcUiException
- exception to be handled by viewAuthenticationException
- re-logon required
-
getFolderById
public FolderNode getFolderById(FolderId id) throws NgcUiException, AuthenticationException
Returns the folder with the specified id.- Parameters:
id
- folder id- Returns:
- folder node
- Throws:
NgcUiException
- exception to be handled by viewAuthenticationException
- re-logon required
-
getPathById
public java.lang.String getPathById(FolderId id) throws NgcUiException, AuthenticationException
Returns the absolute path of the node with the specified id. "/" is used as separator.- Parameters:
id
- folder id- Returns:
- path
- Throws:
AuthenticationException
- re-logon requiredNgcUiException
- exception to be handled by view
-
deleteNodeById
public void deleteNodeById(FolderId id) throws NgcUiException, AuthenticationException
Deletes the specified folder.- Parameters:
id
- folder id- Throws:
NgcUiException
- exception to be handled by viewAuthenticationException
- re-logon required
-
getForm
public com.saperion.ngc.iform.xml.Form getForm(java.lang.String name) throws NgcUiException, AuthenticationException
Returns the mask definition for the specified mask name.- Parameters:
name
- mask name- Returns:
- mask definition
- Throws:
NgcUiException
- exception to be handled by viewAuthenticationException
- re-logon required
-
getTaskCounts
public com.saperion.wf.BoxCount getTaskCounts() throws NgcUiException, AuthenticationException
- Returns:
- count of tasks over all boxes
- Throws:
NgcUiException
- exception to be handled by viewAuthenticationException
- re-logon required
-
isLookupTable
public boolean isLookupTable(java.lang.String ddcName) throws NgcUiException, AuthenticationException
- Parameters:
ddcName
- name of the DDC- Returns:
- true if the DDC is a lookup table
- Throws:
NgcUiException
- exception to be handled by viewAuthenticationException
- re-logon required
-
lockFolder
public void lockFolder(FolderId id) throws NgcUiException, AuthenticationException
Locks the specified folder.- Parameters:
id
- ID of the folder to lock- Throws:
NgcUiException
- exception to be handled by viewAuthenticationException
- re-logon required
-
unlockFolder
public void unlockFolder(FolderId id) throws NgcUiException, AuthenticationException
Unlocks the specified folder.- Parameters:
id
- ID of the folder to unlock- Throws:
NgcUiException
- exception to be handled by viewAuthenticationException
- re-logon required
-
-