Handling of pre-processing result

If the Cryptshare Server using the pre-processing of files, the information of the result can be obtained, if processing fails for one or more files.

The pre-processing result depends on the chosen mode in the server configuration. More information about pre-processing can be found in the server guide.

The TransferError object contains a list of PreProcessingOutputInfo. This class wraps the following strings:

  1. TransferFileName: Gets the preprocessing result file name.

  2. PreProcessingOutput: Gets the preprocessing result output message. The content of the message can be configured in the Cryptshare pre-processing admin settings area.

public class UploadCompleteHandler implements IUploadCompleteHandler {
	@Override
	public void uploadComplete(Map<String, String> urlMappings, Map<String, String> smtpMappings, String serverGenPassword,
			TransferError transferError, String trackingId) {
		if (transferError != null && transferError.getPreProcessingOutputs() != null) {
			for (int i = 0; i < transferError.getPreProcessingOutputs().size(); i++) {
				final PreProcessingOutputInfo preProcessingOutputInfo = transferError.getPreProcessingOutputs().get(i);
				System.out.printf(
						"Pre-Processing result %d\nTransferFileName: '%s'\nPreProcessingOutput: '%s'%n",
						i,
						preProcessingOutputInfo.getTransferFileName(),
						preProcessingOutputInfo.getPreProcessingOutput());
			}
		}
	}
}