org.deegree.commons.utils
Class TempFileManager

java.lang.Object
  extended by org.deegree.commons.utils.TempFileManager

public class TempFileManager
extends Object

Manages temporary file system resources for deegree.

This class ensures that each running deegree application (e.g. a service webapp or a command line application) uses a separate directory for storing temporary resources. For webapps, the webapp context name is used to build a unique directory.

Version:
$Revision: 21335 $, $Date: 2009-12-09 12:21:09 +0100 (Wed, 09 Dec 2009) $
Author:
Markus Schneider, last edited by: $Author: mschneider $

Constructor Summary
TempFileManager()
           
 
Method Summary
static File getBaseDir()
          Returns the base directory to be used for storing temporary files.
static void init()
          Initializes the TempFileManager to use a random String for creating unique temporary file names.
static void init(String contextId)
          Initializes the TempFileManager to use the given String for creating unique temporary file names.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TempFileManager

public TempFileManager()
Method Detail

init

public static void init(String contextId)
Initializes the TempFileManager to use the given String for creating unique temporary file names.

Parameters:
contextId - string to use for the unique file names, must not be null

init

public static void init()
Initializes the TempFileManager to use a random String for creating unique temporary file names.


getBaseDir

public static File getBaseDir()
Returns the base directory to be used for storing temporary files.

Returns:
the base directory, never null


Copyright © 2011. All Rights Reserved.