|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.AbstractAction
org.openstreetmap.josm.actions.JosmAction
org.openstreetmap.josm.actions.UploadAction
public class UploadAction
Action that opens a connection to the osm server and uploads all changes. An dialog is displayed asking the user to specify a rectangle to grab. The url and account settings from the preferences are used. If the upload fails this action offers various options to resolve conflicts.
| Field Summary | |
|---|---|
private static java.util.LinkedList<UploadHook> |
lateUploadHooks
|
private static java.util.LinkedList<UploadHook> |
uploadHooks
The list of upload hooks. |
| Fields inherited from class org.openstreetmap.josm.actions.JosmAction |
|---|
sc |
| Fields inherited from class javax.swing.AbstractAction |
|---|
changeSupport, enabled |
| Fields inherited from interface javax.swing.Action |
|---|
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON |
| Constructor Summary | |
|---|---|
UploadAction()
|
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
|
protected static void |
alertUnresolvedConflicts(OsmDataLayer layer)
|
boolean |
checkPreUploadConditions(OsmDataLayer layer)
|
boolean |
checkPreUploadConditions(OsmDataLayer layer,
APIDataSet apiData)
Check whether the preconditions are met to upload data in apiData. |
static void |
registerUploadHook(UploadHook hook)
Registers an upload hook. |
static void |
registerUploadHook(UploadHook hook,
boolean late)
Registers an upload hook. |
static void |
unregisterUploadHook(UploadHook hook)
Unregisters an upload hook. |
protected void |
updateEnabledState()
Refreshes the enabled state |
void |
uploadData(OsmDataLayer layer,
APIDataSet apiData)
Uploads data to the OSM API. |
static boolean |
warnUploadDiscouraged(OsmDataLayer layer)
returns true if the user wants to cancel, false if they want to continue |
| Methods inherited from class org.openstreetmap.josm.actions.JosmAction |
|---|
destroy, getCurrentDataSet, getEditLayer, getShortcut, initEnabledState, installAdapters, setTooltip, updateEnabledState |
| Methods inherited from class javax.swing.AbstractAction |
|---|
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.util.LinkedList<UploadHook> uploadHooks
private static final java.util.LinkedList<UploadHook> lateUploadHooks
| Constructor Detail |
|---|
public UploadAction()
| Method Detail |
|---|
public static void registerUploadHook(UploadHook hook)
hook - the upload hook. Ignored if null.
public static void registerUploadHook(UploadHook hook,
boolean late)
hook - the upload hook. Ignored if null.late - true, if the hook should be executed after the upload dialog
has been confirmed. Late upload hooks should in general succeed and not
abort the upload.public static void unregisterUploadHook(UploadHook hook)
hook - the upload hook. Ignored if null.protected void updateEnabledState()
updateEnabledState in class JosmActionJosmAction.updateEnabledState(Collection),
JosmAction.initEnabledState()public boolean checkPreUploadConditions(OsmDataLayer layer)
protected static void alertUnresolvedConflicts(OsmDataLayer layer)
public static boolean warnUploadDiscouraged(OsmDataLayer layer)
public boolean checkPreUploadConditions(OsmDataLayer layer,
APIDataSet apiData)
apiData.
Makes sure upload is allowed, primitives in apiData don't participate in conflicts and
runs the installed UploadHooks.
layer - the source layer of the data to be uploadedapiData - the data to be uploaded
public void uploadData(OsmDataLayer layer,
APIDataSet apiData)
layer - the source layer for the data to uploadapiData - the primitives to be added, updated, or deletedpublic void actionPerformed(java.awt.event.ActionEvent e)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||