Package com.atlassian.jira.template
Class DefaultJiraHomeTemplatesRevertService
java.lang.Object
com.atlassian.jira.template.DefaultJiraHomeTemplatesRevertService
- All Implemented Interfaces:
JiraHomeTemplatesRevertService
public class DefaultJiraHomeTemplatesRevertService
extends Object
implements JiraHomeTemplatesRevertService
- Since:
- v8.14
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final String
protected static final String
protected static final String
static final String
protected static final String
protected final String
protected final String
protected final String
protected static final String
protected static final String
protected static final String
protected final String
protected final String
protected final String
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultJiraHomeTemplatesRevertService
(FileStores fileStores, com.atlassian.plugin.PluginAccessor pluginAccessor) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
cleanupDir
(String tempDir) void
Copies all the bundled email templates (single and batched) into {SharedJiraHome}/data/templates directory.protected void
copyUrlToFile
(URL url, File destination) protected boolean
protected File
protected org.springframework.core.io.support.PathMatchingResourcePatternResolver
protected void
renameTempDir
(String source, String destination) void
Copies all the bundled email templates (single and batched) into {SharedJiraHome}/data/templates directory.
-
Field Details
-
TEMP_DIR
- See Also:
-
REVERT_TEMP_DIR
- See Also:
-
SHARE_PLUGIN_KEY
- See Also:
-
BATCH_EMAILS_PLUGIN_KEY
- See Also:
-
BATCH_EMAILS_SOURCE_PATH
- See Also:
-
BATCH_EMAILS_TARGET_PATH
- See Also:
-
BATCH_EMAILS_TARGET_PATH_TEMP
- See Also:
-
BATCH_EMAILS_REVERT_TEMP
- See Also:
-
SHARE_PLUGIN_RESOURCES
-
BATCH_EMAILS_PLUGIN_RESOURCES
-
templatesTargetLocation
-
batchTemplatesTargetLocation
-
templatesTargetLocationTemp
-
batchTemplatesTargetLocationTemp
-
templatesRevertTemp
-
batchTemplatesRevertTemp
-
-
Constructor Details
-
DefaultJiraHomeTemplatesRevertService
public DefaultJiraHomeTemplatesRevertService(FileStores fileStores, com.atlassian.plugin.PluginAccessor pluginAccessor)
-
-
Method Details
-
copyMissingBundledTemplatesIntoJiraHome
Description copied from interface:JiraHomeTemplatesRevertService
Copies all the bundled email templates (single and batched) into {SharedJiraHome}/data/templates directory. It doesn't override any already existing files. This operation doesn't clear template caches as it's called from Upgrade Task.- Specified by:
copyMissingBundledTemplatesIntoJiraHome
in interfaceJiraHomeTemplatesRevertService
- Throws:
IOException
- as it involves operations on Files
-
revertTemplates
Description copied from interface:JiraHomeTemplatesRevertService
Copies all the bundled email templates (single and batched) into {SharedJiraHome}/data/templates directory. Overrides any already existing files. Clears template caches after the copying is done.- Specified by:
revertTemplates
in interfaceJiraHomeTemplatesRevertService
- Throws:
IOException
- as it involves operations on Files
-
dirExists
-
renameTempDir
- Throws:
IOException
-
cleanupDir
- Throws:
IOException
-
newResourceResolver
protected org.springframework.core.io.support.PathMatchingResourcePatternResolver newResourceResolver() -
newFile
-
copyUrlToFile
- Throws:
IOException
-