public class RestPkiClient
extends java.lang.Object
| Constructor and Description |
|---|
RestPkiClient(java.lang.String endpointUrl,
java.lang.String authToken)
Create a new instance of the class passing the URL for the REST PKI API and the access token
to be used for authenticating with the service.
|
RestPkiClient(java.lang.String endpointUrl,
java.lang.String authToken,
java.net.Proxy proxy)
Create a new instance of the class passing the URL for the REST PKI API and the access token
to be used for authenticating with the service, using a proxy for communication.
|
| Modifier and Type | Method and Description |
|---|---|
Authentication |
getAuthentication() |
java.lang.String |
getAuthToken() |
java.lang.String |
getEndpointUrl() |
boolean |
getMultipartUploadDoubleCheck()
Deprecated.
|
int |
getMultipartUploadThreshold() |
java.net.Proxy |
getProxy() |
com.lacunasoftware.restpki.Version |
getRestPkiVersion() |
boolean |
isMultipartUploadDoubleCheck() |
void |
setAuthToken(java.lang.String authToken) |
void |
setEndpointUrl(java.lang.String endpointUrl) |
void |
setMultipartUploadDoubleCheck(boolean multipartUploadDoubleCheck) |
void |
setMultipartUploadThreshold(int multipartUploadThreshold) |
void |
setProxy(java.net.Proxy proxy) |
void |
setRestPkiVersion(com.lacunasoftware.restpki.Version restPkiVersion) |
BlobReference |
uploadFile(byte[] content) |
BlobReference |
uploadFile(java.io.InputStream stream) |
BlobReference |
uploadFile(java.nio.file.Path path) |
BlobReference |
uploadFile(java.lang.String path) |
public RestPkiClient(java.lang.String endpointUrl,
java.lang.String authToken)
If you do not have an access token, you can get one on the REST PKI website.
endpointUrl - The URL for the REST PKI API, terminated in a slash (/), for instance
"https://restpki.lacunasoftware.com/" (this might be different if you are
using a on-premises instance).authToken - The access token to be used for authenticating with the service.public RestPkiClient(java.lang.String endpointUrl,
java.lang.String authToken,
java.net.Proxy proxy)
If you do not have an access token, you can get one on the REST PKI website.
endpointUrl - The URL for the REST PKI API, terminated in a slash (/), for instance
"https://restpki.lacunasoftware.com/" (this might be different if you are
using a on-premises instance).authToken - The access token to be used for authenticating with the service.proxy - The proxy settings to be used for communication.public java.lang.String getEndpointUrl()
public void setEndpointUrl(java.lang.String endpointUrl)
public java.lang.String getAuthToken()
public void setAuthToken(java.lang.String authToken)
public java.net.Proxy getProxy()
public void setProxy(java.net.Proxy proxy)
@Deprecated public boolean getMultipartUploadDoubleCheck()
public boolean isMultipartUploadDoubleCheck()
public void setMultipartUploadDoubleCheck(boolean multipartUploadDoubleCheck)
public int getMultipartUploadThreshold()
public void setMultipartUploadThreshold(int multipartUploadThreshold)
public com.lacunasoftware.restpki.Version getRestPkiVersion()
public void setRestPkiVersion(com.lacunasoftware.restpki.Version restPkiVersion)
public Authentication getAuthentication()
public BlobReference uploadFile(java.io.InputStream stream) throws RestException
RestExceptionpublic BlobReference uploadFile(java.nio.file.Path path) throws java.io.IOException, RestException
java.io.IOExceptionRestExceptionpublic BlobReference uploadFile(java.lang.String path) throws java.io.IOException, RestException
java.io.IOExceptionRestExceptionpublic BlobReference uploadFile(byte[] content) throws java.io.IOException, RestException
java.io.IOExceptionRestException