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
A simple implementation of
org.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
ConstructorDescriptionBackgroundEnvironment
(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
Modifier and TypeMethodDescriptionboolean
void
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 Details
-
BackgroundEnvironment
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 Details
-
redirect
- Throws:
IOException
-
setContentType
-
getContentType
-
setContentLength
-
isExternal
-