Class AccessControlService
java.lang.Object
fr.paris.lutece.portal.service.accesscontrol.AccessControlService
AccessControlService
-
Method Summary
Modifier and TypeMethodDescriptionvoidcleanSessionData(javax.servlet.http.HttpServletRequest request, int idResource, String resourceType) Remove the Session Data for the give DatadoExecuteAccessControl(javax.servlet.http.HttpServletRequest request, int idResource, String resourceType, Object destination) Redirects to the Access Control exists if the resource has an AccesControl tha has not already been validatedintfindAccessControlForResource(int idResource, String resourceType) Find the access control used by a resource.getAccessControlsEnabled(fr.paris.lutece.api.user.User user, Locale locale) return a reference list which contains a list enabled AccessControlstatic AccessControlServiceReturns the unique instance of the servicebooleanCheck if the access control service is available.voidlinkResourceToAccessControl(int idResource, String resourceType, int idAccessControl) Links the given resource to the given access control.
-
Method Details
-
isAvailable
public boolean isAvailable()Check if the access control service is available. To be available, the following conditions must be verified :- the Bean service is not null
- the plugin-accesscontrol must be enable
- Returns:
- true if the workflow service is available
-
getInstance
Returns the unique instance of the service- Returns:
- The instance of the service
-
getAccessControlsEnabled
return a reference list which contains a list enabled AccessControl- Parameters:
user- the Userlocale- the locale- Returns:
- a reference list which contains a list enabled AccessControl
-
findAccessControlForResource
Find the access control used by a resource.- Parameters:
idResource-resourceType-- Returns:
- the id of the access control, -1 if none
-
linkResourceToAccessControl
Links the given resource to the given access control.
if idAccessControl = -1, deletes the link between the resource and any access control.- Parameters:
idResource-resourceType-idAccessControl-
-
doExecuteAccessControl
public XPage doExecuteAccessControl(javax.servlet.http.HttpServletRequest request, int idResource, String resourceType, Object destination) Redirects to the Access Control exists if the resource has an AccesControl tha has not already been validated- Parameters:
request-idResource-resourceType-- Returns:
-
cleanSessionData
public void cleanSessionData(javax.servlet.http.HttpServletRequest request, int idResource, String resourceType) Remove the Session Data for the give Data- Parameters:
request-idResource-resourceType-
-