public class Metadata extends Object
SecuredContainer
/Container
, including accesses, timestamps, length,
categorical type and the container ID.
NOTE: while Absio typically thinks of the type field as a categorical descriptor of the container, it can take on any
value desired. It is stored in the encrypted database in the OfsProvider and on the Absio Broker™ application's
database for the ServerProvider
. It can be used to help accesses data or used for quick accesses to
rules/control/etc associated with the container. It is simply a string so you can put anything in there you desire.
Constructor and Description |
---|
Metadata(UUID id)
Create empty metadata for a specific
Container . |
Metadata(UUID id,
org.threeten.bp.ZonedDateTime createdAt,
UUID createdBy,
long length,
String type)
Create metadata with the given parameters.
|
Metadata(UUID id,
org.threeten.bp.ZonedDateTime createdAt,
UUID createdBy,
org.threeten.bp.ZonedDateTime modifiedAt,
UUID modifiedBy,
long length,
String type)
Create metadata with the given parameters.
|
Modifier and Type | Method and Description |
---|---|
Access |
accessFor(UUID userId)
Gets the accesses for a specific user.
|
boolean |
equals(Metadata metadata)
Check to see if the passed in metadata equals this metadata (comparing all properties of the metadata).
|
boolean |
equals(Object obj) |
List<Access> |
getAccesses()
Get the list of
Access for this metadata. |
org.threeten.bp.ZonedDateTime |
getCreatedAt()
Get the date the
Container /SecuredContainer was created. |
UUID |
getCreatedBy()
Get the user's id that created the
Container /SecuredContainer . |
UUID |
getId()
Get the id of the
Container /SecuredContainer . |
long |
getLength()
Get the length of the
SecuredContainer (the encrypted format). |
org.threeten.bp.ZonedDateTime |
getModifiedAt()
Get the date the
Container /SecuredContainer was last modified. |
UUID |
getModifiedBy()
Get the user's id that last modified the
Container /SecuredContainer . |
String |
getType()
Get the type of the
Container /SecuredContainer . |
int |
hashCode() |
void |
setAccesses(List<Access> accesses)
Set the list of
Access for this metadata. |
void |
setCreatedAt(org.threeten.bp.ZonedDateTime createdAt)
Set the date the
Container /SecuredContainer was created. |
void |
setCreatedBy(UUID createdBy)
Set the user's id that created the
Container /SecuredContainer . |
void |
setId(UUID id)
Set the id of the
Container /SecuredContainer . |
void |
setModifiedAt(org.threeten.bp.ZonedDateTime modifiedAt)
Set the date the
Container /SecuredContainer was last modified. |
void |
setModifiedBy(UUID modifiedBy)
Set the user's id that last modified the
Container /SecuredContainer . |
void |
setType(String type)
Set the type of the
Container /SecuredContainer . |
public Metadata(UUID id)
Container
.id
- the containers idpublic Metadata(UUID id, org.threeten.bp.ZonedDateTime createdAt, UUID createdBy, long length, String type)
id
- the containers idcreatedAt
- when the container was createdcreatedBy
- the user's id that created the containerlength
- the length of the secured container (the total encrypted format)type
- the type of the container (this is open ended and can be any string value)public Metadata(UUID id, org.threeten.bp.ZonedDateTime createdAt, UUID createdBy, org.threeten.bp.ZonedDateTime modifiedAt, UUID modifiedBy, long length, String type)
id
- the containers idcreatedAt
- when the container was createdcreatedBy
- the user's id that created the containermodifiedAt
- when the container was last modifiedmodifiedBy
- the user's id that last modified the containerlength
- the length of the secured container (the total encrypted format)type
- the type of the container (this is open ended and can be any string value)public Access accessFor(UUID userId)
userId
- the user's IDpublic boolean equals(Metadata metadata)
metadata
- the metadata to compare withpublic List<Access> getAccesses()
Access
for this metadata. This is the Access
list for a specific Container
/SecuredContainer
.Access
for this metadatapublic void setAccesses(List<Access> accesses)
Access
for this metadata. This is the Access
list for a specific Container
/SecuredContainer
.accesses
- the list of Access
for this metadatapublic org.threeten.bp.ZonedDateTime getCreatedAt()
Container
/SecuredContainer
was created.Container
/SecuredContainer
was createdpublic void setCreatedAt(org.threeten.bp.ZonedDateTime createdAt)
Container
/SecuredContainer
was created.createdAt
- the date the Container
/SecuredContainer
was createdpublic UUID getCreatedBy()
Container
/SecuredContainer
.Container
/SecuredContainer
public void setCreatedBy(UUID createdBy)
Container
/SecuredContainer
.createdBy
- the user's id that created the Container
/SecuredContainer
public UUID getId()
Container
/SecuredContainer
.Container
/SecuredContainer
public void setId(UUID id)
Container
/SecuredContainer
.id
- the id of the Container
/SecuredContainer
public long getLength()
SecuredContainer
(the encrypted format).SecuredContainer
public org.threeten.bp.ZonedDateTime getModifiedAt()
Container
/SecuredContainer
was last modified.
NOTE: this will be null if the Container
/SecuredContainer
has never been modified
Container
/SecuredContainer
was last modifiedpublic void setModifiedAt(org.threeten.bp.ZonedDateTime modifiedAt)
Container
/SecuredContainer
was last modified.
NOTE: this will be null if the Container
/SecuredContainer
has never been modified
modifiedAt
- the date the Container
/SecuredContainer
was last modifiedpublic UUID getModifiedBy()
Container
/SecuredContainer
.Container
/SecuredContainer
public void setModifiedBy(UUID modifiedBy)
Container
/SecuredContainer
.modifiedBy
- the user's id that last modified the Container
/SecuredContainer
public String getType()
Container
/SecuredContainer
. This is free form and can therefore be any
string. The intention is for it to be identifying information, but any String
is allowed.Container
/SecuredContainer
public void setType(String type)
Container
/SecuredContainer
. This is free form and can therefore be any
string. The intention is for it to be identifying information, but any String
is allowed.type
- the type of the Container
/SecuredContainer
Copyright © 2021. All rights reserved.