jtge.engine.security
Class ValidationHandler

java.lang.Object
  extended byjtge.engine.handler.AbstractProducer
      extended byjtge.engine.handler.AbstractHandler
          extended byjtge.engine.security.ValidationHandler
All Implemented Interfaces:
IConsumer

public class ValidationHandler
extends AbstractHandler

Implements a handler to filter out invalid commands.

It intercepts commands and checks that the registered user has the right to issue them before forwarding to the next consumer.

Version:
$Revision: 1.4 $ $Date: 2005/08/26 18:09:36 $
Author:
Mathieu Champlon

Constructor Summary
ValidationHandler(IConsumer consumer, IUser user)
          Create a validation handler.
ValidationHandler(IConsumer consumer, IUser user, ISecurityObserver observer)
          Create a validation handler.
 
Method Summary
 void handle(ICommand command)
          Handle a command.
 
Methods inherited from class jtge.engine.handler.AbstractProducer
forward
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidationHandler

public ValidationHandler(IConsumer consumer,
                         IUser user,
                         ISecurityObserver observer)
Create a validation handler.

Parameters:
consumer - the target consumer
user - the reference user for validation
observer - the (optional) security observer

ValidationHandler

public ValidationHandler(IConsumer consumer,
                         IUser user)
Create a validation handler.

Parameters:
consumer - the target consumer
user - the reference user for validation
Method Detail

handle

public final void handle(ICommand command)
Handle a command.

Parameters:
command - the command to handle


Copyright © 2003-2005 . All Rights Reserved.