-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent deleting ImportConfigurations that are assigned as project de…
…fault configurations
- Loading branch information
Showing
5 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
Kitodo/src/main/java/org/kitodo/exceptions/ImportConfigurationInUseException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* (c) Kitodo. Key to digital objects e. V. <[email protected]> | ||
* | ||
* This file is part of the Kitodo project. | ||
* | ||
* It is licensed under GNU General Public License version 3 or later. | ||
* | ||
* For the full copyright and license information, please read the | ||
* GPL3-License.txt file that was distributed with this source code. | ||
*/ | ||
|
||
package org.kitodo.exceptions; | ||
|
||
import org.kitodo.production.helper.Helper; | ||
|
||
/** | ||
* This exception is thrown when the user tries to delete an ImportConfiguration that is currently in use. | ||
*/ | ||
public class ImportConfigurationInUseException extends RuntimeException { | ||
|
||
private static final String CONFIG_IN_USE = "importConfig.assignedAsDefaultConfig"; | ||
|
||
/** | ||
* Constructor with message. | ||
* | ||
* @param configurationTitle title of the ImportConfiguration | ||
* @param projectTitle title of the Project to which the ImportConfiguration is assigned as default configuration | ||
*/ | ||
public ImportConfigurationInUseException(String configurationTitle, String projectTitle) { | ||
super(Helper.getTranslation(CONFIG_IN_USE, configurationTitle, projectTitle)); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters