org.wso2.mashup.hostobjects.request
Class Request

java.lang.Object
  extended by org.mozilla.javascript.ScriptableObject
      extended by org.wso2.mashup.hostobjects.request.Request
All Implemented Interfaces:
java.io.Serializable, org.mozilla.javascript.ConstProperties, org.mozilla.javascript.debug.DebuggableObject, org.mozilla.javascript.Scriptable

public class Request
extends org.mozilla.javascript.ScriptableObject
See Also:
Serialized Form

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
Request()
           
 
Method Summary
 java.lang.String getClassName()
           
 void jsConstructor()
          This is a JavaScript Rhino host object aimed to provide information regarding the request it received and hence it consists of a set of readOnly properties.
 java.lang.String jsGet_address()
          Returns the remoteIP that the request was made from.
 java.lang.String jsGet_authenticatedUser()
          Appplicable to Mashups that are secured using scecurity scenario 1 (UsernameToken with Timestamp over HTTPS).
 java.lang.String jsGet_remoteIP()
          Appplicable to Mashups that are secured using scecurity scenario 1 (UsernameToken with Timestamp over HTTPS).
 
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

Request

public Request()
Method Detail

getClassName

public java.lang.String getClassName()
Specified by:
getClassName in interface org.mozilla.javascript.Scriptable
Specified by:
getClassName in class org.mozilla.javascript.ScriptableObject

jsConstructor

public void jsConstructor()
This is a JavaScript Rhino host object aimed to provide information regarding the request it received and hence it consists of a set of readOnly properties. Example Usage: function securedUsingUTOverHTTPS() { system.log("This mashup was invoked by the following User : " + request.authenticatedUser ); system.log("This mashup was invoked from the following IP : " + request.remoteIP ); system.log("This mashup was invoked with the following URL : " + request.address ); }

jsGet_authenticatedUser

public java.lang.String jsGet_authenticatedUser()
                                         throws org.wso2.mashup.MashupFault
Appplicable to Mashups that are secured using scecurity scenario 1 (UsernameToken with Timestamp over HTTPS). This method will return the username of the user who called this mashup.
 var authenticatedUser = system.authenticatedUser;
 
Throws:
org.wso2.mashup.MashupFault - Thrown in case any exceptions occur

jsGet_remoteIP

public java.lang.String jsGet_remoteIP()
                                throws org.wso2.mashup.MashupFault
Appplicable to Mashups that are secured using scecurity scenario 1 (UsernameToken with Timestamp over HTTPS). This method will return the username of the user who called this mashup.
     var remoteIP = system.remoteIP;
 
Throws:
org.wso2.mashup.MashupFault - Thrown in case any exceptions occur

jsGet_address

public java.lang.String jsGet_address()
                               throws org.wso2.mashup.MashupFault
Returns the remoteIP that the request was made from.
     var requestURL = system.address;
 
Throws:
org.wso2.mashup.MashupFault - Thrown in case any exceptions occur