Package de.xima.fc.gui.model.project
Class EndUserProjectConfigViewModel
- java.lang.Object
-
- de.xima.fc.gui.model.project.EndUserProjectConfigViewModel
-
- All Implemented Interfaces:
ILocalizationsViewModelProviding<LocalizationsViewModelWithFiles>
,ILocalizationsViewModelProviding.ILocalizationsViewModelProvidingWithFiles
,Serializable
public final class EndUserProjectConfigViewModel extends Object implements ILocalizationsViewModelProviding.ILocalizationsViewModelProvidingWithFiles, Serializable
View model for the configuration UI for the end user settings of aform
.- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.xima.fc.gui.model.portal.ILocalizationsViewModelProviding
ILocalizationsViewModelProviding.ILocalizationsViewModelProvidingWithFiles
-
-
Constructor Summary
Constructors Constructor Description EndUserProjectConfigViewModel(Projekt project, boolean active, UserPortalViewModel portalModel, Locale locale, IResourceBundle resourceBundle)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
determineWarnings(Projekt project, UserPortalViewModel model, Locale locale, IResourceBundle resourceBundle)
String
getDefaultDescription()
Gets the default description of the project.String
getDefaultDisplayName()
Gets the default display name of the project.String
getDefaultShortDescription()
Gets the default short description of the project.String
getDisplayName(Locale locale)
ProjectConfigKey
getKey()
Map<Locale,LocalizationsViewModelWithFiles>
getLocalizations()
Gets a map with the localizations for each locale.LocalizationsViewModelWithFiles
getLocalizations(Locale locale)
Gets the localizations for the given locale.Map<String,UserPortalFileViewModel>
getLocalizedFiles(Locale locale)
Gets a map with the localized messages for the given locale.String
getLocalizedMessage(Locale locale, String i18nKey)
Gets the localized message for the given with the given locale.Map<String,String>
getLocalizedMessages(Locale locale)
Gets a map with the localized messages for the given locale.String
getProjectName()
Gets the name of the project being edited.List<ProjectPortalTagViewModel>
getTags()
Gets the selected tags for the project.List<String>
getWarnings()
boolean
hasWarnings()
boolean
isActive()
Gets whether the project is active.void
setActive(boolean active)
Sets whether the project is active.void
setTags(List<ProjectPortalTagViewModel> tags)
Sets the selected tags for the project.
-
-
-
Constructor Detail
-
EndUserProjectConfigViewModel
public EndUserProjectConfigViewModel(Projekt project, boolean active, UserPortalViewModel portalModel, Locale locale, IResourceBundle resourceBundle)
-
-
Method Detail
-
getKey
public ProjectConfigKey getKey()
-
getLocalizations
public Map<Locale,LocalizationsViewModelWithFiles> getLocalizations()
Gets a map with the localizations for each locale.- Specified by:
getLocalizations
in interfaceILocalizationsViewModelProviding<LocalizationsViewModelWithFiles>
- Returns:
- Map with localizations.
-
getLocalizations
public LocalizationsViewModelWithFiles getLocalizations(Locale locale)
Gets the localizations for the given locale.- Specified by:
getLocalizations
in interfaceILocalizationsViewModelProviding<LocalizationsViewModelWithFiles>
- Returns:
- DefaultLocalizations for the locale.
-
getLocalizedMessage
public String getLocalizedMessage(Locale locale, String i18nKey)
Gets the localized message for the given with the given locale.- Specified by:
getLocalizedMessage
in interfaceILocalizationsViewModelProviding<LocalizationsViewModelWithFiles>
- Returns:
- The project config's localized message for the given key.
-
getLocalizedMessages
public Map<String,String> getLocalizedMessages(Locale locale)
Gets a map with the localized messages for the given locale.- Specified by:
getLocalizedMessages
in interfaceILocalizationsViewModelProviding<LocalizationsViewModelWithFiles>
- Returns:
- Map with localized messages.
-
getProjectName
public String getProjectName()
Gets the name of the project being edited.- Returns:
- Name of the project.
-
getDefaultDisplayName
public String getDefaultDisplayName()
Gets the default display name of the project.- Returns:
- Default display name of the project.
-
getDefaultShortDescription
public String getDefaultShortDescription()
Gets the default short description of the project.- Returns:
- Default short description of the project.
-
getDefaultDescription
public String getDefaultDescription()
Gets the default description of the project.- Returns:
- Default description of the project.
-
getTags
public List<ProjectPortalTagViewModel> getTags()
Gets the selected tags for the project. Tags are managed globally for the portal. For each project, the user can select a tag from the global list of tags.- Returns:
- List of selected tags.
-
setTags
public void setTags(List<ProjectPortalTagViewModel> tags)
Sets the selected tags for the project. Tags are managed globally for the portal. For each project, the user can select a tag from the global list of tags.- Parameters:
tags
- List of selected tags.
-
isActive
public boolean isActive()
Gets whether the project is active.- Returns:
- Whether the project is active.
-
setActive
public void setActive(boolean active)
Sets whether the project is active.- Parameters:
active
- Whether the project is active.
-
hasWarnings
public boolean hasWarnings()
-
getLocalizedFiles
public Map<String,UserPortalFileViewModel> getLocalizedFiles(Locale locale)
Gets a map with the localized messages for the given locale.- Specified by:
getLocalizedFiles
in interfaceILocalizationsViewModelProviding.ILocalizationsViewModelProvidingWithFiles
- Returns:
- Map with localized messages.
-
determineWarnings
public void determineWarnings(Projekt project, UserPortalViewModel model, Locale locale, IResourceBundle resourceBundle)
-
-