Class ValidateUploadHook

java.lang.Object
org.openstreetmap.josm.actions.upload.ValidateUploadHook
All Implemented Interfaces:
UploadHook

public class ValidateUploadHook extends Object implements UploadHook
The action that does the validate thing.

This action iterates through all active tests and gives them the data, so that each one can test it.

Since:
3669
  • Constructor Details

  • Method Details

    • checkUpload

      public boolean checkUpload(APIDataSet apiDataSet)
      Validate the modified data before uploading
      Specified by:
      checkUpload in interface UploadHook
      Parameters:
      apiDataSet - contains primitives to be uploaded
      Returns:
      true if upload should continue, else false
    • displayErrorScreen

      private static boolean displayErrorScreen(List<TestError> errors)
      Displays a screen where the actions that would be taken are displayed and give the user the possibility to cancel the upload.
      Parameters:
      errors - The errors displayed in the screen
      Returns:
      true, if the upload should continue.
      false, if the user requested cancel.