|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bea.ales.management.PolicyQuery
This class represents a policy query. It contains all query criteria for querying policies.
The query criteria include effect type, result type, action, resource, role, subject and delegator.
Notice policy constraints can not be a query criterion.
A PolicyQuery
instance can be saved persistently and deleted by PoliciesManager.
Inner Class Summary | |
static class |
PolicyQuery.OrderType
This class represents the order type of a policy query. |
static class |
PolicyQuery.ResultType
This class represents the result type of a policy query. |
Constructor Summary | |
PolicyQuery(java.lang.String name,
java.lang.String owner,
PolicyType policyType)
Construct the PolicyQuery instance. |
Method Summary | |
void |
addAction(Action action)
Add the action to the policy query. |
void |
addDelegator(User delegator)
Add the delegator to the policy query. |
void |
addResource(Resource resource)
Add the resource to the policy query. |
void |
addRole(Role role)
Add the role to the policy query. |
void |
addSubject(java.lang.Object subject)
Add the subject to the policy query. |
java.util.List |
getActions()
Get all actions of the policy query. |
AuthorizationPolicyQueryResult |
getAuthorizationPolicies(PoliciesManager policiesManager)
Find all authorization policies which match this policyQuery. |
java.util.List |
getDelegators()
Get all delegators of the policy query. |
PolicyEffectType |
getEffectType()
Get the effect type of the policy query. |
MembershipRuleQueryResult |
getMembershipRules(PoliciesManager policiesManager)
Find all membership rules which match this policyQuery. |
java.lang.String |
getName()
Gets the name of the policy query. |
PolicyQuery.OrderType |
getOrderType()
Get the order type of the policy query. |
java.lang.String |
getOwner()
Get the owner name of the policy query. |
PolicyType |
getPolicyType()
Get the policy type of the policy query. |
java.util.List |
getResources()
Get all resources of the policy query. |
PolicyQuery.ResultType |
getResultType()
Get the result type of the policy query. |
java.util.List |
getRoles()
Get the roles of the policy query. |
java.util.List |
getSubjects()
Get all subjects of the policy query. |
void |
removeAction(Action action)
Remove the action from the policy query. |
void |
removeDelegator(User delegator)
Remove the delegator from the policy query. |
void |
removeResource(Resource resource)
Remove a resource from the policy query. |
void |
removeRole(Role role)
Remove the role from the policy query. |
void |
removeSubject(java.lang.Object subject)
Remove the subject from the policy query. |
void |
setActions(java.util.List actions)
Set actions to the policy query. |
void |
setDelegators(java.util.List delegators)
Set delegators to the policy query. |
void |
setEffectType(PolicyEffectType effectType)
Set the effect type of the policy query. |
void |
setName(java.lang.String name)
Set the name of the policy query. |
void |
setOrderType(PolicyQuery.OrderType orderType)
Set the order type to the policy query. |
void |
setOwner(java.lang.String owner)
Set the owner name to the policy query. |
void |
setPolicyType(PolicyType policyType)
Set the policy type to the policy query. |
void |
setResources(java.util.List resources)
Set resources to the policy query. |
void |
setResultType(PolicyQuery.ResultType resultType)
Set the result type to the policy query. |
void |
setRoles(java.util.List roles)
Sets role to the policy query. |
void |
setSubjects(java.util.List subjects)
Set subjects to the policy query. |
java.lang.String |
toString()
Convert the policy query to a text value |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public PolicyQuery(java.lang.String name, java.lang.String owner, PolicyType policyType) throws java.lang.IllegalArgumentException
PolicyQuery
instance.
name
- the name of policy query. It can not be a null or empty string, otherwise an IllegalArgumentException will be thrown.owner
- the owner name of policy query. It must be a qualified name. And it can not be a null or empty string, otherwise an IllegalArgumentException will be thrown.policyType
- the policy type which is either PolicyType.AUTHORIZATION_POLICY or PolicyType.MEMBERSHIP_RULE. It can not be null, otherwise an IllegalArgumentException will be thrown.Method Detail |
public java.lang.String getName()
public void setName(java.lang.String name) throws java.lang.IllegalArgumentException
name
- the name to be set.public java.lang.String getOwner()
public void setOwner(java.lang.String owner) throws java.lang.IllegalArgumentException
owner
- the owner name to be set. The name must be a qualified user name.public PolicyType getPolicyType() throws ManagementException
public void setPolicyType(PolicyType policyType) throws java.lang.IllegalArgumentException, ManagementException
policyType
- the policy type to the policy query.public PolicyEffectType getEffectType() throws ManagementException
public void setEffectType(PolicyEffectType effectType) throws ManagementException
effectType
- the effect type of the policy query.public java.util.List getActions() throws ManagementException
Action
.public void setActions(java.util.List actions) throws ManagementException
actions
- list of actions as Action
.
The null or empty list indicate any action.public void addAction(Action action) throws java.lang.IllegalArgumentException, ManagementException
action
- the action to be added.public void removeAction(Action action) throws java.lang.IllegalArgumentException, ManagementException
action
- the action to be removed.public java.util.List getRoles() throws ManagementException
Role
.public void setRoles(java.util.List roles) throws ManagementException
roles
- list of roles as Role
.public void addRole(Role role) throws java.lang.IllegalArgumentException, ManagementException
role
- the role to be added.public void removeRole(Role role) throws java.lang.IllegalArgumentException, ManagementException
role
- the role to be removed.public java.util.List getResources() throws ManagementException
Resource
.public void setResources(java.util.List resources) throws ManagementException
resources
- list of resources as Resource
.public void addResource(Resource resource) throws java.lang.IllegalArgumentException, ManagementException
resource
- the resource to be added.public void removeResource(Resource resource) throws java.lang.IllegalArgumentException, ManagementException
resource
- the resource to be removed.public java.util.List getSubjects() throws ManagementException
User
,
Group
or Role
.
If the policy type is PolicyType.MEMBERSHIP_RULE, the possible type of subject is User
or Group
.public void setSubjects(java.util.List subjects) throws ManagementException
subjects
- list of subjects to be set.
If the policy type is PolicyType.AUTHORIZATION_POLICY, the possible type of subject is User
,
Group
or Role
.
If the policy type is PolicyType.MEMBERSHIP_RULE, the possible type of subject is User
or Group
.public void addSubject(java.lang.Object subject) throws java.lang.IllegalArgumentException, ManagementException
subject
- the subject to be added.
If the policy type is PolicyType.AUTHORIZATION_POLICY, the possible type of subject is User
,
Group
or Role
.
If the policy type is PolicyType.MEMBERSHIP_RULE, the possible type of subject is User
or Group
.public void removeSubject(java.lang.Object subject) throws java.lang.IllegalArgumentException, ManagementException
subject
- the subject to be removed.
If the policy type is PolicyType.AUTHORIZATION_POLICY, the possible type of subject is User
,
Group
or Role
.
If the policy type is PolicyType.MEMBERSHIP_RULE, the possible type of subject is User
or Group
.public java.util.List getDelegators() throws ManagementException
User
.public void setDelegators(java.util.List delegators) throws ManagementException
delegators
- list of delegators as User
.public void addDelegator(User delegator) throws java.lang.IllegalArgumentException, ManagementException
delegator
- a delegator to be added.public void removeDelegator(User delegator) throws java.lang.IllegalArgumentException, ManagementException
delegator
- the delegator to be removed.public PolicyQuery.ResultType getResultType() throws ManagementException
public void setResultType(PolicyQuery.ResultType resultType) throws ManagementException
resultType
- the result type to be set.public PolicyQuery.OrderType getOrderType() throws ManagementException
public void setOrderType(PolicyQuery.OrderType orderType) throws ManagementException
orderType
- the order type to the policy query.public java.lang.String toString()
public AuthorizationPolicyQueryResult getAuthorizationPolicies(PoliciesManager policiesManager) throws ManagementException
policiesManager
- by which policy query to be executed.public MembershipRuleQueryResult getMembershipRules(PoliciesManager policiesManager) throws java.lang.IllegalStateException, ManagementException
policiesManager
- by which policy query to be executed.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |