Class Facade

Package: io.keychain.core

public class Facade
extends java.lang.Object

Description

Facade encapsulates the methods in common between Persona and Contacts for use in methods in other classes that can take either class. These classes provide basic information about the related Keychains such as the maturity (blockchain confirmation) level of the two Keychains and the base URI.

The distinction between a Persona and a Contact is that a Passport stores the public and private keys for each Persona whereas for Contacts it only stores (and knows) the public keys of the Contact as recorded on the blockchain. Methods for which this distinction is unimportant generally take Facade as a parameter.

The information from the methods is a static snapshot of the state of the Persona or Contact objects at the time the object was created.

Since: v2.0

Public Member Functions

Return type Method and Description

long

getId()

Gets the Facade ID

String

getName()

Gets the `Facade`name

String

getSubName()

Gets the Facade sub name

Uri

[getUri]()

Gets the blockchain URI for the Facade

boolean

isNull()

Whether the Facade is a NULL sentinel object

PersonaStatus

getStatus()

Gets the Facade confirmation status on the blockchain

boolean

isMature()

Whether the Facade has been fully confirmed on the blockchain at least once in its lifetime

Public Member Functions Detail

getId

long getId()

Returns the Facade internal ID

Returns:

The Facade internal ID

getName

String getName()

Returns the Facade name, which is a local attribute initially associated with the Facade at its creation time.

Returns:

The Facade name

getSubName

String getSubName()

Returns the Facade sub-name, which is a local attribute initially associated with the Facade at its creation time.

Returns:

The Facade sub-name

getUri()

Uri getUri()

Returns the Facade Uri, used to locate the Facade keychains on the blockchain.

Returns:

The Facade Uri

isNull

boolean isNull()

Returns true if the Facade is a NULL sentinel object. This type of object may be returned from the Keychain library where a Facade should not be Java-null, but should also not be allocated in the library. Checking for isNull() on a non-null Facade lets the developer know if they shouldn’t use the object.

Returns:

true if the Facade is a NULL sentinel

getStatus

PersonaStatus getStatus()

Returns the Facade status on the blockchain

Returns:

The Facade status on the blockchain

isMature

boolean isMature()

Returns the true if the Facade has matured on the blockchain at least once

Returns:

true if the Facade has matured at least once