Package xal.rbac
Class ExclusiveAccess
java.lang.Object
xal.rbac.ExclusiveAccess
- Direct Known Subclasses:
DummyExclusiveAccess
,EssExclusiveAccess
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 Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ExclusiveAccess
(String resource, String permission, Date date) Construct a new exclusive access. -
Method Summary
Modifier and TypeMethodDescriptionThe date when exclusive access expires.Returns the name of the permission, for which exclusive access was requested.Returns the name of the resource that owns the permission.abstract void
Releases this exclusive access.
-
Field Details
-
resource
-
permission
-
expirationDate
-
-
Constructor Details
-
ExclusiveAccess
Construct a new exclusive access.- Parameters:
ip
- the host IPresource
- the name of the resource that owns the permissionpermission
- the name of the permission for which exclusive access was requesteddate
- the expiration date as UTC
-
-
Method Details
-
getResource
Returns the name of the resource that owns the permission.- Returns:
- the resource name
-
getPermission
Returns the name of the permission, for which exclusive access was requested.- Returns:
- the permission name
-
getExpirationDate
The date when exclusive access expires. After this date, the user no longer has exclusive access.- Returns:
- the exclusive access expiration date
-
releaseExclusiveAccess
Releases this exclusive access. If there was an error aRBACException
is thrown.- Throws:
AccessDeniedException
- if the subject is no longer logged inRBACException
- if token is missing, or if there was an error while reading or connecting to web services
-