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 the expiration.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) Set the confirmation key.voidsetExpiration(Instant expiration) Set the expiration.voidsetKeystorePassword(String keystorePassword) Set the keystore password.voidsetNetworkCertificate(String networkCertificate) Set the network certificate.voidsetNetworkCertificateStatus(String networkCertificateStatus) Set the network certificate status.voidsetNetworkCertificateSubjectDN(String networkCertificateSubjectDN) Set the network certificate subject DN.voidsetNetworkId(Long networkId) Set the network ID.voidsetSecurityPhrase(String secretPhrase) Set the security phrase.voidsetUsername(String username) Set the 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
Set the username.- Parameters:
username- the username to set
-
getExpiration
Get the expiration.- Returns:
- the expiration
-
setExpiration
Set the expiration.- Parameters:
expiration- the expiration to set
-
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
Set the confirmation key.- Parameters:
confirmationKey- the confirmation key to set
-
getSecurityPhrase
Description copied from interface:NetworkAssociationGet a security phrase, generated on the network side.- Specified by:
getSecurityPhrasein interfaceNetworkAssociation- Returns:
- a security phrase
-
setSecurityPhrase
Set the security phrase.- Parameters:
secretPhrase- the phrase to set
-
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
Set the network ID.- Parameters:
networkId- the network ID to set
-
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
Set the network certificate.- Parameters:
networkCertificate- the network certificate to set
-
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
Set the network certificate status.- Parameters:
networkCertificateStatus- the status to set
-
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
Set the network certificate subject DN.- Parameters:
networkCertificateSubjectDN- the DN to set
-
getKeystorePassword
Description copied from interface:NetworkAssociationGet a password to use for this association's keystore.- Specified by:
getKeystorePasswordin interfaceNetworkAssociation- Returns:
- a keystore password
-
setKeystorePassword
Set the keystore password.- Parameters:
keystorePassword- the password to set
-