org.apache.cocoon.ant
Class DelayedFileSavingEnvironment

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.cocoon.environment.AbstractEnvironment
          extended byorg.apache.cocoon.environment.commandline.AbstractCommandLineEnvironment
              extended byorg.apache.cocoon.ant.DelayedFileSavingEnvironment
All Implemented Interfaces:
Environment, LogEnabled

public class DelayedFileSavingEnvironment
extends AbstractCommandLineEnvironment

A command line file saving environment writing files in a delayed mode. File writing is delayed until the content-type is clear, until then output is written into temporary buffer

Version:
CVS $Id: DelayedFileSavingEnvironment.java 30941 2004-07-29 19:56:58Z vgritsenko $
Author:
huber@apache.org

Field Summary
 
Fields inherited from class org.apache.cocoon.environment.commandline.AbstractCommandLineEnvironment
contentLength, contentType, statusCode
 
Fields inherited from class org.apache.cocoon.environment.AbstractEnvironment
action, objectModel, outputStream, prefix, secureOutputStream, uri, view
 
Constructor Summary
DelayedFileSavingEnvironment(UriType uriType, File context, Map attributes, Map parameters, Map links, DelayedFileOutputStream dfos, Logger log)
          Constructor for the DelayedFileSavingEnvironment object It uses the default view
DelayedFileSavingEnvironment(UriType uriType, String view, File context, Map attributes, Map parameters, Map links, DelayedFileOutputStream dfos, Logger log)
          Constructor for the DelayedFileSavingEnvironment object Cocoon's view is explictly set.
 
Method Summary
 void commitResponse()
          Commit the response
 File getDestDir()
          Gets the destDir attribute of the DelayedFileSavingEnvironment object
protected  File getFile()
          Gets the filename attribute of the DelayedFileSavingEnvironment object
 void setDestDir(File destDir)
          Sets the destDir attribute of the DelayedFileSavingEnvironment object
 
Methods inherited from class org.apache.cocoon.environment.commandline.AbstractCommandLineEnvironment
getContentType, getOutputStream, getStatus, isExternal, redirect, setContentLength, setContentType, setStatus
 
Methods inherited from class org.apache.cocoon.environment.AbstractEnvironment
extractAction, extractView, finishingProcessing, getAction, getAttribute, getAttributeNames, getObjectModel, getURI, getURIPrefix, getView, isInternalRedirect, isResponseModified, removeAttribute, setAction, setAttribute, setResponseIsNotModified, setURI, 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
 

Constructor Detail

DelayedFileSavingEnvironment

public DelayedFileSavingEnvironment(UriType uriType,
                                    File context,
                                    Map attributes,
                                    Map parameters,
                                    Map links,
                                    DelayedFileOutputStream dfos,
                                    Logger log)
                             throws MalformedURLException
Constructor for the DelayedFileSavingEnvironment object It uses the default view

Parameters:
context - Cocoon's context directory
attributes - Description of Parameter
links - Description of Parameter
log - Logger of this environment
parameters - Description of Parameter
uriType - uri of this environment
dfos - Description of Parameter
Throws:
MalformedURLException - Description of Exception

DelayedFileSavingEnvironment

public DelayedFileSavingEnvironment(UriType uriType,
                                    String view,
                                    File context,
                                    Map attributes,
                                    Map parameters,
                                    Map links,
                                    DelayedFileOutputStream dfos,
                                    Logger log)
                             throws MalformedURLException
Constructor for the DelayedFileSavingEnvironment object Cocoon's view is explictly set.

Parameters:
context - Cocoon's context directory
attributes - Description of Parameter
links - Description of Parameter
log - Logger of this environment
parameters - Description of Parameter
uriType - uri of this environment
view - Description of Parameter
dfos - Description of Parameter
Throws:
MalformedURLException - Description of Exception
Method Detail

setDestDir

public void setDestDir(File destDir)
Sets the destDir attribute of the DelayedFileSavingEnvironment object

Parameters:
destDir - The new destDir value

getDestDir

public File getDestDir()
Gets the destDir attribute of the DelayedFileSavingEnvironment object

Returns:
The destDir value

commitResponse

public void commitResponse()
                    throws IOException
Commit the response

Specified by:
commitResponse in interface Environment
Overrides:
commitResponse in class AbstractEnvironment
Throws:
IOException - Description of Exception

getFile

protected File getFile()
Gets the filename attribute of the DelayedFileSavingEnvironment object

Returns:
The filename value


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.