Package org.ametys.core.engine
Class BackgroundEnvironment
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.apache.cocoon.environment.AbstractEnvironment
-
- org.ametys.core.engine.BackgroundEnvironment
-
- All Implemented Interfaces:
Component
,LogEnabled
,Environment
,SourceResolver
,SourceResolver
public class BackgroundEnvironment extends AbstractEnvironment
A simple implementation oforg.apache.cocoon.environment.Environment
for pipeline calls which are not externally triggered.
-
-
Field Summary
-
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
Constructors Constructor Description BackgroundEnvironment(String uri, Map requestParameters, Map requestAttributes, Map requestHeaders, String contextPath, Context ctx, Logger logger, OutputStream os)
Constructs the environment.BackgroundEnvironment(Logger logger, Context ctx)
Constructs the environment.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getContentType()
boolean
isExternal()
void
redirect(boolean sessionmode, String newURL)
void
setContentLength(int length)
void
setContentType(String mimeType)
-
Methods inherited from class org.apache.cocoon.environment.AbstractEnvironment
changeContext, commitResponse, extractAction, extractView, finishingProcessing, getAction, getAttribute, getAttributeNames, getContext, getObjectModel, getOutputStream, getOutputStream, getRootContext, getURI, getURIPrefix, getView, globalRedirect, hasAttribute, initComponents, isInternalRedirect, isResponseModified, release, removeAttribute, resolve, resolveURI, resolveURI, setAction, setAttribute, setContext, setContext, setResponseIsNotModified, setStatus, setURIPrefix, setView, startingProcessing, tryResetResponse
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Constructor Detail
-
BackgroundEnvironment
public BackgroundEnvironment(Logger logger, Context ctx) throws MalformedURLException
Constructs the environment.- Parameters:
logger
- a logger for traces.ctx
- the applicationContext
.- Throws:
MalformedURLException
- if the context is ill-formed
-
BackgroundEnvironment
public BackgroundEnvironment(String uri, Map requestParameters, Map requestAttributes, Map requestHeaders, String contextPath, Context ctx, Logger logger, OutputStream os) throws MalformedURLException
Constructs the environment.- Parameters:
uri
- the processed uri.requestParameters
- request parameters.requestAttributes
- request attributes.requestHeaders
- request headers.contextPath
- the application context path.ctx
- the applicationContext
.logger
- a logger for traces.os
- theOutputStream
to send the response to.- Throws:
MalformedURLException
- if the context is ill-formed
-
-
Method Detail
-
redirect
public void redirect(boolean sessionmode, String newURL) throws IOException
- Throws:
IOException
-
setContentType
public void setContentType(String mimeType)
-
getContentType
public String getContentType()
-
setContentLength
public void setContentLength(int length)
-
isExternal
public boolean isExternal()
-
-