pase.server
Class ServerScriptEnv

java.lang.Object
  extended by pase.server.ServerScriptEnv

public class ServerScriptEnv
extends java.lang.Object

ServerScriptEnv: Server Script Environment, store script environment information.

Version:
1.1.5,
Author:
yschen
See Also:
ServerAPI, Task

Constructor Summary
ServerScriptEnv()
          Create the server script environment.
ServerScriptEnv(ServerAPI api, Task t)
          Create the server script environment.
ServerScriptEnv(ServerAPI api, Task t, java.lang.String object, java.lang.String method)
           
 
Method Summary
 java.util.Iterator getAllVariableName()
          Get all variable name
 Task getCurrentTask()
          Get current task.
 java.lang.String getMethod()
           
 java.lang.String getObject()
           
 ServerAPI getServer()
          Get the server.
 java.lang.Object getVariable(java.lang.String name)
          Get the variable value
 void setCurrentTask(Task t)
          Set current task.
 void setMethod(java.lang.String method)
           
 void setObject(java.lang.String object)
           
 void setServer(ServerAPI api)
          Set the server.
 void setVariable(java.lang.String name, java.lang.Object value)
          Set the variable used in the JavaScript
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerScriptEnv

public ServerScriptEnv()
Create the server script environment. Initial the server and task.

Since:
version 1.0.0

ServerScriptEnv

public ServerScriptEnv(ServerAPI api,
                       Task t)
Create the server script environment. Store the information about ServerAPI and Task.

Parameters:
api - the given server which execute the script.
t - the current task.
Since:
version 1.0.0
See Also:
ServerAPI, Task

ServerScriptEnv

public ServerScriptEnv(ServerAPI api,
                       Task t,
                       java.lang.String object,
                       java.lang.String method)
Method Detail

getServer

public ServerAPI getServer()
Get the server.

Returns:
the server.
Since:
version 1.0.0
See Also:
ServerAPI

getCurrentTask

public Task getCurrentTask()
Get current task.

Returns:
the current task.
Since:
version 1.0.0
See Also:
Task

setServer

public void setServer(ServerAPI api)
Set the server.

Parameters:
api - the given server.
Since:
version 1.0.0
See Also:
ServerAPI

setCurrentTask

public void setCurrentTask(Task t)
Set current task.

Parameters:
t - the current task.
Since:
version 1.0.0
See Also:
Task

setVariable

public void setVariable(java.lang.String name,
                        java.lang.Object value)
Set the variable used in the JavaScript

Parameters:
name - the name of the variable
value - the value of the variable
Since:
version 1.3

getVariable

public java.lang.Object getVariable(java.lang.String name)
Get the variable value

Parameters:
name - the name of the variable
Returns:
the value of the variable
Since:
version 1.3

getAllVariableName

public java.util.Iterator getAllVariableName()
Get all variable name

Returns:
the iterator of all variable name

getObject

public java.lang.String getObject()

setObject

public void setObject(java.lang.String object)

getMethod

public java.lang.String getMethod()

setMethod

public void setMethod(java.lang.String method)