public class ConfluenceTempDirExportFileNameGenerator extends Object implements ExportFileNameGenerator
Constructor and Description |
---|
ConfluenceTempDirExportFileNameGenerator(BootstrapManager bootstrapManager,
String exportDirPrefix,
String extension,
String dateFormat,
String timeFormat) |
Modifier and Type | Method and Description |
---|---|
File |
createExportDirectory()
Create a unique directory within which an export operation can create any necessary files and final output.
|
File |
getExportFile(String... differentiators)
Generate a File that can be used to create an output.
|
String |
getExportFileName(String... differentiators)
Generate a unique file name encompassing the differentiator parameters supplied.
|
public ConfluenceTempDirExportFileNameGenerator(BootstrapManager bootstrapManager, String exportDirPrefix, String extension, String dateFormat, String timeFormat)
public File createExportDirectory() throws IOException
ExportFileNameGenerator
createExportDirectory
in interface ExportFileNameGenerator
IOException
- if there is a problem creating the output directory.public String getExportFileName(String... differentiators)
ExportFileNameGenerator
getExportFileName
in interface ExportFileNameGenerator
differentiators
- 0 or more components that will be used in creation of the file name.public File getExportFile(String... differentiators) throws IOException
ExportFileNameGenerator
Generate a File that can be used to create an output. All necessary parent directories will be created as necessary meaning the supplied File simply has to be opened for writing.
This method is a convenient combination of ExportFileNameGenerator.createExportDirectory()
and
ExportFileNameGenerator.getExportFileName(String...)
.
getExportFile
in interface ExportFileNameGenerator
differentiators
- 0 or more components that will be used in creation of the file name.IOException
- if there is a problem creating the output directory.Copyright © 2003–2020 Atlassian. All rights reserved.