001package org.dcm4che3.conf.core.api;
002
003/**
004 * Denotes a UUID conflict in configuration
005 */
006public class DuplicateUUIDException extends  ConfigurationException{
007
008    private static final long serialVersionUID = -7681606202001756448L;
009
010    String duplicateUUID;
011    Path existingNodePath;
012    Path nodeBeingPersistedPath;
013
014    public DuplicateUUIDException(String duplicateUUID, Path existingNodePath, Path nodeBeingPersistedPath) {
015
016        super("Detected duplicate UUID in configuration: " + duplicateUUID + " " +
017                "\n           Existing object path: " + existingNodePath +
018                "\n Path of object being persisted: " + nodeBeingPersistedPath);
019
020        this.duplicateUUID = duplicateUUID;
021        this.existingNodePath = existingNodePath;
022        this.nodeBeingPersistedPath = nodeBeingPersistedPath;
023    }
024
025    public String getDuplicateUUID() {
026        return duplicateUUID;
027    }
028
029    public Path getExistingNodePath() {
030        return existingNodePath;
031    }
032
033    public Path getNodeBeingPersistedPath() {
034        return nodeBeingPersistedPath;
035    }
036}