public interface

ProjectImportTemporaryFiles

com.atlassian.jira.imports.project.util.ProjectImportTemporaryFiles
Known Indirect Subclasses

Class Overview

Single class to handle IO for the Temporary XML partition files.

Summary

Public Methods
void closeWriters()
Closes writers opened with 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 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 Methods

public void closeWriters ()

Closes writers opened with getWriter(String). Must be called once writers are no longer needed.

public void deleteTempFiles ()

Deletes the temporary files held in this object. It is safe to call this method twice as it will check if the files actually exist first.

public String getEncoding ()

Queries the encoding being used by any print writers opened by getWriter(String).

Returns
  • the encoding being used

public File getEntityXmlFile (String entity)

Returns the temporary XML partition file an entity.

Returns
  • the temporary XML partition file an entity.

public File getParentDirectory ()

Returns the temporary directory which is the parent of all the temporary partition files.

Returns
  • the temporary directory which is the parent of all the temporary partition files.

public PrintWriter getWriter (String entity)

Returns a writer capable of writing to an entity file.

Parameters
entity the entity being written
Returns
  • the writer to use to write that entity
Throws
IOException if the file cannot be opened for writing