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 Stringprotected static final Stringprotected static final Stringstatic final Stringprotected static final Stringprotected final Stringprotected final Stringprotected final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected final Stringprotected final Stringprotected final String -
Constructor Summary
ConstructorsConstructorDescriptionDefaultJiraHomeTemplatesRevertService(FileStores fileStores, com.atlassian.plugin.PluginAccessor pluginAccessor) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcleanupDir(String tempDir) voidCopies all the bundled email templates (single and batched) into {SharedJiraHome}/data/templates directory.protected voidcopyUrlToFile(URL url, File destination) protected booleanprotected Fileprotected org.springframework.core.io.support.PathMatchingResourcePatternResolverprotected voidrenameTempDir(String source, String destination) voidCopies 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:JiraHomeTemplatesRevertServiceCopies 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:
copyMissingBundledTemplatesIntoJiraHomein interfaceJiraHomeTemplatesRevertService- Throws:
IOException- as it involves operations on Files
-
revertTemplates
Description copied from interface:JiraHomeTemplatesRevertServiceCopies 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:
revertTemplatesin 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
-