This project has retired. For details please refer to its
Attic page.
ProxyConnectorRule xref
1 package org.apache.archiva.admin.model.beans;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 import org.apache.archiva.proxy.model.ProxyConnectorRuleType;
22
23 import javax.xml.bind.annotation.XmlRootElement;
24 import java.io.Serializable;
25 import java.util.ArrayList;
26 import java.util.List;
27
28
29
30
31
32 @XmlRootElement ( name = "proxyConnectorRule" )
33 public class ProxyConnectorRule
34 implements Serializable
35 {
36 private String pattern;
37
38
39 private ProxyConnectorRuleType proxyConnectorRuleType;
40
41 private List<ProxyConnector> proxyConnectors;
42
43 public ProxyConnectorRule()
44 {
45
46 }
47
48 public ProxyConnectorRule( String pattern, ProxyConnectorRuleType proxyConnectorRuleType,
49 List<ProxyConnector> proxyConnectors )
50 {
51 this.pattern = pattern;
52 this.proxyConnectorRuleType = proxyConnectorRuleType;
53 this.proxyConnectors = proxyConnectors;
54 }
55
56 public String getPattern()
57 {
58 return pattern;
59 }
60
61 public void setPattern( String pattern )
62 {
63 this.pattern = pattern;
64 }
65
66 public ProxyConnectorRuleType getProxyConnectorRuleType()
67 {
68 return proxyConnectorRuleType;
69 }
70
71 public void setProxyConnectorRuleType( ProxyConnectorRuleType proxyConnectorRuleType )
72 {
73 this.proxyConnectorRuleType = proxyConnectorRuleType;
74 }
75
76 public List<ProxyConnector> getProxyConnectors()
77 {
78 if ( this.proxyConnectors == null )
79 {
80 this.proxyConnectors = new ArrayList<>();
81 }
82 return proxyConnectors;
83 }
84
85 public void setProxyConnectors( List<ProxyConnector> proxyConnectors )
86 {
87 this.proxyConnectors = proxyConnectors;
88 }
89
90 @Override
91 public boolean equals( Object o )
92 {
93 if ( this == o )
94 {
95 return true;
96 }
97 if ( !( o instanceof ProxyConnectorRule ) )
98 {
99 return false;
100 }
101
102 ProxyConnectorRule./../../org/apache/archiva/admin/model/beans/ProxyConnectorRule.html#ProxyConnectorRule">ProxyConnectorRule that = (ProxyConnectorRule) o;
103
104 if ( !pattern.equals( that.pattern ) )
105 {
106 return false;
107 }
108 if ( proxyConnectorRuleType != that.proxyConnectorRuleType )
109 {
110 return false;
111 }
112
113 return true;
114 }
115
116 @Override
117 public int hashCode()
118 {
119 int result = pattern.hashCode();
120 result = 31 * result + proxyConnectorRuleType.hashCode();
121 return result;
122 }
123
124 @Override
125 public String toString()
126 {
127 final StringBuilder sb = new StringBuilder();
128 sb.append( "ProxyConnectorRule" );
129 sb.append( "{pattern='" ).append( pattern ).append( '\'' );
130 sb.append( ", proxyConnectorRuleType=" ).append( proxyConnectorRuleType );
131 sb.append( ", proxyConnectors=" ).append( proxyConnectors );
132 sb.append( '}' );
133 return sb.toString();
134 }
135 }