PageRenderTime 26ms CodeModel.GetById 21ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/plugin-module-codegen-engine/src/main/java/com/atlassian/plugins/codegen/modules/stash/ssh/SshScmRequestHandlerProperties.java

https://bitbucket.org/mmeinhold/amps
Java | 49 lines | 38 code | 11 blank | 0 comment | 0 complexity | 220a1d68ea5bb3a25e272163756239d7 MD5 | raw file
 1package com.atlassian.plugins.codegen.modules.stash.ssh;
 2
 3import com.atlassian.plugins.codegen.ClassId;
 4import com.atlassian.plugins.codegen.modules.BasicClassModuleProperties;
 5
 6import static com.atlassian.plugins.codegen.ClassId.fullyQualified;
 7
 8public class SshScmRequestHandlerProperties extends BasicClassModuleProperties
 9{
10
11    public static final String FQ_HANDLER_CLASSNAME = "FQ_HANDLER_CLASSNAME";
12    public static final String HANDLER_CLASSNAME = "HANDLER_CLASSNAME";
13    public static final String FQ_REQUEST_CLASSNAME = "FQ_REQUEST_CLASSNAME";
14    public static final String REQUEST_CLASSNAME = "REQUEST_CLASSNAME";
15
16    private ClassId requestClassId;
17
18    public SshScmRequestHandlerProperties(String fqRequestClassName)
19    {
20        this(fqRequestClassName, fqRequestClassName + "Handler");
21    }
22
23    private SshScmRequestHandlerProperties(String fqRequestClassName, String fqHandlerClassName)
24    {
25        super(fqHandlerClassName);
26        setFullyQualifiedHandlerClassname(fqHandlerClassName);
27        setFullyQualifiedRequestClassname(fqRequestClassName);
28    }
29
30    public void setFullyQualifiedRequestClassname(String fqName)
31    {
32        requestClassId = fullyQualified(fqName);
33        setProperty(FQ_REQUEST_CLASSNAME, fqName);
34        setProperty(REQUEST_CLASSNAME, requestClassId.getName());
35    }
36
37    public void setFullyQualifiedHandlerClassname(String fqName)
38    {
39        ClassId handlerClassId = fullyQualified(fqName);
40        setProperty(FQ_HANDLER_CLASSNAME, fqName);
41        setProperty(HANDLER_CLASSNAME, handlerClassId.getName());
42    }
43
44    public ClassId getRequestClassId()
45    {
46        return requestClassId;
47    }
48
49}