public class Access extends Object
Permission
values), when (if at all) the access
will expire, the id of the container the access is for, who the access is for and their key blob. The Permission
portion of the access is enforced by the Absio Broker™ application when using the ServerProvider
.Constructor and Description |
---|
Access(UUID userId)
Create access with given user id.
|
Access(UUID userId,
int permissions)
Create access with given user id and permissions.
|
Access(UUID userId,
int permissions,
org.threeten.bp.ZonedDateTime expiresAt)
Create access with given user id, permissions and expiration time.
|
Access(UUID containerId,
org.threeten.bp.ZonedDateTime createdAt,
UUID createdBy,
org.threeten.bp.ZonedDateTime expiresAt,
byte[] keyBlob,
org.threeten.bp.ZonedDateTime modifiedAt,
UUID modifiedBy,
int permissions)
Create access with given values.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Access access)
Check to see if the passed in access is equal in value to this access.
|
boolean |
equals(Object obj) |
UUID |
getContainerId()
Get the container id this access corresponds to.
|
org.threeten.bp.ZonedDateTime |
getCreatedAt()
Get when the access was created.
|
UUID |
getCreatedBy()
Get the user id that created the access.
|
org.threeten.bp.ZonedDateTime |
getExpiresAt()
Get when the access expires.
|
byte[] |
getKeyBlob()
Get the encrypted key blob for the access user.
|
org.threeten.bp.ZonedDateTime |
getModifiedAt()
Get the last time the access was modified.
|
UUID |
getModifiedBy()
Get the last user to modify the access.
|
int |
getPermissions()
Get the access permissions.
|
UUID |
getUserId()
Get the user's id for the access.
|
int |
hashCode() |
void |
setContainerId(UUID containerId)
set the container id this access corresponds to.
|
void |
setCreatedAt(org.threeten.bp.ZonedDateTime createdAt)
Set when the access was created.
|
void |
setCreatedBy(UUID createdBy)
Set the user id that created the access.
|
void |
setKeyBlob(byte[] keyBlob)
Set the encrypted key blob for the access user.
|
void |
setModifiedAt(org.threeten.bp.ZonedDateTime modifiedAt)
Set the last time the access was modified.
|
void |
setModifiedBy(UUID modifiedBy)
Set the last user to modify the access.
|
void |
setPermissions(int permissions)
Set the access permissions.
|
void |
setUserId(UUID userId)
Sets the user id for the access.
|
public Access(UUID userId, int permissions)
Permission.getFlag()
. The permissions are guaranteed to be respected and adhered to by the Absio
Broker™ application when using the ServerProvider
.userId
- the user id the access is forpermissions
- the ORed list of the flag values from Permission.getFlag()
public Access(UUID userId)
Permission.DEFAULT_USER_PERMISSIONS
for the permissions.
The permissions are guaranteed to be respected and adhered to by the Absio Broker™ application when using
the ServerProvider
.userId
- the user id the access is forpublic Access(UUID userId, int permissions, org.threeten.bp.ZonedDateTime expiresAt)
Permission.getFlag()
. The permissions and expiration are guaranteed to be respected and
adhered to by the Absio Broker™ application when using the ServerProvider
.userId
- the user id the access is forpermissions
- the ORed list of the flag values from Permission.getFlag()
expiresAt
- the expiration time of the accesspublic Access(UUID containerId, org.threeten.bp.ZonedDateTime createdAt, UUID createdBy, org.threeten.bp.ZonedDateTime expiresAt, byte[] keyBlob, org.threeten.bp.ZonedDateTime modifiedAt, UUID modifiedBy, int permissions)
Permission.getFlag()
. The permissions and expiration are guaranteed to be respected and adhered to by the Absio
Broker™ application when using the ServerProvider
.containerId
- the id of the container this access is related tocreatedAt
- when the access was createdcreatedBy
- who created the accessexpiresAt
- the expiration time of the accesskeyBlob
- the recipient key blob (key encrypted with AIES specifically for the user this access is for)modifiedAt
- when the access was last modifiedmodifiedBy
- who modified the access lastpermissions
- the ORed list of the flag values from Permission.getFlag()
public boolean equals(Access access)
access
- the access to compare withpublic UUID getContainerId()
public void setContainerId(UUID containerId)
containerId
- the container id this access corresponds topublic org.threeten.bp.ZonedDateTime getCreatedAt()
public void setCreatedAt(org.threeten.bp.ZonedDateTime createdAt)
createdAt
- when the access was createdpublic UUID getCreatedBy()
public void setCreatedBy(UUID createdBy)
createdBy
- the user id that created the accesspublic org.threeten.bp.ZonedDateTime getExpiresAt()
ServerProvider
.public byte[] getKeyBlob()
NOTE: this will be null if the access is retrieved from the ServerProvider
and it does
not have the Permission.DECRYPT_CONTAINER
.
public void setKeyBlob(byte[] keyBlob)
NOTE: this will be null if the access is retrieved from the ServerProvider
and it does
not have the Permission.DECRYPT_CONTAINER
.
keyBlob
- the encrypted key blob for the access userpublic org.threeten.bp.ZonedDateTime getModifiedAt()
public void setModifiedAt(org.threeten.bp.ZonedDateTime modifiedAt)
modifiedAt
- the last time the access was modifiedpublic UUID getModifiedBy()
public void setModifiedBy(UUID modifiedBy)
modifiedBy
- the last user to modify the accesspublic int getPermissions()
Permission.getFlag()
values.public void setPermissions(int permissions)
Permission.getFlag()
values.permissions
- the access permissionspublic UUID getUserId()
public void setUserId(UUID userId)
userId
- the user idCopyright © 2021. All rights reserved.