Class ApplicationMenuToNodeConverter
- java.lang.Object
-
- org.bonitasoft.engine.business.application.converter.ApplicationMenuToNodeConverter
-
public class ApplicationMenuToNodeConverter extends java.lang.Object- Author:
- Emmanuel Duchastenier
-
-
Constructor Summary
Constructors Constructor Description ApplicationMenuToNodeConverter(ApplicationService applicationService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMenusToApplicationNode(long applicationId, java.lang.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, java.lang.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 Detail
-
ApplicationMenuToNodeConverter
public ApplicationMenuToNodeConverter(ApplicationService applicationService)
-
-
Method Detail
-
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, java.lang.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, java.lang.Long parentMenuId, org.bonitasoft.engine.business.application.xml.ApplicationNode applicationNode, org.bonitasoft.engine.business.application.xml.ApplicationMenuNode menuNode) throws SBonitaReadException, SObjectNotFoundExceptionRECURSIVELY 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
-
-