|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.cocoon.environment.AbstractEnvironment org.apache.cocoon.environment.commandline.AbstractCommandLineEnvironment
public abstract class AbstractCommandLineEnvironment
This environment is used to save the requested file to disk.
Field Summary | |
---|---|
static String |
CLI_REQUEST_ID
|
protected int |
contentLength
|
protected String |
contentType
|
protected boolean |
hasRedirected
|
protected int |
statusCode
|
Fields inherited from class org.apache.cocoon.environment.AbstractEnvironment |
---|
action, avalonToCocoonSourceWrapper, context, initializedComponents, manager, objectModel, outputStream, prefix, rootContext, secureOutputStream, sourceResolver, uris, view |
Fields inherited from interface org.apache.excalibur.source.SourceResolver |
---|
METHOD, ROLE, URI_ENCODING, URI_PARAMETERS |
Constructor Summary | |
---|---|
AbstractCommandLineEnvironment(String uri,
Map attributes,
Map parameters,
Map headers,
String view,
File context,
CommandLineContext cliContext,
OutputStream stream,
Logger log)
|
|
AbstractCommandLineEnvironment(String uri,
String view,
File context,
OutputStream stream,
Logger log)
|
Method Summary | |
---|---|
String |
getContentType()
Get the ContentType |
OutputStream |
getOutputStream(int bufferSize)
Return an OutputStream, but allow it to be null for when the pipeline is being streamed to the provided SAX content handler (using CocoonBean) |
int |
getStatus()
Get the StatusCode |
boolean |
hasRedirected()
Was one of the redirection methods called ? |
boolean |
isExternal()
Always return true . |
void |
redirect(boolean sessionmode,
String newURL)
Redirect the client to a new URL |
void |
sendStatus(int sc)
Send a content-less response with the given status code. |
void |
setContentLength(int contentLength)
Set the ContentLength |
void |
setContentType(String contentType)
Set the ContentType |
void |
setStatus(int statusCode)
Set the StatusCode |
Methods inherited from class org.apache.cocoon.environment.AbstractEnvironment |
---|
changeContext, commitResponse, extractAction, extractView, finishingProcessing, getAction, getAttribute, getAttributeNames, getContext, getObjectModel, getOutputStream, getRootContext, getURI, getURIPrefix, getView, globalRedirect, hasAttribute, initComponents, isInternalRedirect, isResponseModified, release, removeAttribute, resolve, resolveURI, resolveURI, setAction, setAttribute, setContext, setContext, setResponseIsNotModified, setURIPrefix, setView, startingProcessing, tryResetResponse |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.cocoon.environment.Redirector |
---|
globalRedirect |
Field Detail |
---|
public static final String CLI_REQUEST_ID
protected String contentType
protected int contentLength
protected boolean hasRedirected
protected int statusCode
Constructor Detail |
---|
public AbstractCommandLineEnvironment(String uri, String view, File context, OutputStream stream, Logger log) throws MalformedURLException
MalformedURLException
public AbstractCommandLineEnvironment(String uri, Map attributes, Map parameters, Map headers, String view, File context, CommandLineContext cliContext, OutputStream stream, Logger log) throws MalformedURLException
MalformedURLException
Method Detail |
---|
public void redirect(boolean sessionmode, String newURL) throws IOException
redirect
in interface Environment
redirect
in interface Redirector
IOException
public void sendStatus(int sc)
Redirector
sendStatus
in interface Redirector
sc
- an http status code.public boolean hasRedirected()
Redirector
hasRedirected
in interface Redirector
public void setStatus(int statusCode)
setStatus
in interface Environment
setStatus
in class AbstractEnvironment
public int getStatus()
public void setContentType(String contentType)
setContentType
in interface Environment
public void setContentLength(int contentLength)
setContentLength
in interface Environment
public String getContentType()
getContentType
in interface Environment
public boolean isExternal()
true
.
isExternal
in interface Environment
public OutputStream getOutputStream(int bufferSize) throws IOException
getOutputStream
in interface Environment
getOutputStream
in class AbstractEnvironment
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |