public interface RASPolicyRuleManager extends EntityManager
Modifier and Type | Method and Description |
---|---|
RASPolicyRuleEntry |
createRASPolicyRule(java.lang.String name, java.lang.String displayName, java.lang.String description, java.lang.String principalName, RASPolicyRuleEntry.PrincipalType principalType, java.util.Set<java.lang.String> privileges, PolicyRuleEntry.EffectType effect, java.util.Date startDate, java.util.Date endDate, boolean invert)
Creates RAS policy rule.
|
void |
deleteRASPolicyRule(java.lang.String name, boolean cascading)
Deletes the policy rule.
|
RASPolicyRuleEntry |
getRASPolicyRule(java.lang.String name)
Returns the RAS policy rule by its name.
|
java.util.List<RASPolicyRuleEntry> |
getRASPolicyRules(RASPolicyRuleSearchQuery rasPolicyRuleSearchQuery)
Queries RAS policy rules.
|
void |
modifyRASPolicyRule(RASPolicyRuleEntry rasPolicyRuleEntry)
Modifies RAS policy rule.
|
resolveReference
RASPolicyRuleEntry createRASPolicyRule(java.lang.String name, java.lang.String displayName, java.lang.String description, java.lang.String principalName, RASPolicyRuleEntry.PrincipalType principalType, java.util.Set<java.lang.String> privileges, PolicyRuleEntry.EffectType effect, java.util.Date startDate, java.util.Date endDate, boolean invert) throws PolicyStoreException
name
- the name of the rule. The parameter should not be null, otherwise, throw out an InvalidArgumentException.displayName
- the display name of the rule. The parameter can be either a String value or null.description
- the description of the rule. The parameter can be either a String value or null.principalName
- target for RAS policy rule. NOTE, if the principalType is external, the principalName should use GUID.principalType
- principal type of RAS policy ruleprivileges
- privileges used in RAS policy Ruleeffect
- the effect can be GRANT or DENY.startDate
- a time point from which this rule takes effect.endDate
- a time point at which this rule expires.invert
- flag specifying whether this rule is inverted for the principal or not. That is, when invert is true, this RAS policy rule is applicable ONLY when the subject has NO such principal specified by <principalName>PolicyStoreException
- if any internal status error, throws out PolicyStoreException.void deleteRASPolicyRule(java.lang.String name, boolean cascading) throws PolicyObjectNotFoundException, PolicyStoreException
name
- the name of the rule.cascade
- cascading flag.InvalidArgumentException
- if null/empty name passed in, throws out InvalidArgumentException.PolicyObjectNotFoundException
- if the RAS policy rule specified by name doesn't exist, throws out PolicyObjectNotFoundException.PolicyStoreOperationNotAllowedException
- if the cascading flag is set to false and the RAS policy rule is referred by other RAS policies, throw out a PolicyStoreOperationNotAllowedExceptionPolicyStoreException
- if any internal status error, throws out PolicyStoreException.void modifyRASPolicyRule(RASPolicyRuleEntry rasPolicyRuleEntry) throws PolicyStoreException
rasPolicyRuleEntry
- the RAS policy rule entry, please refer to RASPolicyRuleEntry
for details.PolicyStoreException.
PolicyStoreException
java.util.List<RASPolicyRuleEntry> getRASPolicyRules(RASPolicyRuleSearchQuery rasPolicyRuleSearchQuery) throws PolicyStoreException
Only RAS policy rules created using the createRASPolicyRule
API are returned.
rasPolicyRuleSearchQuery
- search criteria, please refer to RASPolicyRuleSearchQuery
for details.PolicyStoreException.
PolicyStoreException
RASPolicyRuleEntry getRASPolicyRule(java.lang.String name) throws PolicyObjectNotFoundException, PolicyStoreException
name
- the name of the rule.PolicyStoreException.
PolicyObjectNotFoundException
PolicyStoreException