Class AssignmentPolicyUtil
java.lang.Object
io.deephaven.enterprise.controller.assignment.AssignmentPolicyUtil
A Utility class for creating
AssignmentPolicy
instances from a descriptor.-
Method Summary
Modifier and TypeMethodDescriptionstatic AssignmentPolicy
createPolicy
(String policyName, String assignmentPolicyParams, QueryUserAssignmentLogger logger) Create anAssignmentPolicy
for the policy name.static String
Get the default policy name.static String
Get the default policy parameters.static void
updateConfiguration
(Map<String, AssignmentPolicyConfig> newPolicies, String defaultPolicyName, String defaultPolicyParams) Update the configuration values from the parameters.
-
Method Details
-
updateConfiguration
public static void updateConfiguration(@NotNull Map<String, AssignmentPolicyConfig> newPolicies, @NotNull String defaultPolicyName, @NotNull String defaultPolicyParams) Update the configuration values from the parameters. This must be invoked before any other method is called.- Parameters:
newPolicies
- the map of Policy name to implementation classdefaultPolicyName
- the name of the default policydefaultPolicyParams
- the default policy parameters, or the empty string.
-
getDefaultPolicyName
Get the default policy name.- Returns:
- the default policy name.
-
getDefaultPolicyParams
Get the default policy parameters.- Returns:
- the default policy parameters.
-
createPolicy
public static AssignmentPolicy createPolicy(@Nullable String policyName, @Nullable String assignmentPolicyParams, @NotNull QueryUserAssignmentLogger logger) Create anAssignmentPolicy
for the policy name.- Parameters:
policyName
- the name of the policyassignmentPolicyParams
- the parameters for the policy. May be null.logger
- the logger to record changes of user assignment.- Returns:
- a new
AssignmentPolicy
-