org.jwarp.service.security
Interface ISecurityService

All Superinterfaces:
IConfigurable, IExceptionProvider, ISecurityAware, IService
All Known Implementing Classes:
SecurityService

public interface ISecurityService
extends IService, ISecurityAware


Field Summary
static java.lang.String SERVICE_TYPE
          The service type constant
 
Fields inherited from interface org.jwarp.service.IService
SERVICE_STATUS_CREATED, SERVICE_STATUS_NOT_AVAILABLE, SERVICE_STATUS_READY, SERVICE_STATUS_RESUMING, SERVICE_STATUS_RUNNING, SERVICE_STATUS_STARTING, SERVICE_STATUS_STOPPED, SERVICE_STATUS_STOPPING, SERVICE_STATUS_SUSPENDED
 
Method Summary
 boolean accessGranted(java.lang.String objectID, int level, ITicket ticket)
          Returns true if the user is granted access of the given level to the object with the given ID.
 ISecurity getSecurity(ITicket admin)
          Get the security object.
 ITicket login(java.lang.String user, java.lang.String pwd)
          Login a user.
 void setSystemTicket(ITicket ticket)
          Used to intialize the securitx with the context's security ticket for the system.
 
Methods inherited from interface org.jwarp.service.IService
checkContext, getDependencies, getLogLevel, getName, getStatus, getType, resume, setContext, setDependencies, setLogLevel, shutdown, start, suspend
 
Methods inherited from interface org.jwarp.service.configuration.IConfigurable
configure
 
Methods inherited from interface org.jwarp.common.IExceptionProvider
addExceptionListener, getExceptionListeners, removeAllExceptionListeners, removeExceptionListener
 
Methods inherited from interface org.jwarp.service.security.ISecurityAware
getSecurityObjects, initSecurity
 

Field Detail

SERVICE_TYPE

public static final java.lang.String SERVICE_TYPE
The service type constant
Method Detail

setSystemTicket

public void setSystemTicket(ITicket ticket)
                     throws java.lang.SecurityException
Used to intialize the securitx with the context's security ticket for the system.
Parameters:
The - system ticket
Throws:
java.lang.SecurityException - Raised if the security ticket is yet defined.

getSecurity

public ISecurity getSecurity(ITicket admin)
                      throws java.lang.SecurityException
Get the security object. This must be only allowed to admin users since for all "normal" operations the accessgranted method is sufficient.
Parameters:
admin - The admin ticket

login

public ITicket login(java.lang.String user,
                     java.lang.String pwd)
              throws java.lang.SecurityException
Login a user.
Parameters:
user - The user id
user - The user password
Throws:
If - access was denied

accessGranted

public boolean accessGranted(java.lang.String objectID,
                             int level,
                             ITicket ticket)
Returns true if the user is granted access of the given level to the object with the given ID. This is the cetral access control method of the WHOLE security system.
Returns:
true if the user is a member

©   O R C A   S y s t e m s