com.google.code.facebookapi
Class BundleActionLink

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

public class BundleActionLink
extends java.lang.Object
implements ToJsonObject, java.io.Serializable

A simple data structure for storing a story-template action link, used in the feed_registerTemplateBundle API call.

See Also:
http://wiki.developers.facebook.com/index.php/Action_Links}, Serialized Form

Constructor Summary
BundleActionLink()
          Constructor.
BundleActionLink(java.lang.String text, java.lang.String href)
          Constructor.
 
Method Summary
static java.util.List<BundleActionLink> fromJson(org.json.JSONArray arr)
           
static BundleActionLink fromJson(org.json.JSONObject obj)
           
 java.lang.String getHref()
          Get the action link (may include tokens).
 java.lang.String getText()
          Get the text to display for the action.
 void setHref(java.lang.String href)
          Set the action link (may include tokens).
 void setText(java.lang.String text)
          Set the text to display for the action.
 org.json.JSONObject toJson()
           
static org.json.JSONArray toJsonArray(java.lang.Iterable<BundleActionLink> list)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BundleActionLink

public BundleActionLink()
Constructor. If you use this version, you must make sure you set both the 'text' and 'href' fields before trying to submit your template, otherwise it will not serialize correctly.


BundleActionLink

public BundleActionLink(java.lang.String text,
                        java.lang.String href)
Constructor.

Parameters:
text - the text to display for the action.
href - the action link (may include tokens).
Method Detail

toJson

public org.json.JSONObject toJson()
Specified by:
toJson in interface ToJsonObject
Returns:
a JSON representation of this template.

getText

public final java.lang.String getText()
Get the text to display for the action.


setText

public final void setText(java.lang.String text)
Set the text to display for the action.


getHref

public final java.lang.String getHref()
Get the action link (may include tokens).


setHref

public final void setHref(java.lang.String href)
Set the action link (may include tokens).


toJsonArray

public static org.json.JSONArray toJsonArray(java.lang.Iterable<BundleActionLink> list)

fromJson

public static BundleActionLink fromJson(org.json.JSONObject obj)
                                 throws org.json.JSONException
Throws:
org.json.JSONException

fromJson

public static java.util.List<BundleActionLink> fromJson(org.json.JSONArray arr)
                                                 throws org.json.JSONException
Throws:
org.json.JSONException


Copyright © 2010. All Rights Reserved.