public class Uploader extends javax.swing.JApplet implements S3ServiceEventListener, java.awt.event.ActionListener, javax.swing.event.ListSelectionListener, HyperlinkActivatedListener, org.apache.http.client.CredentialsProvider
For more information and help please see the Uploader Guide.
The Uploader is highly configurable through properties specified in a file uploader.properties. This file must be available at the root of the classpath.
javax.swing.JApplet.AccessibleJApplet
java.applet.Applet.AccessibleApplet
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
APPLICATION_DESCRIPTION |
static java.lang.String |
ERROR_CODE__MISSING_REQUIRED_PARAM |
static java.lang.String |
ERROR_CODE__S3_UPLOAD_FAILED |
static java.lang.String |
ERROR_CODE__TRANSACTION_ID_REQUIRED_TO_CREATE_XML_SUMMARY |
static java.lang.String |
ERROR_CODE__UPLOAD_REQUEST_DECLINED |
static int |
HTTP_CONNECTION_TIMEOUT |
static int |
MAX_CONNECTION_RETRIES |
static int |
SOCKET_CONNECTION_TIMEOUT |
static java.lang.String |
UPLOADER_PROPERTIES_FILENAME |
static int |
WIZARD_SCREEN_1 |
static int |
WIZARD_SCREEN_2 |
static int |
WIZARD_SCREEN_3 |
static int |
WIZARD_SCREEN_4 |
static int |
WIZARD_SCREEN_5 |
accessibleContext, rootPane, rootPaneCheckingEnabled
Constructor and Description |
---|
Uploader()
Constructor to run this application as an Applet.
|
Uploader(javax.swing.JFrame ownerFrame,
java.util.Properties standAloneArgumentProperties)
Constructor to run this application in a stand-alone window.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent actionEvent)
Handles GUI actions.
|
void |
clear()
Clear credentials.
|
void |
followHyperlink(java.net.URL url,
java.lang.String target)
Follows hyperlinks clicked on by a user.
|
org.apache.http.auth.Credentials |
getCredentials(org.apache.http.auth.AuthScope scope)
Implementation method for the CredentialsProvider interface.
|
void |
init()
Prepares application to run as a GUI by finding/creating a root owner JFrame, and
(if necessary) creating a directory for storing remembered logins.
|
static void |
main(java.lang.String[] args)
Run the Uploader as a stand-alone application.
|
void |
s3ServiceEventPerformed(CopyObjectsEvent event) |
void |
s3ServiceEventPerformed(CreateBucketsEvent event) |
void |
s3ServiceEventPerformed(CreateObjectsEvent event)
Listener method that responds to events from the jets3t toolkit when objects are
created in S3 - ie when files are uploaded.
|
void |
s3ServiceEventPerformed(DeleteObjectsEvent event) |
void |
s3ServiceEventPerformed(DeleteVersionedObjectsEvent event) |
void |
s3ServiceEventPerformed(DownloadObjectsEvent event) |
void |
s3ServiceEventPerformed(GetObjectHeadsEvent event) |
void |
s3ServiceEventPerformed(GetObjectsEvent event) |
void |
s3ServiceEventPerformed(ListObjectsEvent event) |
void |
s3ServiceEventPerformed(LookupACLEvent event) |
void |
s3ServiceEventPerformed(UpdateACLEvent event) |
void |
setCredentials(org.apache.http.auth.AuthScope authscope,
org.apache.http.auth.Credentials credentials) |
void |
valueChanged(javax.swing.event.ListSelectionEvent arg0) |
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isRootPaneCheckingEnabled, paramString, remove, repaint, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, isValidateRoot, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public static final java.lang.String APPLICATION_DESCRIPTION
public static final java.lang.String UPLOADER_PROPERTIES_FILENAME
public static final int WIZARD_SCREEN_1
public static final int WIZARD_SCREEN_2
public static final int WIZARD_SCREEN_3
public static final int WIZARD_SCREEN_4
public static final int WIZARD_SCREEN_5
public static final java.lang.String ERROR_CODE__MISSING_REQUIRED_PARAM
public static final java.lang.String ERROR_CODE__S3_UPLOAD_FAILED
public static final java.lang.String ERROR_CODE__UPLOAD_REQUEST_DECLINED
public static final java.lang.String ERROR_CODE__TRANSACTION_ID_REQUIRED_TO_CREATE_XML_SUMMARY
public static final int HTTP_CONNECTION_TIMEOUT
public static final int SOCKET_CONNECTION_TIMEOUT
public static final int MAX_CONNECTION_RETRIES
public Uploader()
public Uploader(javax.swing.JFrame ownerFrame, java.util.Properties standAloneArgumentProperties) throws S3ServiceException
ownerFrame
- the frame the application will be displayed inS3ServiceException
public void init()
init
in class java.applet.Applet
public void s3ServiceEventPerformed(CreateObjectsEvent event)
s3ServiceEventPerformed
in interface S3ServiceEventListener
public void actionPerformed(java.awt.event.ActionEvent actionEvent)
actionPerformed
in interface java.awt.event.ActionListener
public void followHyperlink(java.net.URL url, java.lang.String target)
followHyperlink
in interface HyperlinkActivatedListener
url
- the url to opentarget
- the target pane to open the url in, eg "_blank". This may be null.public void setCredentials(org.apache.http.auth.AuthScope authscope, org.apache.http.auth.Credentials credentials)
setCredentials
in interface org.apache.http.client.CredentialsProvider
public void clear()
clear
in interface org.apache.http.client.CredentialsProvider
public org.apache.http.auth.Credentials getCredentials(org.apache.http.auth.AuthScope scope)
Based on sample code: InteractiveAuthenticationExample
getCredentials
in interface org.apache.http.client.CredentialsProvider
public void s3ServiceEventPerformed(ListObjectsEvent event)
s3ServiceEventPerformed
in interface S3ServiceEventListener
public void s3ServiceEventPerformed(CreateBucketsEvent event)
s3ServiceEventPerformed
in interface S3ServiceEventListener
public void s3ServiceEventPerformed(DeleteObjectsEvent event)
s3ServiceEventPerformed
in interface S3ServiceEventListener
public void s3ServiceEventPerformed(GetObjectsEvent event)
s3ServiceEventPerformed
in interface S3ServiceEventListener
public void s3ServiceEventPerformed(GetObjectHeadsEvent event)
s3ServiceEventPerformed
in interface S3ServiceEventListener
public void s3ServiceEventPerformed(LookupACLEvent event)
s3ServiceEventPerformed
in interface S3ServiceEventListener
public void s3ServiceEventPerformed(UpdateACLEvent event)
s3ServiceEventPerformed
in interface S3ServiceEventListener
public void s3ServiceEventPerformed(DownloadObjectsEvent event)
s3ServiceEventPerformed
in interface S3ServiceEventListener
public void s3ServiceEventPerformed(CopyObjectsEvent event)
s3ServiceEventPerformed
in interface S3ServiceEventListener
public void s3ServiceEventPerformed(DeleteVersionedObjectsEvent event)
s3ServiceEventPerformed
in interface S3ServiceEventListener
public void valueChanged(javax.swing.event.ListSelectionEvent arg0)
valueChanged
in interface javax.swing.event.ListSelectionListener
public static void main(java.lang.String[] args) throws java.lang.Exception
args
- java.lang.Exception