Class ApiPreconditionCheckerHook
java.lang.Object
org.openstreetmap.josm.actions.upload.ApiPreconditionCheckerHook
- All Implemented Interfaces:
UploadHook
Checks certain basic conditions, that are listed in the OSM API
Capabilities.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static booleancheckMaxNodes(Collection<OsmPrimitive> primitives, long maxNodes) booleancheckUpload(APIDataSet apiData) Check and/or change the data to be uploaded.private static booleanvalueLengthCheck(OsmPrimitive osmPrimitive) Check that the tag values of a primitive are not too long.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.openstreetmap.josm.actions.upload.UploadHook
modifyChangesetTags
-
Field Details
-
PREF_LENGTH_CHECK
-
-
Constructor Details
-
ApiPreconditionCheckerHook
public ApiPreconditionCheckerHook()
-
-
Method Details
-
checkUpload
Description copied from interface:UploadHookCheck and/or change the data to be uploaded. Default implementation is to approve the upload.- Specified by:
checkUploadin interfaceUploadHook- Parameters:
apiData- the data to upload, modify this to change the data.- Returns:
trueif upload is possible,falseto block the upload.
-
checkMaxNodes
-
valueLengthCheck
Check that the tag values of a primitive are not too long.- Parameters:
osmPrimitive- the primitive to check- Returns:
- false if any tag value of the primitive is too long, true else
-