| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
MINIMUM_SERVER_VERSION |
| Constructor and Description |
|---|
Client(java.lang.String userEmailAddress,
CryptshareConnection connection,
java.nio.file.Path storePath)
Constructs a Client instance that sets the
Locale.getDefault() as user language, and uses a file based store to persist information. |
Client(java.lang.String userEmailAddress,
CryptshareConnection connection,
java.nio.file.Path storePath,
ProtectionScope protectionScope)
Constructs a Client instance that sets the
Locale.getDefault() as user language, and uses a file based store to persist information. |
Client(java.lang.String userEmailAddress,
java.util.Locale userLanguage,
CryptshareConnection connection,
IStore store)
Constructs a Client instance with a custom
IStore implementation. |
Client(java.lang.String userEmailAddress,
java.util.Locale userLanguage,
CryptshareConnection connection,
java.nio.file.Path storePath)
Constructs a Client instance that sets the
Locale.getDefault() as user language, and uses a file based store to persist information. |
Client(java.lang.String userEmailAddress,
java.util.Locale userLanguage,
CryptshareConnection connection,
java.nio.file.Path storePath,
ProtectionScope protectionScope)
Constructs a
Client instance that sets the Locale as user language, and uses a file based store to persist information. |
| Modifier and Type | Method and Description |
|---|---|
void |
applyQuickActivationCode(java.lang.String recoveryCode)
Applies a QUICK activation code to activate QUICK access for the user on this client.
|
void |
beginTransfer(Transfer transfer,
IUploadProgressChangedHandler uploadProgressChangedCallback,
IUploadCompleteHandler uploadCompleteCallback,
IUploadInterruptedHandler uploadInterruptedCallback,
IUploadCancelledHandler uploadCancelledCallback,
int pollingTimer)
Performs a transfer asynchronously in a separate thread.
|
void |
cancelTransfer()
Cancels a currently ongoing transfer.
|
boolean |
checkCompatibility()
Performs a compatibility check of this API against the Cryptshare Server.
|
boolean |
checkCompatibility(java.lang.String minimumServerVersion)
Performs a compatibility check against the Cryptshare Server.
|
PasswordCheckResult |
checkPassword(java.lang.String password)
Checks the given password against the password policy defined on the server.
|
CheckVerificationResult |
checkVerification()
Requests information about the verification configuration on the server and the current verification
state of the user on this client.
|
void |
confirmQuickConnection(java.lang.String metaId,
java.lang.String password)
Confirms/activates the QUICK connection that has been offered with a transfer.
|
void |
confirmSenderVerification(java.lang.String verificationCode)
Completes the sender verification process by confirming it with the the received verification code.
|
void |
enableVerificationForQuick()
Enables the verification of the user for QUICK so that it can be used to send and retrieve QUICK transfers.
|
java.lang.String |
generateQuickActivationCode()
Generates a activation code for client activation.
|
java.lang.String |
getClientId()
Returns the identifier if the client, which is generated automatically together with the store file.
|
java.lang.String |
getServerUrl()
Returns the Cryptshare Server URL that is set for this client.
|
java.lang.String |
getUserEmailAddress()
Returns the email address of the user that is set for this client.
|
java.util.Locale |
getUserLanguage()
Returns the language/region that is set for this client.
|
java.lang.String |
getVerificationToken()
Returns the verification token for the user that is set for this client.
|
void |
performTransfer(Transfer transfer,
IUploadProgressChangedHandler uploadProgressChangedCallback,
IUploadCompleteHandler uploadCompleteCallback,
IUploadInterruptedHandler uploadInterruptedCallback,
IUploadCancelledHandler uploadCancelledCallback,
int pollingTimer)
Performs a transfer synchronously in the current thread.
|
void |
performTransfer(Transfer transfer,
IUploadProgressChangedHandler uploadProgressChangedCallback,
IUploadCompleteHandler uploadCompleteCallback,
IUploadInterruptedHandler uploadInterruptedCallback,
IUploadCancelledHandler uploadCancelledCallback,
int pollingTimer,
IUploadFilesFinishedHandler uploadFilesFinishedHandler)
Performs a transfer synchronously in the current thread.
|
java.util.Map<java.lang.String,java.lang.String> |
requestActiveTransfers()
Requests all active transfers where this client's sender address is a recipient.
|
java.util.Map<java.lang.String,AddOnOptionValue> |
requestAddOnSettings()
Requests the Add-On settings from the server.
|
void |
requestClientVerification()
Requests a client verification.
|
java.util.Map<java.util.List<java.lang.String>,java.lang.String> |
requestEmailTemplate(java.lang.String templateName,
java.util.Map<java.util.Set<java.lang.String>,java.util.Set<TemplateReplacement>> replacements,
java.util.Locale locale,
EmailFormat mailFormat)
Requests several resolved template content strings at once.
|
java.lang.String |
requestGeneratedPassword(int length)
Requests a generated password with the given length from the Cryptshare Server.
|
byte[] |
requestLanguagePackFile(java.lang.String filePath,
java.util.Locale locale)
Downloads a single language pack resource.
|
java.util.List<LanguagePack> |
requestLanguagePacks()
Requests info about the language packs that are available on the server.
|
LicenseInfo |
requestLicenseInfo()
Requests the license info for the Cryptshare server and this product.
|
PasswordPolicy |
requestPasswordPolicy()
Requests the password policy from the server.
|
Policy |
requestPolicy(java.util.Collection<java.lang.String> recipients)
Request the policy rules that applies to the combination of the current user as sender, and the specified recipients.
|
java.util.Map<java.lang.String,QuickConnectionState> |
requestQuickConnectionStates(java.util.List<java.lang.String> userEmailAddresses)
Requests the
QuickConnectionState for each of the specified recipients. |
RecipientQuickState |
requestRecipientQuickState(java.lang.String metaId)
Requests information about the QUICK state of a transfer recipient.
|
void |
requestSenderVerification()
Requests a sender verification.
|
ServerData |
requestServerData()
Requests the general server settings from the Cryptshare server.
|
TermsOfUse |
requestTermsOfUse()
Requests the Terms of Use from the server.
|
void |
resetQuickState()
Resets the QUICK state of the user on the Cryptshare server.
|
void |
revokeTransfer(java.lang.String trackingId)
Revokes the transfer with the given trackingId such that its files are no longer accessible.
|
void |
revokeTransfer(java.lang.String trackingId,
boolean notifyRecipient,
boolean notifySender)
Revokes the transfer with the given trackingId such that its files are no longer accessible.
|
void |
revokeTransfer(java.lang.String trackingId,
boolean notifyRecipient,
boolean notifySender,
java.lang.String message)
Revokes the transfer with the given trackingId such that its files are no longer accessible.
|
void |
revokeTransfer(java.lang.String trackingId,
java.lang.String message)
Revokes the transfer with the given trackingId such that its files are no longer accessible.
|
void |
setUserLanguage(java.util.Locale userLanguage)
Sets the language/region for this client.
|
void |
updateTransferError(java.lang.String trackingId,
TransferError transferError)
Updates the error status for the Transfer with the given tracking ID.
|
public static final java.lang.String MINIMUM_SERVER_VERSION
public Client(java.lang.String userEmailAddress,
CryptshareConnection connection,
java.nio.file.Path storePath)
throws ClientException
Locale.getDefault() as user language, and uses a file based store to persist information.
The file contents are protected on machine scope. This means that the created client store file cannot
be used on another host.
Depending on the OS, a default IProtectionService is to protect the store:
AesProtectionService with LinuxKeySourceProvider.DpApiProtectionService.userEmailAddress - The email address of the user that acts as initiating user (that is, most of the time, as sender) for the opertions.connection - The CryptshareConnection for the targeted Cryptshare Server.storePath - The path to the store file or directory. If the path points to an existing directory, a file named 'client.store' will be created in there.ClientException - If the Client can't be created using the given CryptshareConnection.public Client(java.lang.String userEmailAddress,
java.util.Locale userLanguage,
CryptshareConnection connection,
java.nio.file.Path storePath)
throws ClientException
Locale.getDefault() as user language, and uses a file based store to persist information.
The file contents are protected on machine scope. This means that the created client store file cannot
be used on another host.
Depending on the OS, a default IProtectionService is to protect the store:
AesProtectionService with LinuxKeySourceProvider.DpApiProtectionService.userEmailAddress - The email address of the user that acts as initiating user (that is, most of the time, as sender) for the opertions.userLanguage - The language/region of the user. This sets the default language for all requests, for example to set the sender language for transfers.
It may be null, in which case the Locale.getDefault() is set.connection - The CryptshareConnection for the targeted Cryptshare Server.storePath - The path to the store file or directory. If the path points to an existing directory, a file named 'client.store' will be created in there.ClientException - If the Client can't be created using the given CryptshareConnection.public Client(java.lang.String userEmailAddress,
CryptshareConnection connection,
java.nio.file.Path storePath,
ProtectionScope protectionScope)
throws ClientException
Locale.getDefault() as user language, and uses a file based store to persist information.
Depending on the OS, a default IProtectionService is to protect the store:
AesProtectionService with LinuxKeySourceProvider.DpApiProtectionService.userEmailAddress - The email address of the user that acts as initiating user (that is, most of the time, as sender) for the opertions.connection - The CryptshareConnection for the targeted Cryptshare Server.storePath - The path to the store file or directory. If the path points to an existing directory, a file named 'client.store' will be created in there.protectionScope - The ProtectionScope that is used to protect the data in the store file. On Linux, only ProtectionScope.LOCAL_MACHINE is valid.ClientException - If the Client can't be created using the given CryptshareConnection.public Client(java.lang.String userEmailAddress,
java.util.Locale userLanguage,
CryptshareConnection connection,
java.nio.file.Path storePath,
ProtectionScope protectionScope)
throws ClientException
Client instance that sets the Locale as user language, and uses a file based store to persist information.
Depending on the OS, a default IProtectionService is to protect the store:
AesProtectionService with LinuxKeySourceProvider.DpApiProtectionService.userEmailAddress - The email address of the user that acts as initiating user (that is, most of the time, as sender) for the opertions.userLanguage - The language/region of the user. This sets the default language for all requests, for example to set the sender language for transfers.
It may be null, in which case the Locale.getDefault() is set.connection - The CryptshareConnection for the targeted Cryptshare Server.storePath - The path to the store file or directory. If the path points to an existing directory, a file named 'client.store' will be created in there.protectionScope - The ProtectionScope that is used to protect the data in the store file. On Linux, only ProtectionScope.LOCAL_MACHINE is valid.ClientException - If the Client can't be created using the given CryptshareConnection.public Client(java.lang.String userEmailAddress,
java.util.Locale userLanguage,
CryptshareConnection connection,
IStore store)
throws ClientException
IStore implementation.userEmailAddress - The email address of the user that acts as initiating user (that is, most of the time, as sender) for the opertions.userLanguage - The language/region of the user. This sets the default language for all requests, for example to set the sender language for transfers.
It may be null, in which case the Locale.getDefault() is set.connection - The CryptshareConnection for the targeted Cryptshare Server.store - An IStore instance that persists the clients state.ClientException - If the Client can't be created using the given CryptshareConnection.public CheckVerificationResult checkVerification() throws CryptshareServerException, ClientException
IClientcheckVerification in interface IClientCheckVerificationResult object that contains information about the verification state and configuration.CryptshareServerException - If the Cryptshare Server failed to process the request.ClientException - If the API failed to process the request.public void requestClientVerification()
throws ClientException,
CryptshareServerException
IClientrequestClientVerification in interface IClientClientException - If the API failed to process the request.CryptshareServerException - If the Cryptshare Server failed to process the request.public Policy requestPolicy(java.util.Collection<java.lang.String> recipients) throws CryptshareServerException, ClientException
IClientrequestPolicy in interface IClientrecipients - The email addresses of the recipientsPolicy containing the policy rulesCryptshareServerException - If the Cryptshare Server failed to process the request.ClientException - If the API failed to process the request.public java.util.Map<java.lang.String,AddOnOptionValue> requestAddOnSettings() throws CryptshareServerException, ClientException
CryptshareServerException - Cryptshare server exceptionClientException - client exceptionpublic java.util.List<LanguagePack> requestLanguagePacks() throws CryptshareServerException, ClientException
IClientCryptshareConnection.requestLanguagePacks in interface IClientCryptshareServerException - If the Cryptshare Server failed to process the request.ClientException - If the API failed to process the request.public byte[] requestLanguagePackFile(java.lang.String filePath,
java.util.Locale locale)
throws CryptshareServerException,
ClientException
IClientCryptshareConnection.requestLanguagePackFile in interface IClientfilePath - The path to the resource, relative to the language pack root.locale - The Locale of the requested language pack fileCryptshareServerException - If the Cryptshare Server failed to process the request.ClientException - If the API failed to process the request.public TermsOfUse requestTermsOfUse() throws CryptshareServerException, ClientException
IClientrequestTermsOfUse in interface IClientTermsOfUse object containing a list of key/value entries where the key is the locale,
and the value is the actual text of the Terms of Use for that language.CryptshareServerException - If the Cryptshare Server failed to process the request.ClientException - If the API failed to process the request.public LicenseInfo requestLicenseInfo() throws CryptshareServerException, ClientException
IClientrequestLicenseInfo in interface IClientLicenseInfo object containing the license informationCryptshareServerException - If the Cryptshare Server failed to process the request.ClientException - If the API failed to process the request.public ServerData requestServerData() throws CryptshareServerException, ClientException
IClientrequestServerData in interface IClientServerData object containing the server settings.CryptshareServerException - If the Cryptshare Server failed to process the request.ClientException - If the API failed to process the request.public java.util.Map<java.lang.String,java.lang.String> requestActiveTransfers()
throws CryptshareServerException,
ClientException
IClientrequestActiveTransfers in interface IClientCryptshareServerException - If the Cryptshare Server failed to process the request.ClientException - If the API failed to process the request.public java.lang.String requestGeneratedPassword(int length)
throws CryptshareServerException,
ClientException
IClientrequestGeneratedPassword in interface IClientlength - The length of the password to generate.CryptshareServerException - If the Cryptshare Server failed to process the request.ClientException - If the API failed to process the request.public PasswordCheckResult checkPassword(java.lang.String password) throws CryptshareServerException, ClientException
IClientcheckPassword in interface IClientpassword - String with password to checkPasswordPolicy object containing the password policy information and a security rating for the password.CryptshareServerException - If the Cryptshare Server failed to process the request.ClientException - If the API failed to process the request.public java.util.Map<java.util.List<java.lang.String>,java.lang.String> requestEmailTemplate(java.lang.String templateName,
java.util.Map<java.util.Set<java.lang.String>,java.util.Set<TemplateReplacement>> replacements,
java.util.Locale locale,
EmailFormat mailFormat)
throws CryptshareServerException,
ClientException
IClientSet with TemplateReplacements) has a corresponing
Set of identifiers (e.g. recipients), to which the replacements belong.
The result will return the distinct and (partially) resolved templates with all identifiers that led to
that certain template result.requestEmailTemplate in interface IClienttemplateName - The name of the template, for example "recipient" or "sender"replacements - Associations between a list of identifiers (e.g. recipients) and replacements.locale - The Locale for which the template is requestedmailFormat - The email format of the template as EmailFormat.Map containing the email template variants for each set of identifiers.CryptshareServerException - If the Cryptshare Server failed to process the request.ClientException - If the API failed to process the request.public void updateTransferError(java.lang.String trackingId,
TransferError transferError)
throws CryptshareServerException,
ClientException
IClientupdateTransferError in interface IClienttrackingId - The tracking ID of the transfer whose error status is to be updatedtransferError - The error information. For this webservice call, TransferError.isAllNotificationsFailed(),
TransferError.isEmlCreationFailed(),
TransferError.isSenderNotificationFailed() flags and TransferError.getFailedRecipients() is updated.CryptshareServerException - If the Cryptshare Server failed to process the request.ClientException - If the API failed to process the request.public void cancelTransfer()
IClientcancelTransfer in interface IClientpublic void beginTransfer(Transfer transfer, IUploadProgressChangedHandler uploadProgressChangedCallback, IUploadCompleteHandler uploadCompleteCallback, IUploadInterruptedHandler uploadInterruptedCallback, IUploadCancelledHandler uploadCancelledCallback, int pollingTimer)
IClientbeginTransfer in interface IClienttransfer - The transfer to be performed asynchronouslyuploadProgressChangedCallback - This callback is called regularly with current information about the progress.uploadCompleteCallback - This callback is called when the transfer completes without cancellation.uploadInterruptedCallback - This callback is called when the transfer is interrupted due to exceptions.uploadCancelledCallback - This callback is called when the user cancelled the transfer.pollingTimer - The time in milliseconds between two checks of transfer state during the pre-processing.public void performTransfer(Transfer transfer, IUploadProgressChangedHandler uploadProgressChangedCallback, IUploadCompleteHandler uploadCompleteCallback, IUploadInterruptedHandler uploadInterruptedCallback, IUploadCancelledHandler uploadCancelledCallback, int pollingTimer) throws CryptshareServerException, ClientException
IClientperformTransfer in interface IClienttransfer - The transfer to be performed synchronouslyuploadProgressChangedCallback - This callback is called regularly with current information about the progress.uploadCompleteCallback - This callback is called when the transfer completes without cancellation.uploadInterruptedCallback - This callback is called when the transfer is interrupted due to exceptions.uploadCancelledCallback - This callback is called when the user cancelled the transfer.pollingTimer - The time in milliseconds between two checks of transfer state during the pre-processing.CryptshareServerException - If the Cryptshare Server failed to process the request.ClientException - If the API failed to process the request.public void performTransfer(Transfer transfer, IUploadProgressChangedHandler uploadProgressChangedCallback, IUploadCompleteHandler uploadCompleteCallback, IUploadInterruptedHandler uploadInterruptedCallback, IUploadCancelledHandler uploadCancelledCallback, int pollingTimer, IUploadFilesFinishedHandler uploadFilesFinishedHandler) throws CryptshareServerException, ClientException
IClientperformTransfer in interface IClienttransfer - The transfer to be performed synchronouslyuploadProgressChangedCallback - This callback is called regularly with current information about the progress.uploadCompleteCallback - This callback is called when the transfer completes without cancellation.uploadInterruptedCallback - This callback is called when the transfer is interrupted due to exceptions.uploadCancelledCallback - This callback is called when the user cancelled the transfer.pollingTimer - The time in milliseconds between two checks of transfer state during the pre-processing.uploadFilesFinishedHandler - This callback is called when the file upload is finished, but before they are processed by the server.CryptshareServerException - If the Cryptshare Server failed to process the request.ClientException - If the API failed to process the request.public java.util.Map<java.lang.String,QuickConnectionState> requestQuickConnectionStates(java.util.List<java.lang.String> userEmailAddresses) throws CryptshareServerException, ClientException
IClientQuickConnectionState for each of the specified recipients.requestQuickConnectionStates in interface IClientuserEmailAddresses - A collection of email addresses to request the QUICK connection state for.QuickConnectionState"/> as values.CryptshareServerException - If the Cryptshare Server failed to process the request.ClientException - If the API failed to process the request.public java.lang.String generateQuickActivationCode()
throws CryptshareServerException,
ClientException
IClientgenerateQuickActivationCode in interface IClientCryptshareServerException - If the Cryptshare Server failed to process the request.ClientException - If the API failed to process the request.public void applyQuickActivationCode(java.lang.String recoveryCode)
throws CryptshareServerException,
ClientException
IClientapplyQuickActivationCode in interface IClientrecoveryCode - The activation code.CryptshareServerException - If the Cryptshare Server failed to process the request.ClientException - If the API failed to process the request.public void enableVerificationForQuick()
throws CryptshareServerException,
ClientException
IClientenableVerificationForQuick in interface IClientCryptshareServerException - If the Cryptshare Server failed to process the request.ClientException - If the API failed to process the request.public void resetQuickState()
throws CryptshareServerException,
ClientException
IClientresetQuickState in interface IClientCryptshareServerException - If the Cryptshare Server failed to process the request.ClientException - If the API failed to process the request.public void confirmQuickConnection(java.lang.String metaId,
java.lang.String password)
throws CryptshareServerException,
ClientException
IClientconfirmQuickConnection in interface IClientmetaId - The recipient's meta ID of the transfer.password - The password to retrieve the transfer.CryptshareServerException - If the Cryptshare Server failed to process the request.ClientException - If the API failed to process the request.public RecipientQuickState requestRecipientQuickState(java.lang.String metaId) throws CryptshareServerException, ClientException
IClientrequestRecipientQuickState in interface IClientmetaId - The recipient's meta ID of the transfer.RecipientQuickState object with further information.CryptshareServerException - If the Cryptshare Server failed to process the request.ClientException - If the API failed to process the request.public void requestSenderVerification()
throws CryptshareServerException,
ClientException
IClientIClient.confirmSenderVerification(String).requestSenderVerification in interface IClientCryptshareServerException - If the Cryptshare Server failed to process the request.ClientException - If the API failed to process the request.public void confirmSenderVerification(java.lang.String verificationCode)
throws CryptshareServerException,
ClientException
IClientconfirmSenderVerification in interface IClientverificationCode - The verification code that has been received after calling IClient.requestSenderVerification()CryptshareServerException - If the Cryptshare Server failed to process the request.ClientException - If the API failed to process the request.public boolean checkCompatibility()
throws ClientException
IClientcheckCompatibility in interface IClienttrue, if the configured Cryptshare server is compatible to this version of the API.ClientException - If the API failed to process the request.public boolean checkCompatibility(java.lang.String minimumServerVersion)
throws ClientException
IClientIClient.checkCompatibility() instead.checkCompatibility in interface IClientminimumServerVersion - The minimum server version.ClientException - If the API failed to process the request.public PasswordPolicy requestPasswordPolicy() throws CryptshareServerException, ClientException
IClientrequestPasswordPolicy in interface IClientPasswordPolicy with the current password policy from the server.CryptshareServerException - If the Cryptshare Server failed to process the request.ClientException - If the API failed to process the request.public void revokeTransfer(java.lang.String trackingId)
throws ClientException,
CryptshareServerException
IClientrevokeTransfer in interface IClienttrackingId - The tracking ID of the transfer to revoke.ClientException - If the API failed to process the request.CryptshareServerException - CryptshareServerException indicating:
Either no transfer matching the given trackingId was found,
The requesting user is not the sender of the transfer
Failed to delete transfer files.
Failed to send email notification to recipients.public void revokeTransfer(java.lang.String trackingId,
boolean notifyRecipient,
boolean notifySender)
throws ClientException,
CryptshareServerException
IClientrevokeTransfer in interface IClienttrackingId - The tracking ID of the transfer to revoke.notifyRecipient - Whether the recipient receives an email notification.notifySender - Whether the sender receives an email notification.ClientException - If the API failed to process the request.CryptshareServerException - CryptshareServerException indicating:
public void revokeTransfer(java.lang.String trackingId,
java.lang.String message)
throws ClientException,
CryptshareServerException
IClientrevokeTransfer in interface IClienttrackingId - The tracking ID of the transfer to revoke.message - The email notification message. If a default message is set..ClientException - If the API failed to process the request.CryptshareServerException - CryptshareServerException indicating:
public void revokeTransfer(java.lang.String trackingId,
boolean notifyRecipient,
boolean notifySender,
java.lang.String message)
throws ClientException,
CryptshareServerException
IClientrevokeTransfer in interface IClienttrackingId - The tracking ID of the transfer to revoke.notifyRecipient - Whether the recipient receives an email notification.notifySender - Whether the sender receives an email notification.message - The email notification message. If a default message is set..ClientException - If the API failed to process the request.CryptshareServerException - CryptshareServerException indicating:
public java.lang.String getClientId()
IClientgetClientId in interface IClientpublic java.lang.String getUserEmailAddress()
IClientgetUserEmailAddress in interface IClientpublic java.lang.String getVerificationToken()
IClientgetVerificationToken in interface IClientpublic java.util.Locale getUserLanguage()
IClientgetUserLanguage in interface IClientLocale.public java.lang.String getServerUrl()
IClientgetServerUrl in interface IClientpublic void setUserLanguage(java.util.Locale userLanguage)
IClientsetUserLanguage in interface IClientuserLanguage - The language/region as Locale.