Class NetworkAssociationDetails

java.lang.Object
net.solarnetwork.domain.BasicNetworkIdentity
net.solarnetwork.domain.NetworkAssociationDetails
All Implemented Interfaces:
Serializable, NetworkAssociation, NetworkCertificate, NetworkIdentity

public class NetworkAssociationDetails extends BasicNetworkIdentity implements NetworkAssociation, NetworkCertificate, Serializable
Command object for initial SolarNode and SolarNet association data.
Version:
2.0
Author:
matt
See Also:
  • Constructor Details

    • NetworkAssociationDetails

      public NetworkAssociationDetails()
      Default constructor.
    • NetworkAssociationDetails

      public NetworkAssociationDetails(NetworkAssociation other)
      Copy constructor.
      Parameters:
      other - the NetworkAssociation to copy
    • NetworkAssociationDetails

      public NetworkAssociationDetails(String username, String confirmationKey, String keystorePassword)
      Construct with association details.
      Parameters:
      username - the username
      confirmationKey - the confirmation key
      keystorePassword - the keystore password
      Since:
      1.1
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getUsername

      public String getUsername()
      Description copied from interface: NetworkAssociation
      Get the username associated with this association.
      Specified by:
      getUsername in interface NetworkAssociation
      Returns:
      the username
    • setUsername

      public void setUsername(String username)
    • getExpiration

      public Instant getExpiration()
    • setExpiration

      public void setExpiration(Instant expiration)
    • getConfirmationKey

      public String getConfirmationKey()
      Description copied from interface: NetworkAssociation
      Get a confirmation key, generated on the network side.
      Specified by:
      getConfirmationKey in interface NetworkAssociation
      Specified by:
      getConfirmationKey in interface NetworkCertificate
      Returns:
      confirmation key
    • setConfirmationKey

      public void setConfirmationKey(String confirmationKey)
    • getSecurityPhrase

      public String getSecurityPhrase()
      Description copied from interface: NetworkAssociation
      Get a security phrase, generated on the network side.
      Specified by:
      getSecurityPhrase in interface NetworkAssociation
      Returns:
      a security phrase
    • setSecurityPhrase

      public void setSecurityPhrase(String secretPhrase)
    • getNetworkId

      public Long getNetworkId()
      Description copied from interface: NetworkCertificate
      Get an ID associated with this certificate.
      Specified by:
      getNetworkId in interface NetworkCertificate
      Returns:
      a unique ID, e.g. node ID, never null
    • setNetworkId

      public void setNetworkId(Long networkId)
    • getNetworkCertificate

      public String getNetworkCertificate()
      Description copied from interface: NetworkCertificate
      Get the certificate, as Base64-encoded string.
      Specified by:
      getNetworkCertificate in interface NetworkCertificate
      Returns:
      the certificate, or null if the certificate is not available yet
    • setNetworkCertificate

      public void setNetworkCertificate(String networkCertificate)
    • getNetworkCertificateStatus

      public String getNetworkCertificateStatus()
      Description copied from interface: NetworkCertificate
      Get a status associated with the certificate.
      Specified by:
      getNetworkCertificateStatus in interface NetworkCertificate
      Returns:
      the status, which may indicate if the certificate is being processed, etc
    • setNetworkCertificateStatus

      public void setNetworkCertificateStatus(String networkCertificateStatus)
    • getNetworkCertificateSubjectDN

      public String getNetworkCertificateSubjectDN()
      Description copied from interface: NetworkCertificate
      Get the value of the node's expected public key certificate subject name.

      The node must generate a certificate signing request (CSR) using this subject name and then install the signed certificate when granted by the SolarNet certification authority (CA).

      Specified by:
      getNetworkCertificateSubjectDN in interface NetworkCertificate
      Returns:
      the node's subject DN
    • setNetworkCertificateSubjectDN

      public void setNetworkCertificateSubjectDN(String networkCertificateSubjectDN)
    • getKeystorePassword

      public String getKeystorePassword()
      Description copied from interface: NetworkAssociation
      Get a password to use for this association's keystore.
      Specified by:
      getKeystorePassword in interface NetworkAssociation
      Returns:
      a keystore password
    • setKeystorePassword

      public void setKeystorePassword(String keystorePassword)