Package net.solarnetwork.domain
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:
-
Field Summary
Fields inherited from interface net.solarnetwork.domain.NetworkIdentity
SOLARIN_MQTT_NETWORK_SERVICE_KEY, SOLARQUERY_NETWORK_SERVICE_KEY, SOLARUSER_NETWORK_SERVICE_KEY -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.NetworkAssociationDetails(String username, String confirmationKey, String keystorePassword) Construct with association details.Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionGet a confirmation key, generated on the network side.Get a password to use for this association's keystore.Get the certificate, as Base64-encoded string.Get a status associated with the certificate.Get the value of the node's expected public key certificate subject name.Get an ID associated with this certificate.Get a security phrase, generated on the network side.Get the username associated with this association.voidsetConfirmationKey(String confirmationKey) voidsetExpiration(Instant expiration) voidsetKeystorePassword(String keystorePassword) voidsetNetworkCertificate(String networkCertificate) voidsetNetworkCertificateStatus(String networkCertificateStatus) voidsetNetworkCertificateSubjectDN(String networkCertificateSubjectDN) voidsetNetworkId(Long networkId) voidsetSecurityPhrase(String secretPhrase) voidsetUsername(String username) toString()Methods inherited from class net.solarnetwork.domain.BasicNetworkIdentity
getHost, getIdentityKey, getNetworkServiceURLs, getPort, getSolarInMqttServiceURL, getSolarQueryServiceURL, getSolarUserServiceURL, getTermsOfService, isForceTLS, setForceTLS, setHost, setIdentityKey, setNetworkServiceURLs, setPort, setSolarInMqttServiceURL, setSolarQueryServiceURL, setSolarUserServiceURL, setTermsOfServiceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.solarnetwork.domain.NetworkIdentity
getHost, getIdentityKey, getNetworkServiceURLs, getPort, getTermsOfService, isForceTLS
-
Constructor Details
-
NetworkAssociationDetails
public NetworkAssociationDetails()Default constructor. -
NetworkAssociationDetails
Copy constructor.- Parameters:
other- the NetworkAssociation to copy
-
NetworkAssociationDetails
Construct with association details.- Parameters:
username- the usernameconfirmationKey- the confirmation keykeystorePassword- the keystore password- Since:
- 1.1
-
-
Method Details
-
toString
-
getUsername
Description copied from interface:NetworkAssociationGet the username associated with this association.- Specified by:
getUsernamein interfaceNetworkAssociation- Returns:
- the username
-
setUsername
-
getExpiration
-
setExpiration
-
getConfirmationKey
Description copied from interface:NetworkAssociationGet a confirmation key, generated on the network side.- Specified by:
getConfirmationKeyin interfaceNetworkAssociation- Specified by:
getConfirmationKeyin interfaceNetworkCertificate- Returns:
- confirmation key
-
setConfirmationKey
-
getSecurityPhrase
Description copied from interface:NetworkAssociationGet a security phrase, generated on the network side.- Specified by:
getSecurityPhrasein interfaceNetworkAssociation- Returns:
- a security phrase
-
setSecurityPhrase
-
getNetworkId
Description copied from interface:NetworkCertificateGet an ID associated with this certificate.- Specified by:
getNetworkIdin interfaceNetworkCertificate- Returns:
- a unique ID, e.g. node ID, never null
-
setNetworkId
-
getNetworkCertificate
Description copied from interface:NetworkCertificateGet the certificate, as Base64-encoded string.- Specified by:
getNetworkCertificatein interfaceNetworkCertificate- Returns:
- the certificate, or null if the certificate is not available yet
-
setNetworkCertificate
-
getNetworkCertificateStatus
Description copied from interface:NetworkCertificateGet a status associated with the certificate.- Specified by:
getNetworkCertificateStatusin interfaceNetworkCertificate- Returns:
- the status, which may indicate if the certificate is being processed, etc
-
setNetworkCertificateStatus
-
getNetworkCertificateSubjectDN
Description copied from interface:NetworkCertificateGet 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:
getNetworkCertificateSubjectDNin interfaceNetworkCertificate- Returns:
- the node's subject DN
-
setNetworkCertificateSubjectDN
-
getKeystorePassword
Description copied from interface:NetworkAssociationGet a password to use for this association's keystore.- Specified by:
getKeystorePasswordin interfaceNetworkAssociation- Returns:
- a keystore password
-
setKeystorePassword
-