public class JavaRosaPropertyRules extends java.lang.Object implements IPropertyRules
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CURRENT_LOCALE |
static java.lang.String |
DEVICE_ID_PROPERTY |
static java.lang.String |
LOGS_ENABLED |
static java.lang.String |
LOGS_ENABLED_NO |
static java.lang.String |
LOGS_ENABLED_YES |
static java.lang.String |
OPENROSA_API_LEVEL
The expected compliance version for the OpenRosa API set
|
(package private) java.util.ArrayList<java.lang.String> |
readOnlyProperties |
(package private) java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>> |
rules |
Constructor and Description |
---|
JavaRosaPropertyRules()
Creates the JavaRosa set of property rules
|
Modifier and Type | Method and Description |
---|---|
java.util.ArrayList<java.lang.String> |
allowableProperties()
(non-Javadoc)
|
java.util.ArrayList<java.lang.String> |
allowableValues(java.lang.String propertyName)
(non-Javadoc)
|
boolean |
checkPropertyAllowed(java.lang.String propertyName)
(non-Javadoc)
|
boolean |
checkPropertyUserReadOnly(java.lang.String propertyName)
(non-Javadoc)
|
boolean |
checkValueAllowed(java.lang.String propertyName,
java.lang.String potentialValue)
(non-Javadoc)
|
java.lang.String |
getHumanReadableDescription(java.lang.String propertyName)
Returns a human readable string representing the description of a
property.
|
java.lang.String |
getHumanReadableValue(java.lang.String propertyName,
java.lang.String value)
Returns a human readable string representing the value of a specific
property.
|
void |
handlePropertyChanges(java.lang.String propertyName)
Handles any state changes that would be required upon a specific value
being changed.
|
java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>> rules
java.util.ArrayList<java.lang.String> readOnlyProperties
public static final java.lang.String DEVICE_ID_PROPERTY
public static final java.lang.String CURRENT_LOCALE
public static final java.lang.String LOGS_ENABLED
public static final java.lang.String LOGS_ENABLED_YES
public static final java.lang.String LOGS_ENABLED_NO
public static final java.lang.String OPENROSA_API_LEVEL
public JavaRosaPropertyRules()
public java.util.ArrayList<java.lang.String> allowableValues(java.lang.String propertyName)
allowableValues
in interface IPropertyRules
propertyName
- The name of the property that is being identifiedIPropertyRules.allowableValues(String)
public boolean checkValueAllowed(java.lang.String propertyName, java.lang.String potentialValue)
checkValueAllowed
in interface IPropertyRules
propertyName
- The name of the property that is being identifiedpotentialValue
- The value that is being testedIPropertyRules.checkValueAllowed(String, String)
public java.util.ArrayList<java.lang.String> allowableProperties()
allowableProperties
in interface IPropertyRules
IPropertyRules.allowableProperties()
public boolean checkPropertyAllowed(java.lang.String propertyName)
checkPropertyAllowed
in interface IPropertyRules
propertyName
- The name of the property that is being testedorg.javarosa.core.services.properties.IPropertyRules#checkPropertyAllowed)
public boolean checkPropertyUserReadOnly(java.lang.String propertyName)
checkPropertyUserReadOnly
in interface IPropertyRules
propertyName
- The name of the property that is being testedorg.javarosa.core.services.properties.IPropertyRules#checkPropertyUserReadOnly)
public java.lang.String getHumanReadableDescription(java.lang.String propertyName)
IPropertyRules
getHumanReadableDescription
in interface IPropertyRules
propertyName
- The name of the property to be describedpublic java.lang.String getHumanReadableValue(java.lang.String propertyName, java.lang.String value)
IPropertyRules
getHumanReadableValue
in interface IPropertyRules
propertyName
- The name of the property whose value is to be
interpreted.value
- The value to be interpreted as a Stringpublic void handlePropertyChanges(java.lang.String propertyName)
IPropertyRules
handlePropertyChanges
in interface IPropertyRules
propertyName
- The name of the property that has changed