Class AccessControlService
- java.lang.Object
-
- fr.paris.lutece.portal.service.accesscontrol.AccessControlService
-
public final class AccessControlService extends java.lang.ObjectAccessControlService
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanSessionData(javax.servlet.http.HttpServletRequest request, int idResource, java.lang.String resourceType)Remove the Session Data for the give DataXPagedoExecuteAccessControl(javax.servlet.http.HttpServletRequest request, int idResource, java.lang.String resourceType, java.lang.Object destination)Redirects to the Access Control exists if the resource has an AccesControl tha has not already been validatedintfindAccessControlForResource(int idResource, java.lang.String resourceType)Find the access control used by a resource.ReferenceListgetAccessControlsEnabled(fr.paris.lutece.api.user.User user, java.util.Locale locale)return a reference list which contains a list enabled AccessControlstatic AccessControlServicegetInstance()Returns the unique instance of the servicebooleanisAvailable()Check if the access control service is available.voidlinkResourceToAccessControl(int idResource, java.lang.String resourceType, int idAccessControl)Links the given resource to the given access control.
-
-
-
Method Detail
-
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
public static AccessControlService getInstance()
Returns the unique instance of the service- Returns:
- The instance of the service
-
getAccessControlsEnabled
public ReferenceList getAccessControlsEnabled(fr.paris.lutece.api.user.User user, java.util.Locale locale)
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
public int findAccessControlForResource(int idResource, java.lang.String resourceType)Find the access control used by a resource.- Parameters:
idResource-resourceType-- Returns:
- the id of the access control, -1 if none
-
linkResourceToAccessControl
public void linkResourceToAccessControl(int idResource, java.lang.String resourceType, int idAccessControl)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, java.lang.String resourceType, java.lang.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, java.lang.String resourceType)Remove the Session Data for the give Data- Parameters:
request-idResource-resourceType-
-
-