com.google.code.facebookapi
Class ApplicationPropertySet

java.lang.Object
  extended by com.google.code.facebookapi.ApplicationPropertySet
All Implemented Interfaces:
java.io.Serializable

public class ApplicationPropertySet
extends java.lang.Object
implements java.io.Serializable

This utility represents a set of application properties for use in the facebook.admin_setApplicatoinProperty API call.

See Also:
Serialized Form

Constructor Summary
ApplicationPropertySet()
           
ApplicationPropertySet(java.lang.String jsonString)
          Initialize the ApplicationPropertySet mapping from its JSON representation
 
Method Summary
 java.lang.Boolean getBoolProperty(ApplicationProperty prop)
          Gets a boolean property value.
 java.lang.CharSequence getStringProperty(ApplicationProperty prop)
          Gets a String property value.
 boolean isEmpty()
           
 org.json.JSONObject jsonify()
          Return a JSON representation of this property set object
static java.util.Map<ApplicationProperty,java.lang.String> parseProperties(java.lang.String json)
           
 void removeProperty(ApplicationProperty prop)
          Remove a property from the set.
 void setBoolProperty(ApplicationProperty prop, boolean value)
          Sets a boolean property value.
 void setStringProperty(ApplicationProperty prop, java.lang.CharSequence value)
          Sets a String property value.
 org.json.JSONObject toJson()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationPropertySet

public ApplicationPropertySet()

ApplicationPropertySet

public ApplicationPropertySet(java.lang.String jsonString)
                       throws java.lang.ClassCastException
Initialize the ApplicationPropertySet mapping from its JSON representation

Parameters:
jsonString - JSON representing the application properties
Throws:
java.lang.ClassCastException - if the JSON-encoded mapping doesn't conform to expectations
Method Detail

setBoolProperty

public void setBoolProperty(ApplicationProperty prop,
                            boolean value)
Sets a boolean property value.

Parameters:
prop - the property to set, it should be of boolean type.
value - the value to set.

getBoolProperty

public java.lang.Boolean getBoolProperty(ApplicationProperty prop)
Gets a boolean property value.

Parameters:
prop - the property to get, it should be of boolean type.
Returns:
the value of the property.

setStringProperty

public void setStringProperty(ApplicationProperty prop,
                              java.lang.CharSequence value)
Sets a String property value.

Parameters:
prop - the property to set, it should be of String type.
value - the value to set.

getStringProperty

public java.lang.CharSequence getStringProperty(ApplicationProperty prop)
Gets a String property value.

Parameters:
prop - the property to get, it should be of String type.
Returns:
the value of the property.

removeProperty

public void removeProperty(ApplicationProperty prop)
Remove a property from the set.

Parameters:
prop - the property to remove.

isEmpty

public boolean isEmpty()
Returns:
true if this set is empty false otherwise

toJson

public org.json.JSONObject toJson()

jsonify

public org.json.JSONObject jsonify()
Return a JSON representation of this property set object

Returns:
JSONObject

parseProperties

public static java.util.Map<ApplicationProperty,java.lang.String> parseProperties(java.lang.String json)


Copyright © 2010. All Rights Reserved.