* @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()
sb.append( '}' );
return sb.toString();
}
+
+ public int compareTo( PropertyEntry o )
+ {
+ return this.key.compareTo( o.getKey() );
+ }
}
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;
{
configurationPropertiesEntries.add( new PropertyEntry( entry.getKey(), entry.getValue() ) );
}
+ Collections.sort( configurationPropertiesEntries );
return configurationPropertiesEntries;
}
*/
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;
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;