"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
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 org.wso2.mashup.MashupFault
eg:
client.credentials={username:"you@email.com",password:"xxx",service:"blogger",authtype:"google"};
object -org.wso2.mashup.MashupFaultpublic org.mozilla.javascript.Scriptable jsGet_credentials()
public 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 org.wso2.mashup.MashupFault
var entry2 = client.get("http://www.blogger.com/feeds/000/posts/full/000");
org.wso2.mashup.MashupFault
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 org.wso2.mashup.MashupFault
var feed = client.getFeed("http://www.blogger.com/feeds/000/posts/full/000");
org.wso2.mashup.MashupFault
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 org.wso2.mashup.MashupFault
org.wso2.mashup.MashupFault
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 org.wso2.mashup.MashupFault
java.io.IOExceptionorg.wso2.mashup.MashupFault
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 org.wso2.mashup.MashupFault
org.wso2.mashup.MashupFault
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 org.wso2.mashup.MashupFault
client.delete("http://www.blogger.com/feeds/000/posts/full/000");
java.io.IOExceptionorg.wso2.mashup.MashupFault