EMMA Coverage Report (generated Sun Sep 18 11:34:27 PHT 2011)
[all classes][org.apache.maven.continuum.web.action.notifier]

COVERAGE SUMMARY FOR SOURCE FILE [JabberGroupNotifierEditAction.java]

nameclass, %method, %block, %line, %
JabberGroupNotifierEditAction.java0%   (0/1)0%   (0/19)0%   (0/179)0%   (0/47)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class JabberGroupNotifierEditAction0%   (0/1)0%   (0/19)0%   (0/179)0%   (0/47)
JabberGroupNotifierEditAction (): void 0%   (0/1)0%   (0/6)0%   (0/2)
getAddress (): String 0%   (0/1)0%   (0/3)0%   (0/1)
getDomainName (): String 0%   (0/1)0%   (0/3)0%   (0/1)
getHost (): String 0%   (0/1)0%   (0/3)0%   (0/1)
getLogin (): String 0%   (0/1)0%   (0/3)0%   (0/1)
getPassword (): String 0%   (0/1)0%   (0/3)0%   (0/1)
getPort (): int 0%   (0/1)0%   (0/3)0%   (0/1)
initConfiguration (Map): void 0%   (0/1)0%   (0/58)0%   (0/10)
isGroup (): boolean 0%   (0/1)0%   (0/3)0%   (0/1)
isSslConnection (): boolean 0%   (0/1)0%   (0/3)0%   (0/1)
setAddress (String): void 0%   (0/1)0%   (0/4)0%   (0/2)
setDomainName (String): void 0%   (0/1)0%   (0/4)0%   (0/2)
setGroup (boolean): void 0%   (0/1)0%   (0/4)0%   (0/2)
setHost (String): void 0%   (0/1)0%   (0/4)0%   (0/2)
setLogin (String): void 0%   (0/1)0%   (0/4)0%   (0/2)
setNotifierConfiguration (ProjectNotifier): void 0%   (0/1)0%   (0/59)0%   (0/11)
setPassword (String): void 0%   (0/1)0%   (0/4)0%   (0/2)
setPort (int): void 0%   (0/1)0%   (0/4)0%   (0/2)
setSslConnection (boolean): void 0%   (0/1)0%   (0/4)0%   (0/2)

1package 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 
22import java.util.HashMap;
23import java.util.Map;
24 
25import org.apache.maven.continuum.model.project.ProjectGroup;
26import org.apache.maven.continuum.model.project.ProjectNotifier;
27import org.apache.maven.continuum.notification.AbstractContinuumNotifier;
28 
29/**
30 * Action that edits a {@link ProjectNotifier} of type 'Jabber' from the
31 * specified {@link ProjectGroup}.
32 *
33 * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
34 * @version $Id: JabberGroupNotifierEditAction.java 766895 2009-04-20 22:02:13Z evenisse $
35 * @plexus.component role="com.opensymphony.xwork2.Action" role-hint="jabberGroupNotifierEdit"
36 * @since 1.1
37 */
38public class JabberGroupNotifierEditAction
39    extends AbstractGroupNotifierEditAction
40{
41    private String host;
42 
43    private int port = 5222;
44 
45    private String login;
46 
47    private String password;
48 
49    private String domainName;
50 
51    private String address;
52 
53    private boolean sslConnection;
54 
55    private boolean group;
56 
57    protected void initConfiguration( Map<String, String> configuration )
58    {
59        host = configuration.get( "host" );
60 
61        if ( configuration.get( "port" ) != null )
62        {
63            port = Integer.parseInt( configuration.get( "port" ) );
64        }
65 
66        login = configuration.get( "login" );
67 
68        password = configuration.get( "password" );
69 
70        domainName = configuration.get( "domainName" );
71 
72        address = configuration.get( AbstractContinuumNotifier.ADDRESS_FIELD );
73 
74        sslConnection = Boolean.valueOf( configuration.get( "sslConnection" ) );
75 
76        group = Boolean.valueOf( configuration.get( "isGroup" ) );
77    }
78 
79    protected void setNotifierConfiguration( ProjectNotifier notifier )
80    {
81        HashMap<String, String> configuration = new HashMap<String, String>();
82 
83        configuration.put( "host", host );
84 
85        configuration.put( "port", String.valueOf( port ) );
86 
87        configuration.put( "login", login );
88 
89        configuration.put( "password", password );
90 
91        configuration.put( "domainName", domainName );
92 
93        configuration.put( AbstractContinuumNotifier.ADDRESS_FIELD, address );
94 
95        configuration.put( "sslConnection", String.valueOf( sslConnection ) );
96 
97        configuration.put( "isGroup", String.valueOf( group ) );
98 
99        notifier.setConfiguration( configuration );
100    }
101 
102    public String getHost()
103    {
104        return host;
105    }
106 
107    public void setHost( String host )
108    {
109        this.host = host;
110    }
111 
112    public int getPort()
113    {
114        return port;
115    }
116 
117    public void setPort( int port )
118    {
119        this.port = port;
120    }
121 
122    public String getLogin()
123    {
124        return login;
125    }
126 
127    public void setLogin( String login )
128    {
129        this.login = login;
130    }
131 
132    public String getPassword()
133    {
134        return password;
135    }
136 
137    public void setPassword( String password )
138    {
139        this.password = password;
140    }
141 
142    public String getDomainName()
143    {
144        return domainName;
145    }
146 
147    public void setDomainName( String domainName )
148    {
149        this.domainName = domainName;
150    }
151 
152    public String getAddress()
153    {
154        return address;
155    }
156 
157    public void setAddress( String address )
158    {
159        this.address = address;
160    }
161 
162    public boolean isSslConnection()
163    {
164        return sslConnection;
165    }
166 
167    public void setSslConnection( boolean sslConnection )
168    {
169        this.sslConnection = sslConnection;
170    }
171 
172    public boolean isGroup()
173    {
174        return group;
175    }
176 
177    public void setGroup( boolean group )
178    {
179        this.group = group;
180    }
181}

[all classes][org.apache.maven.continuum.web.action.notifier]
EMMA 2.0.5312 (C) Vladimir Roubtsov