|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metamatrix.toolbox.preference.UserPreferences
public class UserPreferences
Field Summary | |
---|---|
static java.lang.String |
LOG_CONTEXT
|
static java.lang.String |
PROPERTY_PREFIX
|
static java.lang.String |
USER_PREFERENCES_DEFINITION_FILE_PROPERTY_NAME
|
Method Summary | |
---|---|
void |
clearChanges()
|
boolean |
getBooleanValue(java.lang.String propName)
Convenience method for determining if a property value is "true" or "false" |
static UserPreferences |
getInstance()
|
PropertiedObject |
getPropertiedObject()
|
PropertiedObjectEditor |
getPropertiedObjectEditor()
|
java.util.Properties |
getProperties()
Return an unmodifiable Properties object containing all user preference properties. |
java.util.Properties |
getProperties(java.lang.String filter)
Return an unmodifiable Properties object that contains only those properties that match the specified filter. |
java.util.Properties |
getProperties(java.lang.String filter,
boolean ignoreCase)
Return an unmodifiable Properties object that contains only those properties that match the specified filter. |
java.util.Properties |
getPropertiesBranch(java.lang.String prefix)
Return an unmodifiable Properties object containing all user preference properties that exist beneath the specified property name prefix. |
java.lang.Object |
getValue(java.lang.String propName)
|
java.util.Collection |
getValues(java.lang.String propName,
char delimiter)
return an collection of String values tokenized buy the specified delimiter |
boolean |
hasChanges()
|
boolean |
isReadOnly()
|
static void |
main(java.lang.String[] args)
|
void |
removeValue(java.lang.String propName)
|
void |
saveChanges()
|
void |
setConfigProperties(java.util.Properties properties)
Set the configuration properties used to initialize this. |
void |
setValue(java.lang.String propName,
java.lang.Object value)
set this entity's value for the specified property name. |
void |
setValues(java.lang.String propName,
java.util.Collection values,
char delimiter)
Store an array of values as their toString returns, delimited by the specified delimiter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String LOG_CONTEXT
public static final java.lang.String PROPERTY_PREFIX
public static final java.lang.String USER_PREFERENCES_DEFINITION_FILE_PROPERTY_NAME
Method Detail |
---|
public static UserPreferences getInstance()
public void setConfigProperties(java.util.Properties properties)
properties
- public boolean hasChanges()
public void saveChanges()
public void clearChanges()
public boolean isReadOnly()
public PropertiedObjectEditor getPropertiedObjectEditor()
public PropertiedObject getPropertiedObject()
public java.lang.Object getValue(java.lang.String propName)
public boolean getBooleanValue(java.lang.String propName)
public void setValue(java.lang.String propName, java.lang.Object value)
propName
- the name of the propertyvalue
- the object to store for this property name. If the value is null or a zero-length
String, then the specified propName will be removed from this entity's list of properties.public void setValues(java.lang.String propName, java.util.Collection values, char delimiter)
propName
- the name of the propertyvalues
- a Collection of objects to store for this property name. If the collection is either null
or empty, then the specified propName will be removed from this entity's list of properties.public void removeValue(java.lang.String propName)
public java.util.Collection getValues(java.lang.String propName, char delimiter)
public java.util.Properties getProperties()
public java.util.Properties getPropertiesBranch(java.lang.String prefix)
prefix
- the string filter that identifies the root of the property names to be returned;
if null or zero-length, all properties are returned.
public java.util.Properties getProperties(java.lang.String filter)
*metamatrix.*
finds all properties that contain somewhere in the property name the string "metamatrix.".
The filter is case sensitive.
filter
- the string filter that will be used to narrow the set of properties returned;
all properties are returned if the filter is null, zero-length or equal to "*".
public java.util.Properties getProperties(java.lang.String filter, boolean ignoreCase)
*metamatrix.*
finds all properties that contain somewhere in the property name the string "metamatrix.".
filter
- the string filter that will be used to narrow the set of properties returned;
all properties are returned if the filter is null, zero-length or equal to "*".ignoreCase
- true if the case of the property names is to be ignored
when using the filter.
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |