com.ibm.commerce.command
Class HttpDirectViewCommandImpl

java.lang.Object
  |
  +--com.ibm.commerce.command.AbstractECCommand
        |
        +--com.ibm.commerce.command.AbstractViewCommand
              |
              +--com.ibm.commerce.command.AbstractDirectViewCommand
                    |
                    +--com.ibm.commerce.command.HttpDirectViewCommandImpl
All Implemented Interfaces:
AccCommand, DirectViewCommand, ECCommand, HttpViewCommand, Protectable, ViewCommand

public class HttpDirectViewCommandImpl
extends AbstractDirectViewCommand
implements HttpViewCommand

This is the default implementation of a http direct view command.


Fields inherited from class com.ibm.commerce.command.AbstractViewCommand
requestProperties, responseProperties
 
Fields inherited from class com.ibm.commerce.command.AbstractECCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.command.HttpViewCommand
COPYRIGHT
 
Fields inherited from interface com.ibm.commerce.command.DirectViewCommand
COPYRIGHT
 
Fields inherited from interface com.ibm.commerce.command.ECCommand
defaultCommandClassName
 
Constructor Summary
HttpDirectViewCommandImpl()
          HttpDirectViewCommandImpl constructor.
 
Method Summary
 com.ibm.commerce.command.HttpServletRequest getRequest()
          Gets the HttpServletRequest associated with this command.
 com.ibm.commerce.command.HttpServletResponse getResponse()
          Gets the HttpServletResponse associated with this command.
 void performExecute()
          This method retreives either a text document or a raw document from the request properties and sends it out.
protected  void sendRawDocument(byte[] doc)
          Send a raw document out.
protected  void sendRawDocument(java.io.InputStream doc)
          Send a raw document out.
protected  void sendTextDocument(java.io.InputStream doc)
          Send a text document out.
 
Methods inherited from class com.ibm.commerce.command.AbstractDirectViewCommand
getContentLength, getContentType, getRawDocument, getTextDocument
 
Methods inherited from class com.ibm.commerce.command.AbstractViewCommand
fulfills, getForUserId, getOwner, getRequestProperties, getResourceOwners, getResponseProperties, getViewName, mergeProperties, setForUserId, setOwner, setRequestProperties, setResponseProperties, setViewName
 
Methods inherited from class com.ibm.commerce.command.AbstractECCommand
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.commerce.command.ViewCommand
getRequestProperties, getResponseProperties, getViewName, mergeProperties, setRequestProperties, setViewName
 
Methods inherited from interface com.ibm.commerce.command.AccCommand
accessControlCheck, getAccCheck, getForUserId, setAccCheck, setForUserId, setOwner
 
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, execute, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters
 
Methods inherited from interface com.ibm.commerce.security.Protectable
fulfills, getOwner
 

Constructor Detail

HttpDirectViewCommandImpl

public HttpDirectViewCommandImpl()
HttpDirectViewCommandImpl constructor.
Method Detail

getRequest

public com.ibm.commerce.command.HttpServletRequest getRequest()
Gets the HttpServletRequest associated with this command.

Specified by:
getRequest in interface HttpViewCommand
Returns:
HttpServletRequest

getResponse

public com.ibm.commerce.command.HttpServletResponse getResponse()
Gets the HttpServletResponse associated with this command.

Specified by:
getResponse in interface HttpViewCommand
Returns:
HttpServletResponse

performExecute

public void performExecute()
                    throws ECException
This method retreives either a text document or a raw document from the request properties and sends it out.
Overrides:
performExecute in class AbstractViewCommand
Throws:
ECException - The exception description.

sendRawDocument

protected void sendRawDocument(byte[] doc)
                        throws ECException
Send a raw document out. No header is added to the document
Parameters:
doc - byte[] - content of document in an array of bytes
Throws:
EXException -  

sendRawDocument

protected void sendRawDocument(java.io.InputStream doc)
                        throws ECException
Send a raw document out. No header is added to the document
Parameters:
doc - InputStream - output document as an input stream
Throws:
EXException -  

sendTextDocument

protected void sendTextDocument(java.io.InputStream doc)
                         throws ECException
Send a text document out. No header is added to the document
Parameters:
doc - InputStream - output document as an input stream
Throws:
EXException -