org.talika.tarsis.security
Class AuthorizatorService

java.lang.Object
  extended by org.talika.tarsis.service.AbstractService
      extended by org.talika.tarsis.security.AuthorizatorService
All Implemented Interfaces:
Authorizator, Service
Direct Known Subclasses:
MemoryAuthorizator

public abstract class AuthorizatorService
extends AbstractService
implements Authorizator

Base implementation of Authorizator interface.

Authorizator plugs in system like a service by extending AbstractService.

Version:
$Revision: 124 $
Author:
Jose M. Palomar

Constructor Summary
AuthorizatorService()
          Creates a new AuthorizatorService.
 
Method Summary
abstract  void authorize(User user, Command command)
          Checks if User has authorizations to access Command.
abstract  boolean isRestricted(Command command)
          Returns true if Command has access restrited.
 
Methods inherited from class org.talika.tarsis.service.AbstractService
destroy, getContext, getLogger, getName, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthorizatorService

public AuthorizatorService()
Creates a new AuthorizatorService.

Method Detail

authorize

public abstract void authorize(User user,
                               Command command)
                        throws ForbiddenAccessException
Checks if User has authorizations to access Command. If not throws a ForbiddenAccessException.

Specified by:
authorize in interface Authorizator
Parameters:
user - User user to be checked.
command - Command command to be checked.
Throws:
ForbiddenAccessException - if User has not authorization.
See Also:
Authorizator.authorize(User, Command)

isRestricted

public abstract boolean isRestricted(Command command)
Returns true if Command has access restrited.

Specified by:
isRestricted in interface Authorizator
Parameters:
command - Command command to be checked.
Returns:
boolean true if Command has access restrited.
See Also:
Authorizator.isRestricted(Command)


Copyright © 2002-2012 Talika Open Source Group. All Rights Reserved.