]> source.dussan.org Git - archiva.git/commitdiff
added webapp configuration section, default setting for default-archiva.xml object...
authorJesse McConnell <jmcconnell@apache.org>
Thu, 24 May 2007 15:17:03 +0000 (15:17 +0000)
committerJesse McConnell <jmcconnell@apache.org>
Thu, 24 May 2007 15:17:03 +0000 (15:17 +0000)
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@541319 13f79535-47bb-0310-9956-ffa450edef68

archiva-base/archiva-configuration/src/main/mdo/configuration.mdo
archiva-base/archiva-configuration/src/main/resources/org/apache/maven/archiva/configuration/default-archiva.xml
archiva-base/archiva-configuration/src/test/conf/repository-manager.xml
archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/ArchivaConfigurationTest.java

index b0c91c5e9aa05d761d1cbd3b12473a7b4ffe6056..5e168af446b10fd6b52d826e071ad80d498a3976 100644 (file)
           <description>
             The database scanning configuration.
           </description>
+        </field>\r
+        <field>\r
+          <name>webapp</name>\r
+          <version>1.0.0+</version>\r
+          <association>\r
+            <type>WebappConfiguration</type>\r
+            <multiplicity>1</multiplicity>\r
+          </association>\r
+          <description>\r
+            The webapp configuration.\r
+          </description>\r
         </field>
       </fields>
       <codeSegments>
       </fields>
     </class>
     \r
+    <!--    \r
+    __        _______ ____    _    ____  ____  \r
+    \ \      / / ____| __ )  / \  |  _ \|  _ \ \r
+     \ \ /\ / /|  _| |  _ \ / _ \ | |_) | |_) |\r
+      \ V  V / | |___| |_) / ___ \|  __/|  __/ \r
+       \_/\_/  |_____|____/_/   \_\_|   |_|    \r
+                                               \r
+    -->\r
+    \r
+    <class>\r
+      <name>WebappConfiguration</name>\r
+      <version>1.0.0+</version>\r
+      <description>\r
+        The webapp configuration settings.\r
+      </description>\r
+      <fields>\r
+        <field>\r
+          <name>ui</name>\r
+          <description>options for altering the ui presentation</description>\r
+          <version>1.0.0+</version>\r
+          <association>\r
+            <type>UserInterfaceOptions</type>\r
+          </association>          \r
+        </field>\r
+      </fields>\r
+    </class>\r
+    \r
+    <class>\r
+      <name>UserInterfaceOptions</name>\r
+      <version>1.0.0+</version>\r
+      <description>\r
+        The user interface configuration settings.\r
+      </description>\r
+      <fields>\r
+        <field>\r
+          <name>showFindArtifacts</name>\r
+          <description>true if find artifacts should be enabled</description>\r
+          <version>1.0.0+</version>       \r
+          <type>boolean</type>  \r
+          <defaultValue>false</defaultValue>\r
+        </field>\r
+      </fields>\r
+    </class>\r
+    \r
   </classes>\r
 </model>\r
 \r
index d553961674a1642db648c93d7f839355a30805a4..b2ddcddea333a1c6b63a09724dadf071f76a17a5 100644 (file)
     </cleanupConsumers>
   </databaseScanning>
 
+  <webapp>
+    <ui>
+      <showFindArtifacts>false</showFindArtifacts>
+    </ui>
+  </webapp>
+
 </configuration>
index f2ff08a0513e0e149bfecdda67fe511da211dd08..a0ffdf7c6912e150b98dac863a1059bf22771f10 100644 (file)
     </cleanupConsumers>
   </databaseScanning>
 
+  <webapp>
+    <ui>
+      <showFindArtifacts>false</showFindArtifacts>
+    </ui>
+  </webapp>
+
 </configuration>
index 81bbba1a42962e69d2f66066577cda2e161f2222..87852e9d82880c36ea37679285eb723cbf5dc1dc 100644 (file)
@@ -81,6 +81,13 @@ public class ArchivaConfigurationTest extends PlexusTestCase
         assertEquals( "check managed repositories", "internal", repository.getId() );
         assertEquals( "check managed repositories", "default", repository.getLayout() );
         assertTrue( "check managed repositories", repository.isIndexed() );
+        
+        WebappConfiguration webapp = (WebappConfiguration) configuration.getWebapp();
+        assertNotNull( "check webapp", webapp );
+        
+        UserInterfaceOptions ui = (UserInterfaceOptions) webapp.getUi();
+        assertNotNull( "check webapp ui", ui  );
+        assertFalse( "check showFindArtifacts", ui.isShowFindArtifacts() );
     }
 
     public void testGetConfigurationSystemOverride() throws Exception