Class SystemUtil

java.lang.Object
com.ssgllc.fish.service.util.registered.SystemUtil

@Component public class SystemUtil extends Object
  • Constructor Details

    • SystemUtil

      public SystemUtil(org.springframework.core.env.Environment environment, com.ssgllc.fish.service.cache.EntityConfigCacheService entityConfigCacheService, com.ssgllc.fish.service.cache.CustomCacheService customCacheService, com.ssgllc.fish.config.ApplicationProperties applicationProperties)
  • Method Details

    • getApplicationProperty

      public static String getApplicationProperty(String key)
    • getBaseUrl

      public static String getBaseUrl()
    • getSystemTimezone

      public static String getSystemTimezone()
    • getEcPrivateKeyFolder

      public static String getEcPrivateKeyFolder()
    • getEnvironmentName

      public static String getEnvironmentName()
    • getAppConfig

      public static String getAppConfig(String name)
    • getTextTemplate

      public static String getTextTemplate(String name)
    • getFromCache

      public static Object getFromCache(String cacheName, String entryKey)
    • getCache

      public static Object getCache(String cacheName)
    • executeScript

      public static Object executeScript(String templateName, Map<String,Object> config, List<Map<String,Object>> payload, Object body)
    • evaluateExpression

      public static <T> T evaluateExpression(Object rootObject, String expression, String returnTypeName, boolean mapContext) throws ClassNotFoundException
      Evaluate given expression in context of a root object and return result in given type.

      Example:
      evaluateExpression(entity, "firstName == null", "java.lang.Boolean", false)

      Returns:
      Boolean true or false
      Parameters:
      rootObject - object in scope where given expression will be evaluated
      expression - expression to be evaluated
      returnTypeName - fully qualified name of return type from expression evaluation
      mapContext - true if map accessor should be used in evaluation context, false otherwise
      Returns:
      result from expression evaluation
      Throws:
      ClassNotFoundException
    • debug

      public static void debug(String message)
    • info

      public static void info(String message)
    • warn

      public static void warn(String message)
    • error

      public static void error(String message)
    • inspect

      public static Object inspect(Object object)