uk.ac.soton.itinnovation.grid.types
Class PolicyRule

java.lang.Object
  extended by uk.ac.soton.itinnovation.grid.types.PolicyRule
All Implemented Interfaces:
Comparable

public class PolicyRule
extends Object
implements Comparable

A rule used in determining whether a user has a role.

When determining whether a SOAP operation should be permitted, the PBAC PDP must first find the set of roles which the caller has in the context of the resource. This is done by evaluating each of the resource's PolicyRules.

Each rule contains a MatchPattern, and the effect of the pattern being matched.

Since:
5.1

Field Summary
protected  MatchPattern matchPattern
           
protected  String role
          The role this rule applies to
protected  PolicyRuleType type
           
 
Constructor Summary
PolicyRule()
          For Axis.
PolicyRule(MatchPattern pattern, String role)
          Convenience constructor for SUFFICIENT rules.
PolicyRule(MatchPattern pattern, String role, PolicyRuleType type)
           
PolicyRule(MatchRule rule)
           
 
Method Summary
 void checkValid()
          Ensure that all required fields are set, and no fields conflict.
 int compareTo(Object otherObj)
          Used to ensure a stable sort order for display.
 MatchPattern getMatchPattern()
           
 String getRole()
           
 PolicyRuleType getType()
           
 void setMatchPattern(MatchPattern value)
           
 void setRole(String value)
           
 void setType(PolicyRuleType value)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

matchPattern

protected MatchPattern matchPattern

type

protected PolicyRuleType type

role

protected String role
The role this rule applies to

Constructor Detail

PolicyRule

public PolicyRule()
For Axis.


PolicyRule

public PolicyRule(MatchPattern pattern,
                  String role)
Convenience constructor for SUFFICIENT rules.


PolicyRule

public PolicyRule(MatchPattern pattern,
                  String role,
                  PolicyRuleType type)

PolicyRule

public PolicyRule(MatchRule rule)
Method Detail

getMatchPattern

public MatchPattern getMatchPattern()

getType

public PolicyRuleType getType()

getRole

public String getRole()

setMatchPattern

public void setMatchPattern(MatchPattern value)

setType

public void setType(PolicyRuleType value)

setRole

public void setRole(String value)

toString

public String toString()
Overrides:
toString in class Object

checkValid

public void checkValid()
                throws InvalidPolicyRuleException
Ensure that all required fields are set, and no fields conflict.

Throws:
InvalidPolicyRuleException

compareTo

public int compareTo(Object otherObj)
Used to ensure a stable sort order for display.

Specified by:
compareTo in interface Comparable


Copyright © 2001-2008 University of Southampton IT Innovation Centre. All Rights Reserved.