Class ServiceConfig

    • Constructor Detail

      • ServiceConfig

        public ServiceConfig()
    • Method Detail

      • setApplicationContext

        @Autowired
        public void setApplicationContext​(org.springframework.context.ApplicationContext context)
        Autowired application context
        Specified by:
        setApplicationContext in interface org.springframework.context.ApplicationContextAware
        Parameters:
        context - application context
      • getApplicationContext

        protected org.springframework.context.ApplicationContext getApplicationContext()
        Get application context
        Returns:
        context
      • getElements

        public AweElements getElements()
        Returns instantiated elements
        Returns:
        Awe Elements
      • getRequest

        public AweRequest getRequest()
        Returns request object
        Returns:
        Awe request
      • containsBean

        public boolean containsBean​(String bean)
        Check if bean is defined
        Parameters:
        bean - Bean class
        Returns:
        Bean
      • getBean

        public <T> T getBean​(Class<T> clazz)
        Retrieve a bean
        Type Parameters:
        T - Bean
        Parameters:
        clazz - Bean class
        Returns:
        Bean
      • getBean

        public Object getBean​(String beanId)
        Retrieve a bean
        Parameters:
        beanId - Bean identifier
        Returns:
        Bean
      • getSession

        public AweSession getSession()
        Get current users session
        Returns:
        Awe Session
      • getLocale

        public String getLocale​(String locale)
        Retrieve locale
        Parameters:
        locale - Locale identifier
        Returns:
        Locale text
      • getLocale

        public String getLocale​(String locale,
                                String... parameters)
        Retrieve locale with parameter
        Parameters:
        locale - Locale identifier
        parameters - Parameter
        Returns:
        Locale text
      • getProperty

        public String getProperty​(String property)
        Retrieve property
        Parameters:
        property - Property identifier
        Returns:
        Property value
      • getProperty

        public <T> T getProperty​(String property,
                                 Class<T> clazz)
        Retrieve property of a determined class
        Type Parameters:
        T - Return value class
        Parameters:
        property - Property identifier
        clazz - Property class
        Returns:
        Property value