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 java.lang.Object


Field Summary
static java.lang.String HTTP_BODY
           
static java.lang.String HTTP_CONTENT_TYPE
           
static java.lang.String HTTP_QS
           
static java.lang.String RES_ASSEMBLY_LINE
           
static java.lang.String RES_ASSEMBLY_LINE_LOG
           
static java.lang.String RES_CONFIG_AL
           
static java.lang.String RES_CONFIG_INSTANCE
           
static java.lang.String RES_CONFIG_RUNAL
           
static java.lang.String RES_CONFIGURATION
           
static java.lang.String RES_CONNECTOR_CLOSE
           
static java.lang.String RES_CONNECTOR_GETNEXT
           
static java.lang.String RES_CONNECTOR_LOAD
           
static java.lang.String RES_CONNECTOR_QUERYSCHEMA
           
static ResourceHash sRes
          For error messages and Exceptions
 
Constructor Summary
RestCommand()
           
 
Method Summary
 void addPendingCommand(java.lang.String name, RestCommand obj)
           
 void appendBody(java.lang.String body)
           
protected  Attribute appendResult(java.lang.String attr, java.lang.String value)
           
 void dispose()
           
abstract  void execute()
           
 ServerAPI getApi()
           
 java.lang.String getCommand()
           
 HTTPServerConnector getConnector()
           
 java.util.List getPath()
           
 java.lang.String getPath(int index)
           
 RestCommand getPendingCommand(java.lang.String name)
           
 Entry getRequest()
           
 java.lang.String getRequestBody()
           
 java.lang.String getRequestParam(java.lang.String name)
           
 Entry getResponse()
           
 Session getSession()
           
 boolean isParamTrue(java.lang.String name)
           
 boolean isReusable()
           
 java.lang.String readFile(java.io.File file)
           
 void setApi(ServerAPI api)
           
 void setBody(java.lang.String body)
           
 void setBody(java.lang.String body, boolean append)
           
 void setPath(java.util.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 java.lang.String RES_CONFIGURATION
See Also:
Constant Field Values

RES_ASSEMBLY_LINE_LOG

public static final java.lang.String RES_ASSEMBLY_LINE_LOG
See Also:
Constant Field Values

RES_ASSEMBLY_LINE

public static final java.lang.String RES_ASSEMBLY_LINE
See Also:
Constant Field Values

RES_CONFIG_INSTANCE

public static final java.lang.String RES_CONFIG_INSTANCE
See Also:
Constant Field Values

RES_CONNECTOR_LOAD

public static final java.lang.String RES_CONNECTOR_LOAD
See Also:
Constant Field Values

RES_CONNECTOR_GETNEXT

public static final java.lang.String RES_CONNECTOR_GETNEXT
See Also:
Constant Field Values

RES_CONNECTOR_QUERYSCHEMA

public static final java.lang.String RES_CONNECTOR_QUERYSCHEMA
See Also:
Constant Field Values

RES_CONNECTOR_CLOSE

public static final java.lang.String RES_CONNECTOR_CLOSE
See Also:
Constant Field Values

RES_CONFIG_RUNAL

public static final java.lang.String RES_CONFIG_RUNAL
See Also:
Constant Field Values

RES_CONFIG_AL

public static final java.lang.String RES_CONFIG_AL
See Also:
Constant Field Values

HTTP_BODY

public static final java.lang.String HTTP_BODY
See Also:
Constant Field Values

HTTP_QS

public static final java.lang.String HTTP_QS
See Also:
Constant Field Values

HTTP_CONTENT_TYPE

public static final java.lang.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(java.util.List path)

getPath

public java.util.List getPath()

getPath

public java.lang.String getPath(int index)

getCommand

public java.lang.String getCommand()

appendResult

protected Attribute appendResult(java.lang.String attr,
                                 java.lang.String value)

execute

public abstract void execute()
                      throws java.lang.Exception
Throws:
java.lang.Exception

getConnector

public HTTPServerConnector getConnector()

addPendingCommand

public void addPendingCommand(java.lang.String name,
                              RestCommand obj)

getPendingCommand

public RestCommand getPendingCommand(java.lang.String name)

getRequestParam

public java.lang.String getRequestParam(java.lang.String name)

isParamTrue

public boolean isParamTrue(java.lang.String name)

getRequestBody

public java.lang.String getRequestBody()

appendBody

public void appendBody(java.lang.String body)

setBody

public void setBody(java.lang.String body)

setBody

public void setBody(java.lang.String body,
                    boolean append)

readFile

public java.lang.String readFile(java.io.File file)
                          throws java.io.IOException
Throws:
java.io.IOException

isReusable

public boolean isReusable()

dispose

public void dispose()