Package xal.rbac

Class ExclusiveAccess

java.lang.Object
xal.rbac.ExclusiveAccess
Direct Known Subclasses:
DummyExclusiveAccess, EssExclusiveAccess

public abstract class ExclusiveAccess extends Object
ExclusiveAccess has information about requested exclusive access. It provides the information, which permission was requested and the expiration date, which is when the exclusive access will be automatically released. It also provide a method to release exclusive access earlier.
Author:
Jaka Bobnar, Ivo List
  • Field Details

    • resource

      protected String resource
    • permission

      protected String permission
    • expirationDate

      protected Date expirationDate
  • Constructor Details

    • ExclusiveAccess

      protected ExclusiveAccess(String resource, String permission, Date date)
      Construct a new exclusive access.
      Parameters:
      ip - the host IP
      resource - the name of the resource that owns the permission
      permission - the name of the permission for which exclusive access was requested
      date - the expiration date as UTC
  • Method Details

    • getResource

      public String getResource()
      Returns the name of the resource that owns the permission.
      Returns:
      the resource name
    • getPermission

      public String getPermission()
      Returns the name of the permission, for which exclusive access was requested.
      Returns:
      the permission name
    • getExpirationDate

      public Date getExpirationDate()
      The date when exclusive access expires. After this date, the user no longer has exclusive access.
      Returns:
      the exclusive access expiration date
    • releaseExclusiveAccess

      public abstract void releaseExclusiveAccess() throws AccessDeniedException, RBACException
      Releases this exclusive access. If there was an error a RBACException is thrown.
      Throws:
      AccessDeniedException - if the subject is no longer logged in
      RBACException - if token is missing, or if there was an error while reading or connecting to web services