Class AweElements

java.lang.Object
com.almis.awe.model.component.AweElements

public class AweElements extends Object
The type Awe elements.
Author:
pgarcia
  • Constructor Details

    • AweElements

      public AweElements(org.springframework.web.context.WebApplicationContext context, BaseConfigProperties baseConfigProperties, AweElementsDao elementsDao)
      Autowired constructor
      Parameters:
      context - Application context
      baseConfigProperties - base configuration properties
      elementsDao - Element DAO
  • Method Details

    • init

      @PostConstruct public void init()
      Read all XML files and store them in the component
    • waitForTermination

      protected void waitForTermination(XMLInitData initData)
      Wait executor for termination
      Parameters:
      initData - Initialize data threads
    • waitForMap

      protected <T> Map<String,T> waitForMap(Future<Map<String,T>> result, String fileType)
      Wait executor for termination
      Parameters:
      result - future results
      fileType - File type
    • getEnumerated

      public EnumeratedGroup getEnumerated(String groupId) throws AWException
      Get an EnumeratedGroup with the identifier
      Parameters:
      groupId - Group identifier
      Returns:
      The ENUMERATED group corresponding the groupId
      Throws:
      AWException - Clone not supported
    • getQuery

      public Query getQuery(String queryId) throws AWException
      Get a Query with the identifier
      Parameters:
      queryId - Query identifier
      Returns:
      The query corresponding the queryId
      Throws:
      AWException - Clone not supported
    • getQueue

      public Queue getQueue(String queueId) throws AWException
      Get a Queue with the identifier
      Parameters:
      queueId - Queue id
      Returns:
      The query corresponding the queryId
      Throws:
      AWException - Clone not supported
    • getMaintain

      public Target getMaintain(String maintainId) throws AWException
      Get a MAINTAIN operation with the identifier
      Parameters:
      maintainId - Maintain operation identifier
      Returns:
      The MAINTAIN operation corresponding the maintainId
      Throws:
      AWException - Clone not supported
    • getEmail

      public Email getEmail(String emailId) throws AWException
      Get an email operation with the identifier
      Parameters:
      emailId - Email operation identifier
      Returns:
      The email operation corresponding the mntId
      Throws:
      AWException - Clone not supported
    • getService

      public Service getService(String serviceId) throws AWException
      Get a service with the identifier
      Parameters:
      serviceId - Service identifier
      Returns:
      The service corresponding the serviceId
      Throws:
      AWException - Clone not supported
    • getAction

      public Action getAction(String actionId) throws AWException
      Get an action with the identifier
      Parameters:
      actionId - Action identifier
      Returns:
      The action corresponding the actionId
      Throws:
      AWException - Clone not supported
    • getScreen

      public Screen getScreen(String screenId) throws AWException
      Get a screen with the identifier
      Parameters:
      screenId - Screen identifier
      Returns:
      The screen corresponding the screenId
      Throws:
      AWException - Clone not supported
    • setScreen

      public Screen setScreen(@NonNull @NonNull Screen screen)
      Inserts or updates given screen
      Parameters:
      screen - Screen
      Returns:
      Screen
    • getMenu

      public Menu getMenu(String menuId) throws AWException
      Get menu object
      Parameters:
      menuId - Menu name
      Returns:
      Menu object
      Throws:
      AWException - Clone not supported
    • setMenu

      public Menu setMenu(String menuId, Menu menu)
      Inserts or updates given menu
      Parameters:
      menuId - menu id
      menu - Menu
      Returns:
      Menu
    • getProfile

      public Profile getProfile(String profile) throws AWException
      Get profile object
      Parameters:
      profile - Profile name
      Returns:
      Profile object
      Throws:
      AWException - Clone not supported
    • getProfileList

      public Set<String> getProfileList()
      Get available profile list
      Returns:
      Profile object
    • getScreenList

      public Set<String> getScreenList()
      Get available screen list
      Returns:
      Screen list
    • getLocales

      public Map<String,Map<String,String>> getLocales()
      Returns all locales
      Returns:
      locales
    • getLanguage

      public String getLanguage()
      Retrieve language
      Returns:
      Language
    • getLocale

      public String getLocale(String localeIdentifier)
      Returns a locale based on its identifier
      Parameters:
      localeIdentifier - Local identifier
      Returns:
      Selected locale
    • getLocale

      public String getLocale(String localeIdentifier, Object... tokenList)
      Returns a locale based on its identifier
      Parameters:
      localeIdentifier - Local identifier
      Returns:
      Selected locale
    • getLocaleWithLanguage

      public String getLocaleWithLanguage(String localeIdentifier, String language)
      Returns a locale based on its identifier
      Parameters:
      localeIdentifier - Local identifier
      Returns:
      Selected locale
    • getLocaleWithLanguage

      public String getLocaleWithLanguage(String localeIdentifier, String language, Object... tokenList)
      Returns a locale based on its identifier replacing a set of tokens by a string array
      Parameters:
      localeIdentifier - Local identifier
      tokenList - Token list to replace
      Returns:
      Selected locale
    • getProperty

      public String getProperty(String propertyIdentifier)
      Retrieve a property value
      Parameters:
      propertyIdentifier - Property identifier
      Returns:
      Selected locale
    • getProperty

      public <T> T getProperty(String propertyIdentifier, Class<T> tClass)
      Retrieve a property value reading as a class
      Type Parameters:
      T - property class
      Parameters:
      propertyIdentifier - propertyIdentifier Property identifier
      tClass - Class to read the property value
      Returns:
      Selected locale
    • getProperty

      public String getProperty(String propertyIdentifier, String defaultValue)
      Retrieve a property value
      Parameters:
      propertyIdentifier - Property identifier
      defaultValue - Default value
      Returns:
      Selected locale
    • getPhaseServices

      public List<Service> getPhaseServices(LaunchPhaseType phase) throws AWException
      Get phase SERVICES
      Parameters:
      phase - Phase to look into
      Returns:
      Start Service list
      Throws:
      AWException - Error starting service
    • getQueryMap

      public Map<String,Query> getQueryMap()
      Retrieve query map (query name + query object)
      Returns:
      Query map
    • getMaintainMap

      public Map<String,Target> getMaintainMap()
      Retrieve maintain map (maintain name + maintain object)
      Returns:
      Maintain map
    • getApplicationContext

      public org.springframework.context.ApplicationContext getApplicationContext()
      Retrieve the application context
      Returns:
      Application context