|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnl.gx.webmanager.wcb.foundation.ComponentBase
nl.gx.webmanager.wcb.servicetype.impl.SimpleServiceComponent
nl.gx.webmanager.authorization.impl.AuthorizationServiceImpl
public class AuthorizationServiceImpl
Implementation of AuthorizationService interface.
| Field Summary |
|---|
| Fields inherited from class nl.gx.webmanager.wcb.foundation.ComponentBase |
|---|
myBundleContext, myComponentBundle, myComponentDefinition |
| Constructor Summary | |
|---|---|
AuthorizationServiceImpl()
|
|
| Method Summary | |
|---|---|
boolean |
checkAccess(java.lang.String permissionValue)
Returns |
boolean |
checkAccess(java.lang.String permissionValue,
WorkflowEnabled workflowEnabledObject)
Returns true if the owner of the current session has both
the requested static RBAC authorization as well as the dynamic Workflow
authorization according to the Workflow of the given Workflow enabled
object. |
boolean |
checkAccess(java.lang.String permissionValue,
WorkflowModel workflowModel)
Returns true if the owner of the current session has both the
requested static RBAC authorization as well as the auhorization to initiate
the given Workflow model (in other words; to create a Workflow model instance from it)
Returns false otherwise |
boolean |
checkComponent(java.lang.String permissionValue,
int webid)
This method checks if the component that corresponds to the given permission is enabled or not. |
User |
getCurrentUser()
Returns the currently logged in user. |
java.lang.String[] |
getElementCreatePermission(java.lang.Class<? extends Element> elementClass)
Returns the create RBAC permissions associated with this element. |
java.lang.String[] |
getElementDeletePermission(java.lang.Class<? extends Element> elementClass)
Returns the Delete RBAC permission associated with this element. |
User |
getUserById(int id)
Returns the user specified by the SiteWorks id. |
User |
getUserByUsername(java.lang.String username)
Returns the user specified by a username. |
boolean |
login(java.lang.String username,
java.lang.String password,
javax.servlet.http.HttpServletRequest request)
Logs in the given user with the given password for the given http servlet request |
void |
registerCreatePermissions(java.lang.Class<? extends Element> elementClass,
Permission[] createPermissions)
Called by element component type to register the create permissions registered by the element component definition |
void |
registerDeletePermissions(java.lang.Class<? extends Element> elementClass,
Permission[] deletePermissions)
Called by element component type to register the delete permissions registered by the element component definition |
void |
unregisterCreatePermissions(java.lang.Class<? extends Element> elementClass)
Called by element component type to unregister the create permissions registered by the element component definition |
void |
unregisterDeletePermissions(java.lang.Class<? extends Element> elementClass)
Called by element component type to unregister the delete permissions registered by the element component definition |
| Methods inherited from class nl.gx.webmanager.wcb.servicetype.impl.SimpleServiceComponent |
|---|
getInstance |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface nl.gx.webmanager.wcb.Component |
|---|
exportContent, getClassesFromBundle, getClassForName, getComponentBundle, getComponentDefinition, getExtensions, getId, getInstanceForName, getPrivateNode, getTypeId, getWrapperDefinitions, importContent, onDestroy, onInit, onInstall, onPurge, onStart, onStop, onUninstall, onUpdate, purgeContent, setBundleContext, setComponentBundle, setComponentDefinition, setComponentManager |
| Constructor Detail |
|---|
public AuthorizationServiceImpl()
| Method Detail |
|---|
public boolean checkAccess(java.lang.String permissionValue)
checkAccess in interface AuthorizationServicepermissionValue - Value that uniquely identifies the permission to check.
public boolean checkAccess(java.lang.String permissionValue,
WorkflowEnabled workflowEnabledObject)
true if the owner of the current session has both
the requested static RBAC authorization as well as the dynamic Workflow
authorization according to the Workflow of the given Workflow enabled
object. Returns false otherwise.
checkAccess in interface AuthorizationServicepermissionValue - RBAC authorization key to check authorization for.workflowEnabledObject - Workflow enabled object to check Workflow authorization
against.
true if the owner of the current session has both
static RBAC and dynamic Workflow authorization for the requested
RBAC permission and Workflow context.
public boolean checkAccess(java.lang.String permissionValue,
WorkflowModel workflowModel)
true if the owner of the current session has both the
requested static RBAC authorization as well as the auhorization to initiate
the given Workflow model (in other words; to create a Workflow model instance from it)
Returns false otherwise
checkAccess in interface AuthorizationServicepermissionValue - RBAC authorization key to check authorization for
true if the owner of the current session has both static RBAC
and dynamic Workflow authorization to initiate the given Workflow model
public boolean checkComponent(java.lang.String permissionValue,
int webid)
checkComponent in interface AuthorizationServicepermissionValue - Label of the permission to check component access for
public void registerCreatePermissions(java.lang.Class<? extends Element> elementClass,
Permission[] createPermissions)
registerCreatePermissions in interface AuthorizationServiceelementClass - Element class to register the create permissions forcreatePermissions - Create permissions to registerpublic void unregisterCreatePermissions(java.lang.Class<? extends Element> elementClass)
unregisterCreatePermissions in interface AuthorizationServiceelementClass - Element class to unregister the create permissions for
public void registerDeletePermissions(java.lang.Class<? extends Element> elementClass,
Permission[] deletePermissions)
registerDeletePermissions in interface AuthorizationServiceelementClass - Element class to register the delete permissions fordeletePermissions - Delete permissions to registerpublic void unregisterDeletePermissions(java.lang.Class<? extends Element> elementClass)
unregisterDeletePermissions in interface AuthorizationServiceelementClass - Element class to unregister the delete permissions forpublic java.lang.String[] getElementCreatePermission(java.lang.Class<? extends Element> elementClass)
getElementCreatePermission in interface AuthorizationServicepublic java.lang.String[] getElementDeletePermission(java.lang.Class<? extends Element> elementClass)
getElementDeletePermission in interface AuthorizationService
public boolean login(java.lang.String username,
java.lang.String password,
javax.servlet.http.HttpServletRequest request)
login in interface AuthorizationServiceusername - Username of the userpassword - Password of the userrequest - Current http servlet request
public User getCurrentUser()
getCurrentUser in interface AuthorizationServicepublic User getUserById(int id)
getUserById in interface AuthorizationServicepublic User getUserByUsername(java.lang.String username)
getUserByUsername in interface AuthorizationServiceusername - Username to search for (case sensitive).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||