Class JavaRosaPropertyRules
java.lang.Object
org.javarosa.core.services.properties.JavaRosaPropertyRules
- All Implemented Interfaces:
IPropertyRules
public class JavaRosaPropertyRules extends Object implements IPropertyRules
A set of rules governing the allowable properties for JavaRosa's
core funtionality.
- Author:
- ctsims
-
Field Summary
Fields Modifier and Type Field Description static StringCURRENT_LOCALEstatic StringDEVICE_ID_PROPERTYstatic StringLOGS_ENABLEDstatic StringLOGS_ENABLED_NOstatic StringLOGS_ENABLED_YESstatic StringOPENROSA_API_LEVELThe expected compliance version for the OpenRosa API set -
Constructor Summary
Constructors Constructor Description JavaRosaPropertyRules()Creates the JavaRosa set of property rules -
Method Summary
Modifier and Type Method Description ArrayList<String>allowableProperties()(non-Javadoc)ArrayList<String>allowableValues(String propertyName)(non-Javadoc)booleancheckPropertyAllowed(String propertyName)(non-Javadoc)booleancheckPropertyUserReadOnly(String propertyName)(non-Javadoc)booleancheckValueAllowed(String propertyName, String potentialValue)(non-Javadoc)StringgetHumanReadableDescription(String propertyName)Returns a human readable string representing the description of a property.StringgetHumanReadableValue(String propertyName, String value)Returns a human readable string representing the value of a specific property.voidhandlePropertyChanges(String propertyName)Handles any state changes that would be required upon a specific value being changed.
-
Field Details
-
DEVICE_ID_PROPERTY
- See Also:
- Constant Field Values
-
CURRENT_LOCALE
- See Also:
- Constant Field Values
-
LOGS_ENABLED
- See Also:
- Constant Field Values
-
LOGS_ENABLED_YES
- See Also:
- Constant Field Values
-
LOGS_ENABLED_NO
- See Also:
- Constant Field Values
-
OPENROSA_API_LEVEL
The expected compliance version for the OpenRosa API set- See Also:
- Constant Field Values
-
-
Constructor Details
-
JavaRosaPropertyRules
public JavaRosaPropertyRules()Creates the JavaRosa set of property rules
-
-
Method Details
-
allowableValues
(non-Javadoc)- Specified by:
allowableValuesin interfaceIPropertyRules- Parameters:
propertyName- The name of the property that is being identified- Returns:
- A List containing all of the values that this property may be set to
- See Also:
IPropertyRules.allowableValues(String)
-
checkValueAllowed
(non-Javadoc)- Specified by:
checkValueAllowedin interfaceIPropertyRules- Parameters:
propertyName- The name of the property that is being identifiedpotentialValue- The value that is being tested- Returns:
- True if the property specified may be set to potentialValue, False otherwise
- See Also:
IPropertyRules.checkValueAllowed(String, String)
-
allowableProperties
(non-Javadoc)- Specified by:
allowablePropertiesin interfaceIPropertyRules- Returns:
- A List containing all of the properties that may be set
- See Also:
IPropertyRules.allowableProperties()
-
checkPropertyAllowed
(non-Javadoc)- Specified by:
checkPropertyAllowedin interfaceIPropertyRules- Parameters:
propertyName- The name of the property that is being tested- Returns:
- True if the property specified may used. False otherwise
-
checkPropertyUserReadOnly
(non-Javadoc)- Specified by:
checkPropertyUserReadOnlyin interfaceIPropertyRules- Parameters:
propertyName- The name of the property that is being tested- Returns:
- True if the property specified may not be modified by the user. false otherwise
-
getHumanReadableDescription
Description copied from interface:IPropertyRulesReturns a human readable string representing the description of a property.- Specified by:
getHumanReadableDescriptionin interfaceIPropertyRules- Parameters:
propertyName- The name of the property to be described- Returns:
- A string that describes the meaning of the property name
-
getHumanReadableValue
Description copied from interface:IPropertyRulesReturns a human readable string representing the value of a specific property. This allows multiple choice answers to be stored in a concise format, while offering a standardized way to present those options to a user.- Specified by:
getHumanReadableValuein interfaceIPropertyRules- Parameters:
propertyName- The name of the property whose value is to be interpreted.value- The value to be interpreted as a String- Returns:
- A string representing the passed in value that can be parsed by a user to determine what its significance is.
-
handlePropertyChanges
Description copied from interface:IPropertyRulesHandles any state changes that would be required upon a specific value being changed.- Specified by:
handlePropertyChangesin interfaceIPropertyRules- Parameters:
propertyName- The name of the property that has changed
-