001package org.apache.archiva.configuration; 002 003/* 004 * Licensed to the Apache Software Foundation (ASF) under one 005 * or more contributor license agreements. See the NOTICE file 006 * distributed with this work for additional information 007 * regarding copyright ownership. The ASF licenses this file 008 * to you under the Apache License, Version 2.0 (the 009 * "License"); you may not use this file except in compliance 010 * with the License. You may obtain a copy of the License at 011 * 012 * http://www.apache.org/licenses/LICENSE-2.0 013 * 014 * Unless required by applicable law or agreed to in writing, 015 * software distributed under the License is distributed on an 016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 017 * KIND, either express or implied. See the License for the 018 * specific language governing permissions and limitations 019 * under the License. 020 */ 021 022/** 023 * Class ProxyConnectorRuleConfiguration. 024 * 025 * @version $Revision$ $Date$ 026 */ 027@SuppressWarnings( "all" ) 028public class ProxyConnectorRuleConfiguration 029 implements java.io.Serializable 030{ 031 032 //--------------------------/ 033 //- Class/Member Variables -/ 034 //--------------------------/ 035 036 /** 037 * 038 * The type if this rule: whiteList, blackList 039 * etc.. 040 * 041 */ 042 private String ruleType; 043 044 /** 045 * 046 * The pattern for this rule: whiteList, blackList 047 * etc.. 048 * 049 */ 050 private String pattern; 051 052 /** 053 * Field proxyConnectors. 054 */ 055 private java.util.List<ProxyConnectorConfiguration> proxyConnectors; 056 057 058 //-----------/ 059 //- Methods -/ 060 //-----------/ 061 062 /** 063 * Method addProxyConnector. 064 * 065 * @param proxyConnectorConfiguration 066 */ 067 public void addProxyConnector( ProxyConnectorConfiguration proxyConnectorConfiguration ) 068 { 069 getProxyConnectors().add( proxyConnectorConfiguration ); 070 } //-- void addProxyConnector( ProxyConnectorConfiguration ) 071 072 /** 073 * Get the pattern for this rule: whiteList, blackList etc.. 074 * 075 * @return String 076 */ 077 public String getPattern() 078 { 079 return this.pattern; 080 } //-- String getPattern() 081 082 /** 083 * Method getProxyConnectors. 084 * 085 * @return List 086 */ 087 public java.util.List<ProxyConnectorConfiguration> getProxyConnectors() 088 { 089 if ( this.proxyConnectors == null ) 090 { 091 this.proxyConnectors = new java.util.ArrayList<ProxyConnectorConfiguration>(); 092 } 093 094 return this.proxyConnectors; 095 } //-- java.util.List<ProxyConnectorConfiguration> getProxyConnectors() 096 097 /** 098 * Get the type if this rule: whiteList, blackList etc.. 099 * 100 * @return String 101 */ 102 public String getRuleType() 103 { 104 return this.ruleType; 105 } //-- String getRuleType() 106 107 /** 108 * Method removeProxyConnector. 109 * 110 * @param proxyConnectorConfiguration 111 */ 112 public void removeProxyConnector( ProxyConnectorConfiguration proxyConnectorConfiguration ) 113 { 114 getProxyConnectors().remove( proxyConnectorConfiguration ); 115 } //-- void removeProxyConnector( ProxyConnectorConfiguration ) 116 117 /** 118 * Set the pattern for this rule: whiteList, blackList etc.. 119 * 120 * @param pattern 121 */ 122 public void setPattern( String pattern ) 123 { 124 this.pattern = pattern; 125 } //-- void setPattern( String ) 126 127 /** 128 * Set associated proxyConnectors configuration. 129 * 130 * @param proxyConnectors 131 */ 132 public void setProxyConnectors( java.util.List<ProxyConnectorConfiguration> proxyConnectors ) 133 { 134 this.proxyConnectors = proxyConnectors; 135 } //-- void setProxyConnectors( java.util.List ) 136 137 /** 138 * Set the type if this rule: whiteList, blackList etc.. 139 * 140 * @param ruleType 141 */ 142 public void setRuleType( String ruleType ) 143 { 144 this.ruleType = ruleType; 145 } //-- void setRuleType( String ) 146 147}