Class PolicyEnforcementPoint.QueryParamSpec
java.lang.Object
org.gcube.informationsystem.resourceregistry.pep.PolicyEnforcementPoint.QueryParamSpec
- Enclosing class:
- PolicyEnforcementPoint
Specification for query parameter authorization and validation.
-
Constructor Summary
ConstructorsConstructorDescriptionQueryParamSpec(String name, String defaultValue, boolean requiresPrivilege, Set<String> restrictedToRoles) Creates a new query parameter policy specification. -
Method Summary
Modifier and TypeMethodDescriptionReturns the default value of the query parameter.getName()Returns the name of the query parameter.Returns the set of roles permitted to use this parameter.booleanReturns whether this parameter requires special privileges.
-
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 parameterdefaultValue- the default value of the parameterrequiresPrivilege- whether it requires special privilegesrestrictedToRoles- the restricted roles, or null/empty if none
-
-
Method Details
-
getName
Returns the name of the query parameter.- Returns:
- the parameter name
-
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
Returns the set of roles permitted to use this parameter.- Returns:
- the allowed roles
-