@Immutable
public class CertificateEntry
extends java.lang.Object
CertificateEntry
will keep track of:
Modifier and Type | Class and Description |
---|---|
static class |
CertificateEntry.Key |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ENTITY_ID |
static java.lang.String |
PEM |
static java.lang.String |
REGISTERED_AT |
static java.lang.String |
VERSION |
Constructor and Description |
---|
CertificateEntry(java.lang.String entityId,
int version,
java.lang.String pem,
long registeredAt)
Constructs a
CertificateEntry with the specified entity id, certificate version,
certificate, and time the certificate was registered. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Indicates whether some other object is "equal to" this object.
|
static CertificateEntry |
from(CertificateRegistrationRequest request)
Constructs a
CertificateEntry from a CertificateRegistrationRequest by adding
the current time as the registered at time. |
java.lang.String |
getEntityId()
Returns the entity ID that holds the certificate.
|
CertificateEntry.Key |
getKey()
Returns the
Key of the CertificateEntry . |
java.lang.String |
getPem()
Returns the certificate.
|
long |
getRegisteredAt()
Returns the time the certificate was registered at.
|
int |
getVersion()
Returns the certificate version.
|
int |
hashCode()
Returns a hash code value for the object.
|
public static final java.lang.String ENTITY_ID
public static final java.lang.String VERSION
public static final java.lang.String PEM
public static final java.lang.String REGISTERED_AT
public CertificateEntry(java.lang.String entityId, int version, java.lang.String pem, long registeredAt)
CertificateEntry
with the specified entity id, certificate version,
certificate, and time the certificate was registered.entityId
- an entity id that holds a certificateversion
- the certificate versionpem
- the certificateregisteredAt
- the time the contract was registeredpublic CertificateEntry.Key getKey()
Key
of the CertificateEntry
. A Key is made up of the entity id and
version.Key
of the CertificateEntry
public java.lang.String getEntityId()
public int getVersion()
public java.lang.String getPem()
public long getRegisteredAt()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
CertificateEntry
and both instances have the same
equals
in class java.lang.Object
o
- an object to be tested for equalitytrue
if the other object is "equal to" this object otherwise false
public static CertificateEntry from(CertificateRegistrationRequest request)
CertificateEntry
from a CertificateRegistrationRequest
by adding
the current time as the registered at time.request
- a CertificateRegistrationRequest
CertificateEntry