This project has retired. For details please refer to its Attic page.
Source code
001package org.apache.archiva.admin.model.beans;
002/*
003 * Licensed to the Apache Software Foundation (ASF) under one
004 * or more contributor license agreements.  See the NOTICE file
005 * distributed with this work for additional information
006 * regarding copyright ownership.  The ASF licenses this file
007 * to you under the Apache License, Version 2.0 (the
008 * "License"); you may not use this file except in compliance
009 * with the License.  You may obtain a copy of the License at
010 *
011 *   http://www.apache.org/licenses/LICENSE-2.0
012 *
013 * Unless required by applicable law or agreed to in writing,
014 * software distributed under the License is distributed on an
015 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
016 * KIND, either express or implied.  See the License for the
017 * specific language governing permissions and limitations
018 * under the License.
019 */
020
021import org.apache.archiva.admin.model.AbstractRepositoryConnector;
022
023import javax.xml.bind.annotation.XmlRootElement;
024import java.io.Serializable;
025
026/**
027 * @author Olivier Lamy
028 * @since 1.4-M1
029 */
030@XmlRootElement( name = "proxyConnector" )
031public class ProxyConnector
032    extends AbstractRepositoryConnector
033    implements Serializable
034{
035    /**
036     * The order id for UNORDERED
037     */
038    public static final int UNORDERED = 0;
039
040    /**
041     * The policy key {@link #getPolicies()} for error handling.
042     * for details on potential values to this policy key.
043     */
044    public static final String POLICY_PROPAGATE_ERRORS = "propagate-errors";
045
046    /**
047     * The policy key {@link #getPolicies()} for error handling when an artifact is present.
048     * for details on potential values to this policy key.
049     */
050    public static final String POLICY_PROPAGATE_ERRORS_ON_UPDATE = "propagate-errors-on-update";
051
052    /**
053     * The policy key {@link #getPolicies()} for snapshot handling.
054     * for details on potential values to this policy key.
055     */
056    public static final String POLICY_SNAPSHOTS = "snapshots";
057
058    /**
059     * The policy key {@link #getPolicies()} for releases handling.
060     * for details on potential values to this policy key.
061     */
062    public static final String POLICY_RELEASES = "releases";
063
064    /**
065     * The policy key {@link #getPolicies()} for checksum handling.
066     * for details on potential values to this policy key.
067     */
068    public static final String POLICY_CHECKSUM = "checksum";
069
070    /**
071     * The policy key {@link #getPolicies()} for cache-failures handling.
072     * for details on potential values to this policy key.
073     */
074    public static final String POLICY_CACHE_FAILURES = "cache-failures";
075
076    /**
077     *
078     * The order of the proxy connectors. (0 means no order specified)
079     *           .
080     */
081    private int order = 0;
082
083    /**
084     * Get the order of the proxy connectors. (0 means no order specified)
085     * @return int
086     */
087    public int getOrder()
088    {
089        return this.order;
090    }
091
092
093    /**
094     * Set the order of the proxy connectors. (0 means no order specified)
095     * @param order
096     */
097    public void setOrder( int order )
098    {
099        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}