ubiware.core.policies
Class DenyAllPolicyChecker

java.lang.Object
  extended by ubiware.core.policies.PolicyChecker
      extended by ubiware.core.policies.DenyAllPolicyChecker

public final class DenyAllPolicyChecker
extends PolicyChecker

A PolicyChecker which does not allow actions to be executed. Its performPolicyCheck method always returns Status.DisAllowed

Since:
29 Jul 2010
Author:
Michael Cochez for Ubiware project

Field Summary
 
Fields inherited from class ubiware.core.policies.PolicyChecker
optionsForPolicyCheckN3Generation
 
Method Summary
static PolicyChecker getInstance()
          get the singleton instance.
 Status performPolicyCheck(UbiwareAgent agent, java.lang.String actionName, BehaviorStartParameters parameters, ParameterGenerator paramsgenerator)
          Perform a policy check; check whether the given agent is allowed to execute the action specified in actionName with the given parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static PolicyChecker getInstance()
get the singleton instance.

Returns:
a PolicyChecker which denies any action.

performPolicyCheck

public Status performPolicyCheck(UbiwareAgent agent,
                                 java.lang.String actionName,
                                 BehaviorStartParameters parameters,
                                 ParameterGenerator paramsgenerator)
Description copied from class: PolicyChecker
Perform a policy check; check whether the given agent is allowed to execute the action specified in actionName with the given parameters.

Specified by:
performPolicyCheck in class PolicyChecker
Parameters:
agent - The agent which wants to perform the action.
actionName - The name of the ReusableAtomicBehavior class the agent wants to execute.
parameters - The parameters for execution.
paramsgenerator - A generator which is able to generate a S-APL object String representing the parameters.
Returns:
The Status of the policy check.