Package de.xima.fc.gui.model.form_theme
Class FormThemeViewManager
- java.lang.Object
-
- de.xima.fc.gui.model.form_theme.FormThemeViewManager
-
- All Implemented Interfaces:
Serializable
public final class FormThemeViewManager extends Object implements Serializable
Keeps track of all existingclient form themes
for a specific client.- Since:
- 8.3.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FormThemeView
createNewTheme(Locale locale)
Creates a new form theme for the current client with the given locale.List<FormThemeView>
deleteThemesById(Iterable<Long> themes)
Deletes the form themes with the given IDs.FormThemeView
themeById(Long themeId)
Finds the client form theme by its ID.FormThemeView
themeByUuid(Long clientId, UUID clientFormThemeUuid)
Finds the client form theme by its UUID and the ID of the client.FormThemeView
themeByUuid(UUID themeUuid)
Finds the client form theme by its UUID.List<FormThemeView>
themes()
Gets a list of all available form themes.FormThemeView
updateThemeDetail(UUID themeUuid, Consumer<FormThemeView> updater)
Updates a detail of the theme with the given UUID.
-
-
-
Method Detail
-
createNewTheme
public FormThemeView createNewTheme(Locale locale)
Creates a new form theme for the current client with the given locale.- Parameters:
locale
- The locale for generating a new name for the form theme.- Returns:
- The newly created form theme.
-
deleteThemesById
public List<FormThemeView> deleteThemesById(Iterable<Long> themes)
Deletes the form themes with the given IDs.- Parameters:
themes
- The IDs of the form themes to delete.- Returns:
- The form themes that were deleted.
-
themeById
public FormThemeView themeById(Long themeId)
Finds the client form theme by its ID.- Parameters:
themeId
- The ID of the client form theme.- Returns:
- The client form theme with the given ID, or null if no such theme exists.
-
themeByUuid
public FormThemeView themeByUuid(UUID themeUuid)
Finds the client form theme by its UUID.- Parameters:
themeUuid
- The UUID of the client form theme.- Returns:
- The client form theme with the given UUID, or null if no such theme exists.
-
themeByUuid
public FormThemeView themeByUuid(Long clientId, UUID clientFormThemeUuid)
Finds the client form theme by its UUID and the ID of the client.- Parameters:
clientId
- The ID of the client that contains the form themes.clientFormThemeUuid
- The UUID of the client form theme.- Returns:
- The client form theme with the given UUID belonging to the client with the given ID, or null if no such theme exists.
-
themes
public List<FormThemeView> themes()
Gets a list of all available form themes.- Returns:
- A list of all available form themes.
-
updateThemeDetail
@CanIgnoreReturnValue public FormThemeView updateThemeDetail(UUID themeUuid, Consumer<FormThemeView> updater)
Updates a detail of the theme with the given UUID.- Parameters:
themeUuid
- UUID of the theme to update.updater
- Update function that mutates the theme.- Returns:
- The updated theme.
- Throws:
de.xima.cmn.dao.exceptions.UpdateException
- If the theme with the given UUID does not exist, or if the update fails.
-
-