issrg.pba.rbac.policies
Class MMERUnit

java.lang.Object
  extended by issrg.pba.rbac.policies.MMERUnit

public class MMERUnit
extends java.lang.Object

This is the class representing a MMER unit. A MMER policy may contains several MMER units.

Version:
0.1
Author:
W. Xu

Constructor Summary
MMERUnit(int forbiddenCardinality, java.util.Vector<RoleBasedCredentials> mmer)
          This constructor creates the MMERUnit object.
 
Method Summary
 int getMatchCount()
          This method returns the current match count of MMER, i.e.
 boolean MMERMatches(java.util.Vector roles)
          This method compare mmer with the input vector V -- an array of user roles, to determine if any of user roles match mmer roles.
 void startMatch()
          This method starts a new matching between user roles and this MMER unit.
 java.lang.String toString()
          This method is to output all the role information in the MMER unit as a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MMERUnit

public MMERUnit(int forbiddenCardinality,
                java.util.Vector<RoleBasedCredentials> mmer)
This constructor creates the MMERUnit object.

Method Detail

getMatchCount

public int getMatchCount()
This method returns the current match count of MMER, i.e. how many MMER have been matched by the user roles in this MMER Unit.


startMatch

public void startMatch()
This method starts a new matching between user roles and this MMER unit.


MMERMatches

public boolean MMERMatches(java.util.Vector roles)
This method compare mmer with the input vector V -- an array of user roles, to determine if any of user roles match mmer roles. Once matched, remove the user role from the mmer role set. Once the matched number reaches forbinddenCardinality, then return true. return true if the input user roles vector matches any of the MMER roles in this MMER unit AND the forbiddenCardinality is reached; otherwise return false.


toString

public java.lang.String toString()
This method is to output all the role information in the MMER unit as a String. This is for testing purposes.

Overrides:
toString in class java.lang.Object