public class DefaultJiraHomeTemplatesRevertService extends Object implements JiraHomeTemplatesRevertService
Modifier and Type | Field and Description |
---|---|
protected static String |
BATCH_EMAILS_PLUGIN_KEY |
protected static List<String> |
BATCH_EMAILS_PLUGIN_RESOURCES |
protected static String |
BATCH_EMAILS_REVERT_TEMP |
protected static String |
BATCH_EMAILS_SOURCE_PATH |
static String |
BATCH_EMAILS_TARGET_PATH |
protected static String |
BATCH_EMAILS_TARGET_PATH_TEMP |
protected String |
batchTemplatesRevertTemp |
protected String |
batchTemplatesTargetLocation |
protected String |
batchTemplatesTargetLocationTemp |
protected static String |
REVERT_TEMP_DIR |
protected static String |
SHARE_PLUGIN_KEY |
protected static List<String> |
SHARE_PLUGIN_RESOURCES |
protected static String |
TEMP_DIR |
protected String |
templatesRevertTemp |
protected String |
templatesTargetLocation |
protected String |
templatesTargetLocationTemp |
Constructor and Description |
---|
DefaultJiraHomeTemplatesRevertService(FileStores fileStores,
com.atlassian.plugin.PluginAccessor pluginAccessor) |
Modifier and Type | Method and Description |
---|---|
protected void |
cleanupDir(String tempDir) |
void |
copyMissingBundledTemplatesIntoJiraHome()
Copies all the bundled email templates (single and batched) into {SharedJiraHome}/data/templates directory.
|
protected void |
copyUrlToFile(URL url,
File destination) |
protected boolean |
dirExists(String path) |
protected File |
newFile(String targetDir,
String targetName) |
protected org.springframework.core.io.support.PathMatchingResourcePatternResolver |
newResourceResolver() |
protected void |
renameTempDir(String source,
String destination) |
void |
revertTemplates()
Copies all the bundled email templates (single and batched) into {SharedJiraHome}/data/templates directory.
|
protected static final String TEMP_DIR
protected static final String REVERT_TEMP_DIR
protected static final String SHARE_PLUGIN_KEY
protected static final String BATCH_EMAILS_PLUGIN_KEY
protected static final String BATCH_EMAILS_SOURCE_PATH
public static final String BATCH_EMAILS_TARGET_PATH
protected static final String BATCH_EMAILS_TARGET_PATH_TEMP
protected static final String BATCH_EMAILS_REVERT_TEMP
protected final String templatesTargetLocation
protected final String batchTemplatesTargetLocation
protected final String templatesTargetLocationTemp
protected final String batchTemplatesTargetLocationTemp
protected final String templatesRevertTemp
protected final String batchTemplatesRevertTemp
public DefaultJiraHomeTemplatesRevertService(FileStores fileStores, com.atlassian.plugin.PluginAccessor pluginAccessor)
public void copyMissingBundledTemplatesIntoJiraHome() throws IOException
JiraHomeTemplatesRevertService
copyMissingBundledTemplatesIntoJiraHome
in interface JiraHomeTemplatesRevertService
IOException
- as it involves operations on Filespublic void revertTemplates() throws IOException
JiraHomeTemplatesRevertService
revertTemplates
in interface JiraHomeTemplatesRevertService
IOException
- as it involves operations on Filesprotected boolean dirExists(String path)
protected void renameTempDir(String source, String destination) throws IOException
IOException
protected void cleanupDir(String tempDir) throws IOException
IOException
protected org.springframework.core.io.support.PathMatchingResourcePatternResolver newResourceResolver()
protected void copyUrlToFile(URL url, File destination) throws IOException
IOException
Copyright © 2002-2022 Atlassian. All Rights Reserved.