Class ApplicationMenuToNodeConverter
java.lang.Object
org.bonitasoft.engine.business.application.converter.ApplicationMenuToNodeConverter
- Author:
- Emmanuel Duchastenier
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMenusToApplicationNode(long applicationId, Long parentMenuId, org.bonitasoft.engine.business.application.xml.ApplicationNode applicationNode, org.bonitasoft.engine.business.application.xml.ApplicationMenuNode menuNode) RECURSIVELY add menu elements (and sub-menus) to xml node, from menu identified by parentMenuId.protected QueryOptionsbuildApplicationMenusQueryOptions(long applicationId, Long parentMenuId, int startIndex, int maxResults) protected org.bonitasoft.engine.business.application.xml.ApplicationMenuNodetoMenu(SApplicationMenu menu) RECURSIVELY convert menu (and sub-menus) to xml node.
-
Constructor Details
-
ApplicationMenuToNodeConverter
-
-
Method Details
-
toMenu
protected org.bonitasoft.engine.business.application.xml.ApplicationMenuNode toMenu(SApplicationMenu menu) throws SBonitaReadException, SObjectNotFoundException RECURSIVELY convert menu (and sub-menus) to xml node.- Parameters:
menu- the menu to convert- Returns:
- the converted menu.
- Throws:
SObjectNotFoundException- if the referenced menu does not exist.SBonitaReadException- if the referenced menu cannot be retrieved.
-
buildApplicationMenusQueryOptions
protected QueryOptions buildApplicationMenusQueryOptions(long applicationId, Long parentMenuId, int startIndex, int maxResults) - Parameters:
applicationId- application ID.parentMenuId- Id of the parent menu, usenullfor explicit no parent.startIndex- pagination start index.maxResults- pagination max results to retrieve.- Returns:
- the newly built
QueryOptions
-
addMenusToApplicationNode
public void addMenusToApplicationNode(long applicationId, Long parentMenuId, org.bonitasoft.engine.business.application.xml.ApplicationNode applicationNode, org.bonitasoft.engine.business.application.xml.ApplicationMenuNode menuNode) throws SBonitaReadException, SObjectNotFoundException RECURSIVELY add menu elements (and sub-menus) to xml node, from menu identified by parentMenuId.- Parameters:
applicationId- ID of the application.parentMenuId- Id of the parent menu, usenullfor explicit no parent.applicationNode-menuNode- the menu node to add new menu elements to. Pass null if new menu node must be added to root application node.- Throws:
SBonitaReadExceptionSObjectNotFoundException
-