PageRenderTime 25ms CodeModel.GetById 13ms app.highlight 7ms RepoModel.GetById 2ms app.codeStats 0ms

/plugin-module-codegen-engine/src/main/java/com/atlassian/plugins/codegen/modules/common/web/WebResourceModuleCreator.java

https://bitbucket.org/mmeinhold/amps
Java | 42 lines | 34 code | 5 blank | 3 comment | 0 complexity | 8a392780cc9b1d8ccad44c342733f3ac MD5 | raw file
 1package com.atlassian.plugins.codegen.modules.common.web;
 2
 3import com.atlassian.plugins.codegen.PluginProjectChangeset;
 4import com.atlassian.plugins.codegen.annotations.BambooPluginModuleCreator;
 5import com.atlassian.plugins.codegen.annotations.ConfluencePluginModuleCreator;
 6import com.atlassian.plugins.codegen.annotations.FeCruPluginModuleCreator;
 7import com.atlassian.plugins.codegen.annotations.JiraPluginModuleCreator;
 8import com.atlassian.plugins.codegen.annotations.RefAppPluginModuleCreator;
 9import com.atlassian.plugins.codegen.annotations.StashPluginModuleCreator;
10import com.atlassian.plugins.codegen.modules.AbstractPluginModuleCreator;
11
12import static com.atlassian.plugins.codegen.modules.Dependencies.MOCKITO_TEST;
13
14/**
15 * @since 3.6
16 */
17@RefAppPluginModuleCreator
18@JiraPluginModuleCreator
19@ConfluencePluginModuleCreator
20@BambooPluginModuleCreator
21@FeCruPluginModuleCreator
22@StashPluginModuleCreator
23public class WebResourceModuleCreator extends AbstractPluginModuleCreator<WebResourceProperties>
24{
25    public static final String MODULE_NAME = "Web Resource";
26    private static final String TEMPLATE_PREFIX = "templates/common/web/webresource/";
27    private static final String PLUGIN_MODULE_TEMPLATE = TEMPLATE_PREFIX + "web-resource-plugin.xml.vtl";
28
29    @Override
30    public PluginProjectChangeset createModule(WebResourceProperties props) throws Exception
31    {
32        return new PluginProjectChangeset()
33            .with(MOCKITO_TEST)
34            .with(createModule(props, PLUGIN_MODULE_TEMPLATE));
35    }
36    
37    @Override
38    public String getModuleName()
39    {
40        return MODULE_NAME;
41    }
42}