Interface ILicensee

All Known Implementing Classes:
AbstractLicensee, ClientApplication, IpRange, User, UserGroup

public interface ILicensee
Represents an entity (user, user group, IP range, or client application) that can hold access licenses in the Goobi viewer. Provides methods to retrieve assigned licenses and to check whether a particular license — optionally restricted to a specific privilege and record identifier — has been granted.
  • Method Details

    • getName

      String getName()
      getName.
      Returns:
      the name of this licensee
    • getAccessType

      License.AccessType getAccessType()
      Returns:
      AccessType corresponding to the licensee's class
    • getLicenses

      List<License> getLicenses()
      getLicenses.
      Returns:
      a list of licenses assigned to this licensee
    • hasLicense

      AccessPermission hasLicense(String licenseName, String privilegeName, String pi) throws DAOException, IndexUnreachableException, PresentationException
      Checks whether the licensee has a license with the given name. IF a privilege name is passed, the licensee must also have this privilege for that license.
      Parameters:
      licenseName - License name.
      privilegeName - Required privilege (optional).
      pi - Checks the privilege in connection with a specific record identifier (optional).
      Returns:
      true if the licensee holds a matching license (and the required privilege if specified), false otherwise
      Throws:
      DAOException
      IndexUnreachableException - if any.
      PresentationException - if any.