Package cronapi

Class QueryManager


  • public class QueryManager
    extends Object
    • Field Detail

      • JSON_CACHE

        public static ThreadLocal<com.google.gson.JsonObject> JSON_CACHE
      • DISABLE_AUTH

        public static boolean DISABLE_AUTH
    • Constructor Detail

      • QueryManager

        public QueryManager()
    • Method Detail

      • getJSON

        public static com.google.gson.JsonObject getJSON()
      • getQuery

        public static com.google.gson.JsonObject getQuery​(String id)
      • getJPQL

        public static String getJPQL​(com.google.gson.JsonObject query,
                                     boolean checkMultitenant)
      • getType

        public static String getType​(com.google.gson.JsonObject obj)
      • checkSecurity

        public static void checkSecurity​(com.google.gson.JsonObject obj,
                                         String verb)
      • getAuthorities

        public static com.google.gson.JsonArray getAuthorities​(com.google.gson.JsonObject datasource,
                                                               String verb)
      • checkSecurity

        public static void checkSecurity​(com.google.gson.JsonObject obj,
                                         String verb,
                                         boolean checkAuthorities)
      • isNull

        public static boolean isNull​(com.google.gson.JsonElement value)
      • addDefaultValues

        public static void addDefaultValues​(com.google.gson.JsonObject query,
                                            Var ds,
                                            boolean onlyNull)
      • executeEvent

        public static Var executeEvent​(com.google.gson.JsonObject query,
                                       Object ds,
                                       String eventName)
      • executeEvent

        public static void executeEvent​(com.google.gson.JsonObject query,
                                        String eventName,
                                        Map<String,​Var> customValues)
      • executeEvent

        public static void executeEvent​(com.google.gson.JsonObject query,
                                        String eventName,
                                        Var... params)
      • executeNavigateEvent

        public static void executeNavigateEvent​(com.google.gson.JsonObject query,
                                                DataSource ds)
      • doExecuteBlockly

        public static Var doExecuteBlockly​(com.google.gson.JsonObject blockly,
                                           String method,
                                           Var... params)
                                    throws Exception
        Throws:
        Exception
      • executeBlockly

        public static Var executeBlockly​(com.google.gson.JsonObject query,
                                         String method,
                                         Var... vars)
      • hasParameterValue

        public static boolean hasParameterValue​(com.google.gson.JsonObject customQuery,
                                                String param)
      • getParameterValue

        public static Var getParameterValue​(com.google.gson.JsonObject customQuery,
                                            String param,
                                            Object ds,
                                            Map<String,​Var> customValues)
      • getParameterValue

        public static Var getParameterValue​(com.google.gson.JsonObject customQuery,
                                            String param,
                                            Map<String,​Var> customValues)
      • getBlocklyMethod

        public static String getBlocklyMethod​(com.google.gson.JsonObject query,
                                              String method)
      • createDefaultPermission

        public static com.google.gson.JsonObject createDefaultPermission​(com.google.gson.JsonElement permission,
                                                                         String method)
      • isDynamicField

        public static boolean isDynamicField​(com.google.gson.JsonObject query,
                                             String field)
      • isFieldAuthorized

        public static boolean isFieldAuthorized​(com.google.gson.JsonObject query,
                                                String field,
                                                String method)
                                         throws Exception
        Throws:
        Exception
      • checkFieldSecurity

        public static void checkFieldSecurity​(com.google.gson.JsonObject query,
                                              Object ds,
                                              String method)
                                       throws Exception
        Throws:
        Exception
      • checkFilterSecurity

        public static void checkFilterSecurity​(com.google.gson.JsonObject query,
                                               DataSourceFilter filter)
      • checkEntityFilterSecurity

        public static void checkEntityFilterSecurity​(Object obj,
                                                     List<String> filters)
      • checkFilterSecurity

        public static void checkFilterSecurity​(com.google.gson.JsonObject query,
                                               List<String> filter)
      • getCalcFieldValues

        public static Map<String,​Object> getCalcFieldValues​(com.google.gson.JsonObject query,
                                                                  Object bean)
      • getDefaultValues

        public static Map<String,​Object> getDefaultValues​(com.google.gson.JsonObject query,
                                                                Object bean)
      • parseExpressionValue

        public static Var parseExpressionValue​(com.google.gson.JsonObject query,
                                               Object ds,
                                               String str,
                                               Map<String,​Var> customValues)
      • parseExpressionValue

        public static Var parseExpressionValue​(Object ds,
                                               com.google.gson.JsonElement element,
                                               Map<String,​Var> customValues)
      • parseExpressionValue

        public static Var parseExpressionValue​(String id,
                                               com.google.gson.JsonObject query,
                                               Object ds,
                                               com.google.gson.JsonElement element,
                                               Map<String,​Var> customValues)
      • parseExpressionValue

        public static Var parseExpressionValue​(com.google.gson.JsonElement element)
      • addCalcFields

        public static void addCalcFields​(com.google.gson.JsonObject query,
                                         DataSource ds)
      • addCalcFields

        public static void addCalcFields​(com.google.gson.JsonObject query,
                                         Object ds,
                                         boolean post)
      • checkMultiTenant

        public static void checkMultiTenant​(com.google.gson.JsonObject query,
                                            DataSource ds)
      • createNewQuery

        public static com.google.gson.JsonObject createNewQuery​(String entityFullName)
      • addFilter

        public static void addFilter​(com.google.gson.JsonObject query,
                                     String field,
                                     String type,
                                     String operator,
                                     String value)