Interface DeleteCommand.DeletionCallback

    • Method Detail

      • checkAndConfirmOutlyingDelete

        boolean checkAndConfirmOutlyingDelete​(java.util.Collection<? extends OsmPrimitive> primitives,
                                              java.util.Collection<? extends OsmPrimitive> ignore)
        Check whether user is about to delete data outside of the download area. Request confirmation if he is.
        Parameters:
        primitives - the primitives to operate on
        ignore - null or a primitive to be ignored
        Returns:
        true, if operating on outlying primitives is OK; false, otherwise
      • confirmRelationDeletion

        boolean confirmRelationDeletion​(java.util.Collection<Relation> relations)
        Confirm before deleting a relation, as it is a common newbie error.
        Parameters:
        relations - relation to check for deletion
        Returns:
        true if user confirms the deletion
        Since:
        12760
      • confirmDeletionFromRelation

        boolean confirmDeletionFromRelation​(java.util.Collection<RelationToChildReference> references)
        Confirm before removing a collection of primitives from their parent relations.
        Parameters:
        references - the list of relation-to-child references
        Returns:
        true if user confirms the deletion
        Since:
        12763
      • confirmDeletionFromRelation

        default boolean confirmDeletionFromRelation​(java.util.Collection<RelationToChildReference> references,
                                                    java.util.Collection<Pair<Relation,​java.lang.Boolean>> parentsToDelete)
        Confirm before removing a collection of primitives from their parent relations, with the probability of deleting the parents as well.
        Parameters:
        references - the list of relation-to-child references
        parentsToDelete - the list of parents to delete (the boolean part will be true if the user wants to delete the relation).
        Returns:
        true if the user confirms the deletion
        Since:
        18395