issrg.pba.rbac.policies
Class MMEPUnit

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

public class MMEPUnit
extends java.lang.Object

This class represents a MMEP unit -- it includes a forbiddenCardinality and a privilege set which comprises several mutually exclusive privileges with the forbiddenCardinality.

Version:
0.1
Author:
W.Xu

Constructor Summary
MMEPUnit(int forbiddenCardinality, java.util.Vector<UserAction> mmep)
          This constructor creates the MMEPUnit object.
 
Method Summary
 int getMatchCount()
          This method returns the current match count of MMEP, i.e.
 boolean MMEPMatches(java.lang.String action, java.lang.String target)
          This method compare mmep with the input user action and target, to determine if this action and target pair match any mmep privileges.
 void startMatch()
          This method starts a new matching between user actions and this MMEP unit.
 java.lang.String toString()
          This method is to output all the MMEP action information as a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MMEPUnit

public MMEPUnit(int forbiddenCardinality,
                java.util.Vector<UserAction> mmep)
This constructor creates the MMEPUnit object.

Method Detail

getMatchCount

public int getMatchCount()
This method returns the current match count of MMEP, i.e. until now, how many MMEP have been matched by the user actions this MMEP Unit.


startMatch

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


MMEPMatches

public boolean MMEPMatches(java.lang.String action,
                           java.lang.String target)
This method compare mmep with the input user action and target, to determine if this action and target pair match any mmep privileges. Once matched, matchCount is increased by 1, and if matchCount reaches forbiddenCardinality, then this MMEP rule is broken by the user, true will be returned; otherwise, false will be returned. return true if this user action and target matches any one of the MMEP privilege and the forbeddenCardinality is reached; otherwise return false.


toString

public java.lang.String toString()
This method is to output all the MMEP action information as a String. This is for testing purposes.

Overrides:
toString in class java.lang.Object