Class ServiceConfig

java.lang.Object
com.almis.awe.config.ServiceConfig
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware
Direct Known Subclasses:
AbstractQueryBuilder, AbstractQueryConnector, AbstractRestConnector, AccessService, ActionService, AweDatabaseContextHolder, AweSessionDetails, AweUserDetailService, BroadcastService, CalendarDAO, ChartService, DataListBuilder, DataListService, EmailMaintainConnector, EmailService, EncodeService, EnumBuilder, FileChecker, FileController, FileDAO, FileService, HelpService, InitService, JavaConnector, JobService, JWTTokenService, LauncherService, LdapAweUserDetailsMapper, LiteralsService, LocaleFileService, LocaleService, LogService, MaintainLauncher, MaintainService, MenuService, NumericService, PathService, PrinterService, PropertyService, QueryLauncher, QueryService, QueryUtil, QueueListener, QueueMaintainConnector, QueueProcessor, RemoteSchedulerService, ReportDesigner, ReportGenerator, ReportJob, ReportService, RestSecurityConfiguration, SchedulerDAO, SchedulerEmailReportService, SchedulerJobListener, SchedulerSecurityConfig, SchedulerService, SchedulerTriggerListener, ScreenComponentGenerator, ScreenConfigurationGenerator, ScreenModelGenerator, ScreenService, SecurityConfig, ServiceMaintainConnector, SessionService, SettingsController, SqlExtractorService, SQLMaintainConnector, SystemService, TaskDAO, TemplateService, TotpService, TranslationService, UploadController, UserDAOImpl, UserService

public abstract class ServiceConfig extends Object implements org.springframework.context.ApplicationContextAware
Base class for all custom service
Author:
Jorge BELLON
  • Constructor Details

    • ServiceConfig

      public ServiceConfig()
  • Method Details

    • 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