<?xml version="1.0" ?>
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one
  ~ or more contributor license agreements.  See the NOTICE file
  ~ distributed with this work for additional information
  ~ regarding copyright ownership.  The ASF licenses this file
  ~ to you under the Apache License, Version 2.0 (the
  ~ "License"); you may not use this file except in compliance
  ~ with the License.  You may obtain a copy of the License at
  ~
  ~   http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing,
  ~ software distributed under the License is distributed on an
  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  ~ KIND, either express or implied.  See the License for the
  ~ specific language governing permissions and limitations
  ~ under the License.
  -->

<model>
  <id>configuration</id>
  <name>Configuration</name>
  <description>
    Configuration for the Maven Repository Manager.
  </description>
  <defaults>
    <default>
      <key>package</key>
      <value>org.apache.maven.archiva.configuration</value>
    </default>
  </defaults>
  <classes>
    <class rootElement="true" xml.tagName="configuration">
      <name>Configuration</name>
      <version>1.0.0+</version>
      <fields>
        <field>
          <name>version</name>
          <version>1.0.0+</version>
          <type>String</type>
          <required>true</required>
          <description>This is the version of the configuration format.</description>
        </field>
        <field java.adder="false">
          <description>
 @deprecated use managedRepositories or remoteRepositories instead.
          </description>
          <name>repositories</name>
          <version>1.0.0+</version>
          <association java.generate-add="false"
                       java.generate-remove="false"
                       java.generate-break="false"
                       java.generate-create="false">
            <type>V1RepositoryConfiguration</type>
            <multiplicity>*</multiplicity>
          </association>
        </field>
        <field>
          <name>repositoryGroups</name>
          <version>1.2.0+</version>
          <association>
            <type>RepositoryGroupConfiguration</type>
            <multiplicity>*</multiplicity>
          </association>
          <description>The list of repository groups.</description>
        </field>
        <field>
          <name>managedRepositories</name>
          <version>1.0.0+</version>
          <association>
            <type>ManagedRepositoryConfiguration</type>
            <multiplicity>*</multiplicity>
          </association>
          <description>The list of repositories that this archiva instance uses.</description>
        </field>
        <field>
          <name>remoteRepositories</name>
          <version>1.0.0+</version>
          <association>
            <type>RemoteRepositoryConfiguration</type>
            <multiplicity>*</multiplicity>
          </association>
          <description>The list of repositories that this archiva can retrieve from or publish to.</description>
        </field>
        <field>
          <name>proxyConnectors</name>
          <version>1.0.0+</version>
          <association>
            <type>ProxyConnectorConfiguration</type>
            <multiplicity>*</multiplicity>
          </association>
          <description>The list of proxy connectors for this archiva instance.</description>
        </field>
        <!-- To be introduced later.
        <field>
          <name>syncConnectors</name>
          <version>1.0.0+</version>
          <association>
            <type>SyncConnectorConfiguration</type>
            <multiplicity>*</multiplicity>
          </association>
          <description>The list of sync connectors for this archiva instance.</description>
        </field>
           -->
        <field>
          <name>networkProxies</name>
          <version>1.0.0+</version>
          <association>
            <type>NetworkProxyConfiguration</type>
            <multiplicity>*</multiplicity>
          </association>
          <description>
            The list of network proxies to use for outgoing requests.
          </description>
        </field>
        <field>
          <name>legacyArtifactPaths</name>
          <version>1.1.0+</version>
          <association>
            <type>LegacyArtifactPath</type>
            <multiplicity>*</multiplicity>
          </association>
          <description>
            The list of custom legacy path to artifact.
          </description>
        </field>
        <field>
          <name>repositoryScanning</name>
          <version>1.0.0+</version>
          <association>
            <type>RepositoryScanningConfiguration</type>
            <multiplicity>1</multiplicity>
          </association>
          <description>
            The repository scanning configuration.
          </description>
        </field>
        <field>
          <name>databaseScanning</name>
          <version>1.0.0+</version>
          <association>
            <type>DatabaseScanningConfiguration</type>
            <multiplicity>1</multiplicity>
          </association>
          <description>
            The database scanning configuration.
          </description>
        </field>
        <field>
          <name>webapp</name>
          <version>1.0.0+</version>
          <association>
            <type>WebappConfiguration</type>
            <multiplicity>1</multiplicity>
          </association>
          <description>
            The webapp configuration.
          </description>
        </field>
        <field>
          <name>organisationInfo</name>
          <version>1.1.0+</version>
          <association>
            <type>OrganisationInformation</type>
            <multiplicity>1</multiplicity>
          </association>
          <description>
            The organisation info.
          </description>
        </field>  
      </fields>
      <codeSegments>
        <codeSegment>
          <version>1.2.0+</version>
          <code><![CDATA[
    private java.util.Map<String, java.util.List<String>> repositoryToGroupMap; 
    
    public java.util.Map<String, java.util.List<String>> getRepositoryToGroupMap()
    {
        if ( repositoryGroups != null )
        {
            java.util.Map<String, java.util.List<String>> map = new java.util.HashMap<String, java.util.List<String>>();
            
            for ( RepositoryGroupConfiguration group : (java.util.List<RepositoryGroupConfiguration>) repositoryGroups )
            {
                for ( String repositoryId : (java.util.List<String>) group.getRepositories() )
                {
                    java.util.List<String> groups = map.get( repositoryId );
                    if ( groups == null )
                    {
                        groups = new java.util.ArrayList<String>();
                        map.put( repositoryId, groups );
                    }
                    groups.add( group.getId() );
                }
            }
            
            repositoryToGroupMap = map;
        }
        return repositoryToGroupMap;
    }
    
    public java.util.Map<String, RepositoryGroupConfiguration> getRepositoryGroupsAsMap()
    {
        java.util.Map<String, RepositoryGroupConfiguration> map = new java.util.HashMap<String, RepositoryGroupConfiguration>();
        if ( repositoryGroups != null )
        {
            for ( RepositoryGroupConfiguration group : (java.util.List<RepositoryGroupConfiguration>) repositoryGroups )
            {
                map.put( group.getId(), group );
            }
        }
        return map;
    }
    
    public RepositoryGroupConfiguration findRepositoryGroupById( String id )
    {
        if ( repositoryGroups != null )
        {
            for ( RepositoryGroupConfiguration group : (java.util.List<RepositoryGroupConfiguration>) repositoryGroups )
            {
                if ( group.getId().equals( id ) )
                {
                    return group;
                }
            }
        }
        return null;
    }

    private java.util.Map<String, java.util.List<String>> groupToRepositoryMap;
    	
    public java.util.Map<String, java.util.List<String>> getGroupToRepositoryMap()
    {
    	if ( repositoryGroups != null && managedRepositories != null )
        {
            java.util.Map<String, java.util.List<String>> map = new java.util.HashMap<String, java.util.List<String>>();
            
            for ( ManagedRepositoryConfiguration repo : (java.util.List<ManagedRepositoryConfiguration>) managedRepositories )
            {
                for ( RepositoryGroupConfiguration group : (java.util.List<RepositoryGroupConfiguration>) repositoryGroups )
                {
                    if ( !group.getRepositories().contains( repo.getId() ) )
                    {
                        String groupId = group.getId();
                        java.util.List<String> repos = map.get( groupId );
                        if ( repos == null )
                        {
                            repos = new java.util.ArrayList<String>();
                            map.put( groupId, repos );
                        }
                        repos.add( repo.getId() );
                    }
                }
            }
            groupToRepositoryMap = map;
        }
        return groupToRepositoryMap;
    }
          ]]></code>
        </codeSegment>
        <codeSegment>
          <version>1.0.0+</version>
          <code><![CDATA[
    public java.util.Map<String, NetworkProxyConfiguration> getNetworkProxiesAsMap()
    {
        java.util.Map<String, NetworkProxyConfiguration> map = new java.util.HashMap<String, NetworkProxyConfiguration>();
        if ( networkProxies != null )
        {
            for ( java.util.Iterator<NetworkProxyConfiguration> i = networkProxies.iterator(); i.hasNext(); )
            {
                NetworkProxyConfiguration proxy = i.next();
                map.put( proxy.getId(), proxy );
            }
        }
        return map;
    }

    public java.util.Map<String, java.util.List<ProxyConnectorConfiguration>> getProxyConnectorAsMap()
    {
        java.util.Map<String, java.util.List<ProxyConnectorConfiguration>> proxyConnectorMap =
            new java.util.HashMap<String, java.util.List<ProxyConnectorConfiguration>>();

        java.util.Iterator<ProxyConnectorConfiguration> it = proxyConnectors.iterator();
        while ( it.hasNext() )
        {
            ProxyConnectorConfiguration proxyConfig = it.next();
            String key = proxyConfig.getSourceRepoId();

            java.util.List<ProxyConnectorConfiguration> connectors = proxyConnectorMap.get( key );
            if ( connectors == null )
            {
                connectors = new java.util.ArrayList<ProxyConnectorConfiguration>();
                proxyConnectorMap.put( key, connectors );
            }

            connectors.add( proxyConfig );
            java.util.Collections.sort( connectors,
                org.apache.maven.archiva.configuration.functors.ProxyConnectorConfigurationOrderComparator.getInstance() );
        }

        return proxyConnectorMap;
    }

    public java.util.Map<String, RemoteRepositoryConfiguration> getRemoteRepositoriesAsMap()
    {
        java.util.Map<String, RemoteRepositoryConfiguration> map = new java.util.HashMap<String, RemoteRepositoryConfiguration>();
        if ( remoteRepositories != null )
        {
            for ( java.util.Iterator<RemoteRepositoryConfiguration> i = remoteRepositories.iterator(); i.hasNext(); )
            {
                RemoteRepositoryConfiguration repo = i.next();
                map.put( repo.getId(), repo );
            }
        }
        return map;
    }

    public RemoteRepositoryConfiguration findRemoteRepositoryById( String id )
    {
        if ( remoteRepositories != null )
        {
            for ( java.util.Iterator<RemoteRepositoryConfiguration> i = remoteRepositories.iterator(); i.hasNext(); )
            {
                RemoteRepositoryConfiguration repo = i.next();
                if ( repo.getId().equals( id ) )
                {
                    return repo;
                }
            }
        }
        return null;
    }

    public java.util.Map<String, ManagedRepositoryConfiguration> getManagedRepositoriesAsMap()
    {
        java.util.Map<String, ManagedRepositoryConfiguration> map = new java.util.HashMap<String, ManagedRepositoryConfiguration>();
        if ( managedRepositories != null )
        {
            for ( java.util.Iterator<ManagedRepositoryConfiguration> i = managedRepositories.iterator(); i.hasNext(); )
            {
                ManagedRepositoryConfiguration repo = i.next();
                map.put( repo.getId(), repo );
            }
        }
        return map;
    }

    public ManagedRepositoryConfiguration findManagedRepositoryById( String id )
    {
        if ( managedRepositories != null )
        {
            for ( java.util.Iterator<ManagedRepositoryConfiguration> i = managedRepositories.iterator(); i.hasNext(); )
            {
                ManagedRepositoryConfiguration repo = i.next();
                if ( repo.getId().equals( id ) )
                {
                    return repo;
                }
            }
        }
        return null;
    }
          ]]></code>
        </codeSegment>
      </codeSegments>
    </class>

    <!--
     ____                      _ _
    |  _ \ ___ _ __   ___  ___(_) |_ ___  _ __ _   _
    | |_) / _ \ '_ \ / _ \/ __| | __/ _ \| '__| | | |
    |  _ <  __/ |_) | (_) \__ \ | || (_) | |  | |_| |
    |_| \_\___| .__/ \___/|___/_|\__\___/|_|   \__, |
              |_|                              |___/

    -->

    <class>
      <name>AbstractRepositoryConfiguration</name>
      <version>1.0.0+</version>
      <abstract>true</abstract>
      <fields>
        <field>
          <name>id</name>
          <version>1.0.0+</version>
          <type>String</type>
          <required>true</required>
          <description>
            The repository identifier.
          </description>
        </field>
        <field>
          <name>name</name>
          <version>1.0.0+</version>
          <type>String</type>
          <required>true</required>
          <description>
            The descriptive name of the repository.
          </description>
        </field>
        <field>
          <name>layout</name>
          <version>1.0.0+</version>
          <type>String</type>
          <required>true</required>
          <description>
            The layout of the repository. Valid values are "default" and "legacy".
          </description>
          <!-- TODO: should be able to detect this from the repository (perhaps by metadata at the root) -->
          <defaultValue>default</defaultValue>
        </field>
      </fields>
    </class>
    <class>
      <name>RemoteRepositoryConfiguration</name>
      <version>1.0.0+</version>
      <superClass>AbstractRepositoryConfiguration</superClass>
      <fields>
        <field>
          <name>url</name>
          <version>1.0.0+</version>
          <type>String</type>
          <required>true</required>
          <description>
            The URL for this repository.
          </description>
        </field>
        <field>
          <name>username</name>
          <version>1.0.0+</version>
          <type>String</type>
          <description>
            The Username for this repository.
          </description>
        </field>
        <field>
          <name>password</name>
          <version>1.0.0+</version>
          <type>String</type>
          <description>
            The Password for this repository.
          </description>
        </field>
        <field>
          <name>timeout</name>
          <version>1.0.1+</version>
          <type>int</type>
          <description>
            Timeout in seconds for connections to this repository
          </description>
          <defaultValue>60</defaultValue>
        </field>		
      </fields>
    </class>
    <class>
      <name>ManagedRepositoryConfiguration</name>
      <version>1.0.0+</version>
      <superClass>AbstractRepositoryConfiguration</superClass>
      <fields>
        <field>
          <name>location</name>
          <version>1.0.0+</version>
          <type>String</type>
          <required>true</required>
          <description>
            The file system location for this repository.
          </description>
        </field>
        <field>
          <name>releases</name>
          <version>1.0.0+</version>
          <type>boolean</type>
          <description>True if this repository contains release versioned artifacts.</description>
          <defaultValue>true</defaultValue>
        </field>
        <field>
          <name>snapshots</name>
          <version>1.0.0+</version>
          <type>boolean</type>
          <description>True if this repository contains snapshot versioned artifacts.</description>
          <defaultValue>false</defaultValue>
        </field>
        <field>
          <name>scanned</name>
          <version>1.0.0+</version>
          <type>boolean</type>
          <description>True if this repository should be scanned and processed.</description>
          <defaultValue>true</defaultValue>
        </field>
        <field>
          <name>indexDir</name>
          <version>1.0.0+</version>
          <type>String</type>
          <description>
            The directory for the indexes of this repository.
          </description>
        </field>
        <field>
          <name>refreshCronExpression</name>
          <version>1.0.0+</version>
          <type>String</type>
          <description>
            When to run the refresh task.
            Default is every hour
          </description>
          <defaultValue>0 0 * * * ?</defaultValue>
        </field>
        <field>
          <name>retentionCount</name>
          <version>1.0.0+</version>
          <type>int</type>
          <description>
            The total count of the artifact to be retained for each snapshot.
          </description>
          <defaultValue>2</defaultValue>
        </field>
        <field>
          <name>daysOlder</name>
          <version>1.0.0+</version>
          <type>int</type>
          <description>
            The number of days old which will be the basis for removing a snapshot.
          </description>
          <defaultValue>100</defaultValue>
        </field>
        <field>
          <name>deleteReleasedSnapshots</name>
          <version>1.0.0+</version>
          <type>boolean</type>
          <description>
            True if the released snapshots are to be removed from the repo during repository purge.
          </description>
          <defaultValue>false</defaultValue>
        </field>
      </fields>
    </class>
    <class>
      <name>V1RepositoryConfiguration</name>
      <version>1.0.0+</version>
      <superClass>ManagedRepositoryConfiguration</superClass>
      <fields>
        <field>
          <name>url</name>
          <version>1.0.0+</version>
          <type>String</type>
          <required>true</required>
          <description>
            The URL for this repository.
          </description>
        </field>
        <field>
          <name>indexed</name>
          <version>1.0.0+</version>
          <type>boolean</type>
          <required>true</required>
        </field>
      </fields>
    </class>

    <class>
      <name>LegacyArtifactPath</name>
      <version>1.1.0+</version>
      <fields>
        <field>
          <name>path</name>
          <version>1.1.0+</version>
          <type>String</type>
          <required>true</required>
          <description>
            The legacy path.
          </description>
        </field>
        <field>
          <name>artifact</name>
          <version>1.1.0+</version>
          <type>String</type>
          <required>true</required>
          <description>
            The artifact reference, as " [groupId] : [artifactId] : [version] : [classifier] : [type] ".
          </description>
        </field>
      </fields>
      <codeSegments>
        <codeSegment>
          <version>1.0.0+</version>
            <code><![CDATA[
    public boolean match( String path )
    {
        return path.equals( this.path );
    }

    public String getGroupId()
    {
        return artifact.split( ":" )[0];
	}

    public String getArtifactId()
    {
        return artifact.split( ":" )[1];
	}
        
    public String getVersion()
    {
        return artifact.split( ":" )[2];
	}
    
    public String getClassifier()
    {
		String classifier = artifact.split( ":" )[3];
        return classifier.length() > 0 ? classifier : null;
	}
    
    public String getType()
    {
        return artifact.split( ":" )[4];
    }
       ]]></code>
        </codeSegment>
      </codeSegments>
    </class>
    <class>
      <name>RepositoryGroupConfiguration</name>
      <version>1.2.0+</version>
      <fields>
        <field>
          <name>id</name>
          <version>1.2.0+</version>
          <type>String</type>
          <required>true</required>
          <description>The id of the repository group.</description>
        </field>
        <field>
          <name>repositories</name>
          <version>1.2.0+</version>
          <association>
            <type>String</type>
            <multiplicity>*</multiplicity>
          </association>
          <description>The list of repository ids under the group.</description>          
        </field>
      </fields>
    </class>

    <!--
      ____                            _
     / ___|___  _ __  _ __   ___  ___| |_ ___  _ __ ___
    | |   / _ \| '_ \| '_ \ / _ \/ __| __/ _ \| '__/ __|
    | |__| (_) | | | | | | |  __/ (__| || (_) | |  \__ \
     \____\___/|_| |_|_| |_|\___|\___|\__\___/|_|  |___/

    -->

    <class>
      <name>AbstractRepositoryConnectorConfiguration</name>
      <abstract>true</abstract>
      <version>1.0.0+</version>
      <fields>
        <field>
          <name>sourceRepoId</name>
          <version>1.0.0+</version>
          <type>String</type>
          <required>true</required>
          <description>
            The Repository Source for this connector.
          </description>
        </field>
        <field>
          <name>targetRepoId</name>
          <version>1.0.0+</version>
          <type>String</type>
          <required>true</required>
          <description>
            The Repository Target for this connector.
          </description>
        </field>
        <field>
          <name>proxyId</name>
          <version>1.0.0+</version>
          <type>String</type>
          <description>
            The network proxy ID to use for this connector.
          </description>
        </field>
        <field>
          <name>blackListPatterns</name>
          <version>1.0.0+</version>
          <association>
            <type>String</type>
            <multiplicity>*</multiplicity>
          </association>
          <description>
            The list of blacklisted patterns for this connector.
          </description>
        </field>
        <field>
          <name>whiteListPatterns</name>
          <version>1.0.0+</version>
          <association>
            <type>String</type>
            <multiplicity>*</multiplicity>
          </association>
          <description>
            The list of whitelisted patterns for this connector.
          </description>
        </field>
        <field>
          <name>policies</name>
          <version>1.0.0+</version>
          <type>Map</type>
          <description>Policy configuration for the connector.</description>
          <association xml.mapStyle="inline">
            <type>String</type>
            <multiplicity>*</multiplicity>
          </association>
        </field>
        <field>
          <name>properties</name>
          <version>1.0.0+</version>
          <type>Map</type>
          <description>Configuration for the connector.</description>
          <association xml.mapStyle="inline">
            <type>String</type>
            <multiplicity>*</multiplicity>
          </association>
        </field>
        <field>
          <name>disabled</name>
          <version>1.2+</version>
          <description>
            If the the repository proxy connector is disabled or not
          </description>
          <type>boolean</type>
          <defaultValue>false</defaultValue>
        </field>
      </fields>
      <codeSegments>
        <codeSegment>
          <version>1.0.0+</version>
          <code><![CDATA[
    /**
     * Obtain a specific policy from the underlying connector.
     *
     * @param policyId the policy id to fetch.
     * @param defaultValue the default value for the policy id.
     * @return the configured policy value (or default value if not found).
     */
    public String getPolicy( String policyId, String defaultValue )
    {
        if ( this.getPolicies() == null )
        {
            return null;
        }

        Object value = this.getPolicies().get( policyId );

        if ( value == null )
        {
            return defaultValue;
        }

        return (String) value;
    }
          ]]></code>
        </codeSegment>
      </codeSegments>
    </class>

    <class>
      <superClass>AbstractRepositoryConnectorConfiguration</superClass>
      <name>ProxyConnectorConfiguration</name>
      <version>1.0.0+</version>
      <fields>
        <field>
          <name>order</name>
          <version>1.0.0+</version>
          <description>
            The order of the proxy connectors. (0 means no order specified)
          </description>
          <type>int</type>
          <defaultValue>0</defaultValue>
        </field>
      </fields>
      <codeSegments>
        <codeSegment>
          <version>1.0.0+</version>
          <code><![CDATA[
    /**
     * The order id for UNORDERED
     */
    public static final int UNORDERED = 0;

    /**
     * The policy key {@link #getPolicies()} for error handling.
     * See {@link org.apache.maven.archiva.policies.DownloadErrorPolicy}
     * for details on potential values to this policy key.
     */
    public static final String POLICY_PROPAGATE_ERRORS = "propagate-errors";

    /**
     * The policy key {@link #getPolicies()} for error handling when an artifact is present.
     * See {@link org.apache.maven.archiva.policies.DownloadErrorPolicy}
     * for details on potential values to this policy key.
     */
    public static final String POLICY_PROPAGATE_ERRORS_ON_UPDATE = "propagate-errors-on-update";

    /**
     * The policy key {@link #getPolicies()} for snapshot handling.
     * See {@link org.apache.maven.archiva.policies.SnapshotsPolicy}
     * for details on potential values to this policy key.
     */
    public static final String POLICY_SNAPSHOTS = "snapshots";

    /**
     * The policy key {@link #getPolicies()} for releases handling.
     * See {@link org.apache.maven.archiva.policies.ReleasesPolicy}
     * for details on potential values to this policy key.
     */
    public static final String POLICY_RELEASES = "releases";

    /**
     * The policy key {@link #getPolicies()} for checksum handling.
     * See {@link org.apache.maven.archiva.policies.ChecksumPolicy}
     * for details on potential values to this policy key.
     */
    public static final String POLICY_CHECKSUM = "checksum";

    /**
     * The policy key {@link #getPolicies()} for cache-failures handling.
     * See {@link org.apache.maven.archiva.policies.CachedFailuresPolicy}
     * for details on potential values to this policy key.
     */
    public static final String POLICY_CACHE_FAILURES = "cache-failures";
          ]]></code>
        </codeSegment>
      </codeSegments>
    </class>

    <class>
      <superClass>AbstractRepositoryConnectorConfiguration</superClass>
      <name>SyncConnectorConfiguration</name>
      <abstract>true</abstract>
      <version>1.0.0+</version>
      <fields>
        <field>
          <name>cronExpression</name>
          <version>1.0.0+</version>
          <type>String</type>
          <description>When to run the sync mechanism. Default is every hour on the hour.</description>
          <defaultValue>0 0 * * * ?</defaultValue>
        </field>
        <field>
          <name>method</name>
          <version>1.0.0+</version>
          <type>String</type>
          <description>The type of synchronization to use.</description>
          <defaultValue>rsync</defaultValue>
        </field>
      </fields>
    </class>

    <!--
     ____                _
    |  _ \ _ __ _____  _(_) ___  ___
    | |_) | '__/ _ \ \/ / |/ _ \/ __|
    |  __/| | | (_) >  <| |  __/\__ \
    |_|   |_|  \___/_/\_\_|\___||___/

    -->

    <class>
      <name>NetworkProxyConfiguration</name>
      <version>1.0.0+</version>
      <fields>
        <field>
          <name>id</name>
          <version>1.0.0+</version>
          <type>String</type>
          <description>
            The ID for this proxy.
          </description>
        </field>
        <field>
          <name>protocol</name>
          <version>1.0.0+</version>
          <description>
            The network protocol to use with this proxy: "http", "socks-4"
          </description>
          <type>String</type>
          <required>true</required>
          <defaultValue>http</defaultValue>
        </field>
        <field>
          <name>host</name>
          <version>1.0.0+</version>
          <description>
            The proxy host.
          </description>
          <type>String</type>
          <required>true</required>
        </field>
        <field>
          <name>port</name>
          <version>1.0.0+</version>
          <description>
            The proxy port.
          </description>
          <type>int</type>
          <defaultValue>8080</defaultValue>
        </field>
        <field>
          <name>username</name>
          <version>1.0.0+</version>
          <description>
            The proxy user.
          </description>
          <type>String</type>
        </field>
        <field>
          <name>password</name>
          <version>1.0.0+</version>
          <description>
            The proxy password.
          </description>
          <type>String</type>
        </field>
      </fields>
    </class>

    <!--
     ____                        _
    / ___|  ___ __ _ _ __  _ __ (_)_ __   __ _
    \___ \ / __/ _` | '_ \| '_ \| | '_ \ / _` |
     ___) | (_| (_| | | | | | | | | | | | (_| |
    |____/ \___\__,_|_| |_|_| |_|_|_| |_|\__, |
                                         |___/

    -->
    <class>
      <name>RepositoryScanningConfiguration</name>
      <version>1.0.0+</version>
      <fields>
        <field>
          <name>fileTypes</name>
          <version>1.0.0+</version>
          <required>true</required>
          <association>
            <type>FileType</type>
            <multiplicity>*</multiplicity>
          </association>
          <description>
            The FileTypes for the repository scanning configuration.
          </description>
        </field>
        <field>
          <name>knownContentConsumers</name>
          <version>1.0.0+</version>
          <required>true</required>
          <association>
            <type>String</type>
            <multiplicity>*</multiplicity>
          </association>
          <description>
            The list of active consumers IDs for known content.
          </description>
        </field>
        <field>
          <name>invalidContentConsumers</name>
          <version>1.0.0+</version>
          <required>true</required>
          <association>
            <type>String</type>
            <multiplicity>*</multiplicity>
          </association>
          <description>
            The list of active consumer IDs for invalid content.
          </description>
        </field>
      </fields>
    </class>
    <class>
      <name>FileType</name>
      <version>1.0.0+</version>
      <description>The FileType object</description>
      <fields>
        <field>
          <name>id</name>
          <version>1.0.0+</version>
          <required>true</required>
          <type>String</type>
        </field>
        <field>
          <name>patterns</name>
          <version>1.0.0+</version>
          <required>true</required>
          <association>
            <type>String</type>
            <multiplicity>*</multiplicity>
          </association>
        </field>
      </fields>
    </class>
    <class>
      <name>DatabaseScanningConfiguration</name>
      <version>1.0.0+</version>
      <description>
        The scanning configuration for unprocessed ArchivaArtifact database objects.
      </description>
      <fields>
        <field>
          <name>cronExpression</name>
          <version>1.0.0+</version>
          <type>String</type>
          <description>When to run the database scanning mechanism. Default is every two hours on the hour.
          </description>
          <defaultValue>0 0 0/2 * * ?</defaultValue>
        </field>
        <field>
          <name>unprocessedConsumers</name>
          <version>1.0.0+</version>
          <required>true</required>
          <association>
            <type>String</type>
            <multiplicity>*</multiplicity>
          </association>
          <description>
            The list of consumers for the unprocessed ArchivaArtifact database objects.
          </description>
        </field>
        <field>
          <name>cleanupConsumers</name>
          <version>1.0.0+</version>
          <required>true</required>
          <association>
            <type>String</type>
            <multiplicity>*</multiplicity>
          </association>
          <description>
            The list of consumers for previously processed ArchivaArtifact database
            objects that no longer exist on the filesystem, and might need to
            undergo a cleanup.
          </description>
        </field>
      </fields>
    </class>

    <!--
    __        _______ ____    _    ____  ____
    \ \      / / ____| __ )  / \  |  _ \|  _ \
     \ \ /\ / /|  _| |  _ \ / _ \ | |_) | |_) |
      \ V  V / | |___| |_) / ___ \|  __/|  __/
       \_/\_/  |_____|____/_/   \_\_|   |_|

    -->

    <class>
      <name>OrganisationInformation</name>
      <version>1.1.0+</version>
      <description>
        The organisation information settings.
      </description>
      <fields>
        <field>
          <name>name</name>
          <description>name of the organisation</description>
          <version>1.1.0+</version>
          <association>
            <type>String</type>
          </association>
        </field>
        <field>
          <name>url</name>
          <description>name of the organisation</description>
          <version>1.1.0+</version>
          <association>
            <type>String</type>
          </association>
        </field>
        <field>
          <name>logoLocation</name>
          <description>name of the organisation</description>
          <version>1.1.0+</version>
          <association>
            <type>String</type>
          </association>
        </field>
      </fields>
    </class>

    <class>
      <name>WebappConfiguration</name>
      <version>1.0.0+</version>
      <description>
        The webapp configuration settings.
      </description>
      <fields>
        <field>
          <name>ui</name>
          <description>options for altering the ui presentation</description>
          <version>1.0.0+</version>
          <association>
            <type>UserInterfaceOptions</type>
          </association>
        </field>
      </fields>
    </class>

    <class>
      <name>UserInterfaceOptions</name>
      <version>1.0.0+</version>
      <description>
        The user interface configuration settings.
      </description>
      <fields>
        <field>
          <name>showFindArtifacts</name>
          <description>true if find artifacts should be enabled</description>
          <version>1.0.0+</version>
          <type>boolean</type>
          <defaultValue>true</defaultValue>
        </field>
        <field>
          <name>appletFindEnabled</name>
          <description>true if applet behavior for find artifacts should be enabled</description>
          <version>1.0.0+</version>
          <type>boolean</type>
          <defaultValue>true</defaultValue>
        </field>
      </fields>
    </class>

  </classes>
</model>


