Simias::Policy::Rule Class Reference

Object used to encapsulate rule into a more friendly form. More...

Collaboration diagram for Simias::Policy::Rule:

Collaboration graph
[legend]

List of all members.

Public Types

enum  Result { Allow, Deny }
 Result of applying input value to policy rule. More...
enum  Operation {
  Equal, Not_Equal, Greater, Less,
  Greater_Equal, Less_Equal, RegExp, RegExp_IgnoreCase,
  None, Add, Delete, Modify,
  NameChange
}
 Operation type to perform on policy rules. More...

Public Member Functions

 Rule (object operand, Operation operation, Result result)
 Initializes the object with the specified parameters.
 Rule (object rule)
 Initializes the object with the specified rule document.
 Rule (string rule)
 Initializes the object with the specified rule string.
virtual void GetObjectData (SerializationInfo info, StreamingContext context)
 Called by the ISerializable interface to serialize a Rule object.
XmlDocument ToXml ()
 Converts the value of this instance to an XML document.
Result Apply (object input)
 Applies the rule to the input object and returns the result.
override bool Equals (object rule)
 Determines whether two Object instances are equal.
override int GetHashCode ()
 Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
override string ToString ()
 Converts the value of this instance to its equivalent string.

Static Public Member Functions

static bool operator== (Rule rule1, Rule rule2)
 Determines whether two Object instances are equal.
static bool operator!= (Rule rule1, Rule rule2)
 Determines whether two Object instances are not equal.

Protected Member Functions

 Rule (SerializationInfo info, StreamingContext context)
 Special constructor used to deserialize a Rule object.

Properties

bool IsExclusion [get]
 Gets whether this rule is an exclusion rule.
bool IsException [get]
 Gets whether this rule is an exception rule.
object Operand [get, set]
 Gets or sets the object that is used to match against the input object when the Apply method is called.
Operation RuleOperation [get, set]
 Gets or sets the match type operation to perform between the input and operand.
Result RuleResult [get, set]
 Gets or set the result to return when operation is true.


Detailed Description

Object used to encapsulate rule into a more friendly form.


Member Enumeration Documentation

Result of applying input value to policy rule.

Operation type to perform on policy rules.


Constructor & Destructor Documentation

Simias::Policy::Rule::Rule ( object  operand,
Operation  operation,
Result  result 
) [inline]

Initializes the object with the specified parameters.

Parameters:
operand Object that is used to match against the input object when the Apply method is called. The type of object must be one of the Simias.Syntax types.
operation Operation to perform between input and operand.
result Result to return when operation is true.

Simias::Policy::Rule::Rule ( object  rule  )  [inline]

Initializes the object with the specified rule document.

Parameters:
rule Xml document that contains a rule representation.

Simias::Policy::Rule::Rule ( string  rule  )  [inline]

Initializes the object with the specified rule string.

Parameters:
rule Xml document of string format that contains a rule representation.

Simias::Policy::Rule::Rule ( SerializationInfo  info,
StreamingContext  context 
) [inline, protected]

Special constructor used to deserialize a Rule object.

Parameters:
info The SerializationInfo populated with the data.
context The source (see StreamingContext) for this serialization.


Member Function Documentation

virtual void Simias::Policy::Rule::GetObjectData ( SerializationInfo  info,
StreamingContext  context 
) [inline, virtual]

Called by the ISerializable interface to serialize a Rule object.

Parameters:
info The SerializationInfo to populate with data.
context The destination (see StreamingContext) for this serialization.

XmlDocument Simias::Policy::Rule::ToXml (  )  [inline]

Converts the value of this instance to an XML document.

Returns:
The value of this instance.

static bool Simias::Policy::Rule::operator== ( Rule  rule1,
Rule  rule2 
) [inline, static]

Determines whether two Object instances are equal.

Parameters:
rule1 First object to compare.
rule2 Second object to compare.
Returns:
True if the first object is equal to the second object. Otherwise false is returned.

static bool Simias::Policy::Rule::operator!= ( Rule  rule1,
Rule  rule2 
) [inline, static]

Determines whether two Object instances are not equal.

Parameters:
rule1 First object to compare.
rule2 Second object to compare.
Returns:
True if the first object is not equal to the second object. Otherwise false is returned.

Result Simias::Policy::Rule::Apply ( object  input  )  [inline]

Applies the rule to the input object and returns the result.

Parameters:
input Object to apply rule to.
Returns:
The predefined result if the operation is true.

override bool Simias::Policy::Rule::Equals ( object  rule  )  [inline]

Determines whether two Object instances are equal.

Parameters:
rule Object to compare to the current object.
Returns:
True if the specified object is equal to the current object. Otherwise false is returned.

override int Simias::Policy::Rule::GetHashCode (  )  [inline]

Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.

Returns:
A hash code for the current object.

override string Simias::Policy::Rule::ToString (  )  [inline]

Converts the value of this instance to its equivalent string.

Returns:
The value of this instance.


Property Documentation

bool Simias::Policy::Rule::IsExclusion [get]

Gets whether this rule is an exclusion rule.

bool Simias::Policy::Rule::IsException [get]

Gets whether this rule is an exception rule.

object Simias::Policy::Rule::Operand [get, set]

Gets or sets the object that is used to match against the input object when the Apply method is called.

Operation Simias::Policy::Rule::RuleOperation [get, set]

Gets or sets the match type operation to perform between the input and operand.

Result Simias::Policy::Rule::RuleResult [get, set]

Gets or set the result to return when operation is true.


The documentation for this class was generated from the following file:

Generated on Wed Apr 8 14:49:43 2009 for simias by  doxygen 1.5.6