Class ApiPreconditionCheckerHook
- java.lang.Object
-
- org.openstreetmap.josm.actions.upload.ApiPreconditionCheckerHook
-
- All Implemented Interfaces:
UploadHook
public class ApiPreconditionCheckerHook extends java.lang.Object implements UploadHook
Checks certain basic conditions, that are listed in the OSM APICapabilities
.
-
-
Constructor Summary
Constructors Constructor Description ApiPreconditionCheckerHook()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static boolean
checkMaxNodes(java.util.Collection<OsmPrimitive> primitives, long maxNodes)
boolean
checkUpload(APIDataSet apiData)
Check and/or change the data to be uploaded.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.openstreetmap.josm.actions.upload.UploadHook
modifyChangesetTags
-
-
-
-
Constructor Detail
-
ApiPreconditionCheckerHook
public ApiPreconditionCheckerHook()
-
-
Method Detail
-
checkUpload
public boolean checkUpload(APIDataSet apiData)
Description copied from interface:UploadHook
Check and/or change the data to be uploaded. Default implementation is to approve the upload.- Specified by:
checkUpload
in interfaceUploadHook
- Parameters:
apiData
- the data to upload, modify this to change the data.- Returns:
true
if upload is possible,false
to block the upload.
-
checkMaxNodes
private static boolean checkMaxNodes(java.util.Collection<OsmPrimitive> primitives, long maxNodes)
-
-