/** * Move the wizard backward one step/screen. */ private void wizardStepBackward() { drawWizardScreen(currentState - 1); }
public void dragOver(DropTargetDragEvent dtde) { checkValidDrag(dtde); }
/** * Add a signature request item to the XML document to store the request, and details about * the object the request was related to. * * @param key * the key name of the object the signature request applies to. * @param bucketName * the bucket containing the object. * @param metadata * the object's metadata * @param signatureRequest * the signature request for the object. */ public void addSignatureRequest(String key, String bucketName, Map metadata, SignatureRequest signatureRequest) { objectRequestList.add(new ObjectAndSignatureRequestDetails(key, bucketName, metadata, signatureRequest)); }
@Override public void updateBytesTransferred(long byteCount) { super.updateBytesTransferred(byteCount); final int percentage = (int)((double)getBytesTransferred() * 100 / getBytesToTransfer()); SwingUtilities.invokeLater(new Runnable() { public void run() { progressBar.setValue(percentage); } }); } };
/** * Constructor to run this application in a stand-alone window. * * @param ownerFrame the frame the application will be displayed in * @throws S3ServiceException */ public Uploader(JFrame ownerFrame, Properties standAloneArgumentProperties) throws S3ServiceException { this(false); this.ownerFrame = ownerFrame; this.standAloneArgumentProperties = standAloneArgumentProperties; init(); ownerFrame.getContentPane().add(this); ownerFrame.setBounds(this.getBounds()); ownerFrame.setVisible(true); }
private GatekeeperMessage retrieveGatekeeperResponse(S3Object[] objects) throws Exception { // Check whether Uploader has all necessary credentials from user inputs. boolean s3CredentialsProvided = userInputProperties.getProperty("AwsAccessKey") != null && userInputProperties.getProperty("AwsSecretKey") != null && userInputProperties.getProperty("S3BucketName") != null; GatekeeperMessage gatekeeperMessage = null; if (s3CredentialsProvided) { log.debug("S3 login credentials and bucket name are available, the Uploader " + "will generate its own Gatekeeper response"); gatekeeperMessage = buildGatekeeperResponse(objects); } else { gatekeeperMessage = contactGatewayServer(objects); } return gatekeeperMessage; }
@Override public void updateBytesTransferred(long byteCount) { super.updateBytesTransferred(byteCount); final int percentage = (int)((double)getBytesTransferred() * 100 / getBytesToTransfer()); SwingUtilities.invokeLater(new Runnable() { public void run() { progressBar.setValue(percentage); } }); } };
/** * Constructor to run this application in a stand-alone window. * * @param ownerFrame the frame the application will be displayed in * @throws S3ServiceException */ public Uploader(JFrame ownerFrame, Properties standAloneArgumentProperties) throws S3ServiceException { this(false); this.ownerFrame = ownerFrame; this.standAloneArgumentProperties = standAloneArgumentProperties; init(); ownerFrame.getContentPane().add(this); ownerFrame.setBounds(this.getBounds()); ownerFrame.setVisible(true); }
private GatekeeperMessage retrieveGatekeeperResponse(S3Object[] objects) throws Exception { // Check whether Uploader has all necessary credentials from user inputs. boolean s3CredentialsProvided = userInputProperties.getProperty("AwsAccessKey") != null && userInputProperties.getProperty("AwsSecretKey") != null && userInputProperties.getProperty("S3BucketName") != null; GatekeeperMessage gatekeeperMessage = null; if (s3CredentialsProvided) { log.debug("S3 login credentials and bucket name are available, the Uploader " + "will generate its own Gatekeeper response"); gatekeeperMessage = buildGatekeeperResponse(objects); } else { gatekeeperMessage = contactGatewayServer(objects); } return gatekeeperMessage; }
/** * Move the wizard forward one step/screen. */ private void wizardStepForward() { drawWizardScreen(currentState + 1); }
public void dragOver(DropTargetDragEvent dtde) { checkValidDrag(dtde); }
/** * Add a signature request item to the XML document to store the request, and details about * the object the request was related to. * * @param key * the key name of the object the signature request applies to. * @param bucketName * the bucket containing the object. * @param metadata * the object's metadata * @param signatureRequest * the signature request for the object. */ public void addSignatureRequest(String key, String bucketName, Map metadata, SignatureRequest signatureRequest) { objectRequestList.add(new ObjectAndSignatureRequestDetails(key, bucketName, metadata, signatureRequest)); }
/** * Move the wizard backward one step/screen. */ private void wizardStepBackward() { drawWizardScreen(currentState - 1); }
public void dropActionChanged(DropTargetDragEvent dtde) { checkValidDrag(dtde); }
/** * Move the wizard forward one step/screen. */ private void wizardStepForward() { drawWizardScreen(currentState + 1); }
public void dropActionChanged(DropTargetDragEvent dtde) { checkValidDrag(dtde); }
/** * When a fatal error occurs, go straight to last screen to display the error message * and make the error code available as a variable (<code>${errorCode}</code>) to be used * in the error message displayed to the user. * <p> * If there is an Uploader property <code>errorCodeMessage.<code></code> corresponding * to this error code, the value of this property is made available as a variable * (<code>${errorMessage}</code>). If there is no such property available the * <code>${errorMessage}</code> variable will be an empty string. * * * @param errorCode * the error code, which may correspond with an error message in uploader.properties. */ private void failWithFatalError(String errorCode) { uploaderProperties.setProperty("errorCode", errorCode); String errorCodeMessagePropertyName = "errorCodeMessage." + errorCode; String errorCodeMessage = uploaderProperties.getStringProperty(errorCodeMessagePropertyName, ""); uploaderProperties.setProperty("errorMessage", errorCodeMessage); fatalErrorOccurred = true; drawWizardScreen(WIZARD_SCREEN_5); }
public void dragEnter(DropTargetDragEvent dtde) { if (checkValidDrag(dtde)) { SwingUtilities.invokeLater(new Runnable() { public void run() { appContentPanel.setBorder(dragOverBorder); }; }); } } public void dragOver(DropTargetDragEvent dtde) {
/** * When a fatal error occurs, go straight to last screen to display the error message * and make the error code available as a variable (<code>${errorCode}</code>) to be used * in the error message displayed to the user. * <p> * If there is an Uploader property <code>errorCodeMessage.<code></code> corresponding * to this error code, the value of this property is made available as a variable * (<code>${errorMessage}</code>). If there is no such property available the * <code>${errorMessage}</code> variable will be an empty string. * * * @param errorCode * the error code, which may correspond with an error message in uploader.properties. */ private void failWithFatalError(String errorCode) { uploaderProperties.setProperty("errorCode", errorCode); String errorCodeMessagePropertyName = "errorCodeMessage." + errorCode; String errorCodeMessage = uploaderProperties.getStringProperty(errorCodeMessagePropertyName, ""); uploaderProperties.setProperty("errorMessage", errorCodeMessage); fatalErrorOccurred = true; drawWizardScreen(WIZARD_SCREEN_5); }
public void dragEnter(DropTargetDragEvent dtde) { if (checkValidDrag(dtde)) { SwingUtilities.invokeLater(new Runnable() { public void run() { appContentPanel.setBorder(dragOverBorder); }; }); } } public void dragOver(DropTargetDragEvent dtde) {