Package software.nectar.java.factory
Class PublicKeysFactory
java.lang.Object
software.nectar.java.factory.base.BaseFactory<PublicKey>
software.nectar.java.factory.PublicKeysFactory
public class PublicKeysFactory extends BaseFactory<PublicKey>
-
Nested Class Summary
Nested classes/interfaces inherited from class software.nectar.java.factory.base.BaseFactory
BaseFactory.Http -
Field Summary
Fields inherited from class software.nectar.java.factory.base.BaseFactory
BASE_PATH, JSON_CONTENT_TYPE, key, secret -
Constructor Summary
Constructors Constructor Description PublicKeysFactory(java.lang.String key, java.lang.String secret) -
Method Summary
Modifier and Type Method Description voidactivatePublicKey(java.lang.String ref)PublicKeycreatePublicKey(java.lang.String name, java.lang.String key, boolean activated)voiddeactivatePublicKey(java.lang.String ref)PublicKeyextractFrom(org.json.JSONObject responseObj)java.util.List<PublicKey>extractMultipleFrom(org.json.JSONObject responseObj)java.util.List<PublicKey>getPublicKeys(boolean activated)Methods inherited from class software.nectar.java.factory.base.BaseFactory
createPayload, delete, generateHMACAuth, generateNonce, get, getKey, gets, getSecret, initiateMultipleResponseRequest, initiateRequest, md5, post, put, setKey, setSecret
-
Constructor Details
-
PublicKeysFactory
public PublicKeysFactory(java.lang.String key, java.lang.String secret)
-
-
Method Details
-
getPublicKeys
public java.util.List<PublicKey> getPublicKeys(boolean activated) throws java.security.NoSuchAlgorithmException, java.security.InvalidKeyException, java.io.IOException, ApiResponseException- Throws:
java.security.NoSuchAlgorithmExceptionjava.security.InvalidKeyExceptionjava.io.IOExceptionApiResponseException
-
createPublicKey
public PublicKey createPublicKey(java.lang.String name, java.lang.String key, boolean activated) throws java.security.NoSuchAlgorithmException, java.security.InvalidKeyException, java.io.IOException, ApiResponseException- Throws:
java.security.NoSuchAlgorithmExceptionjava.security.InvalidKeyExceptionjava.io.IOExceptionApiResponseException
-
activatePublicKey
public void activatePublicKey(java.lang.String ref) throws java.security.NoSuchAlgorithmException, java.security.InvalidKeyException, java.io.IOException, ApiResponseException- Throws:
java.security.NoSuchAlgorithmExceptionjava.security.InvalidKeyExceptionjava.io.IOExceptionApiResponseException
-
deactivatePublicKey
public void deactivatePublicKey(java.lang.String ref) throws java.security.NoSuchAlgorithmException, java.security.InvalidKeyException, java.io.IOException, ApiResponseException- Throws:
java.security.NoSuchAlgorithmExceptionjava.security.InvalidKeyExceptionjava.io.IOExceptionApiResponseException
-
extractFrom
- Specified by:
extractFromin classBaseFactory<PublicKey>- Throws:
ApiResponseException
-
extractMultipleFrom
public java.util.List<PublicKey> extractMultipleFrom(org.json.JSONObject responseObj) throws ApiResponseException- Specified by:
extractMultipleFromin classBaseFactory<PublicKey>- Throws:
ApiResponseException
-