summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2013-02-12 17:12:30 +0000
committerOlivier Lamy <olamy@apache.org>2013-02-12 17:12:30 +0000
commit600d8258c14a62ca3117cf5cb6daad2fa68dfc9d (patch)
tree5ff750e062e5bab63212c5d531e469b4872246f9
parent46900eea43b08e488f71acc1bfbd9451cdda8d79 (diff)
downloadarchiva-600d8258c14a62ca3117cf5cb6daad2fa68dfc9d.tar.gz
archiva-600d8258c14a62ca3117cf5cb6daad2fa68dfc9d.zip
ordering
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1445273 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/PropertyEntry.java11
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RedbackRuntimeConfiguration.java2
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java2
3 files changed, 12 insertions, 3 deletions
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/PropertyEntry.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/PropertyEntry.java
index e218d6d25..c13bf8fc9 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/PropertyEntry.java
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/PropertyEntry.java
@@ -27,12 +27,12 @@ import java.io.Serializable;
* @author Olivier Lamy
* @since 1.4-M3
*/
-@XmlRootElement( name = "propertyEntry" )
+@XmlRootElement(name = "propertyEntry")
public class PropertyEntry
- implements Serializable
+ implements Serializable, Comparable<PropertyEntry>
{
private String key;
-
+
private String value;
public PropertyEntry()
@@ -76,4 +76,9 @@ public class PropertyEntry
sb.append( '}' );
return sb.toString();
}
+
+ public int compareTo( PropertyEntry o )
+ {
+ return this.key.compareTo( o.getKey() );
+ }
}
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RedbackRuntimeConfiguration.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RedbackRuntimeConfiguration.java
index 95257d681..99c8b893b 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RedbackRuntimeConfiguration.java
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RedbackRuntimeConfiguration.java
@@ -21,6 +21,7 @@ package org.apache.archiva.admin.model.beans;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -122,6 +123,7 @@ public class RedbackRuntimeConfiguration
{
configurationPropertiesEntries.add( new PropertyEntry( entry.getKey(), entry.getValue() ) );
}
+ Collections.sort( configurationPropertiesEntries );
return configurationPropertiesEntries;
}
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java
index e6694dc90..a4e9fd304 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java
@@ -19,6 +19,7 @@ package org.apache.archiva.rest.services;
*/
import org.apache.archiva.admin.model.RepositoryAdminException;
+import org.apache.archiva.admin.model.beans.PropertyEntry;
import org.apache.archiva.admin.model.beans.RedbackRuntimeConfiguration;
import org.apache.archiva.admin.model.beans.LdapConfiguration;
import org.apache.archiva.admin.model.runtime.RedbackRuntimeConfigurationAdmin;
@@ -46,6 +47,7 @@ import javax.naming.InvalidNameException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
+import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Properties;