View Javadoc

1   package org.apache.maven.plugins.patchtracker.tracking;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *   http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  /**
23   * @author Olivier Lamy
24   */
25  public class PatchTrackerRequest
26  {
27      private String url;
28  
29      private String userName;
30  
31      private String password;
32  
33      private String patchContent;
34  
35      private String summary;
36  
37      private String description;
38  
39      /**
40       * used for updating a patch in the patch tracker, (an issue id for jira: MNG-1234)
41       */
42      private String patchId;
43  
44      /**
45       * mandatory for jira: 1 for bug
46       */
47      private String patchType = "1";
48  
49      /**
50       * mandatory on some jira: 3 for major
51       */
52      private String patchPriority;
53  
54      public PatchTrackerRequest()
55      {
56          // no op
57      }
58  
59      public String getUrl()
60      {
61          return url;
62      }
63  
64      public PatchTrackerRequest setUrl( String url )
65      {
66          this.url = url;
67          return this;
68      }
69  
70      public String getUserName()
71      {
72          return userName;
73      }
74  
75      public PatchTrackerRequest setUserName( String userName )
76      {
77          this.userName = userName;
78          return this;
79      }
80  
81      public String getPassword()
82      {
83          return password;
84      }
85  
86      public PatchTrackerRequest setPassword( String password )
87      {
88          this.password = password;
89          return this;
90      }
91  
92      public String getPatchContent()
93      {
94          return patchContent;
95      }
96  
97      public PatchTrackerRequest setPatchContent( String patchContent )
98      {
99          this.patchContent = patchContent;
100         return this;
101     }
102 
103     public String getSummary()
104     {
105         return summary;
106     }
107 
108     public PatchTrackerRequest setSummary( String summary )
109     {
110         this.summary = summary;
111         return this;
112     }
113 
114     public String getDescription()
115     {
116         return description;
117     }
118 
119     public PatchTrackerRequest setDescription( String description )
120     {
121         this.description = description;
122         return this;
123     }
124 
125     public String getPatchId()
126     {
127         return patchId;
128     }
129 
130     public PatchTrackerRequest setPatchId( String patchId )
131     {
132         this.patchId = patchId;
133         return this;
134     }
135 
136     public String getPatchType()
137     {
138         return patchType;
139     }
140 
141     public PatchTrackerRequest setPatchType( String patchType )
142     {
143         this.patchType = patchType;
144         return this;
145     }
146 
147     public String getPatchPriority()
148     {
149         return patchPriority;
150     }
151 
152     public PatchTrackerRequest setPatchPriority( String patchPriority )
153     {
154         this.patchPriority = patchPriority;
155         return this;
156     }
157 
158     @Override
159     public String toString()
160     {
161         final StringBuilder sb = new StringBuilder();
162         sb.append( "PatchTrackerRequest" );
163         sb.append( "{url='" ).append( url ).append( '\'' );
164         sb.append( ", userName='" ).append( userName ).append( '\'' );
165         sb.append( ", password='" ).append( "******" ).append( '\'' );
166         sb.append( ", patchContent='" ).append( patchContent ).append( '\'' );
167         sb.append( ", summary='" ).append( summary ).append( '\'' );
168         sb.append( ", description='" ).append( description ).append( '\'' );
169         sb.append( ", patchId='" ).append( patchId ).append( '\'' );
170         sb.append( ", patchPriority='" ).append( patchPriority ).append( '\'' );
171         sb.append( '}' );
172         return sb.toString();
173     }
174 }