public class AutoExportImpl extends Object implements AutoExport
BASE_FILE_NAME, FIX_INVALID_XML_CHARACTERS
Constructor and Description |
---|
AutoExportImpl(String defaultDir)
Creates an AutoExport that uses the given defaultDir and a datestamp
filename generator.
|
Modifier and Type | Method and Description |
---|---|
String |
exportData()
Attempts to choose the best location for export and exports the existing data
This method tries to export to backup path, then to index path and the to the value
of the "javax.servlet.context.tempdir" property of the passed in ServletContext
|
String |
getExportFilePath()
Tries the JIRA backup path, the configured JIRA index path and the servlet
temp directory as candidate export file paths before failing.
|
protected ExportService |
getExportService() |
protected JiraAuthenticationContext |
getJiraAuthContext() |
protected boolean |
isValidDirectory(String filename) |
public AutoExportImpl(String defaultDir)
defaultDir
- public String exportData() throws IOException, FileExistsException, IllegalXMLCharactersException, com.atlassian.core.AtlassianCoreException
exportData
in interface AutoExport
FileNotFoundException
- if the configured backup directory doesn't exist.FileExistsException
- if the backup filename configured to be used is already taken.IllegalXMLCharactersException
- if the backup data contains illegal characters for XML formatting.IOException
com.atlassian.core.AtlassianCoreException
protected JiraAuthenticationContext getJiraAuthContext()
protected ExportService getExportService()
public String getExportFilePath() throws FileNotFoundException, FileExistsException, IOException
getExportFilePath
in interface AutoExport
FileNotFoundException
- if configuration of each option is a missing dir.FileExistsException
- if there is a file in the way of the generated path.IOException
- if there is a filesystem problem in determining the best path.protected boolean isValidDirectory(String filename)
Copyright © 2002-2015 Atlassian. All Rights Reserved.