|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.enterprise.server.auth.prefs.SubjectPreferencesBase
public abstract class SubjectPreferencesBase
| Field Summary | |
|---|---|
protected org.apache.commons.logging.Log |
log
|
protected static String |
PREF_ITEM_DELIM
|
protected static String |
PREF_ITEM_DELIM_REGEX
|
protected static String |
PREF_LIST_DELIM
delimiter for preferences that are multi-valued and stringified |
| Constructor Summary | |
|---|---|
SubjectPreferencesBase(org.rhq.core.domain.auth.Subject subject)
|
|
| Method Summary | ||
|---|---|---|
protected boolean |
getBooleanPref(String key)
Get the value of a preference as a boolean. |
|
protected boolean |
getBooleanPref(String key,
boolean ifNull)
Get the value of a preference as a boolean. |
|
protected int |
getIntPref(String key)
Get the value of a preference as an int. |
|
protected int |
getIntPref(String key,
int ifNull)
Get the value of a preference as an int. |
|
protected Long |
getLongPref(String key)
Get the value of a preference as an long. |
|
protected String |
getPreference(String key)
|
|
|
getPreference(String key,
T defaultValue)
|
|
protected List<Integer> |
getPreferenceAsIntegerList(String key,
String delimiter)
|
|
List<String> |
getPreferenceAsList(String key)
Break the named preference into tokens delimited by PREF_LIST_DELIM. |
|
List<String> |
getPreferenceAsList(String key,
String delimiter)
Tokenize the named preference into a List of Strings. |
|
protected void |
setPreference(String key,
List<?> values)
|
|
protected void |
setPreference(String key,
List<?> values,
String delim)
|
|
void |
setPreference(String key,
Object value)
|
|
protected void |
unsetPreference(String key)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final org.apache.commons.logging.Log log
protected static final String PREF_LIST_DELIM
protected static final String PREF_ITEM_DELIM
protected static final String PREF_ITEM_DELIM_REGEX
| Constructor Detail |
|---|
public SubjectPreferencesBase(org.rhq.core.domain.auth.Subject subject)
| Method Detail |
|---|
protected boolean getBooleanPref(String key)
key - the preference to get
protected boolean getBooleanPref(String key,
boolean ifNull)
key - the preference to getifNull - if the pref is undefined, return this value instead
protected int getIntPref(String key)
key - the preference to get
protected int getIntPref(String key,
int ifNull)
key - the preference to getifNull - if the pref is null, return this value instead
protected Long getLongPref(String key)
key - the preference to get
protected String getPreference(String key)
throws IllegalArgumentException
IllegalArgumentException
public <T> T getPreference(String key,
T defaultValue)
public List<String> getPreferenceAsList(String key)
PREF_LIST_DELIM.
key - the name of the preference
List of String tokens
public List<String> getPreferenceAsList(String key,
String delimiter)
delimiter - the delimiter to break it up bykey - the name of the preference
List of String tokens
protected List<Integer> getPreferenceAsIntegerList(String key,
String delimiter)
protected void setPreference(String key,
List<?> values)
throws IllegalArgumentException
IllegalArgumentException
protected void setPreference(String key,
List<?> values,
String delim)
throws IllegalArgumentException
IllegalArgumentException
public void setPreference(String key,
Object value)
throws IllegalArgumentException
IllegalArgumentExceptionprotected void unsetPreference(String key)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||