Package software.nectar.java.factory
Class CredentialsFactory
java.lang.Object
software.nectar.java.factory.base.BaseFactory<Credentials>
software.nectar.java.factory.CredentialsFactory
public class CredentialsFactory extends BaseFactory<Credentials>
-
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 CredentialsFactory(java.lang.String key, java.lang.String secret) -
Method Summary
Modifier and Type Method Description voidactivateCredentials(java.lang.String ref)voiddeactivateCredentials(java.lang.String ref)CredentialsextractFrom(org.json.JSONObject responseObj)java.util.List<Credentials>extractMultipleFrom(org.json.JSONObject responseObj)CredentialsgetCredentials(java.lang.String ref)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
-
CredentialsFactory
public CredentialsFactory(java.lang.String key, java.lang.String secret)
-
-
Method Details
-
getCredentials
public Credentials getCredentials(java.lang.String ref) throws java.security.NoSuchAlgorithmException, java.security.InvalidKeyException, java.io.IOException, ApiResponseException- Throws:
java.security.NoSuchAlgorithmExceptionjava.security.InvalidKeyExceptionjava.io.IOExceptionApiResponseException
-
activateCredentials
public void activateCredentials(java.lang.String ref) throws java.security.NoSuchAlgorithmException, java.security.InvalidKeyException, java.io.IOException, ApiResponseException- Throws:
java.security.NoSuchAlgorithmExceptionjava.security.InvalidKeyExceptionjava.io.IOExceptionApiResponseException
-
deactivateCredentials
public void deactivateCredentials(java.lang.String ref) throws java.security.NoSuchAlgorithmException, java.security.InvalidKeyException, java.io.IOException, ApiResponseException- Throws:
java.security.NoSuchAlgorithmExceptionjava.security.InvalidKeyExceptionjava.io.IOExceptionApiResponseException
-
extractMultipleFrom
public java.util.List<Credentials> extractMultipleFrom(org.json.JSONObject responseObj) throws ApiResponseException- Specified by:
extractMultipleFromin classBaseFactory<Credentials>- Throws:
ApiResponseException
-
extractFrom
- Specified by:
extractFromin classBaseFactory<Credentials>- Throws:
ApiResponseException
-