Class PersistentQueryConfigTableUtils
java.lang.Object
com.illumon.iris.controller.utils.PersistentQueryConfigTableUtils
Utility class for creating a Persistent Query Config Table and supports Swing Panel Rendering.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
Helper class to analyze and hold selected query states and permissions. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetQueryTypeNames
(PersistentQueryControllerConfiguration serverConfiguration) Gets a map of from Query Type to Display Name.getSelectedQueryState
(IrisUserContext irisUserContext, PersistentQueryInfo[] selectedQueries, PersistentQueryControllerConfiguration serverConfiguration) Gets the states for selected queries and permissions for those queries based on user context.static boolean
isStateColumn
(int columnIndex) static boolean
isStateColumn
(String columnName) static FunctionalInterfaces.TriFunction<PersistentQueryInfo,
Map<Long, PersistentQueryInfo>, Map<String, Map<String, String>>, Object> lookupGetValueProcedure
(String columnName) Creates a function that will lookup the value of column based on its name.
-
Field Details
-
QUERY_TYPE_TO_NAME_KEY
- See Also:
-
-
Constructor Details
-
PersistentQueryConfigTableUtils
public PersistentQueryConfigTableUtils()
-
-
Method Details
-
getQueryTypeNames
public static Map<String,String> getQueryTypeNames(PersistentQueryControllerConfiguration serverConfiguration) Gets a map of from Query Type to Display Name.- Parameters:
serverConfiguration
- the server configuration- Returns:
- the query type name map
-
lookupGetValueProcedure
public static FunctionalInterfaces.TriFunction<PersistentQueryInfo,Map<Long, lookupGetValueProcedurePersistentQueryInfo>, Map<String, Map<String, String>>, Object> (String columnName) Creates a function that will lookup the value of column based on its name.- Parameters:
columnName
- the name of the column- Returns:
- a function that will lookup the value
-
isStateColumn
-
isStateColumn
public static boolean isStateColumn(int columnIndex) -
getSelectedQueryState
public static PersistentQueryConfigTableUtils.SelectedQueryStates getSelectedQueryState(IrisUserContext irisUserContext, PersistentQueryInfo[] selectedQueries, PersistentQueryControllerConfiguration serverConfiguration) Gets the states for selected queries and permissions for those queries based on user context.- Parameters:
irisUserContext
- the user contextselectedQueries
- the selected queriesserverConfiguration
- the server configuration- Returns:
- a data object containing the states and permissions
-