From cd0daf51edd2805cdaef032ab5e96553fb672165 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Wed, 06 Jan 2010 22:39:35 +0000
Subject: [PATCH] Fix for issue 4417 (control panel manage tasks not showing tasks log message) Display the log messages of the selected task. Improve how the panel handle the modification in the contents of the task and when the user modifies the displayed attributes in the table. Before this changes the selection of the table was always lost, with this changes the previously selected task(s) are still selected. Improve some labeling in the 'View' menu.
---
opends/src/guitools/org/opends/guitools/controlpanel/datamodel/CustomSearchResult.java | 22 ++++++++++------------
1 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/opends/src/guitools/org/opends/guitools/controlpanel/datamodel/CustomSearchResult.java b/opends/src/guitools/org/opends/guitools/controlpanel/datamodel/CustomSearchResult.java
index ad540cf..be4ed69 100644
--- a/opends/src/guitools/org/opends/guitools/controlpanel/datamodel/CustomSearchResult.java
+++ b/opends/src/guitools/org/opends/guitools/controlpanel/datamodel/CustomSearchResult.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Copyright 2008-2009 Sun Microsystems, Inc.
+ * Copyright 2008-2010 Sun Microsystems, Inc.
*/
package org.opends.guitools.controlpanel.datamodel;
@@ -32,10 +32,8 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
-import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
@@ -70,7 +68,7 @@
public class CustomSearchResult implements Comparable<CustomSearchResult> {
private Name name;
private String dn;
- private Map<String, Set<Object>> attributes;
+ private Map<String, List<Object>> attributes;
private SortedSet<String> attrNames;
private String toString;
private int hashCode;
@@ -84,7 +82,7 @@
public CustomSearchResult(String dn)
{
this.dn = dn;
- attributes = new HashMap<String, Set<Object>>();
+ attributes = new HashMap<String, List<Object>>();
attrNames = new TreeSet<String>();
toString = calculateToString();
hashCode = calculateHashCode();
@@ -131,17 +129,17 @@
}
dn = buf.toString();
- attributes = new HashMap<String, Set<Object>>();
+ attributes = new HashMap<String, List<Object>>();
attrNames = new TreeSet<String>();
Attributes attrs = sr.getAttributes();
if (attrs != null)
{
- NamingEnumeration en = attrs.getAll();
+ NamingEnumeration<?> en = attrs.getAll();
while (en.hasMore()) {
Attribute attr = (Attribute)en.next();
String name = attr.getID();
attrNames.add(name);
- Set<Object> values = new HashSet<Object>();
+ List<Object> values = new ArrayList<Object>();
for (int i=0; i<attr.size(); i++)
{
Object v = attr.get(i);
@@ -172,11 +170,11 @@
* @return the values for a given attribute. It returns an empty Set if
* the attribute is not defined.
*/
- public Set<Object> getAttributeValues(String name) {
- Set<Object> values = attributes.get(name.toLowerCase());
+ public List<Object> getAttributeValues(String name) {
+ List<Object> values = attributes.get(name.toLowerCase());
if (values == null)
{
- values = Collections.emptySet();
+ values = Collections.emptyList();
}
return values;
}
@@ -258,7 +256,7 @@
* @param attrName the name of the attribute.
* @param values the values for the attribute.
*/
- public void set(String attrName, Set<Object> values)
+ public void set(String attrName, List<Object> values)
{
attrNames.add(attrName);
attrName = attrName.toLowerCase();
--
Gitblit v1.10.0