net.rim.pushsdk.commons
Class PropertyStore

java.lang.Object
  extended by net.rim.pushsdk.commons.PropertyStore
Direct Known Subclasses:
DefaultPropertyStore

public abstract class PropertyStore
extends Object

Abstract class for storing SDK properties. Provides methods to automatically convert properties from Strings to the specified types - if the property cannot be converted a RuntimeException will be thrown.

Implement the getProperty() and setProperty() methods to provide a custom property store.

Author:
mhogan

Constructor Summary
PropertyStore()
           
 
Method Summary
 Boolean getBooleanProperty(String property)
          Gets the value of a Boolean property.
 Double getDoubleProperty(String property)
          Gets the value of a Double property.
 Integer getIntegerProperty(String property)
          Gets the value of an Integer property.
 Long getLongProperty(String property)
          Gets the value of a Long property.
abstract  String getProperty(String property)
          Gets the value associated with the given property.
abstract  void setProperty(String property, String value)
          Sets the property-value pair.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyStore

public PropertyStore()
Method Detail

getProperty

public abstract String getProperty(String property)
Gets the value associated with the given property.

Parameters:
property - the property name
Returns:
the property value

setProperty

public abstract void setProperty(String property,
                                 String value)
Sets the property-value pair.

Parameters:
property - the property name
value - the property value

getIntegerProperty

public Integer getIntegerProperty(String property)
Gets the value of an Integer property.

Parameters:
property - the property name
Returns:
an Integer value

getLongProperty

public Long getLongProperty(String property)
Gets the value of a Long property.

Parameters:
property - the property name
Returns:
a Long value

getDoubleProperty

public Double getDoubleProperty(String property)
Gets the value of a Double property.

Parameters:
property - the property name
Returns:
a Double value

getBooleanProperty

public Boolean getBooleanProperty(String property)
Gets the value of a Boolean property.

Parameters:
property - the property name
Returns:
a Boolean value


Copyright © 2011 Research In Motion. All Rights Reserved.