Class ApplicationMenuToNodeConverter

java.lang.Object
org.bonitasoft.engine.business.application.converter.ApplicationMenuToNodeConverter

public class ApplicationMenuToNodeConverter extends Object
Author:
Emmanuel Duchastenier
  • Constructor Details

    • ApplicationMenuToNodeConverter

      public ApplicationMenuToNodeConverter(ApplicationService applicationService)
  • 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, use null for 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, use null for 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:
      SBonitaReadException
      SObjectNotFoundException