Class TempFileNameGenerator
- java.lang.Object
-
- org.pentaho.reporting.libraries.repository.file.TempFileNameGenerator
-
- All Implemented Interfaces:
NameGenerator
public class TempFileNameGenerator extends java.lang.Object implements NameGenerator
Todo: Document me! Date: 15.04.2010 Time: 16:35:38- Author:
- Thomas Morgner.
-
-
Constructor Summary
Constructors Constructor Description TempFileNameGenerator(FileContentLocation fileContentLocation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
generateName(java.lang.String nameHint, java.lang.String mimeType)
Generates a new name for the location.
-
-
-
Constructor Detail
-
TempFileNameGenerator
public TempFileNameGenerator(FileContentLocation fileContentLocation)
-
-
Method Detail
-
generateName
public java.lang.String generateName(java.lang.String nameHint, java.lang.String mimeType) throws ContentIOException
Generates a new name for the location. The name-generator may use both the name-hint and mimetype to compute the new name.- Specified by:
generateName
in interfaceNameGenerator
- Parameters:
nameHint
- the name hint, usually a identifier for the new filename (can be null).mimeType
- the mime type of the new filename. Usually used to compute a suitable file-suffix.- Returns:
- the generated name, never null.
- Throws:
ContentIOException
- if the name could not be generated for any reason.
-
-