public interface ResultPreferencesEngine
Modifier and Type | Method and Description |
---|---|
boolean |
isCustomized(long typeId,
com.flexive.shared.search.ResultViewType viewType,
com.flexive.shared.search.ResultLocation location)
Returns true when the user actually stored a configuration for the given parameters.
|
com.flexive.shared.search.ResultPreferences |
load(long typeId,
com.flexive.shared.search.ResultViewType viewType,
com.flexive.shared.search.ResultLocation location)
Loads the result preferences for the given type for the current user.
|
com.flexive.shared.search.ResultPreferences |
loadSystemDefault(long typeId,
com.flexive.shared.search.ResultViewType viewType,
com.flexive.shared.search.ResultLocation location)
Loads the system default result preferences for the given type.
|
void |
remove(long typeId,
com.flexive.shared.search.ResultViewType viewType,
com.flexive.shared.search.ResultLocation location)
Remove the current user's preferences for the given parameters.
|
void |
save(com.flexive.shared.search.ResultPreferences preferences,
long typeId,
com.flexive.shared.search.ResultViewType viewType,
com.flexive.shared.search.ResultLocation location)
Save the given result preferences for the current user.
|
void |
saveInSource(com.flexive.shared.search.ResultPreferences preferences,
long typeId,
com.flexive.shared.search.ResultViewType viewType,
com.flexive.shared.search.ResultLocation location)
Save the given result preferences for the current user, using the type ID where the existing result preferences
are stored.
|
void |
saveSystemDefault(com.flexive.shared.search.ResultPreferences preferences,
long typeId,
com.flexive.shared.search.ResultViewType viewType,
com.flexive.shared.search.ResultLocation... locations)
Save the given result preferences as the default settings for the given type, viewtype, and location.
|
com.flexive.shared.search.ResultPreferences load(long typeId, com.flexive.shared.search.ResultViewType viewType, com.flexive.shared.search.ResultLocation location) throws com.flexive.shared.exceptions.FxApplicationException
typeId
- the content type ID, or -1 for the "overall" propertiesviewType
- the view type (list, thumbs)location
- the "location" where the results will be displayed (e.g. the main admin result pages)com.flexive.shared.exceptions.FxApplicationException
- if the result preferences could not be loadedcom.flexive.shared.search.ResultPreferences loadSystemDefault(long typeId, com.flexive.shared.search.ResultViewType viewType, com.flexive.shared.search.ResultLocation location) throws com.flexive.shared.exceptions.FxApplicationException
ResultPreferences
object is returned.typeId
- the content type ID, or -1 for the "overall" propertiesviewType
- the view type (list, thumbs)location
- the "location" where the results will be displayed (e.g. the main admin result pages)com.flexive.shared.exceptions.FxApplicationException
- if the result preferences could not be loadedboolean isCustomized(long typeId, com.flexive.shared.search.ResultViewType viewType, com.flexive.shared.search.ResultLocation location) throws com.flexive.shared.exceptions.FxApplicationException
load(long, com.flexive.shared.search.ResultViewType, com.flexive.shared.search.ResultLocation)
.typeId
- the content type ID, or -1 for the "overall" propertiesviewType
- the view type (list, thumbs)location
- the "location" where the results will be displayed (e.g. the main admin result pages)com.flexive.shared.exceptions.FxApplicationException
- on errorsvoid save(com.flexive.shared.search.ResultPreferences preferences, long typeId, com.flexive.shared.search.ResultViewType viewType, com.flexive.shared.search.ResultLocation location) throws com.flexive.shared.exceptions.FxApplicationException
preferences
- the preferences to be savedtypeId
- the content type IDviewType
- the view type (list, thumbs)location
- the "location" where the results will be displayedcom.flexive.shared.exceptions.FxApplicationException
- if the result preferences could not be updatedvoid saveInSource(com.flexive.shared.search.ResultPreferences preferences, long typeId, com.flexive.shared.search.ResultViewType viewType, com.flexive.shared.search.ResultLocation location) throws com.flexive.shared.exceptions.FxApplicationException
Only when a user has no own result preferences and uses the system default's, a new configuration entry will be created (instead of updating the shared result preferences).
preferences
- the preferences to be savedtypeId
- the content type IDviewType
- the view type (list, thumbs)location
- the "location" where the results will be displayedcom.flexive.shared.exceptions.FxApplicationException
- if the result preferences could not be updatedvoid saveSystemDefault(com.flexive.shared.search.ResultPreferences preferences, long typeId, com.flexive.shared.search.ResultViewType viewType, com.flexive.shared.search.ResultLocation... locations) throws com.flexive.shared.exceptions.FxApplicationException
preferences
- the preferences to be savedtypeId
- the content type IDviewType
- the view type (list, thumbs)locations
- the result location(s) where the results will be displayedcom.flexive.shared.exceptions.FxApplicationException
- if the result preferences could not be updatedvoid remove(long typeId, com.flexive.shared.search.ResultViewType viewType, com.flexive.shared.search.ResultLocation location) throws com.flexive.shared.exceptions.FxApplicationException
typeId
- the content type ID, or -1 for the "overall" propertiesviewType
- the view type (list, thumbs)location
- the "location" where the results will be displayed (e.g. the main admin result pages)com.flexive.shared.exceptions.FxApplicationException
- if the user's preferences could not be removed