Class PolicyEnforcementPoint.QueryParamSpec

java.lang.Object
org.gcube.informationsystem.resourceregistry.pep.PolicyEnforcementPoint.QueryParamSpec
Enclosing class:
PolicyEnforcementPoint

public static class PolicyEnforcementPoint.QueryParamSpec extends Object
Specification for query parameter authorization and validation.
  • Constructor Details

    • QueryParamSpec

      public QueryParamSpec(String name, String defaultValue, boolean requiresPrivilege, Set<String> restrictedToRoles)
      Creates a new query parameter policy specification.
      Parameters:
      name - the name of the query parameter
      defaultValue - the default value of the parameter
      requiresPrivilege - whether it requires special privileges
      restrictedToRoles - the restricted roles, or null/empty if none
  • Method Details

    • getName

      public String getName()
      Returns the name of the query parameter.
      Returns:
      the parameter name
    • getDefaultValue

      public String getDefaultValue()
      Returns the default value of the query parameter.
      Returns:
      the default value
    • isRequiresPrivilege

      public boolean isRequiresPrivilege()
      Returns whether this parameter requires special privileges.
      Returns:
      true if privileged, false otherwise
    • getRestrictedToRoles

      public Set<String> getRestrictedToRoles()
      Returns the set of roles permitted to use this parameter.
      Returns:
      the allowed roles