Class AccessControlService

java.lang.Object
fr.paris.lutece.portal.service.accesscontrol.AccessControlService

public final class AccessControlService extends Object
AccessControlService
  • 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

      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, Locale locale)
      return a reference list which contains a list enabled AccessControl
      Parameters:
      user - the User
      locale - the locale
      Returns:
      a reference list which contains a list enabled AccessControl
    • findAccessControlForResource

      public int findAccessControlForResource(int idResource, 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, 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, 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 -