PageRenderTime 29ms CodeModel.GetById 19ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 1ms

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

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