/** * @param objects * the objects that will be renamed. * * @return * the renamed keys that will result from the proposed renaming pattern. */ protected Set renameObjectKeys(S3Object[] objects) { Set newNames = new HashSet(); for (int i = 0; i < objects.length; i++) { String newName = renameObjectKey(objects[i].getKey(), i); newNames.add(newName); } return newNames; }
/** * @param objects * the objects that will be renamed. * * @return * the renamed keys that will result from the proposed renaming pattern. */ protected Set renameObjectKeys(S3Object[] objects) { Set newNames = new HashSet(); for (int i = 0; i < objects.length; i++) { String newName = renameObjectKey(objects[i].getKey(), i); newNames.add(newName); } return newNames; }
/** * Event handler for this dialog. */ public void actionPerformed(ActionEvent e) { if ("OK".equals(e.getActionCommand())) { copyActionApproved = true; for (int i = 0; i < destinationObjects.length; i++) { destinationObjects[i].setKey( renameObjectKey(destinationObjects[i].getKey(), i)); if ("Publically Accessible".equals(destinationAclComboBox.getSelectedItem())) { destinationObjects[i].setAcl(AccessControlList.REST_CANNED_PUBLIC_READ); } else if ("Unchanged".equals(destinationAclComboBox.getSelectedItem())) { copyOriginalAccessControlLists = true; } // Apply storage class destinationObjects[i].setStorageClass( (String) destinationStorageClassComboBox.getSelectedItem()); } this.setVisible(false); } else if ("Cancel".equals(e.getActionCommand())) { copyActionApproved = false; this.setVisible(false); } }
/** * Event handler for this dialog. */ public void actionPerformed(ActionEvent e) { if ("OK".equals(e.getActionCommand())) { copyActionApproved = true; for (int i = 0; i < destinationObjects.length; i++) { destinationObjects[i].setKey( renameObjectKey(destinationObjects[i].getKey(), i)); if ("Publically Accessible".equals(destinationAclComboBox.getSelectedItem())) { destinationObjects[i].setAcl(AccessControlList.REST_CANNED_PUBLIC_READ); } else if ("Unchanged".equals(destinationAclComboBox.getSelectedItem())) { copyOriginalAccessControlLists = true; } // Apply storage class destinationObjects[i].setStorageClass( (String) destinationStorageClassComboBox.getSelectedItem()); } this.setVisible(false); } else if ("Cancel".equals(e.getActionCommand())) { copyActionApproved = false; this.setVisible(false); } }