Class AccessControlService

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

@ApplicationScoped public class AccessControlService extends Object
AccessControlService
  • Constructor Details

    • AccessControlService

      public AccessControlService()
    • AccessControlService

      @Inject public AccessControlService(@Named("accesscontrol.accessControlServiceProvider") jakarta.enterprise.inject.Instance<IAccessControlServiceProvider> providerInstance)
  • 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

      @Deprecated(since="8.0", forRemoval=true) public static AccessControlService getInstance()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use @Inject to obtain the AccessControlService instance. This method will be removed in future versions.
      Returns the unique instance of the AccessControlService service.

      This method is deprecated and is provided for backward compatibility only. For new code, use dependency injection with @Inject to obtain the AccessControlService instance instead.

      Returns:
      The unique instance of AccessControlService.
    • 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(jakarta.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(jakarta.servlet.http.HttpServletRequest request, int idResource, String resourceType)
      Remove the Session Data for the give Data
      Parameters:
      request -
      idResource -
      resourceType -