<!--
/**
 * Copyright (c) 2008 Sonatype, Inc. All rights reserved.
 *
 * This program is licensed to you under the Apache License Version 2.0,
 * and you may not use this file except in compliance with the Apache License Version 2.0.
 * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0.
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the Apache License Version 2.0 is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.
 */
-->

<model>
  <id>settings-security</id>
  
  <name>SecurityConfiguration</name>
  <description>SecurityConfiguration</description>
  
  <defaults>
    <default>
      <key>package</key>
      <value>org.sonatype.plexus.components.sec.dispatcher.model</value>
    </default>
  </defaults>
  
  <classes>

    <class rootElement="true">
      <name>SettingsSecurity</name>
      <version>1.0.0</version>
      <fields>

        <field>
          <name>master</name>
          <version>1.0.0</version>
          <type>String</type>
          <description>encrypted master password</description>
        </field>

        <field>
          <name>relocation</name>
          <version>1.0.0</version>
          <type>String</type>
          <description>reference to the location of the security file</description>
        </field>

        <field>
          <name>configurations</name>
          <version>1.0.0</version>
          <description>named configurations</description>
          <association>
            <type>Config</type>
            <multiplicity>*</multiplicity>
          </association>
        </field>

      </fields>
    </class>

    <class>
      <name>Config</name>
      <version>1.0.0</version>
      <description>Named configuration</description>
      <fields>
      
        <field>
          <name>name</name>
          <type>String</type>
          <required>true</required>
          <version>1.0.0</version>
          <description>name of this configuration</description>
        </field>

        <field>
          <name>properties</name>
          <version>1.0.0</version>
          <description>properties</description>
          <association>
            <type>ConfigProperty</type>
            <multiplicity>*</multiplicity>
          </association>
        </field>
        
      </fields>
    </class>

    <class>
      <name>ConfigProperty</name>
      <version>1.0.0</version>
      <description>generic property - name/value pair</description>
      
      <fields>
      
        <field>
          <name>name</name>
          <type>String</type>
          <required>true</required>
          <version>1.0.0</version>
          <description>name of this property</description>
        </field>

        <field>
          <name>value</name>
          <type>String</type>
          <required>true</required>
          <version>1.0.0</version>
          <description>value of this property</description>
        </field>
        
      </fields>
    </class>

  </classes>
</model>
