Package de.xima.fc.gui.model.form_theme
Class FormThemeDeletionModel
- java.lang.Object
-
- de.xima.fc.gui.model.form_theme.FormThemeDeletionModel
-
- All Implemented Interfaces:
Serializable
public final class FormThemeDeletionModel extends Object implements Serializable
Model with a factory method for deletingclient form themes
. Used by the UI for client form themes. When a user tries to delete a set of form themes, the system checks whether the themes are still in use and informs the user if they are.- Since:
- 8.3.0
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FormThemeDeletionModel.ThemeDeletionItem
A single item from aFormThemeDeletionModel.ThemeGroup
that represents a client form theme to be deleted.static class
FormThemeDeletionModel.ThemeGroup
A group of themes that were requested to be deleted.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FormThemeDeletionModel
forThemes(IEntityContext ec, Mandant client, Locale locale, List<ClientFormTheme> themesToDelete)
Creates the model for the given themes to be deleted.List<FormThemeDeletionModel.ThemeDeletionItem>
getAllThemesToDelete()
Gets the IDs and UUIDs of all client form themes that were marked for deletion, seeFormThemeDeletionModel.ThemeDeletionItem.isDelete()
.FormThemeDeletionModel.ThemeGroup
getDeletable()
Gets the themes that are not in use anymore and can be deleted.FormThemeDeletionModel.ThemeGroup
getDeletableWithWarnings()
Gets the themes that are still in use, but their deletion would not cause any issues.FormThemeDeletionModel.ThemeGroup
getNonDeletable()
Gets the themes that are still in use and cannot be deleted.
-
-
-
Method Detail
-
getAllThemesToDelete
public List<FormThemeDeletionModel.ThemeDeletionItem> getAllThemesToDelete()
Gets the IDs and UUIDs of all client form themes that were marked for deletion, seeFormThemeDeletionModel.ThemeDeletionItem.isDelete()
.- Returns:
- The themes to delete.
-
getDeletable
public FormThemeDeletionModel.ThemeGroup getDeletable()
Gets the themes that are not in use anymore and can be deleted.- Returns:
- The deletable themes.
-
getDeletableWithWarnings
public FormThemeDeletionModel.ThemeGroup getDeletableWithWarnings()
Gets the themes that are still in use, but their deletion would not cause any issues. Such themes can be deleted if the user confirms their deletion.- Returns:
- The deletable themes with warnings that need to be shown to the user.
-
getNonDeletable
public FormThemeDeletionModel.ThemeGroup getNonDeletable()
Gets the themes that are still in use and cannot be deleted.- Returns:
- The non-deletable themes.
-
forThemes
public static FormThemeDeletionModel forThemes(IEntityContext ec, Mandant client, Locale locale, List<ClientFormTheme> themesToDelete)
Creates the model for the given themes to be deleted. Checks which themes are still in use and adds the appropriate messages to the model.- Parameters:
ec
- The entity context to use for accessing the database.client
- The client who owns the themes to be deleted.locale
- The locale to use for localizing messages.themesToDelete
- The themes to be deleted.- Returns:
- The model for the themes to be deleted.
-
-