/** * Returns a list of all the blockers that prevent this object from being deleted. * * In this context, a blocker is a business rule that dictates that the object is in no condition to be deleted. * * Each blocker must be returned as a human-friendly textual description of the blocker, ideally in the * user's preferred language (if applicable). * * @return * All the blockers that may prevent this object from being deleted. */ protected final Collection<String> getDeletionBlockers() { Collection<String> result = new ArrayList<>(); checkForDeletionBlockers(result); for (DeletionBlockerListener<DomainObject> listener : getDomainModel().getDeletionBlockerListenersForType(getClass())) { listener.getDeletionBlockers(this, result); } return result; }