Class CopyObjectsDialog

All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class CopyObjectsDialog extends JDialog implements ActionListener
Dialog for choosing the destination bucket for an Object copy operation, and specifying how the copy will be performed. The dialog includes options for renaming object keys during the copy, and for indicating that the copy will actually be a Move operation - in which case the original objects should be deleted after the copy has completed successfully.
Author:
James Murty
See Also:
  • Constructor Details

    • CopyObjectsDialog

      public CopyObjectsDialog(Frame owner, String title, SkinsFactory skinsFactory, S3Object[] objects, S3Bucket[] buckets)
      Construct a modal dialog for controlling copy opeations.
      Parameters:
      owner - the Frame over which the dialog will be displayed and centred.
      title - a title for the dialog.
      skinsFactory - factory for producing skinned GUI components.
      objects - the S3 objects that will be copied if the user confirms the dialog.
      buckets - a list of S3 buckets to which the user can copy objects.
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Event handler for this dialog.
      Specified by:
      actionPerformed in interface ActionListener
    • isCopyActionApproved

      public boolean isCopyActionApproved()
      Returns:
      true if the user accepted the copy/move operation, false if the user cancelled the dialog.
    • isMoveOptionSelected

      public boolean isMoveOptionSelected()
      Returns:
      true if the user selected the Move option to indicate that objects should be moved, rather than merely copied.
    • isCopyOriginalAccessControlLists

      public boolean isCopyOriginalAccessControlLists()
      Returns:
      true if the use wishes to have the ACL settings of their source objects retained after the copy.
    • getSourceObjectKeys

      public String[] getSourceObjectKeys()
      Returns:
      the original key names of the S3 objects that should be copied or moved when this dialog is accepted.
    • getDestinationObjects

      public S3Object[] getDestinationObjects()
      Returns:
      the objects that will be created as the destination of a copy or move operation. These objects include the metadata changes and Access Control List setting applied by the user.
    • getDestinationBucketName

      public String getDestinationBucketName()
      Returns:
      the name of the bucket to which objects should be copied or moved, as chosen by the user.