public class

ProjectImportTemporaryFilesImpl

extends Object
implements ProjectImportTemporaryFiles
java.lang.Object
   ↳ com.atlassian.jira.imports.project.util.ProjectImportTemporaryFilesImpl

Summary

Public Constructors
ProjectImportTemporaryFilesImpl(String projectKey, Set<String> entities, String encoding)
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.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.imports.project.util.ProjectImportTemporaryFiles

Public Constructors

public ProjectImportTemporaryFilesImpl (String projectKey, Set<String> entities, String encoding)

Throws
IOException

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