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 |
|
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 |
SERVICE_TYPE
public static final java.lang.String SERVICE_TYPE
- The service type constant
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 iduser - 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