com.ibm.di.eclipse.http.commands
Class RestCommand

java.lang.Object
  extended by com.ibm.di.eclipse.http.commands.RestCommand
Direct Known Subclasses:
CheckinCommand, CheckoutCommand, ConnectorCommand, GetCommand, ListCommand, LogCommand, PingCommand, PropertiesCommand, ScriptCommand, ServerCommand, StartCommand, StarttempCommand, StopCommand

public abstract class RestCommand
extends Object


Field Summary
static String HTTP_BODY
           
static String HTTP_CONTENT_TYPE
           
static String HTTP_QS
           
static String RES_ASSEMBLY_LINE
           
static String RES_ASSEMBLY_LINE_LOG
           
static String RES_CONFIG_AL
           
static String RES_CONFIG_INSTANCE
           
static String RES_CONFIG_RUNAL
           
static String RES_CONFIGURATION
           
static String RES_CONNECTOR_CLOSE
           
static String RES_CONNECTOR_GETNEXT
           
static String RES_CONNECTOR_LOAD
           
static String RES_CONNECTOR_QUERYSCHEMA
           
static ResourceHash sRes
          For error messages and Exceptions
 
Constructor Summary
RestCommand()
           
 
Method Summary
 void addPendingCommand(String name, RestCommand obj)
           
 void appendBody(String body)
           
protected  Attribute appendResult(String attr, String value)
           
 void dispose()
           
abstract  void execute()
           
 ServerAPI getApi()
           
 String getCommand()
           
 HTTPServerConnector getConnector()
           
 List getPath()
           
 String getPath(int index)
           
 RestCommand getPendingCommand(String name)
           
 Entry getRequest()
           
 String getRequestBody()
           
 String getRequestParam(String name)
           
 Entry getResponse()
           
 Session getSession()
           
 boolean isParamTrue(String name)
           
 boolean isReusable()
           
 String readFile(File file)
           
 void setApi(ServerAPI api)
           
 void setBody(String body)
           
 void setBody(String body, boolean append)
           
 void setPath(List path)
           
 void setResponse(Entry response)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RES_CONFIGURATION

public static final String RES_CONFIGURATION
See Also:
Constant Field Values

RES_ASSEMBLY_LINE_LOG

public static final String RES_ASSEMBLY_LINE_LOG
See Also:
Constant Field Values

RES_ASSEMBLY_LINE

public static final String RES_ASSEMBLY_LINE
See Also:
Constant Field Values

RES_CONFIG_INSTANCE

public static final String RES_CONFIG_INSTANCE
See Also:
Constant Field Values

RES_CONNECTOR_LOAD

public static final String RES_CONNECTOR_LOAD
See Also:
Constant Field Values

RES_CONNECTOR_GETNEXT

public static final String RES_CONNECTOR_GETNEXT
See Also:
Constant Field Values

RES_CONNECTOR_QUERYSCHEMA

public static final String RES_CONNECTOR_QUERYSCHEMA
See Also:
Constant Field Values

RES_CONNECTOR_CLOSE

public static final String RES_CONNECTOR_CLOSE
See Also:
Constant Field Values

RES_CONFIG_RUNAL

public static final String RES_CONFIG_RUNAL
See Also:
Constant Field Values

RES_CONFIG_AL

public static final String RES_CONFIG_AL
See Also:
Constant Field Values

HTTP_BODY

public static final String HTTP_BODY
See Also:
Constant Field Values

HTTP_QS

public static final String HTTP_QS
See Also:
Constant Field Values

HTTP_CONTENT_TYPE

public static final String HTTP_CONTENT_TYPE
See Also:
Constant Field Values

sRes

public static ResourceHash sRes
For error messages and Exceptions

Constructor Detail

RestCommand

public RestCommand()
Method Detail

setApi

public void setApi(ServerAPI api)

getApi

public ServerAPI getApi()

getSession

public Session getSession()

getResponse

public Entry getResponse()

setResponse

public void setResponse(Entry response)

getRequest

public Entry getRequest()

setPath

public void setPath(List path)

getPath

public List getPath()

getPath

public String getPath(int index)

getCommand

public String getCommand()

appendResult

protected Attribute appendResult(String attr,
                                 String value)

execute

public abstract void execute()
                      throws Exception
Throws:
Exception

getConnector

public HTTPServerConnector getConnector()

addPendingCommand

public void addPendingCommand(String name,
                              RestCommand obj)

getPendingCommand

public RestCommand getPendingCommand(String name)

getRequestParam

public String getRequestParam(String name)

isParamTrue

public boolean isParamTrue(String name)

getRequestBody

public String getRequestBody()

appendBody

public void appendBody(String body)

setBody

public void setBody(String body)

setBody

public void setBody(String body,
                    boolean append)

readFile

public String readFile(File file)
                throws IOException
Throws:
IOException

isReusable

public boolean isReusable()

dispose

public void dispose()