View Javadoc

1   package org.apache.maven.continuum.web.action.notifier;
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  import org.apache.maven.continuum.model.project.ProjectGroup;
23  import org.apache.maven.continuum.model.project.ProjectNotifier;
24  
25  import java.util.HashMap;
26  import java.util.Map;
27  
28  /**
29   * Action that edits a {@link ProjectNotifier} of type 'Wagon' from the
30   * specified {@link ProjectGroup}.
31   *
32   * @author <a href="mailto:hisidro@exist.com">Henry Isidro</a>
33   * @plexus.component role="com.opensymphony.xwork2.Action" role-hint="wagonGroupNotifierEdit"
34   */
35  
36  public class WagonGroupNotifierEditAction
37      extends AbstractGroupNotifierEditAction
38  {
39      private String url;
40  
41      private String id;
42  
43      protected void initConfiguration( Map<String, String> configuration )
44      {
45          url = configuration.get( "url" );
46          id = configuration.get( "id" );
47      }
48  
49      protected void setNotifierConfiguration( ProjectNotifier notifier )
50      {
51          HashMap<String, String> configuration = new HashMap<String, String>();
52  
53          configuration.put( "url", url );
54  
55          configuration.put( "id", id );
56  
57          notifier.setConfiguration( configuration );
58      }
59  
60      public String getUrl()
61      {
62          return url;
63      }
64  
65      public void setUrl( String url )
66      {
67          this.url = url;
68      }
69  
70      public String getId()
71      {
72          return id;
73      }
74  
75      public void setId( String id )
76      {
77          this.id = id;
78      }
79  }