public class MemberPreferenceManager extends java.lang.Object implements DBConstants
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROPERTY_PREFIX |
ALL_CATEGORIES_SET_FIELD, ATTACH_WS_SET_FIELD, AUTH_GRP_SET_FIELD, AUTH_MBR_SET_FIELD, AUTHOR_ID_FIELD, CATEGORIES_SET_FIELD, CDATE_FIELD, CHANNEL_JCMSDB_PROP, DBDATA_URID, HAS_ATTACH_WS_FIELD, HAS_NO_READ_RIGHTS, HIBERNATE_MAPPING_ADATE, HIBERNATE_MAPPING_AUTHOR, HIBERNATE_MAPPING_CDATE, HIBERNATE_MAPPING_EDATE, HIBERNATE_MAPPING_HAS_ATTACH_WS, HIBERNATE_MAPPING_HASNOREADRIGHTS, HIBERNATE_MAPPING_MAININSTANCE_ID, HIBERNATE_MAPPING_MAJORVERSION, HIBERNATE_MAPPING_MDATE, HIBERNATE_MAPPING_MERGE_DATE, HIBERNATE_MAPPING_MERGE_ID, HIBERNATE_MAPPING_MINORVERSION, HIBERNATE_MAPPING_PDATE, HIBERNATE_MAPPING_PSTATUS, HIBERNATE_MAPPING_READERCOUNT, HIBERNATE_MAPPING_TITLE, HIBERNATE_MAPPING_TRACKED, HIBERNATE_MAPPING_UDATE, HIBERNATE_MAPPING_VOTECOUNT, HIBERNATE_MAPPING_VOTESCORE, HIBERNATE_MAPPING_WORKFLOW_ID, HIBERNATE_MAPPING_WORKSPACE_ID, MAX_HIBERNATE_MAPPING_PUBLICATION, MDATE_FIELD, PSTATUS_FIELD, REVISION, ROW_ID_FIELD, SCROLL_FETCH_SIZE, WORKFLOW_ID_FIELD, WORKSPACE_ID_FIELD
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDefaultPreference(java.lang.String key)
Returns the default value for the given preference
|
static MemberPreferenceManager |
getInstance() |
java.util.List<MemberPreference> |
getMemberPreferenceList(Member mbr)
Returns all the MemberPreference of the given member.
|
java.lang.String |
getPreference(Member mbr,
java.lang.String key)
Returns the given preference for the given member (use default if any)
|
java.lang.String |
getPreference(Member mbr,
java.lang.String key,
boolean useDefault)
Returns the given preference for the given member
|
void |
removeAllPreferences(Member mbr)
Remove all the preferences of the given member.
|
void |
saveDefaultPreference(java.lang.String key,
java.lang.String value) |
void |
savePreference(Member mbr,
java.lang.String key,
java.lang.String value)
Save the preference (key/value) for the given member.
|
public static final java.lang.String PROPERTY_PREFIX
public static MemberPreferenceManager getInstance()
public java.lang.String getPreference(Member mbr, java.lang.String key)
mbr
- the memberkey
- the key of the preferencepublic java.lang.String getPreference(Member mbr, java.lang.String key, boolean useDefault)
mbr
- the memberkey
- the key of the preferenceuseDefault
- if true and there is no preference fo the given member, search for a default preferencepublic java.lang.String getDefaultPreference(java.lang.String key)
key
- the key of the preferencepublic java.util.List<MemberPreference> getMemberPreferenceList(Member mbr)
mbr
- the member.public void savePreference(Member mbr, java.lang.String key, java.lang.String value)
mbr
- the memberkey
- the key of the preferencevalue
- the value of the preferencepublic void saveDefaultPreference(java.lang.String key, java.lang.String value)
public void removeAllPreferences(Member mbr)
mbr
- the memberCopyright © 2001-2017 Jalios SA. All Rights Reserved.