PageRenderTime 21ms CodeModel.GetById 11ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/plugin-module-codegen-engine/src/main/java/com/atlassian/plugins/codegen/modules/common/component/ComponentImportProperties.java

https://bitbucket.org/mmeinhold/amps
Java | 40 lines | 29 code | 8 blank | 3 comment | 1 complexity | 5b00cee66f7ec55184e4afa1daefd2ff MD5 | raw file
 1package com.atlassian.plugins.codegen.modules.common.component;
 2
 3import com.atlassian.plugins.codegen.modules.ClassWithInterfaceProperties;
 4
 5import org.apache.commons.lang.StringUtils;
 6
 7/**
 8 * @since 3.6
 9 */
10public class ComponentImportProperties extends ClassWithInterfaceProperties
11{
12    public static final String FILTER = "FILTER";
13    public static final String FQ_INTERFACE = "FQ_INTERFACE";
14
15    public ComponentImportProperties()
16    {
17        this("MyComponentImportProperties");
18    }
19
20    public ComponentImportProperties(String fqClassName)
21    {
22        if (StringUtils.isNotBlank(fqClassName))
23        {
24            setFullyQualifiedInterface(fqClassName);
25            setModuleKey(StringUtils.uncapitalize(getInterfaceId().getName()));
26        }
27
28        setFilter("");
29    }
30
31    public void setFilter(String filter)
32    {
33        setProperty(FILTER, filter);
34    }
35
36    public String getFilter()
37    {
38        return getProperty(FILTER);
39    }
40}