|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.talika.tarsis.service.AbstractService org.talika.tarsis.security.AuthorizatorService org.talika.tarsis.security.memory.MemoryAuthorizator
public final class MemoryAuthorizator
XML/Memory implementation of Authorizator
interface.
Constructor Summary | |
---|---|
MemoryAuthorizator()
Creates a new MemoryAuthorizator . |
Method Summary | |
---|---|
void |
authorize(User user,
Command command)
Checks if User has authorizations to access Command . |
java.lang.String |
getName()
Returns name of service. |
void |
init(Context context)
Called by the framework to indicate that is being placed into service. |
boolean |
isRestricted(Command command)
Returns true if Command has access restrited. |
Methods inherited from class org.talika.tarsis.service.AbstractService |
---|
destroy, getContext, getLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MemoryAuthorizator()
MemoryAuthorizator
.
Method Detail |
---|
public void init(Context context) throws ServiceException
init
in interface Service
init
in class AbstractService
context
- Context context that initialized service.
ServiceException
- if an exception has occurred that interferes with the
services's normal operationService.init(Context)
public java.lang.String getName()
getName
in interface Service
getName
in class AbstractService
Service.getName()
public void authorize(User user, Command command) throws ForbiddenAccessException
User
has authorizations to access Command
.
If not throws a ForbiddenAccessException
.
authorize
in interface Authorizator
authorize
in class AuthorizatorService
user
- User user to be checked.command
- Command command to be checked.
ForbiddenAccessException
- if User
has not authorization.Authorizator.authorize(User, Command)
public boolean isRestricted(Command command)
true
if Command
has access restrited.
isRestricted
in interface Authorizator
isRestricted
in class AuthorizatorService
command
- Command command to be checked.
true
if Command
has access restrited.Authorizator.isRestricted(Command)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |