|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
java.applet.Applet
javax.swing.JApplet
org.jets3t.apps.cockpit.Cockpit
public class Cockpit
Cockpit is a graphical Java application for viewing and managing the contents of an Amazon S3 account. For more information and help please see the Cockpit Guide.
This is the Cockpit application class; it may be run as a stand-alone application or as an Applet.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JApplet |
---|
javax.swing.JApplet.AccessibleJApplet |
Nested classes/interfaces inherited from class java.applet.Applet |
---|
java.applet.Applet.AccessibleApplet |
Nested classes/interfaces inherited from class java.awt.Panel |
---|
java.awt.Panel.AccessibleAWTPanel |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
static java.lang.String |
AMAZON_S3_PAGE
|
static java.lang.String |
APPLICATION_DESCRIPTION
|
static java.lang.String |
APPLICATION_TITLE
|
static java.lang.String |
JETS3T_COCKPIT_HELP_PAGE
|
static java.lang.String |
OS_NAME_MAC
|
Fields inherited from class javax.swing.JApplet |
---|
accessibleContext, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface org.apache.commons.httpclient.auth.CredentialsProvider |
---|
PROVIDER |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
Cockpit()
Constructor to run this application as an Applet. |
|
Cockpit(javax.swing.JFrame ownerFrame)
Constructor to run this application in a stand-alone window. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent event)
Event handler for this application, handles all menu items. |
void |
followHyperlink(java.net.URL url,
java.lang.String target)
Follows hyperlinks clicked on by a user. |
org.apache.commons.httpclient.Credentials |
getCredentials(org.apache.commons.httpclient.auth.AuthScheme authscheme,
java.lang.String host,
int port,
boolean proxy)
Implementation method for the CredentialsProvider interface. |
protected RestS3Service |
getRestS3Service(ProviderCredentials credentials)
|
void |
init()
Prepares application to run as a GUI by finding/creating a root owner JFrame, creating an un-authenticated RestS3Service and loading properties files. |
static void |
main(java.lang.String[] args)
Runs Cockpit as a stand-alone application. |
void |
s3ServiceEventPerformed(CopyObjectsEvent event)
This method is an S3ServiceEventListener action method that is invoked when this
application's S3ServiceMulti triggers a CopyObjectsEvent . |
void |
s3ServiceEventPerformed(CreateBucketsEvent event)
This method is an S3ServiceEventListener action method that is invoked when this
application's S3ServiceMulti triggers a CreateBucketsEvent . |
void |
s3ServiceEventPerformed(CreateObjectsEvent event)
This method is an S3ServiceEventListener action method that is invoked when this
application's S3ServiceMulti triggers a CreateObjectsEvent . |
void |
s3ServiceEventPerformed(DeleteObjectsEvent event)
This method is an S3ServiceEventListener action method that is invoked when this
application's S3ServiceMulti triggers a DeleteObjectsEvent . |
void |
s3ServiceEventPerformed(DeleteVersionedObjectsEvent event)
|
void |
s3ServiceEventPerformed(DownloadObjectsEvent event)
This method is an S3ServiceEventListener action method that is invoked when this
application's S3ServiceMulti triggers a DownloadObjectsEvent . |
void |
s3ServiceEventPerformed(GetObjectHeadsEvent event)
This method is an S3ServiceEventListener action method that is invoked when this
application's S3ServiceMulti triggers a GetObjectHeadsEvent . |
void |
s3ServiceEventPerformed(GetObjectsEvent event)
This method is an S3ServiceEventListener action method that is invoked when this
application's S3ServiceMulti triggers a GetObjectsEvent . |
void |
s3ServiceEventPerformed(ListObjectsEvent event)
This method is an S3ServiceEventListener action method that is invoked when this
application's S3ServiceMulti triggers a ListObjectsEvent . |
void |
s3ServiceEventPerformed(LookupACLEvent event)
This method is an S3ServiceEventListener action method that is invoked when this
application's S3ServiceMulti triggers a LookupACLEvent . |
void |
s3ServiceEventPerformed(UpdateACLEvent event)
This method is an S3ServiceEventListener action method that is invoked when this
application's S3ServiceMulti triggers a UpdateACLEvent . |
void |
valueChanged(javax.swing.event.ListSelectionEvent e)
Handles list selection events for this application. |
Methods inherited from class javax.swing.JApplet |
---|
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isRootPaneCheckingEnabled, paramString, remove, repaint, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update |
Methods inherited from class java.applet.Applet |
---|
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop |
Methods inherited from class java.awt.Panel |
---|
addNotify |
Methods inherited from class java.awt.Container |
---|
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 |
Methods inherited from class java.awt.Component |
---|
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, 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String JETS3T_COCKPIT_HELP_PAGE
public static final java.lang.String AMAZON_S3_PAGE
public static final java.lang.String OS_NAME_MAC
public static final java.lang.String APPLICATION_DESCRIPTION
public static final java.lang.String APPLICATION_TITLE
Constructor Detail |
---|
public Cockpit()
public Cockpit(javax.swing.JFrame ownerFrame) throws S3ServiceException
ownerFrame
- the frame the application will be displayed in
S3ServiceException
Method Detail |
---|
protected RestS3Service getRestS3Service(ProviderCredentials credentials) throws S3ServiceException
S3ServiceException
public void init()
RestS3Service
and loading properties files.
init
in class java.applet.Applet
public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed
in interface java.awt.event.ActionListener
public void valueChanged(javax.swing.event.ListSelectionEvent e)
valueChanged
in interface javax.swing.event.ListSelectionListener
public void s3ServiceEventPerformed(GetObjectsEvent event)
S3ServiceEventListener
action method that is invoked when this
application's S3ServiceMulti
triggers a GetObjectsEvent
.
This never happens in this application as downloads are performed by
S3ServiceMulti.downloadObjects(S3Bucket, DownloadPackage[])
instead.
s3ServiceEventPerformed
in interface S3ServiceEventListener
event
- public void s3ServiceEventPerformed(ListObjectsEvent event)
S3ServiceEventListener
action method that is invoked when this
application's S3ServiceMulti
triggers a ListObjectsEvent
.
This never happens in this application as it does not perform multi-threaded object listings.
s3ServiceEventPerformed
in interface S3ServiceEventListener
event
- public void s3ServiceEventPerformed(DeleteVersionedObjectsEvent event)
s3ServiceEventPerformed
in interface S3ServiceEventListener
public void s3ServiceEventPerformed(CreateBucketsEvent event)
S3ServiceEventListener
action method that is invoked when this
application's S3ServiceMulti
triggers a CreateBucketsEvent
.
When a bucket is successfully created it is added to the listing of buckets.
s3ServiceEventPerformed
in interface S3ServiceEventListener
event
- public void s3ServiceEventPerformed(LookupACLEvent event)
S3ServiceEventListener
action method that is invoked when this
application's S3ServiceMulti
triggers a LookupACLEvent
.
The ACL details are retrieved for the currently selected objects in the gui, then the
AccessControlDialog
is displayed to allow the user to update the ACL settings
for these objects.
s3ServiceEventPerformed
in interface S3ServiceEventListener
event
- public void s3ServiceEventPerformed(UpdateACLEvent event)
S3ServiceEventListener
action method that is invoked when this
application's S3ServiceMulti
triggers a UpdateACLEvent
.
This method merely updates the progress dialog as ACLs are updated.
s3ServiceEventPerformed
in interface S3ServiceEventListener
event
- public void s3ServiceEventPerformed(DownloadObjectsEvent event)
S3ServiceEventListener
action method that is invoked when this
application's S3ServiceMulti
triggers a DownloadObjectsEvent
.
This method merely updates the progress dialog as objects are downloaded.
s3ServiceEventPerformed
in interface S3ServiceEventListener
event
- public void s3ServiceEventPerformed(CreateObjectsEvent event)
S3ServiceEventListener
action method that is invoked when this
application's S3ServiceMulti
triggers a CreateObjectsEvent
.
This method merely updates the progress dialog as files are uploaded.
s3ServiceEventPerformed
in interface S3ServiceEventListener
event
- public void s3ServiceEventPerformed(CopyObjectsEvent event)
S3ServiceEventListener
action method that is invoked when this
application's S3ServiceMulti
triggers a CopyObjectsEvent
.
This method merely updates the progress dialog as objects are copied.
s3ServiceEventPerformed
in interface S3ServiceEventListener
event
- public void s3ServiceEventPerformed(DeleteObjectsEvent event)
S3ServiceEventListener
action method that is invoked when this
application's S3ServiceMulti
triggers a DeleteObjectsEvent
.
This method merely updates the progress dialog as objects are deleted.
s3ServiceEventPerformed
in interface S3ServiceEventListener
event
- public void s3ServiceEventPerformed(GetObjectHeadsEvent event)
S3ServiceEventListener
action method that is invoked when this
application's S3ServiceMulti
triggers a GetObjectHeadsEvent
.
This method merely updates the progress dialog as object details (heads) are retrieved.
s3ServiceEventPerformed
in interface S3ServiceEventListener
event
- 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 org.apache.commons.httpclient.Credentials getCredentials(org.apache.commons.httpclient.auth.AuthScheme authscheme, java.lang.String host, int port, boolean proxy) throws org.apache.commons.httpclient.auth.CredentialsNotAvailableException
Based on sample code: InteractiveAuthenticationExample
getCredentials
in interface org.apache.commons.httpclient.auth.CredentialsProvider
org.apache.commons.httpclient.auth.CredentialsNotAvailableException
public static void main(java.lang.String[] args) throws java.lang.Exception
args
-
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |