Class PolicyParser
java.lang.Object
org.elasticsearch.entitlement.runtime.policy.PolicyParser
A parser to parse policy files for entitlements.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPolicyParser(InputStream inputStream, String policyName, boolean isExternalPlugin) -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetEntitlementName(Class<? extends Entitlement> entitlementClass) protected PolicyParserExceptionnewPolicyParserException(String message) protected PolicyParserExceptionnewPolicyParserException(String scopeName, String message) protected PolicyParserExceptionnewPolicyParserException(String scopeName, String entitlementType, String message) protected PolicyParserExceptionnewPolicyParserException(XContentLocation location, String scopeName, String entitlementType, PolicyValidationException cause) protected EntitlementparseEntitlement(String scopeName, String entitlementType) protected ScopeparseScope(String scopeName)
-
Field Details
-
policyParser
-
policyName
-
-
Constructor Details
-
PolicyParser
public PolicyParser(InputStream inputStream, String policyName, boolean isExternalPlugin) throws IOException - Throws:
IOException
-
-
Method Details
-
getEntitlementName
-
parseVersionedPolicy
-
parsePolicy
-
parseScope
- Throws:
IOException
-
parseEntitlement
- Throws:
IOException
-
newPolicyParserException
-
newPolicyParserException
-
newPolicyParserException
protected PolicyParserException newPolicyParserException(String scopeName, String entitlementType, String message) -
newPolicyParserException
protected PolicyParserException newPolicyParserException(XContentLocation location, String scopeName, String entitlementType, PolicyValidationException cause)
-