Class MenuService

java.lang.Object
com.almis.awe.config.ServiceConfig
com.almis.awe.service.MenuService
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

public class MenuService extends ServiceConfig
Manage application Menus
  • Constructor Details

    • MenuService

      public MenuService(QueryService queryService, ScreenRestrictionGenerator screenRestrictionGenerator, ScreenComponentGenerator screenComponentGenerator, InitialLoadDao initialLoadDao, BaseConfigProperties baseConfigProperties, SecurityConfigProperties securityConfigProperties)
      Autowired constructor
      Parameters:
      queryService - Query service
      screenRestrictionGenerator - Screen restriction generator
      screenComponentGenerator - Screen component generator
      initialLoadDao - Initial load service
      baseConfigProperties - Base configuration properties
      securityConfigProperties - Security configuration properties
  • Method Details

    • getMenu

      public Menu getMenu() throws AWException
      Retrieve the menu for the user
      Returns:
      Retrieved menu
      Throws:
      AWException - Menu has not been found
    • getMenuWithRestrictions

      public Menu getMenuWithRestrictions() throws AWException
      Retrieve the menu for the user
      Returns:
      Retrieved menu
      Throws:
      AWException - Menu has not been found
    • getMenuWithRestrictions

      public Menu getMenuWithRestrictions(String menuType) throws AWException
      Retrieve the menu for the user
      Parameters:
      menuType - Menu type
      Returns:
      Retrieved menu
      Throws:
      AWException - Menu has not been found
    • getMenuWithRestrictions

      public Menu getMenuWithRestrictions(Menu menu) throws AWException
      Retrieve the menu for the user
      Parameters:
      menu - Menu
      Returns:
      Retrieved menu
      Throws:
      AWException - Menu has not been found
    • getMenu

      public Menu getMenu(String menuId) throws AWException
      Retrieve a menu
      Parameters:
      menuId - Menu identifier
      Returns:
      Menu retrieved
      Throws:
      AWException - Menu has not been found
    • getDefaultScreen

      public Screen getDefaultScreen() throws AWException
      Retrieve the menu default screen
      Returns:
      Default screen
      Throws:
      AWException - Default screen has not been defined
    • getOptionScreen

      public Screen getOptionScreen(String optionId) throws AWException
      Retrieve an option screen from the user menu
      Parameters:
      optionId - Option identifier
      Returns:
      Screen retrieved
      Throws:
      AWException - Screen has not been found
    • getAvailableOptionScreen

      public Screen getAvailableOptionScreen(String optionId) throws AWException
      Retrieve an option screen from the user menu
      Parameters:
      optionId - Option identifier
      Returns:
      Screen retrieved
      Throws:
      AWException - Screen has not been found
    • getScreen

      public Screen getScreen(String screenId) throws AWException
      Retrieve an screen
      Parameters:
      screenId - Screen identifier
      Returns:
      Screen retrieved
      Throws:
      AWException - Screen has not been found
    • getOptionByName

      public Option getOptionByName(String optionId) throws AWException
      Retrieve an option screen from the user menu
      Parameters:
      optionId - Option identifier
      Returns:
      Option retrieved
      Throws:
      AWException - Option has not been found
    • getAvailableOptionByName

      public Option getAvailableOptionByName(String optionId) throws AWException
      Retrieve an option screen from the user menu
      Parameters:
      optionId - Option identifier
      Returns:
      Option retrieved
      Throws:
      AWException - Option has not been found
    • getAvailableScreenList

      public ServiceData getAvailableScreenList(String suggest) throws AWException
      Retrieve a list of available screens
      Parameters:
      suggest - Screen typed
      Returns:
      Screen list retrieved
      Throws:
      AWException - Option has not been found
    • getAllScreenList

      public ServiceData getAllScreenList(String suggest)
      Retrieve a list of all screens
      Parameters:
      suggest - Screen typed
      Returns:
      Screen list retrieved
    • checkOptionAddress

      public boolean checkOptionAddress(String address) throws AWException
      Check if address is valid
      Parameters:
      address - Option to check
      Returns:
      Screen list retrieved
      Throws:
      AWException - Option has not been found
    • isAvailableOption

      public boolean isAvailableOption(String optionId, String menuType) throws AWException
      Retrieve if option is available
      Parameters:
      optionId - Option to check
      menuType - Menu type
      Returns:
      Screen list retrieved
      Throws:
      AWException - Option has not been found
    • getModuleList

      public ServiceData getModuleList() throws AWException
      Retrieve a list of available modules
      Returns:
      Module list retrieved
      Throws:
      AWException - Error retrieving module list
    • getNameOptionList

      public ServiceData getNameOptionList(String suggest) throws AWException
      Retrieve a list of available options
      Parameters:
      suggest - Option typed
      Returns:
      Screen list retrieved
      Throws:
      AWException - Option has not been found
    • getScreenRestrictions

      public ServiceData getScreenRestrictions(String restriction) throws AWException
      Retrieve a list of available screens
      Parameters:
      restriction - Restriction profile
      Returns:
      Screen restriction list
      Throws:
      AWException - Screen restriction retrieval failure
    • refreshMenu

      public ServiceData refreshMenu() throws AWException
      Generates an array node with all options in the menu
      Returns:
      Menu options
      Throws:
      AWException - Error generating menu