UserPreferencesService¶
-
public interface
UserPreferencesService
¶ The
UserPreferencesService
provides API for managing the entity user preferences (grid size, visible fields).
Methods¶
getEntityPreferences¶
-
List<UserPreferencesDto>
getEntityPreferences
(Long entityId)¶ Returns preferences for entity with the given id.
Parameters: - entityId – the id of the entity for the preferences
Returns: list of user preferences for the entity
getUserPreferences¶
-
UserPreferencesDto
getUserPreferences
(Long entityId, String username)¶ Returns preferences for given user and entity. If preferences don’t exist then default ones will be created.
Parameters: - entityId – the id of the entity for the preferences
- username – the owner of the preferences
Returns: user preferences for the entity and username
removeUserPreferences¶
selectField¶
-
void
selectField
(Long entityId, String username, String fieldName)¶ Adds field with the given name to the user visible fields. If preferences don’t exist then default ones will be created.
Parameters: - entityId – the id of the entity for the preferences
- username – the owner of the preferences
- fieldName – the name of the field to add
selectFields¶
unselectField¶
-
void
unselectField
(Long entityId, String username, String fieldName)¶ Removes field with the given name from the user visible fields. If preferences don’t exist then default ones will be created.
Parameters: - entityId – the id of the entity for the preferences
- username – the owner of the preferences
- fieldName – the name of the field to remove
unselectFields¶
updateGridSize¶
-
void
updateGridSize
(Long entityId, String username, Integer newSize)¶ Updates grid size preferences for given user and entity. If preferences don’t exist then default ones will be created.
Parameters: - entityId – the id of the entity for the preferences
- username – the owner of the preferences
- newSize – the new size og the grid