public class ProjectImportTemporaryFilesImpl extends Object implements ProjectImportTemporaryFiles
Constructor and Description |
---|
ProjectImportTemporaryFilesImpl(String projectKey,
Set<String> entities,
String encoding) |
Modifier and Type | Method and Description |
---|---|
void |
closeWriters()
Closes writers opened with
ProjectImportTemporaryFiles.getWriter(String) . |
void |
deleteTempFiles()
Deletes the temporary files held in this object.
|
String |
getEncoding()
Queries the encoding being used by any print writers opened by
ProjectImportTemporaryFiles.getWriter(String) . |
File |
getEntityXmlFile(String entity)
Returns the temporary XML partition file an entity.
|
File |
getParentDirectory()
Returns the temporary directory which is the parent of all the temporary partition files.
|
PrintWriter |
getWriter(String entity)
Returns a writer capable of writing to an entity file.
|
public ProjectImportTemporaryFilesImpl(String projectKey, Set<String> entities, String encoding) throws IOException
IOException
public File getEntityXmlFile(String entity)
ProjectImportTemporaryFiles
getEntityXmlFile
in interface ProjectImportTemporaryFiles
public void deleteTempFiles()
ProjectImportTemporaryFiles
deleteTempFiles
in interface ProjectImportTemporaryFiles
public PrintWriter getWriter(String entity) throws IOException
ProjectImportTemporaryFiles
getWriter
in interface ProjectImportTemporaryFiles
entity
- the entity being writtenIOException
- if the file cannot be opened for writingpublic String getEncoding()
ProjectImportTemporaryFiles
ProjectImportTemporaryFiles.getWriter(String)
.getEncoding
in interface ProjectImportTemporaryFiles
public void closeWriters()
ProjectImportTemporaryFiles
ProjectImportTemporaryFiles.getWriter(String)
. Must be called once writers are no longer needed.closeWriters
in interface ProjectImportTemporaryFiles
public File getParentDirectory()
ProjectImportTemporaryFiles
getParentDirectory
in interface ProjectImportTemporaryFiles
Copyright © 2002-2021 Atlassian. All Rights Reserved.