1 package org.apache.archiva.admin.model.beans; 2 /* 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 */ 20 21 import org.apache.archiva.admin.model.AbstractRepositoryConnector; 22 23 import javax.xml.bind.annotation.XmlRootElement; 24 import java.io.Serializable; 25 26 /** 27 * @author Olivier Lamy 28 * @since 1.4-M1 29 */ 30 @XmlRootElement( name = "proxyConnector" ) 31 public class ProxyConnector 32 extends AbstractRepositoryConnector 33 implements Serializable 34 { 35 /** 36 * The order id for UNORDERED 37 */ 38 public static final int UNORDERED = 0; 39 40 /** 41 * The policy key {@link #getPolicies()} for error handling. 42 * for details on potential values to this policy key. 43 */ 44 public static final String POLICY_PROPAGATE_ERRORS = "propagate-errors"; 45 46 /** 47 * The policy key {@link #getPolicies()} for error handling when an artifact is present. 48 * for details on potential values to this policy key. 49 */ 50 public static final String POLICY_PROPAGATE_ERRORS_ON_UPDATE = "propagate-errors-on-update"; 51 52 /** 53 * The policy key {@link #getPolicies()} for snapshot handling. 54 * for details on potential values to this policy key. 55 */ 56 public static final String POLICY_SNAPSHOTS = "snapshots"; 57 58 /** 59 * The policy key {@link #getPolicies()} for releases handling. 60 * for details on potential values to this policy key. 61 */ 62 public static final String POLICY_RELEASES = "releases"; 63 64 /** 65 * The policy key {@link #getPolicies()} for checksum handling. 66 * for details on potential values to this policy key. 67 */ 68 public static final String POLICY_CHECKSUM = "checksum"; 69 70 /** 71 * The policy key {@link #getPolicies()} for cache-failures handling. 72 * for details on potential values to this policy key. 73 */ 74 public static final String POLICY_CACHE_FAILURES = "cache-failures"; 75 76 /** 77 * 78 * The order of the proxy connectors. (0 means no order specified) 79 * . 80 */ 81 private int order = 0; 82 83 /** 84 * Get the order of the proxy connectors. (0 means no order specified) 85 * @return int 86 */ 87 public int getOrder() 88 { 89 return this.order; 90 } 91 92 93 /** 94 * Set the order of the proxy connectors. (0 means no order specified) 95 * @param order 96 */ 97 public void setOrder( int order ) 98 { 99 this.order = order; 100 } 101 102 @Override 103 public String toString() 104 { 105 final StringBuilder sb = new StringBuilder(); 106 sb.append( "ProxyConnector" ); 107 sb.append( "{order=" ).append( order ); 108 sb.append( '}' ); 109 sb.append( super.toString() ); 110 return sb.toString(); 111 } 112 }