java.lang.Objectorg.mozilla.javascript.ScriptableObject
org.wso2.mashup.hostobjects.atom.APPClientHostObject
public class APPClientHostObject
A Mozilla Rhino based javascript host object to act as a client to an APP server as defined in the APP specification.
| Field Summary |
|---|
| Fields inherited from class org.mozilla.javascript.ScriptableObject |
|---|
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST |
| Fields inherited from interface org.mozilla.javascript.Scriptable |
|---|
NOT_FOUND |
| Constructor Summary | |
|---|---|
APPClientHostObject()
|
|
| Method Summary | |
|---|---|
java.lang.String |
getClassName()
|
void |
jsConstructor()
|
static void |
jsFunction_deleteEntry(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] arguments,
org.mozilla.javascript.Function funObj)
Deletes the AtomEntry designated by the URI or by the AtomEntry object from the APPServer. |
static org.mozilla.javascript.Scriptable |
jsFunction_get(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] arguments,
org.mozilla.javascript.Function funObj)
Get an AtomEntry from the APPServer. |
static org.mozilla.javascript.Scriptable |
jsFunction_getFeed(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] arguments,
org.mozilla.javascript.Function funObj)
Get an AtomFeed from the APPServer. |
static org.mozilla.javascript.Scriptable |
jsFunction_getForEdit(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] arguments,
org.mozilla.javascript.Function funObj)
TODO: Do we really need this...?? |
static org.mozilla.javascript.Scriptable |
jsFunction_post(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] arguments,
org.mozilla.javascript.Function funObj)
Posts an AtomEntry object in to an APP server using the given post URI as mentioned in the APP specification. |
static void |
jsFunction_put(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] arguments,
org.mozilla.javascript.Function funObj)
Puts an AtomEntry object in to a APP server using the given edit URI as mentioned in the APP specification. |
org.mozilla.javascript.Scriptable |
jsGet_credentials()
|
void |
jsSet_credentials(java.lang.Object object)
This property can be used to provide a JavaScript object with the username,password and authentication service credentials needed to communicate with APPServer. |
void |
jsSet_options(java.lang.Object object)
Not implemented yet. |
| Methods inherited from class org.mozilla.javascript.ScriptableObject |
|---|
associateValue, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, get, get, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, has, hasInstance, hasProperty, hasProperty, isConst, isSealed, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public APPClientHostObject()
| Method Detail |
|---|
public void jsConstructor()
public java.lang.String getClassName()
getClassName in interface org.mozilla.javascript.ScriptablegetClassName in class org.mozilla.javascript.ScriptableObject
public void jsSet_credentials(java.lang.Object object)
throws java.io.IOException
eg:
client.credentials={username:"you@email.com",password:"xxx",service:"blogger",authtype:"google"};
object -
java.io.IOException
public org.mozilla.javascript.Scriptable jsGet_credentials()
throws java.io.IOException
java.io.IOExceptionpublic void jsSet_options(java.lang.Object object)
object -
public static org.mozilla.javascript.Scriptable jsFunction_get(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] arguments,
org.mozilla.javascript.Function funObj)
throws java.io.IOException
var entry2 = client.get("http://www.blogger.com/feeds/000/posts/full/000");
java.io.IOException
public static org.mozilla.javascript.Scriptable jsFunction_getFeed(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] arguments,
org.mozilla.javascript.Function funObj)
throws java.io.IOException
var feed = client.getFeed("http://www.blogger.com/feeds/000/posts/full/000");
java.io.IOException
public static org.mozilla.javascript.Scriptable jsFunction_getForEdit(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] arguments,
org.mozilla.javascript.Function funObj)
throws java.io.IOException
java.io.IOException
public static org.mozilla.javascript.Scriptable jsFunction_post(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] arguments,
org.mozilla.javascript.Function funObj)
throws java.io.IOException
java.io.IOException
public static void jsFunction_put(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] arguments,
org.mozilla.javascript.Function funObj)
throws java.io.IOException,
java.lang.Exception,
org.apache.abdera.i18n.iri.IRISyntaxException
java.io.IOException
java.lang.Exception
org.apache.abdera.i18n.iri.IRISyntaxException
public static void jsFunction_deleteEntry(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] arguments,
org.mozilla.javascript.Function funObj)
throws java.io.IOException,
java.lang.Exception,
org.apache.abdera.i18n.iri.IRISyntaxException
client.delete("http://www.blogger.com/feeds/000/posts/full/000");
java.io.IOException
java.lang.Exception
org.apache.abdera.i18n.iri.IRISyntaxException