View Javadoc

1   /*
2    * Copyright 2012 smartics, Kronseder & Reiner GmbH
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package de.smartics.maven.issue.command;
17  
18  /**
19   * Defines a command to authenticate against a issue management system.
20   */
21  public interface LoginCommand extends Command<LoginCommand>
22  {
23    // ********************************* Fields *********************************
24  
25    // --- constants ------------------------------------------------------------
26  
27    // ****************************** Initializer *******************************
28  
29    // ****************************** Inner Classes *****************************
30  
31    /**
32     * Defines parameters for the {@link LoginCommand}.
33     */
34    public static enum Parameter implements CommandParameter<LoginCommand>
35    {
36      // ***************************** Enumeration ******************************
37  
38      // FIXME: Mapping in the implementation...
39  
40      /**
41       * The login name of the user who wants to login.
42       */
43      LOGIN("Bugzilla_login"),
44  
45      /**
46       * The password of the user who wants to login.
47       */
48      PASSWORD("Bugzilla_password");
49  
50      // ******************************** Fields ********************************
51  
52      // --- constants ----------------------------------------------------------
53  
54      // --- members ------------------------------------------------------------
55  
56      /**
57       * The name of the parameter.
58       * <p>
59       * The value of this constant is {@value}.
60       */
61      private final String name;
62  
63      // ***************************** Constructors *****************************
64  
65      /**
66       * Default constructor.
67       *
68       * @param name the name of the parameter.
69       */
70      private Parameter(final String name)
71      {
72        this.name = name;
73      }
74  
75      // ******************************** Methods *******************************
76  
77      // --- init ---------------------------------------------------------------
78  
79      // --- get&set ------------------------------------------------------------
80  
81      /**
82       * Returns the name of the parameter.
83       *
84       * @return the name of the parameter.
85       */
86      public String getName()
87      {
88        return name;
89      }
90  
91      // --- business -----------------------------------------------------------
92  
93      // --- object basics ------------------------------------------------------
94  
95      /**
96       * {@inheritDoc}
97       *
98       * @see java.lang.Enum#toString()
99       */
100     @Override
101     public String toString()
102     {
103       return name;
104     }
105   }
106 
107   // ********************************* Methods ********************************
108 
109   // --- get&set --------------------------------------------------------------
110 
111   // --- business -------------------------------------------------------------
112 
113   // --- object basics --------------------------------------------------------
114 
115 }