Class FormThemeDeletionModel
java.lang.Object
de.xima.fc.gui.model.form_theme.FormThemeDeletionModel
- All Implemented Interfaces:
Serializable
Model with a factory method for deleting
client 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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA single item from aFormThemeDeletionModel.ThemeGroupthat represents a client form theme to be deleted.static final classA group of themes that were requested to be deleted. -
Method Summary
Modifier and TypeMethodDescriptionstatic FormThemeDeletionModelforThemes(IEntityContext ec, Mandant client, Locale locale, List<ClientFormTheme> themesToDelete) Creates the model for the given themes to be deleted.Gets the IDs and UUIDs of all client form themes that were marked for deletion, seeFormThemeDeletionModel.ThemeDeletionItem.isDelete().Gets the themes that are not in use anymore and can be deleted.Gets the themes that are still in use, but their deletion would not cause any issues.Gets the themes that are still in use and cannot be deleted.
-
Method Details
-
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
Gets the themes that are not in use anymore and can be deleted.- Returns:
- The deletable themes.
-
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
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.
-