Search in sources :

Example 1 with ObjectHasDataException

use of net.geoprism.registry.ObjectHasDataException in project geoprism-registry by terraframe.

the class ExternalSystem method delete.

public void delete(Boolean checkReferencedData) {
    if (checkReferencedData && getReferencedDataCount() > 0) {
        throw new ObjectHasDataException();
    }
    List<SynchronizationConfig> configs = SynchronizationConfig.getAll(this);
    for (SynchronizationConfig config : configs) {
        config.delete();
    }
    super.delete();
}
Also used : ObjectHasDataException(net.geoprism.registry.ObjectHasDataException) SynchronizationConfig(net.geoprism.registry.SynchronizationConfig)

Aggregations

ObjectHasDataException (net.geoprism.registry.ObjectHasDataException)1 SynchronizationConfig (net.geoprism.registry.SynchronizationConfig)1