You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juddi.apache.org by al...@apache.org on 2013/03/29 03:43:38 UTC

svn commit: r1462384 [2/4] - in /juddi/branches/juddi-3.2.x/juddi-gui: src/java/org/apache/juddi/webconsole/ src/java/org/apache/juddi/webconsole/hub/ src/java/org/apache/juddi/webconsole/hub/builders/ web/ web/META-INF/ web/ajax/ web/js/

Added: juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/hub/builders/Builders.java
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/hub/builders/Builders.java?rev=1462384&view=auto
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/hub/builders/Builders.java (added)
+++ juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/hub/builders/Builders.java Fri Mar 29 02:43:36 2013
@@ -0,0 +1,579 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.apache.juddi.webconsole.hub.builders;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import org.apache.commons.lang.StringEscapeUtils;
+import org.apache.juddi.webconsole.PostBackConstants;
+import org.apache.juddi.webconsole.hub.UddiHub;
+import org.uddi.api_v3.*;
+
+/**
+ *
+ * @author Alex O'Ree
+ */
+public class Builders {
+
+    /**
+     * important - regex to separate postback names from indexes, do not remove
+     * or alter
+     */
+    static final Pattern p = Pattern.compile("[a-zA-Z]");
+
+    /**
+     * Returns a new map, filtering the original map by key string starts with
+     *
+     * @param map
+     * @param pattern
+     * @return
+     */
+    public static Map MapFilter(Map map, String pattern) {
+        Map ret = new HashMap();
+        Iterator it = map.keySet().iterator();
+        while (it.hasNext()) {
+            String key = (String) it.next();
+            if (key.startsWith(pattern)) {
+                ret.put(key, map.get(key));
+            }
+        }
+        return ret;
+    }
+
+    /**
+     * Prefix should be contactXName
+     *
+     * @param map
+     * @param prefix
+     * @return
+     */
+    public static List<PersonName> BuildContactPersonNames(Map map, String prefix) {
+        List<PersonName> ret = new ArrayList();
+        Iterator it = map.keySet().iterator();
+        List<String> processedIndexes = new ArrayList<String>();
+        while (it.hasNext()) {
+            String key = (String) it.next();
+            String filteredkey = key.replace(prefix, "");
+            Matcher match = p.matcher(filteredkey);
+            if (match.find()) {
+                String index = filteredkey.substring(0, match.start());
+                if (!processedIndexes.contains(index)) {
+                    PersonName pn = new PersonName();
+                    String[] t = (String[]) map.get(prefix + index + PostBackConstants.LANG);
+                    if (t[0] == null || t[0].equalsIgnoreCase(PostBackConstants.CLICK_TO_EDIT)) {
+                        pn.setLang(null);
+                    } else {
+                        pn.setLang(t[0]);
+                    }
+                    t = (String[]) map.get(prefix + index + PostBackConstants.VALUE);
+                    pn.setValue(t[0]);
+                    ret.add(pn);
+                    processedIndexes.add(index);
+                }
+            } else {
+                throw new IllegalArgumentException("Invalid form data posted");
+            }
+        }
+        return ret;
+    }
+
+    public static List<OverviewDoc> BuildOverviewDocs(Map map, String prefix) {
+        List<OverviewDoc> ret = new ArrayList<OverviewDoc>();
+        Iterator it = map.keySet().iterator();
+        List<String> processedIndexes = new ArrayList<String>();
+        while (it.hasNext()) {
+            String key = (String) it.next();
+            String filteredkey = key.replace(prefix, "");
+            Matcher match = p.matcher(filteredkey);
+            if (match.find()) {
+                String index = filteredkey.substring(0, match.start());
+                if (!processedIndexes.contains(index)) {
+                    OverviewDoc pn = new OverviewDoc();
+                    pn.setOverviewURL(new OverviewURL());
+                    String[] t = (String[]) map.get(prefix + index + PostBackConstants.VALUE);
+                    pn.getOverviewURL().setValue(t[0]);
+                    t = (String[]) map.get(prefix + index + PostBackConstants.TYPE);
+                    pn.getOverviewURL().setUseType(t[0]);
+                    pn.getDescription().addAll(BuildDescription(MapFilter(map, prefix + index + PostBackConstants.DESCRIPTION), prefix + index + PostBackConstants.DESCRIPTION));
+                    ret.add(pn);
+                    processedIndexes.add(index);
+                }
+            } else {
+                throw new IllegalArgumentException("Invalid form data posted");
+            }
+        }
+        return ret;
+    }
+
+    public static List<Phone> BuildPhone(Map map, String prefix) {
+        List<Phone> ret = new ArrayList();
+        Iterator it = map.keySet().iterator();
+        List<String> processedIndexes = new ArrayList<String>();
+        while (it.hasNext()) {
+            String key = (String) it.next();
+            String filteredkey = key.replace(prefix, "");
+            Matcher match = p.matcher(filteredkey);
+            if (match.find()) {
+                String index = filteredkey.substring(0, match.start());
+                if (!processedIndexes.contains(index)) {
+                    Phone pn = new Phone();
+                    String[] t = (String[]) map.get(prefix + index + PostBackConstants.TYPE);
+                    pn.setUseType(t[0]);
+                    t = (String[]) map.get(prefix + index + PostBackConstants.VALUE);
+                    pn.setValue(t[0]);
+                    ret.add(pn);
+                    processedIndexes.add(index);
+                }
+            } else {
+                throw new IllegalArgumentException("Invalid form data posted");
+            }
+        }
+        return ret;
+    }
+
+    public static Contact BuildSingleContact(Map m, String prefix) {
+        Contact c = new Contact();
+        String[] t = (String[]) m.get(prefix + PostBackConstants.TYPE);
+        c.setUseType(t[0]);
+        c.getPersonName().addAll(BuildContactPersonNames(MapFilter(m, prefix + PostBackConstants.NAME), prefix + PostBackConstants.NAME));
+        c.getDescription().addAll(BuildDescription(MapFilter(m, prefix + PostBackConstants.DESCRIPTION), prefix + PostBackConstants.DESCRIPTION));
+        c.getEmail().addAll(BuildEmail(MapFilter(m, prefix + PostBackConstants.EMAIL), prefix + PostBackConstants.EMAIL));
+        c.getPhone().addAll(BuildPhone(MapFilter(m, prefix + PostBackConstants.PHONE), prefix + PostBackConstants.PHONE));
+        c.getAddress().addAll(BuildAddress(MapFilter(m, prefix + PostBackConstants.ADDRESS), prefix + PostBackConstants.ADDRESS));
+        return c;
+    }
+
+    public static List<Name> BuildNames(Map map, String prefix) {
+        List<Name> ret = new ArrayList();
+        Iterator it = map.keySet().iterator();
+        List<String> processedIndexes = new ArrayList<String>();
+        while (it.hasNext()) {
+            String key = (String) it.next();
+            String filteredkey = key.replace(prefix, "");
+            Matcher match = p.matcher(filteredkey);
+            if (match.find()) {
+                String index = filteredkey.substring(0, match.start());
+                if (!processedIndexes.contains(index)) {
+                    Name pn = new Name();
+                    String[] t = (String[]) map.get(prefix + index + PostBackConstants.LANG);
+                    if (t[0].equalsIgnoreCase(PostBackConstants.CLICK_TO_EDIT)) {
+                        pn.setLang(null);
+                    } else {
+                        pn.setLang(t[0]);
+                    }
+                    t = (String[]) map.get(prefix + index + PostBackConstants.VALUE);
+                    pn.setValue(t[0]);
+                    ret.add(pn);
+                    processedIndexes.add(index);
+                }
+            } else {
+                throw new IllegalArgumentException("Invalid form data posted");
+            }
+        }
+        return ret;
+    }
+
+    public static CategoryBag BuildCatBag(Map map, String prefix) {
+        CategoryBag ret = new CategoryBag();
+        Iterator it = map.keySet().iterator();
+        List<String> processedIndexes = new ArrayList<String>();
+        while (it.hasNext()) {
+            String key = (String) it.next();
+            String filteredkey = key.replace(prefix, "");
+            Matcher match = p.matcher(filteredkey);
+            if (match.find()) {
+                String index = filteredkey.substring(0, match.start());
+                if (!processedIndexes.contains(index)) {
+                    KeyedReference pn = new KeyedReference();
+                    String[] t = (String[]) map.get(prefix + index + PostBackConstants.VALUE);
+                    pn.setTModelKey(t[0]);
+                    t = (String[]) map.get(prefix + index + PostBackConstants.KEYNAME);
+                    pn.setKeyName(t[0]);
+                    t = (String[]) map.get(prefix + index + PostBackConstants.KEYVALUE);
+                    pn.setKeyValue(t[0]);
+                    ret.getKeyedReference().add(pn);
+                    processedIndexes.add(index);
+                }
+            } else {
+                throw new IllegalArgumentException("Invalid form data posted");
+            }
+        }
+        return ret;
+    }
+
+    public static IdentifierBag BuildIdentBag(Map map, String prefix) {
+        IdentifierBag ret = new IdentifierBag();
+        ret.getKeyedReference().addAll(BuildKeyedReference(map, prefix));
+        if (ret.getKeyedReference().isEmpty()) {
+            return null;
+        }
+        return ret;
+    }
+
+    public static DiscoveryURLs BuildDisco(Map map, String prefix) {
+        DiscoveryURLs list = new DiscoveryURLs();
+        Iterator it = map.keySet().iterator();
+        List<String> processedIndexes = new ArrayList<String>();
+        while (it.hasNext()) {
+            String key = (String) it.next();
+            String filteredkey = key.replace(prefix, "");
+            Matcher match = p.matcher(filteredkey);
+            if (match.find()) {
+                String index = filteredkey.substring(0, match.start());
+                if (!processedIndexes.contains(index)) {
+                    DiscoveryURL pn = new DiscoveryURL();
+                    String[] t = (String[]) map.get(prefix + index + PostBackConstants.TYPE);
+                    pn.setUseType(t[0]);
+                    t = (String[]) map.get(prefix + index + PostBackConstants.VALUE);
+                    pn.setValue(t[0]);
+                    list.getDiscoveryURL().add(pn);
+                    processedIndexes.add(index);
+                }
+            } else {
+                throw new IllegalArgumentException("Invalid form data posted");
+            }
+        }
+        if (list.getDiscoveryURL().isEmpty()) {
+            return null;
+        }
+        return list;
+    }
+
+    public static List<Address> BuildAddress(Map map, String prefix) {
+        List<Address> ret = new ArrayList();
+        Iterator it = map.keySet().iterator();
+        List<String> processedIndexes = new ArrayList<String>();
+        while (it.hasNext()) {
+            String key = (String) it.next();
+            String filteredkey = key.replace(prefix, "");
+            Matcher match = p.matcher(filteredkey);
+            if (match.find()) {
+                String index = filteredkey.substring(0, match.start());
+                if (!processedIndexes.contains(index)) {
+                    Address pn = new Address();
+                    String[] t = (String[]) map.get(prefix + index + PostBackConstants.LANG);
+                    if (t[0] == null || t[0].equalsIgnoreCase(PostBackConstants.CLICK_TO_EDIT)) {
+                        pn.setLang(null);
+                    } else {
+                        pn.setLang(t[0]);
+                    }
+                    t = (String[]) map.get(prefix + index + PostBackConstants.TYPE);
+                    if (t[0] == null || t[0].equalsIgnoreCase(PostBackConstants.CLICK_TO_EDIT)) {
+                        pn.setUseType(null);
+                    } else {
+                        pn.setUseType(t[0]);
+                    }
+                    t = (String[]) map.get(prefix + index + PostBackConstants.SORTCODE);
+                    if (t[0] == null || t[0].equalsIgnoreCase(PostBackConstants.CLICK_TO_EDIT)) {
+                        pn.setSortCode(null);
+                    } else {
+                        pn.setSortCode(t[0]);
+                    }
+                    t = (String[]) map.get(prefix + index + PostBackConstants.KEYNAME);
+                    if (t[0] == null || t[0].equalsIgnoreCase(PostBackConstants.CLICK_TO_EDIT)) {
+                        pn.setTModelKey(null);
+                    } else {
+                        pn.setTModelKey(t[0]);
+                    }
+                    pn.getAddressLine().addAll(BuildAddressLine(MapFilter(map, prefix + index + PostBackConstants.ADDRESSLINE), prefix + index + PostBackConstants.ADDRESSLINE));
+                    ret.add(pn);
+                    processedIndexes.add(index);
+                }
+            } else {
+                throw new IllegalArgumentException("Invalid form data posted");
+            }
+        }
+        return ret;
+    }
+
+    public static List<KeyedReferenceGroup> BuildKeyedReferenceGroup(Map map, String prefix) {
+        List<KeyedReferenceGroup> ret = new ArrayList<KeyedReferenceGroup>();
+        Iterator it = map.keySet().iterator();
+        List<String> processedIndexes = new ArrayList<String>();
+        while (it.hasNext()) {
+            String key = (String) it.next();
+            String filteredkey = key.replace(prefix, "");
+            Matcher match = p.matcher(filteredkey);
+            if (match.find()) {
+                String index = filteredkey.substring(0, match.start());
+                if (!processedIndexes.contains(index)) {
+                    KeyedReferenceGroup pn = new KeyedReferenceGroup();
+                    String[] t = (String[]) map.get(prefix + index + PostBackConstants.VALUE);
+                    pn.setTModelKey(t[0]);
+                    pn.getKeyedReference().addAll(BuildKeyedReference(MapFilter(map, prefix + index + PostBackConstants.KEY_REF), prefix + index + PostBackConstants.KEY_REF));
+                    ret.add(pn);
+                    processedIndexes.add(index);
+                }
+            } else {
+                throw new IllegalArgumentException("Invalid form data posted");
+            }
+        }
+        return ret;
+    }
+
+    /**
+     * contactX
+     *
+     * @param map
+     * @return
+     */
+    public static Contacts BuildContacts(Map map) {
+        Contacts cb = new Contacts();
+        Map contactdata = MapFilter(map, PostBackConstants.CONTACT_PREFIX);
+        Iterator it = contactdata.keySet().iterator();
+        List<String> processedIndexes = new ArrayList<String>();
+        while (it.hasNext()) {
+            String key = (String) it.next();
+            key = key.replace(PostBackConstants.CONTACT_PREFIX, "");
+            Matcher match = p.matcher(key);
+            if (match.find()) {
+                String index = key.substring(0, match.start());
+                if (!processedIndexes.contains(index)) {
+                    cb.getContact().add(BuildSingleContact(MapFilter(contactdata, PostBackConstants.CONTACT_PREFIX + index), PostBackConstants.CONTACT_PREFIX + index));
+                    processedIndexes.add(index);
+                }
+            } else {
+                throw new IllegalArgumentException("Invalid form data posted");
+            }
+        }
+        if (cb.getContact().isEmpty()) {
+            return null;
+        }
+        return cb;
+    }
+
+    public static List<Email> BuildEmail(Map map, String prefix) {
+        List<Email> list = new ArrayList<Email>();
+        Iterator it = map.keySet().iterator();
+        List<String> processedIndexes = new ArrayList<String>();
+        while (it.hasNext()) {
+            String key = (String) it.next();
+            String filteredkey = key.replace(prefix, "");
+            Matcher match = p.matcher(filteredkey);
+            if (match.find()) {
+                String index = filteredkey.substring(0, match.start());
+                if (!processedIndexes.contains(index)) {
+                    Email pn = new Email();
+                    String[] t = (String[]) map.get(prefix + index + PostBackConstants.TYPE);
+                    pn.setUseType(t[0]);
+                    t = (String[]) map.get(prefix + index + PostBackConstants.VALUE);
+                    pn.setValue(t[0]);
+                    list.add(pn);
+                    processedIndexes.add(index);
+                }
+            } else {
+                throw new IllegalArgumentException("Invalid form data posted");
+            }
+        }
+        return list;
+    }
+
+    public static List<Description> BuildDescription(Map map, String prefix) {
+        List<Description> ret = new ArrayList();
+        Iterator it = map.keySet().iterator();
+        List<String> processedIndexes = new ArrayList<String>();
+        while (it.hasNext()) {
+            String key = (String) it.next();
+            String filteredkey = key.replace(prefix, "");
+            Matcher match = p.matcher(filteredkey);
+            if (match.find()) {
+                String index = filteredkey.substring(0, match.start());
+                if (!processedIndexes.contains(index)) {
+                    Description pn = new Description();
+                    String[] t = (String[]) map.get(prefix + index + PostBackConstants.LANG);
+                    if (t[0] == null || t[0].equalsIgnoreCase(PostBackConstants.CLICK_TO_EDIT)) {
+                        pn.setLang(null);
+                    } else {
+                        pn.setLang(t[0]);
+                    }
+                    t = (String[]) map.get(prefix + index + PostBackConstants.VALUE);
+                    pn.setValue(t[0]);
+                    ret.add(pn);
+                    processedIndexes.add(index);
+                }
+            } else {
+                throw new IllegalArgumentException("Invalid form data posted");
+            }
+        }
+        return ret;
+    }
+
+    public static List<KeyedReference> BuildKeyedReference(Map map, String prefix) {
+        List<KeyedReference> ret = new ArrayList<KeyedReference>();
+        Iterator it = map.keySet().iterator();
+        List<String> processedIndexes = new ArrayList<String>();
+        while (it.hasNext()) {
+            String key = (String) it.next();
+            String filteredkey = key.replace(prefix, "");
+            Matcher match = p.matcher(filteredkey);
+            if (match.find()) {
+                String index = filteredkey.substring(0, match.start());
+                if (!processedIndexes.contains(index)) {
+                    KeyedReference pn = new KeyedReference();
+                    String[] t = (String[]) map.get(prefix + index + PostBackConstants.VALUE);
+                    pn.setTModelKey(t[0]);
+                    t = (String[]) map.get(prefix + index + PostBackConstants.KEYNAME);
+                    pn.setKeyName(t[0]);
+                    t = (String[]) map.get(prefix + index + PostBackConstants.KEYVALUE);
+                    pn.setKeyValue(t[0]);
+                    ret.add(pn);
+                    processedIndexes.add(index);
+                }
+            } else {
+                throw new IllegalArgumentException("Invalid form data posted");
+            }
+        }
+        return ret;
+    }
+
+    public static List<AddressLine> BuildAddressLine(Map map, String prefix) {
+        List<AddressLine> ret = new ArrayList();
+        Iterator it = map.keySet().iterator();
+        List<String> processedIndexes = new ArrayList<String>();
+        while (it.hasNext()) {
+            String key = (String) it.next();
+            String filteredkey = key.replace(prefix, "");
+            Matcher match = p.matcher(filteredkey);
+            if (match.find()) {
+                String index = filteredkey.substring(0, match.start());
+                if (!processedIndexes.contains(index)) {
+                    AddressLine pn = new AddressLine();
+                    String[] t = (String[]) map.get(prefix + index + PostBackConstants.VALUE);
+                    pn.setValue(t[0]);
+                    t = (String[]) map.get(prefix + index + PostBackConstants.KEYNAME);
+                    pn.setKeyName(t[0]);
+                    t = (String[]) map.get(prefix + index + PostBackConstants.KEYVALUE);
+                    pn.setKeyValue(t[0]);
+                    ret.add(pn);
+                    processedIndexes.add(index);
+                }
+            } else {
+                throw new IllegalArgumentException("Invalid form data posted");
+            }
+        }
+        return ret;
+    }
+
+    public static List<BindingTemplate> BuildBindingTemplates(Map map, String prefix) {
+        List<BindingTemplate> ret = new ArrayList();
+        Iterator it = map.keySet().iterator();
+        List<String> processedIndexes = new ArrayList<String>();
+        while (it.hasNext()) {
+            String key = (String) it.next();
+            String filteredkey = key.replace(prefix, "");
+            Matcher match = p.matcher(filteredkey);
+            if (match.find()) {
+                String index = filteredkey.substring(0, match.start());
+                if (!processedIndexes.contains(index)) {
+                    BindingTemplate pn = new BindingTemplate();
+
+                    String[] t = (String[]) map.get(prefix + index + PostBackConstants.BINDINGKEY);
+                    if (t != null && t.length > 0) {
+                        pn.setBindingKey(t[0]);
+                    }
+
+                    t = (String[]) map.get(prefix + index + PostBackConstants.HOSTINGREDIRECTOR);
+                    if (t != null && t.length > 0) {
+                        pn.setHostingRedirector(new HostingRedirector());
+                        pn.getHostingRedirector().setBindingKey(t[0]);
+                    }
+                    AccessPoint ap = new AccessPoint();
+                    t = (String[]) map.get(prefix + index + PostBackConstants.ACCESSPOINT_TYPE);
+                    if (t != null && t.length > 0) {
+                        ap.setUseType(t[0]);
+                    }
+                    t = (String[]) map.get(prefix + index + PostBackConstants.ACCESSPOINT_VALUE);
+                    if (t != null && t.length > 0) {
+                        ap.setValue(t[0]);
+                    }
+                    if (ap.getValue() != null) {
+                        pn.setAccessPoint(ap);
+                    }
+                    pn.getDescription().addAll(BuildDescription(MapFilter(map, prefix + index + PostBackConstants.DESCRIPTION), prefix + index + PostBackConstants.DESCRIPTION));
+                    CategoryBag cb = new CategoryBag();
+                    cb.getKeyedReference().addAll(BuildKeyedReference(MapFilter(map, prefix + index + PostBackConstants.CATBAG_KEY_REF), prefix + index + PostBackConstants.CATBAG_KEY_REF));
+                    cb.getKeyedReferenceGroup().addAll(BuildKeyedReferenceGroup(MapFilter(map, prefix + index + PostBackConstants.CATBAG_KEY_REF_GRP), prefix + index + PostBackConstants.CATBAG_KEY_REF_GRP));
+                    if (cb.getKeyedReference().isEmpty() && cb.getKeyedReferenceGroup().isEmpty()) {
+                        cb = null;
+                    }
+
+                    pn.setCategoryBag(cb);
+                    pn.setTModelInstanceDetails(BuildTmodelInstanceDetails(MapFilter(map, prefix + index + PostBackConstants.TMODELINSTANCE), prefix + index + PostBackConstants.TMODELINSTANCE));
+
+                    ret.add(pn);
+                    processedIndexes.add(index);
+                }
+            } else {
+                throw new IllegalArgumentException("Invalid form data posted");
+            }
+        }
+        return ret;
+    }
+
+    private static TModelInstanceDetails BuildTmodelInstanceDetails(Map map, String prefix) {
+        TModelInstanceDetails ret = new TModelInstanceDetails();
+
+        Iterator it = map.keySet().iterator();
+        List<String> processedIndexes = new ArrayList<String>();
+        while (it.hasNext()) {
+            String key = (String) it.next();
+            String filteredkey = key.replace(prefix, "");
+            Matcher match = p.matcher(filteredkey);
+            if (match.find()) {
+                String index = filteredkey.substring(0, match.start());
+                if (!processedIndexes.contains(index)) {
+                    TModelInstanceInfo tmi = new TModelInstanceInfo();
+                    String[] t = (String[]) map.get(prefix + index + PostBackConstants.KEYNAME);
+                    tmi.setTModelKey(t[0]);
+
+                    tmi.setInstanceDetails(BuildInstanceDetails(MapFilter(map, prefix + index + PostBackConstants.INSTANCE), prefix + index + PostBackConstants.INSTANCE));
+
+                    tmi.getDescription().addAll(BuildDescription(MapFilter(map, prefix + index + PostBackConstants.INSTANCE+PostBackConstants.DESCRIPTION), prefix + index + PostBackConstants.INSTANCE+PostBackConstants.DESCRIPTION));
+
+                    ret.getTModelInstanceInfo().add(tmi);
+                    processedIndexes.add(index);
+                }
+            } else {
+                throw new IllegalArgumentException("Invalid form data posted");
+            }
+        }
+        if (ret.getTModelInstanceInfo().isEmpty()) {
+            return null;
+        }
+        return ret;
+    }
+
+    private static InstanceDetails BuildInstanceDetails(Map map, String prefix) {
+        InstanceDetails ret = new InstanceDetails();
+        Iterator it = map.keySet().iterator();
+        List<String> processedIndexes = new ArrayList<String>();
+        while (it.hasNext()) {
+            String key = (String) it.next();
+            String filteredkey = key.replace(prefix, "");
+            Matcher match = p.matcher(filteredkey);
+            if (match.find()) {
+                String index = filteredkey.substring(0, match.start());
+                if (!processedIndexes.contains(index)) {
+
+                    String[] t = (String[]) map.get(prefix + index + PostBackConstants.VALUE);
+                    //pn.setValue(t[0]);
+                    ret.setInstanceParms(t[0]);
+
+                    ret.getDescription().addAll(BuildDescription(MapFilter(map, prefix + index + PostBackConstants.INSTANCE + PostBackConstants.DESCRIPTION), prefix + index + PostBackConstants.INSTANCE + PostBackConstants.DESCRIPTION));
+                    ret.getOverviewDoc().addAll(BuildOverviewDocs(MapFilter(map, prefix + index + PostBackConstants.OVERVIEW), prefix + index + PostBackConstants.OVERVIEW));
+                    processedIndexes.add(index);
+                }
+            } else {
+                throw new IllegalArgumentException("Invalid form data posted");
+            }
+        }
+        return ret;
+    }
+}

Added: juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/hub/builders/Printers.java
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/hub/builders/Printers.java?rev=1462384&view=auto
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/hub/builders/Printers.java (added)
+++ juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/hub/builders/Printers.java Fri Mar 29 02:43:36 2013
@@ -0,0 +1,155 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package org.apache.juddi.webconsole.hub.builders;
+
+import java.util.List;
+import org.apache.commons.lang.StringEscapeUtils;
+import org.uddi.api_v3.*;
+
+/**
+ *
+ * @author Alex O'Ree
+ */
+public class Printers {
+
+    public static String TModelInfoToString(TModelInstanceDetails info) {
+        StringBuilder sb = new StringBuilder();
+        for (int i = 0; i < info.getTModelInstanceInfo().size(); i++) {
+            sb.append(info.getTModelInstanceInfo().get(i).getTModelKey());
+        }
+        return sb.toString();
+    }
+
+    /**
+     * Converts category bags of tmodels to a readable string
+     *
+     * @param categoryBag
+     * @return
+     */
+    public static String CatBagToString(CategoryBag categoryBag) {
+        StringBuilder sb = new StringBuilder();
+        if (categoryBag == null) {
+            return "no data";
+        }
+        for (int i = 0; i < categoryBag.getKeyedReference().size(); i++) {
+            sb.append(KeyedReferenceToString(categoryBag.getKeyedReference().get(i)));
+        }
+        for (int i = 0; i < categoryBag.getKeyedReferenceGroup().size(); i++) {
+            sb.append("Key Ref Grp: TModelKey=");
+            for (int k = 0; k < categoryBag.getKeyedReferenceGroup().get(i).getKeyedReference().size(); k++) {
+                sb.append(KeyedReferenceToString(categoryBag.getKeyedReferenceGroup().get(i).getKeyedReference().get(k)));
+            }
+        }
+        return sb.toString();
+    }
+
+    public static String KeyedReferenceToString(KeyedReference item) {
+        StringBuilder sb = new StringBuilder();
+        sb.append("Key Ref: Name=").append(item.getKeyName()).append(" Value=").append(item.getKeyValue()).append(" tModel=").append(item.getTModelKey()).append(System.getProperty("line.separator"));
+        return sb.toString();
+    }
+
+    /**
+     * This function is useful for translating UDDI's somewhat complex data
+     * format to something that is more useful.
+     *
+     * @param bindingTemplates
+     */
+    public  static String PrintBindingTemplates(BindingTemplates bindingTemplates) {
+        if (bindingTemplates == null) {
+            return "No binding templates";
+        }
+        StringBuilder sb = new StringBuilder();
+        for (int i = 0; i < bindingTemplates.getBindingTemplate().size(); i++) {
+            sb.append("Binding Key: ").append(bindingTemplates.getBindingTemplate().get(i).getBindingKey()).append("<Br>");
+            sb.append("Description: ").append(ListToDescString(bindingTemplates.getBindingTemplate().get(i).getDescription())).append("<Br>");
+            sb.append("CatBag: ").append(CatBagToString(bindingTemplates.getBindingTemplate().get(i).getCategoryBag())).append("<Br>");
+            sb.append("tModels: ").append(Printers.TModelInfoToString(bindingTemplates.getBindingTemplate().get(i).getTModelInstanceDetails())).append("<Br>");
+            if (bindingTemplates.getBindingTemplate().get(i).getAccessPoint() != null) {
+                sb.append("Access Point: ").append(bindingTemplates.getBindingTemplate().get(i).getAccessPoint().getValue()).append(" type ").append(bindingTemplates.getBindingTemplate().get(i).getAccessPoint().getUseType()).append("<Br>");
+            }
+            if (bindingTemplates.getBindingTemplate().get(i).getHostingRedirector() != null) {
+                sb.append("Hosting Director: ").append(bindingTemplates.getBindingTemplate().get(i).getHostingRedirector().getBindingKey()).append("<br>");
+            }
+        }
+        return sb.toString();
+    }
+
+    public  static String ListToDescString(List<Description> name) {
+        StringBuilder sb = new StringBuilder();
+        for (int i = 0; i < name.size(); i++) {
+            sb.append(name.get(i).getValue()).append(" ");
+        }
+        return sb.toString();
+    }
+
+    public  static String ListNamesToString(List<Name> name) {
+        StringBuilder sb = new StringBuilder();
+        for (int i = 0; i < name.size(); i++) {
+            sb.append(name.get(i).getValue()).append(" ");
+        }
+        return sb.toString();
+    }
+
+    public  static String ListDiscoToString(DiscoveryURLs info) {
+        StringBuilder sb = new StringBuilder();
+        if (info == null) {
+            return "";
+        }
+        for (int i = 0; i < info.getDiscoveryURL().size(); i++) {
+            sb.append("Type: ").append(StringEscapeUtils.escapeHtml(info.getDiscoveryURL().get(i).getValue())).append(" ").append(StringEscapeUtils.escapeHtml(info.getDiscoveryURL().get(i).getValue()));
+        }
+        return sb.toString();
+    }
+
+    /**
+     * converts contacts to a simple string output
+     */
+    public  static String PrintContacts(Contacts contacts) {
+        if (contacts == null) {
+            return "";
+        }
+        StringBuilder sb = new StringBuilder();
+        for (int i = 0; i < contacts.getContact().size(); i++) {
+            sb.append("Contact ").append(i).append(" type:").append(contacts.getContact().get(i).getUseType()).append("<br>");
+            for (int k = 0; k < contacts.getContact().get(i).getPersonName().size(); k++) {
+                sb.append("Name: ").append(contacts.getContact().get(i).getPersonName().get(k).getValue()).append("<br>");
+            }
+            for (int k = 0; k < contacts.getContact().get(i).getEmail().size(); k++) {
+                sb.append("Email: ").append(contacts.getContact().get(i).getEmail().get(k).getValue()).append("<br>");
+            }
+            for (int k = 0; k < contacts.getContact().get(i).getAddress().size(); k++) {
+                sb.append("Address sort code ").append(contacts.getContact().get(i).getAddress().get(k).getSortCode()).append("<br>");
+                sb.append("Address use type ").append(contacts.getContact().get(i).getAddress().get(k).getUseType()).append("<br>");
+                sb.append("Address tmodel key ").append(contacts.getContact().get(i).getAddress().get(k).getTModelKey()).append("<br>");
+                for (int x = 0; x < contacts.getContact().get(i).getAddress().get(k).getAddressLine().size(); x++) {
+                    sb.append("Address line value ").append(contacts.getContact().get(i).getAddress().get(k).getAddressLine().get(x).getValue()).append("<br>");
+                    sb.append("Address line key name ").append(contacts.getContact().get(i).getAddress().get(k).getAddressLine().get(x).getKeyName()).append("<br>");
+                    sb.append("Address line key value ").append(contacts.getContact().get(i).getAddress().get(k).getAddressLine().get(x).getKeyValue()).append("<br>");
+                }
+            }
+            for (int k = 0; k < contacts.getContact().get(i).getDescription().size(); k++) {
+                sb.append("Desc: ").append(contacts.getContact().get(i).getDescription().get(k).getValue()).append("<br>");
+            }
+            for (int k = 0; k < contacts.getContact().get(i).getPhone().size(); k++) {
+                sb.append("Phone: ").append(contacts.getContact().get(i).getPhone().get(k).getValue()).append("<br>");
+            }
+        }
+        return sb.toString();
+    }
+
+    public  static String ListIdentBagToString(IdentifierBag info) {
+        StringBuilder sb = new StringBuilder();
+        if (info == null) {
+            return "";
+        }
+        for (int i = 0; i < info.getKeyedReference().size(); i++) {
+            sb.append(KeyedReferenceToString(info.getKeyedReference().get(i)));
+        }
+        return sb.toString();
+    }
+
+}

Modified: juddi/branches/juddi-3.2.x/juddi-gui/web/META-INF/config.properties
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/META-INF/config.properties?rev=1462384&r1=1462383&r2=1462384&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/META-INF/config.properties (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/META-INF/config.properties Fri Mar 29 02:43:36 2013
@@ -9,7 +9,7 @@ securityurl=http://localhost:8080/juddiv
 custodyurl=http://localhost:8080/juddiv3/services/custody-transfer?wsdl
 juddipapi=http://localhost:8080/juddiv3/services/juddi-api?wsdl
 subscriptionurl=http://localhost:8080/juddiv3/services/subscription?wsdl
-subscriptionlistenerurl=http://localhost:8080/juddiv3/services/subscription-listener?wsdl
+# note used subscriptionlistenerurl=http://localhost:8080/juddiv3/services/subscription-listener?wsdl
 authtype=UDDI_AUTH
 
 registryType=juddi

Modified: juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/businessdetails.jsp
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/businessdetails.jsp?rev=1462384&r1=1462383&r2=1462384&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/businessdetails.jsp (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/businessdetails.jsp Fri Mar 29 02:43:36 2013
@@ -4,7 +4,7 @@
     Author     : Alex O'Ree
 --%>
 
-<%@page import="org.apache.juddi.webconsole.UddiHub"%>
+<%@page import="org.apache.juddi.webconsole.hub.UddiHub"%>
 <%@page contentType="text/html" pageEncoding="UTF-8"%>
 <%@include  file="../csrf.jsp" %>
 <!DOCTYPE html>

Modified: juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/businesssearch.jsp
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/businesssearch.jsp?rev=1462384&r1=1462383&r2=1462384&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/businesssearch.jsp (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/businesssearch.jsp Fri Mar 29 02:43:36 2013
@@ -5,8 +5,8 @@
 --%>
 
 <%@page import="org.apache.juddi.webconsole.PostBackConstants"%>
-<%@page import="org.apache.juddi.webconsole.PagableContainer"%>
-<%@page import="org.apache.juddi.webconsole.UddiHub"%>
+<%@page import="org.apache.juddi.webconsole.hub.PagableContainer"%>
+<%@page import="org.apache.juddi.webconsole.hub.UddiHub"%>
 <%@page contentType="text/html" pageEncoding="UTF-8"%>
 <%@include  file="../csrf.jsp" %>
 <%

Modified: juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/deleteservice.jsp
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/deleteservice.jsp?rev=1462384&r1=1462383&r2=1462384&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/deleteservice.jsp (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/deleteservice.jsp Fri Mar 29 02:43:36 2013
@@ -5,5 +5,12 @@
 --%>
 
 <%@page contentType="text/html" pageEncoding="UTF-8"%>
-<!DOCTYPE html>
 
+<%@include  file="../csrf.jsp" %>
+<%
+    if (request.getMethod().equalsIgnoreCase("POST")) {
+        UddiHub x = UddiHub.getInstance(application, session);
+        out.write(x.deleteService(request.getParameter("id")));
+    }
+
+%>
\ No newline at end of file

Added: juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/getCert.jsp
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/getCert.jsp?rev=1462384&view=auto
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/getCert.jsp (added)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/getCert.jsp Fri Mar 29 02:43:36 2013
@@ -0,0 +1,36 @@
+<%-- 
+    Document   : getCert - returns a base64 PKI certificate
+    Created on : Mar 28, 2013, 6:39:09 PM
+    Author     : Alex O'Ree
+--%><%@page import="org.apache.juddi.webconsole.hub.UddiHub"%><%
+    String type = request.getParameter("type");
+    String id = request.getParameter("id");
+    int index = 0;
+    try {
+        index = Integer.parseInt(request.getParameter("index"));
+    } catch (Exception ex) {
+    }
+
+    UddiHub x = UddiHub.getInstance(application, session);
+    String data = null;
+    if (type.equalsIgnoreCase("business")) {
+        data = (x.GetCertificate(UddiHub.FindType.Business, id, index));
+    } else if (type.equalsIgnoreCase("service")) {
+        data = (x.GetCertificate(UddiHub.FindType.Service, id, index));
+    } else if (type.equalsIgnoreCase("bindingTemplate")) {
+        data = (x.GetCertificate(UddiHub.FindType.BindingTemplate, id, index));
+    } else if (type.equalsIgnoreCase("tModel")) {
+        data = (x.GetCertificate(UddiHub.FindType.tModel, id, index));
+    }
+    if (data != null && !data.startsWith("Error")) {
+        response.setContentType("application/octet-stream");
+        response.setHeader("Content-Disposition", "inline; filename=cert.crt");
+        out.write("-----BEGIN CERTIFICATE-----" + System.getProperty("line.separator"));
+        out.write(data + System.getProperty("line.separator"));
+        out.write("-----END CERTIFICATE-----" + System.getProperty("line.separator"));
+    } else {
+        response.setStatus(500);
+        out.write(data);
+    }
+
+%>
\ No newline at end of file

Modified: juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/loginpost.jsp
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/loginpost.jsp?rev=1462384&r1=1462383&r2=1462384&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/loginpost.jsp (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/loginpost.jsp Fri Mar 29 02:43:36 2013
@@ -8,7 +8,7 @@
 <%@page import="java.io.InputStream"%>
 <%@page import="java.net.URL"%>
 <%@page import="org.apache.juddi.webconsole.AES"%>
-<%@page import="org.apache.juddi.webconsole.UddiHub"%>
+<%@page import="org.apache.juddi.webconsole.hub.UddiHub"%>
 <%@page contentType="text/html" pageEncoding="UTF-8"%>
 <!DOCTYPE html>
 <%@include  file="../csrf.jsp" %>

Added: juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/opInfo.jsp
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/opInfo.jsp?rev=1462384&view=auto
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/opInfo.jsp (added)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/opInfo.jsp Fri Mar 29 02:43:36 2013
@@ -0,0 +1,19 @@
+<%-- 
+    Document   : opInfo
+    Created on : Mar 28, 2013, 10:25:03 PM
+    Author     : Alex O'Ree
+--%>
+
+<%@page import="org.apache.juddi.webconsole.hub.UddiHub"%>
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+<!DOCTYPE html>
+<%
+    String id=null;
+    id = request.getParameter("id");
+    if (id!=null){
+        UddiHub x = UddiHub.getInstance(application, session);
+        out.write(x.GetOperationalInfo(x.GetOperationalInfo(id)));
+    }
+
+
+%>
\ No newline at end of file

Modified: juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/saveFromXML.jsp
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/saveFromXML.jsp?rev=1462384&r1=1462383&r2=1462384&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/saveFromXML.jsp (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/saveFromXML.jsp Fri Mar 29 02:43:36 2013
@@ -8,7 +8,7 @@
 <%@page import="org.uddi.api_v3.BusinessService"%>
 <%@page import="org.uddi.api_v3.BusinessEntity"%>
 <%@page import="org.apache.juddi.jaxb.EntityCreator"%>
-<%@page import="org.apache.juddi.webconsole.UddiHub"%><%@page import="org.apache.juddi.jaxb.PrintUDDI"%><%@page contentType="text/html" pageEncoding="UTF-8"%><%
+<%@page import="org.apache.juddi.webconsole.hub.UddiHub"%><%@page import="org.apache.juddi.jaxb.PrintUDDI"%><%@page contentType="text/html" pageEncoding="UTF-8"%><%
 
     UddiHub x = UddiHub.getInstance(application, session);
     if (request.getMethod().equalsIgnoreCase("POST")) {

Modified: juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/savebusiness.jsp
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/savebusiness.jsp?rev=1462384&r1=1462383&r2=1462384&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/savebusiness.jsp (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/savebusiness.jsp Fri Mar 29 02:43:36 2013
@@ -4,7 +4,7 @@
    Author     : Alex O'Ree
 --%>
 
-<%@page import="org.apache.juddi.webconsole.UddiHub"%>
+<%@page import="org.apache.juddi.webconsole.hub.UddiHub"%>
 <%@page import="java.util.Enumeration"%>
 <%@page contentType="text/html" pageEncoding="UTF-8"%>
 <%@include  file="../csrf.jsp" %>

Modified: juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/saveservicedetails.jsp
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/saveservicedetails.jsp?rev=1462384&r1=1462383&r2=1462384&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/saveservicedetails.jsp (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/saveservicedetails.jsp Fri Mar 29 02:43:36 2013
@@ -4,15 +4,14 @@
     Author     : Alex O'Ree
 --%>
 
-<%@page import="org.apache.juddi.webconsole.UddiHub"%>
+<%@page import="org.apache.juddi.webconsole.hub.UddiHub"%>
 
 <%@include  file="../csrf.jsp" %>
 <%@page contentType="text/html" pageEncoding="UTF-8"%>
 <%
     if (request.getMethod().equalsIgnoreCase("POST")) {
-           UddiHub x = UddiHub.getInstance(application, request.getSession());
-        
-        x.SaveServiceDetails(request);
+        UddiHub x = UddiHub.getInstance(application, request.getSession());
+        out.write(x.SaveServiceDetails(request));
     }
 
 

Modified: juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/savetmodel.jsp
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/savetmodel.jsp?rev=1462384&r1=1462383&r2=1462384&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/savetmodel.jsp (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/savetmodel.jsp Fri Mar 29 02:43:36 2013
@@ -4,7 +4,7 @@
    Author     : Alex O'Ree
 --%>
 
-<%@page import="org.apache.juddi.webconsole.UddiHub"%>
+<%@page import="org.apache.juddi.webconsole.hub.UddiHub"%>
 <%@page import="java.util.Enumeration"%>
 <%@page contentType="text/html" pageEncoding="UTF-8"%>
 <%@include  file="../csrf.jsp" %>

Modified: juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/search.jsp
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/search.jsp?rev=1462384&r1=1462383&r2=1462384&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/search.jsp (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/search.jsp Fri Mar 29 02:43:36 2013
@@ -4,8 +4,8 @@
     Author     : Alex O'Ree
 --%>
 
-<%@page import="org.apache.juddi.webconsole.UddiHub.FindType"%>
-<%@page import="org.apache.juddi.webconsole.UddiHub.CriteriaType"%>
+<%@page import="org.apache.juddi.webconsole.hub.UddiHub.FindType"%>
+<%@page import="org.apache.juddi.webconsole.hub.UddiHub.CriteriaType"%>
 <%@page contentType="text/html" pageEncoding="UTF-8"%>
 <!DOCTYPE html>
 <%@include file="../csrf.jsp" %>

Modified: juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/servicedetails.jsp
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/servicedetails.jsp?rev=1462384&r1=1462383&r2=1462384&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/servicedetails.jsp (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/servicedetails.jsp Fri Mar 29 02:43:36 2013
@@ -4,7 +4,7 @@
     Author     : Alex O'Ree
 --%>
 
-<%@page import="org.apache.juddi.webconsole.UddiHub"%>
+<%@page import="org.apache.juddi.webconsole.hub.UddiHub"%>
 <%@page contentType="text/html" pageEncoding="UTF-8"%>
 <%@include  file="../csrf.jsp" %>
 <!DOCTYPE html>

Modified: juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/servicelist.jsp
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/servicelist.jsp?rev=1462384&r1=1462383&r2=1462384&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/servicelist.jsp (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/servicelist.jsp Fri Mar 29 02:43:36 2013
@@ -5,7 +5,7 @@
 --%>
 
 
-<%@page import="org.apache.juddi.webconsole.UddiHub"%>
+<%@page import="org.apache.juddi.webconsole.hub.UddiHub"%>
 <%@page contentType="text/html" pageEncoding="UTF-8"%>
 <%@include  file="../csrf.jsp" %>
 <!DOCTYPE html>

Modified: juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/servicesearch.jsp
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/servicesearch.jsp?rev=1462384&r1=1462383&r2=1462384&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/servicesearch.jsp (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/servicesearch.jsp Fri Mar 29 02:43:36 2013
@@ -6,8 +6,8 @@
 
 
 <%@page import="org.apache.juddi.webconsole.PostBackConstants"%>
-<%@page import="org.apache.juddi.webconsole.PagableContainer"%>
-<%@page import="org.apache.juddi.webconsole.UddiHub"%>
+<%@page import="org.apache.juddi.webconsole.hub.PagableContainer"%>
+<%@page import="org.apache.juddi.webconsole.hub.UddiHub"%>
 <%@page contentType="text/html" pageEncoding="UTF-8"%>
 <%@include  file="../csrf.jsp" %>
 <!DOCTYPE html>

Modified: juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/tmodel.jsp
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/tmodel.jsp?rev=1462384&r1=1462383&r2=1462384&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/tmodel.jsp (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/tmodel.jsp Fri Mar 29 02:43:36 2013
@@ -4,7 +4,7 @@
     Author     : Alex O'Ree
 --%>
 
-<%@page import="org.apache.juddi.webconsole.UddiHub"%>
+<%@page import="org.apache.juddi.webconsole.hub.UddiHub"%>
 <%@page import="org.apache.juddi.model.UddiEntity"%>
 <%@page contentType="text/html" pageEncoding="UTF-8"%>
 <!DOCTYPE html>

Modified: juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/tmodelsearch.jsp
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/tmodelsearch.jsp?rev=1462384&r1=1462383&r2=1462384&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/tmodelsearch.jsp (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/tmodelsearch.jsp Fri Mar 29 02:43:36 2013
@@ -5,8 +5,8 @@
 --%>
 
 <%@page import="org.apache.juddi.webconsole.PostBackConstants"%>
-<%@page import="org.apache.juddi.webconsole.PagableContainer"%>
-<%@page import="org.apache.juddi.webconsole.UddiHub"%>
+<%@page import="org.apache.juddi.webconsole.hub.PagableContainer"%>
+<%@page import="org.apache.juddi.webconsole.hub.UddiHub"%>
 <%@page contentType="text/html" pageEncoding="UTF-8"%>
 <!DOCTYPE html>
 <%

Modified: juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/toXML.jsp
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/toXML.jsp?rev=1462384&r1=1462383&r2=1462384&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/toXML.jsp (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/toXML.jsp Fri Mar 29 02:43:36 2013
@@ -2,7 +2,7 @@
     Document   : toXML
     Created on : Mar 14, 2013, 9:17:21 PM
     Author     : Alex O'Ree
---%><%@page import="org.apache.juddi.jaxb.JAXBMarshaller"%><%@page import="org.apache.juddi.jaxb.EntityCreator"%><%@page import="org.apache.juddi.webconsole.UddiHub"%><%@page import="org.apache.juddi.jaxb.PrintUDDI"%><%@page contentType="text/html" pageEncoding="UTF-8"%><%
+--%><%@page import="org.apache.juddi.jaxb.JAXBMarshaller"%><%@page import="org.apache.juddi.jaxb.EntityCreator"%><%@page import="org.apache.juddi.webconsole.hub.UddiHub"%><%@page import="org.apache.juddi.jaxb.PrintUDDI"%><%@page contentType="text/html" pageEncoding="UTF-8"%><%
     //org.apache.juddi.jaxb.PrintUDDI p = new PrintUDDI();
     UddiHub x = UddiHub.getInstance(application, session);
 

Modified: juddi/branches/juddi-3.2.x/juddi-gui/web/businessBrowse.jsp
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/businessBrowse.jsp?rev=1462384&r1=1462383&r2=1462384&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/businessBrowse.jsp (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/businessBrowse.jsp Fri Mar 29 02:43:36 2013
@@ -4,7 +4,7 @@
     Author     : Alex O'Ree
 --%>
 
-<%@page import="org.apache.juddi.webconsole.UddiHub"%>
+<%@page import="org.apache.juddi.webconsole.hub.UddiHub"%>
 <%@page contentType="text/html" pageEncoding="UTF-8"%>
 <%@include file="header-top.jsp" %>
 <div class="container">

Modified: juddi/branches/juddi-3.2.x/juddi-gui/web/businessEditor2.jsp
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/businessEditor2.jsp?rev=1462384&r1=1462383&r2=1462384&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/businessEditor2.jsp (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/businessEditor2.jsp Fri Mar 29 02:43:36 2013
@@ -4,13 +4,14 @@
     Author     : Alex O'Ree
 --%>
 
+<%@page import="java.net.URLEncoder"%>
 <%@page import="org.uddi.api_v3.IdentifierBag"%>
 <%@page import="org.uddi.api_v3.CategoryBag"%>
 <%@page import="org.uddi.api_v3.Contacts"%>
 <%@page import="org.uddi.api_v3.BusinessEntity"%>
 <%@page import="org.apache.juddi.webconsole.PostBackConstants"%>
 
-<%@page import="org.apache.juddi.webconsole.UddiHub"%>
+<%@page import="org.apache.juddi.webconsole.hub.UddiHub"%>
 
 <%@page contentType="text/html" pageEncoding="UTF-8"%>
 <%@include file="header-top.jsp" %>
@@ -96,6 +97,8 @@
                     <li><a href="#identifiers" >Identifiers</a></li>
                     <li><a href="#services" >Services</a></li>
                     <li><a href="#signatures" >Signatures</a></li>
+                    
+                    <li><a href="#opinfo" >Operational Info</a></li>
                 </ul>
                 <script>
                     $(function () {
@@ -129,11 +132,15 @@
                         e.preventDefault();
                         $(this).tab('show');
                     });
+                      $('#myTab a[href=#opinfo]').click(function (e) {
+                        e.preventDefault();
+                        $(this).tab('show');
+                    });
                     
                 </script>
                 <div class="tab-content">
                     <div class="tab-pane active" id="general">
-                        <a href="javascript:AddName();"><i class="icon-plus-sign"></i></a> Name - 
+                        <a href="javascript:AddName();"><i class="icon-plus-sign"></i></a> <b>Name</b> - 
                         Businesses are identified by one or more name. Multiple names are useful for different languages, legal names, or abbreviations.
                         <div id="nameContainer" style="border-width: 2px; border-style: solid;" >
                             <%
@@ -150,7 +157,7 @@
                             %>
                         </div>
                         <Br>
-                        <a href="javascript:AddDescription();"><i class="icon-plus-sign"></i></a> Description - businesses can have more than one description, such as in a different language.
+                        <a href="javascript:AddDescription();"><i class="icon-plus-sign"></i></a> <b>Description </b>- businesses can have more than one description, such as in a different language.
                         <div id="Description" style="border-width: 2px; border-style: solid;" >
                             <%
                                 for (int i = 0; i < bd.getDescription().size(); i++) {
@@ -169,7 +176,7 @@
                     <div class="tab-pane " id="discovery">
                         <Br>
                         <a href="javascript:AddDisco();"><i class="icon-plus-sign"></i></a>
-                        Discovery URLs are typically a link to a simple web page with additional information on it, such as a listing a services.
+                        <b>Discovery URLs </b>- are typically a link to a simple web page with additional information on it, such as a listing a services.
                         Two reserved values are specified in the specification, 'homepage' and 'businessEntity'.
                         <div id="discoContainer" style="border-width: 2px; border-style: solid;" >
                             <%
@@ -201,7 +208,7 @@
                     </div>
                     <div class="tab-pane " id="contacts">
                         <a href="javascript:AddContact();"><i class="icon-plus-sign"></i></a>
-                        Contacts - Each business typically has several points of contact 
+                        <b>Contacts </b>- Each business typically has several points of contact 
                         for a person or a job role within the
                         business so that someone who finds the information can make human contact for any
                         purpose. Examples for Type: "technical questions", "technical contact", "establish account", "sales
@@ -352,10 +359,10 @@
                                     }
                                 }
 
-                                bd.getIdentifierBag();
-                                if (bd.getSignature() != null && !bd.getSignature().isEmpty()) {
-                                    out.write("WARNING: This business entity is digitally signed. After editing it, it will no longer be signed");
-                                }
+                                /* bd.getIdentifierBag();
+                                 if (bd.getSignature() != null && !bd.getSignature().isEmpty()) {
+                                 out.write("WARNING: This business entity is digitally signed. After editing it, it will no longer be signed");
+                                 }*/
                                 //if using savebusiness, can you attach services that are not owned by the business
 
                             %>
@@ -363,7 +370,7 @@
                     </div>
                     <div class="tab-pane " id="categories">
 
-                        Categories - UDDI uses a taxonomy system to categorize businesses and their services. These categories are defined as UDDI tModels and
+                        <b>Categories </b>- UDDI uses a taxonomy system to categorize businesses and their services. These categories are defined as UDDI tModels and
                         are defined by the administrator(s) of this UDDI node. These categories are appended to business registrations either by adding one or more "Key References"
                         or by adding one or more "Key Reference Groups", which in turn can be a zero or more of Key References as part of it.<br><br>
                         Keyed Reference Categories:<Br>
@@ -392,7 +399,7 @@
                             %>
                         </div>
                         <br>
-                        Keyed Reference Groups<br>
+                        <b>Keyed Reference Groups</b><br>
                         <a href="javascript:AddCategoryKeyReferenceGroup();"><i class="icon-plus-sign"></i></a> Add Key Reference Group Category<br>
                         <div id="catContainerGrp" style="border-width: 2px; border-style: solid;" >
 
@@ -408,15 +415,6 @@
                                             + "<div style=\"float:left;height:100%\"><a href=\"javascript:AddCategoryKeyReferenceGroupKeyRef('catbaggrpkeyref" + i + "keyref');\"><i class=\"icon-plus-sign\"></i></a></div>"
                                             + "Add Key Reference"
                                             + "</div>");
-                                    //+ "</div>");
-                                    /*
-                                     out.write("<div id=\"catbaggrpkeyref" + i + "\" style=\"border-width:2px; border-style:solid\">");
-                                     out.write("<div style=\"float:left;height:100%\"><a href=\"javascript:Remove('catbaggrpkeyref" + i + "');\"><i class=\"icon-remove-sign\"></i></a></div>");
-                                     out.write("<div style=\"float:left;height:100%\"><a href=\"javascript:AddCategoryKeyReferenceGroupKeyRef('catbaggrpkeyref" + i + "keyref');\"><i class=\"icon-plus-sign\"></i></a></div>");
-                                     out.write("Add Key Reference");
-                                     out.write("<div style=\"float:left\">Key: &nbsp;</div>"
-                                     + "<div class=\"edit\" id=\"catbagkeyrefgrp" + i + "Value\">" + StringEscapeUtils.escapeHtml(bd.getCategoryBag().getKeyedReferenceGroup().get(i).getTModelKey()) + "</div>");
-                                     * */
                                     for (int k = 0; k < bd.getCategoryBag().getKeyedReferenceGroup().get(i).getKeyedReference().size(); k++) {
 
                                         out.write("<div id=\"catbaggrpkeyref" + i + "keyref" + k + "\" style=\"border-width:1px; border-style:solid\">");
@@ -429,10 +427,6 @@
                                                 + "<div class=\"edit\" id=\"catbaggrpkeyref" + i + "keyref" + k + "KeyValue\">" + StringEscapeUtils.escapeHtml(bd.getCategoryBag().getKeyedReferenceGroup().get(i).getKeyedReference().get(k).getKeyValue()) + "</div>");
                                         out.write("</div>");
                                     }
-                                    //out.write("<div style=\"float:left\">Name&nbsp;</div>"
-                                    //+ "<div class=\"edit\" id=\"discoType" + i + "\">" + StringEscapeUtils.escapeHtml(bd.getCategoryBag().getKeyedReferenceGroup().get(i).()) + "</div>");
-                                    //out.write("<div style=\"float:left\">Value&nbsp;</div>"
-                                    //+ "<div class=\"edit\" id=\"discoType" + i + "\">" + StringEscapeUtils.escapeHtml(bd.getCategoryBag().getKeyedReferenceGroup().get(i).getKeyValue()) + "</div>");
 
                                     out.write("</div>");
                                 }
@@ -442,7 +436,7 @@
                         </div>
                     </div>
                     <div class="tab-pane " id="identifiers">
-                        Identifiers - optionally, you can attach identifiers that uniquely identify this business from other systems, such as a tax ID or a <a href="http://www.whitehouse.gov/sites/default/files/omb/grants/duns_num_guide.pdf">DUNS Number</a>.<Br>
+                        <b>Identifiers </b>- optionally, you can attach identifiers that uniquely identify this business from other systems, such as a tax ID or a <a href="http://www.whitehouse.gov/sites/default/files/omb/grants/duns_num_guide.pdf">DUNS Number</a>.<Br>
                         <a href="javascript:AddIdentKeyReference();"><i class="icon-plus-sign"></i></a> Add Key Reference Category <Br>
                         <div id="identContainer" style="border-width: 2px; border-style: solid;" >
                             <%
@@ -461,14 +455,16 @@
                         </div>
                     </div>
                     <div class="tab-pane " id="services">
-                        Business Services - 
+                        <b>Business Services </b>- 
                         <%
                             if (bd.getBusinessServices() != null) {
                                 out.write(Integer.toString(bd.getBusinessServices().getBusinessService().size()));
                             } else {
                                 out.write("0");
                             }
-                        %> are defined for this business.<br>
+                        %> are defined for this business. 
+                        <a href="serviceEditor.jsp?bizid=<%=URLEncoder.encode(bd.getBusinessKey(), "UTF8")  %>" class="btn btn-primary">+</a>
+                        <br>
                         <table class="table table-hover"><tr><th>Key</th><th>Name</th><th>BTs</th></tr>
                             <%
                                 if (bd.getBusinessServices() != null) {
@@ -501,7 +497,7 @@
                         </table>
 
                     </div>
-                    <div class="tab-pane" id="signatures">Digital Signatures
+                    <div class="tab-pane" id="signatures"><b>Digital Signatures</b>
                         <br>
                         <%
                             if (bd.getSignature().isEmpty()) {
@@ -516,6 +512,8 @@
                                     for (int k = 0; k < bd.getSignature().size(); k++) {
                                         out.write("<tr><td>");
                                         out.write(x.SignatureToReadable(bd.getSignature().get(k)));
+                                        out.write("</td><td>");
+                                        out.write("<a href=\"ajax/getCert.jsp?type=business&id=" + URLEncoder.encode(bd.getBusinessKey(), "UTF-8") + "&index=" + k + "\">View Certificate</a>");
                                         out.write("</td></tr>");
                                     }
                                 }
@@ -523,21 +521,56 @@
                             %>
                         </table>
                     </div>
+                        
+                <div class="tab-pane" id="opinfo">
+                    <script type="text/javascript">
+                        $.get("ajax/opInfo.jsp?id=<%=StringEscapeUtils.escapeJavaScript(bd.getBusinessKey())   %>", function(data){
+                            $("#opinfodiv").html(data);
+                        } )
+                    </script>
+                    <div id="opinfodiv"></div>
+
+                </div>
                 </div>
             </div>
             <div><br>
+                <%
+                    if (bd.getSignature().isEmpty()) {
+                %>
                 <a class="btn btn-primary " href="javascript:saveBusiness();">Save</a> | 
+                <%  } else {
+                %>
+                <a href="#confirmDialog" role="button" class="btn btn-primary" data-toggle="modal">Save</a> |
+
+                <%        }
+                %>
+
                 <a class="btn btn-danger " href="javascript:deleteBusiness();">Delete</a> |
-                <a class="btn btn-success " href="signer.jsp?id=<%=bizid%>&type=business">Digitally Sign</a></div>
-            <script type="text/javascript" src="js/businessEditor.js"></script>
-            <script type="text/javascript">
-                Reedit();
-            </script>
+                <a class="btn btn-success " href="signer.jsp?id=<%=bizid%>&type=business">Digitally Sign</a> |
+                <a class="btn btn-info " href="#" title="Alert me when this entity changes">Subscribe</a> |
+                <a class="btn btn-warning " href="#" title="Transfer this entity to another UDDI node">Transfer</a>
+                <script type="text/javascript" src="js/businessEditor.js"></script>
+                <script type="text/javascript">
+                    Reedit();
+                </script>
+            </div>
         </div>
-
     </div>
 
-
+    <div class="modal hide fade" id="confirmDialog">
+        <div class="modal-header">
+            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
+            <h3>Digital Signature Warning</h3>
+        </div>
+        <div class="modal-body">
+            <p>This item is digitally signed. This means that when saving your changes, all existing signatures will become invalid and 
+                will automatically be excluded from the save process. </p>
+        </div>
+        <div class="modal-footer">
+            <a href="#" class="btn">Close</a>
+            <a href="javascript:saveBusiness();$('#confirmDialog').modal('hide');" class="btn btn-primary">Save changes</a>
+        </div>
+    </div>
 
     <!-- container div is in header bottom-->
     <%@include file="header-bottom.jsp" %>
\ No newline at end of file

Modified: juddi/branches/juddi-3.2.x/juddi-gui/web/csrf.jsp
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/csrf.jsp?rev=1462384&r1=1462383&r2=1462384&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/csrf.jsp (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/csrf.jsp Fri Mar 29 02:43:36 2013
@@ -4,7 +4,7 @@
     Author     : Alex O'Ree
 --%>
 
-<%@page import="org.apache.juddi.webconsole.UddiHub"%>
+<%@page import="org.apache.juddi.webconsole.hub.UddiHub"%>
 <%@page import="org.apache.log4j.Logger"%>
 <%@page import="org.apache.log4j.Level"%>
 <%@page contentType="text/html" pageEncoding="UTF-8"%>
@@ -50,7 +50,10 @@
     } else {
         //HTTP GET or otherwise message
         if ((current == null) || current.isEmpty()) {
-            current = java.util.UUID.randomUUID().toString();
+            current = (String)session.getAttribute("nonce");
+            if (current == null) {
+                current = java.util.UUID.randomUUID().toString();
+            }
             session.setAttribute("nonce", current);
         }
 

Modified: juddi/branches/juddi-3.2.x/juddi-gui/web/header-bottom.jsp
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/header-bottom.jsp?rev=1462384&r1=1462383&r2=1462384&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/header-bottom.jsp (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/header-bottom.jsp Fri Mar 29 02:43:36 2013
@@ -6,14 +6,27 @@
 
 <%@page contentType="text/html" pageEncoding="UTF-8"%>
 
-            <hr>
+<hr>
 
-            <footer>
-                <p>&copy; 2013 The Apache Software Foundation. All Rights Reserved.</p>
-            </footer>
-
-        </div> <!-- /container -->
-        </form>
-    </body>
+<footer>
+    <p>&copy; 2013 The Apache Software Foundation. All Rights Reserved.</p>
+</footer>
+ <div class="modal hide fade" id="confirmDialog">
+        <div class="modal-header">
+            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
+            <h3>Digital Signature Warning</h3>
+        </div>
+        <div class="modal-body">
+            <p>This item is digitally signed. This means that when saving your changes, all existing signatures will become invalid and 
+            will automatically be excluded from the save process. </p>
+        </div>
+        <div class="modal-footer">
+            <a href="#" class="btn">Close</a>
+            <a href="javascript:deleteBusiness();$('#confirmDialog').modal('hide');" class="btn btn-primary">Save changes</a>
+        </div>
+    </div>
+</div> <!-- /container -->
+</form>
+</body>
 </html>
 

Modified: juddi/branches/juddi-3.2.x/juddi-gui/web/header-top.jsp
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/header-top.jsp?rev=1462384&r1=1462383&r2=1462384&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/header-top.jsp (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/header-top.jsp Fri Mar 29 02:43:36 2013
@@ -4,6 +4,7 @@
     Author     : Alex O'Ree
 --%>
 
+<%@page import="org.apache.juddi.webconsole.hub.UddiHub"%>
 <%@page contentType="text/html" pageEncoding="UTF-8"%>
 <!DOCTYPE html>
 <html lang="en">
@@ -16,6 +17,7 @@
 
         <!-- Le styles -->
         <link href="css/bootstrap.css" rel="stylesheet">
+        <link rel="shortcut icon" href="favicon.ico" />
         <style type="text/css">
             body {
                 padding-top: 60px;
@@ -59,7 +61,7 @@
                         <a class="brand" href="index.jsp" style="padding-left:19px; padding-top:0px; padding-bottom:0px"><img src="img/logo2.png"></a>
                         <div class="nav-collapse collapse">
                             <ul class="nav">
-                                <li class="active"><a href="index.jsp">Home</a></li>
+                                <li ><a href="index.jsp">Home</a></li>
                                 <li class="dropdown" ><a href="#" data-toggle="dropdown" class="dropdowb-town">Discover<b class="caret"></b></a>
                                     <ul class="dropdown-menu">
                                         <li><a href="businessBrowse.jsp" title="Browse for businesses">Businesses</a></li>
@@ -86,13 +88,18 @@
                                 </li>
                                 <li class="dropdown"><a href="#" data-toggle="dropdown" class="dropdowb-town">Subscriptions<b class="caret"></b></a>
                                     <ul class="dropdown-menu">
-                                        <li><a href="businessBrowse.jsp" title="Create a businesses">View</a></li>
-                                        <li><a href="serviceBrowse.jsp" title="Create a Services">Create</a></li>
-                                        <li><a href="tmodelBrowse.jsp" title="Create a tModel">Something</a></li>
-                                        <li><a href="tmodelBrowse.jsp" title="Create a publisher">Something else</a></li>
+                                        <li><a href="viewSubscriptions.jsp" title="View my subscriptions">View</a></li>
+                                        <li><a href="serviceBrowse.jsp" title="Create a subscription">Create</a></li>
                                     </ul>
                                 </li>
-                                <li><a href="settings.jsp">Settings</a></li>
+                                
+                                <li class="dropdown"><a href="#" data-toggle="dropdown" class="dropdowb-town">Settings<b class="caret"></b></a>
+                                    <ul class="dropdown-menu">
+                                        <li><a href="settings.jsp" title="Configure this UDDI Browser">Configure</a></li>
+                                        <li><a href="nodeinfo.jsp" title="Information about the UDDI Node that's being accessed">UDDI Node Information</a></li>
+                                    </ul>
+                                </li>
+                                
                                 <li class="dropdown"><a href="#" data-toggle="dropdown" class="dropdowb-town">Help<b class="caret"></b></a>
                                     <ul class="dropdown-menu">
                                         <li><a href="http://juddi.apache.org/docs/3.x/userguide/html/index.html" title="User Guide">User Guide</a></li>

Modified: juddi/branches/juddi-3.2.x/juddi-gui/web/js/serviceEditor.js
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/js/serviceEditor.js?rev=1462384&r1=1462383&r2=1462384&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/js/serviceEditor.js (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/js/serviceEditor.js Fri Mar 29 02:43:36 2013
@@ -7,15 +7,70 @@
 //init the editable fields
 Reedit();
 
+function AddCategoryKeyReferenceSpecific (div)
+{
+    currentcatkeyrefBT++;
+    var i=currentcatkeyrefBT;
+    
+    $("<div id=\""+div + i + "\" style=\"border-width:1px; border-style:solid\">"+
+        "<div style=\"float:left;height:100%\"><a href=\"javascript:Remove('"+div + i + "');\"><i class=\"icon-remove-sign\"></i></a></div>"+
+        "<div style=\"float:left\">Key: &nbsp;</div>"
+        + "<div class=\"edit\" id=\""+div + i + "Value\"></div>"
+        +"<div style=\"float:left\">Name: &nbsp;</div>"
+        + "<div class=\"edit\" id=\""+div + i + "KeyName\"></div>"
+        +"<div style=\"float:left\">Value: &nbsp;</div>"
+        + "<div class=\"edit\" id=\"" +div+ i + "KeyValue\"></div>"
+        +"</div>").appendTo("#"+div);
+    Reedit();
+}
 
 
+function AddCategoryKeyReferenceGroupSpecificBT(div)
+{
+    currentcatkeyrefgrpBT++;
+    var i=currentcatkeyrefgrpBT;
+    
+    $("<div id=\""+div + i + "\" style=\"border-width:2px; border-style:solid\">"+
+        "<div style=\"float:left;height:100%\"><a href=\"javascript:Remove('"+div + i + "');\"><i class=\"icon-remove-sign\"></i></a></div>"+
+        "<div style=\"float:left\">Key: &nbsp;</div>"
+        + "<div class=\"edit\" id=\"" +div+ i + "Value\"></div>"
+        
+        + "<div id=\""+div + i + "keyref\" style=\"border-width:1px; border-style:solid\">"
+        + "<div style=\"float:left;height:100%\"><a href=\"javascript:AddCategoryKeyReferenceGroupKeyRef('"+div + i + "keyref');\"><i class=\"icon-plus-sign\"></i></a></div>"
+        +"Add Key Reference"
+        + "</div>"
+    
+        +"</div>").appendTo("#"+div);
+    Reedit();
+}
+
+function AddOverviewDocumentSpecific(div)
+{
+    currentOverviewDocs++;
+    var i = currentOverviewDocs;
+    $("<div id=\"" + div + i + "\" style=\"border-width:1px; border-style:solid\" >" 
+        +"<div style=\"float:left;height:100%\"><a href=\"javascript:Remove('" + div + i 
+        +"');\"><i class=\"icon-remove-sign\"></i></a></div>"
+        +"<div style=\"float:left\">Value: &nbsp;</div>"
+        +"<div class=\"edit\" id=\"" +div+ i + "Value\"></div>"
+        +"<div style=\"float:left\">Use Type: &nbsp;</div>"
+        +"<div class=\"edit\" id=\"" + div + i + "Type\"></div>"
+        //descriptions
+        +"<a href=\"javascript:AddDescriptionSpecific('" + div + i + "Description');\">"
+        +"<i class=\"icon-plus-sign\"></i></a> Add a description"
+        + ("<div id=\"" + div + i + "Description\" style=\"border-width:1px; border-style:dotted\"></div>")
+    
+        +"</div>").prependTo("#" + div);
+    Reedit();
+}
+
 function AddBindingTemplate()
 {
     
 
     currentbindingtemplates++;
     var i =  currentbindingtemplates;         
-    $("<div id=\"bindingTemplate" + i + "\" style=\"border-width:1px; border-style:solid\" >" 
+    /*  $("<div id=\"bindingTemplate" + i + "\" style=\"border-width:1px; border-style:solid\" >" 
         +"<div style=\"float:left;height:100%\"><a href=\"javascript:Remove('bindingTemplate" + i 
         +"');\"><i class=\"icon-remove-sign\"></i></a></div>"
         +"<div class=\"editrableSelectAccessPoint\"></div>"
@@ -24,8 +79,22 @@ function AddBindingTemplate()
         +"<div style=\"float:left\">Language: &nbsp;</div>"
         +"<div class=\"edit\" id=\"Name" + i + "Lang\"></div>"
         +"</div>").appendTo("#bindingTemplatesContainer");
+*/    
+    $("<br><div id=\"bindingTemplate" + i + "\" style=\"border-width: 2px; border-style: dashed;; border-color: lightseagreen\"><div style=\"float:left\"><a href=\"javascript:Remove('bindingTemplate"+i+"');\"><i class=\"icon-remove-sign\"></i></a>Binding Template Key: &nbsp;</div><div class=\"edit\" id=\"bindingTemplate"+i+"Value\">"
+        +"</div><br><a href=\"javascript:AddDescriptionSpecific('bindingTemplate"+i+"Description');\"><i class=\"icon-plus-sign\"></i></a>Add a Binding Template Description - binding templates can have more than one description, such as in a different language.<br>"
+        +"<div id=\"bindingTemplate"+i+"Description\" style=\"border-width: 1px; border-style: dotted;\"></div>"
+        +"<b>Access Point</b> - UDDI allows for a choice of either a Hosting Redirector OR an Access Point. Access Point is recommend. The access point is usually a URL for the service endpoint.<br>"
+        +"<div style=\"float:left\">Access Point Type: &nbsp;</div><div class=\"edit\" id=\"bindingTemplate"+i+"accessPointType\"></div><div style=\"float:left\">Access Point Value: &nbsp;</div><div class=\"edit\" id=\"bindingTemplate"+i+"accessPointValue\"></div></div>"
+        +"<br><b>tModel Instance Information</b> - a binding template can have additional information attached to it using the tModel Instance.<br>"
+        +"<a href=\"javascript:AddTmodelInstance('bindingTemplate"+i+"tmodelInstance');\"><i class=\"icon-plus-sign\"></i></a> Add a tModel Instance<br>"
+        +"<div id=\"bindingTemplate"+i+"tmodelInstance\" style=\"border-width: 1px; border-style: solid; border-color: red\"></div><br>"
+        +"<b>Binding Template Keyed Reference Categories:</b><br><a href=\"javascript:AddCategoryKeyReferenceSpecific('bindingTemplate"+i+"catbagkeyref');\"><i class=\"icon-plus-sign\"></i></a> Add Key Reference Category <br>"
+        +"<div id=\"bindingTemplate"+i+"catbagkeyref\" style=\"border-width: 1px; border-style: dotted;\"></div><br><b>Binding Template Keyed Reference Groups</b><br>"
+        +"<a href=\"javascript:AddCategoryKeyReferenceGroupSpecificBT('bindingTemplate"+i+"catbaggrpkeyref');\"><i class=\"icon-plus-sign\"></i></a> Add Key Reference Group Category<br>"
+        +"<div id=\"bindingTemplate"+i+"catbaggrpkeyref\" style=\"border-width: 1px; border-style: dotted;\"></div></div>").appendTo("#bindingTemplatesContainer");
+
     Reedit();
-    reselect();
+//reselect();
 
 }
 
@@ -39,15 +108,110 @@ function reselect()
 
 function AddTmodelInstance(div)
 {
+    currentbindingtemplatesInstance++;
+    var i =  currentbindingtemplatesInstance;         
     
+    $("<div id=\"" + div + i + "\" style=\"border-width: 2px; border-style: dashed; border-color: red\">"        
+        +"<div style=\"float:left;height:100%\"><a href=\"javascript:Remove('" + div + i + "');\"><i class=\"icon-remove-sign\"></i></a></div><div style=\"float:left\"><b>tModel Key: </b>&nbsp;</div><div class=\"edit\" id=\"" + div + i + "KeyName\"></div>"
+        +"<br><div style=\"float:left\"><b>tModel Instance Parameters:</b> &nbsp;</div><div class=\"edit\" id=\"" + div + i + "instanceValue\"></div>"
+        +"<br><b>tModel Instance Description</b> - tModel instance infos can have more than one description, such as in a different language.<br>"
+        +"<a href=\"javascript:AddDescriptionSpecific('" + div + i + "instanceDescription');\"><i class=\"icon-plus-sign\"></i></a> Add a tModel Instance Description<br>"
+        +"<div id=\"" + div + i + "instanceDescription\" style=\"border-width: 1px; border-style: groove;\">"
+        //issue
+
+        +"<div><br><b>Overview Documents</b> - These are typically URLs to web pages that describe this tModel's details and usage scenarios.<br>"
+        +"<a href=\"javascript:AddOverviewDocumentSpecific('" + div + i + "instanceoverviewDoc');\"><i class=\"icon-plus-sign\"></i></a> Add an Overview Document<br>"
+        +"<div id=\"" + div + i + "overviewDoc\" style=\"border-width: 1px; border-style: groove;\"></div></div></div></div></div>").appendTo("#"+div);
+    Reedit();
 }
 
 
 function saveService()
 {
+    var url='ajax/saveservicedetails.jsp';
+    var postbackdata = new Array();
+    $("div.edit").each(function()
+    {
+        //TODO filter out (click to edit) values
+        var id=$(this).attr("id");
+        var value=$(this).text();
+        postbackdata.push({
+            name: id, 
+            value: value
+        });
+    }); 
+    postbackdata.push({
+        name:"nonce", 
+        value: $("#nonce").val()
+    });
+    $("div.noedit").each(function()
+    {
+        var id=$(this).attr("id");
+        var value=$(this).text();
+        postbackdata.push({
+            name: id, 
+            value: value
+        });
+    }); 
     
+    
+    var request=   $.ajax({
+        url: url,
+        type:"POST",
+        //  dataType: "html", 
+        cache: false, 
+        //  processData: false,f
+        data: postbackdata
+    });
+                
+                
+    request.done(function(msg) {
+        window.console && console.log('postback done '  + url);                
+        
+        $("#resultBar").html('<a class="close" data-dismiss="alert" href="javascript:hideAlert();">&times;'  + '</a>' + msg);
+        $("#resultBar").show();
+        
+    });
+
+    request.fail(function(jqXHR, textStatus) {
+        window.console && console.log('postback failed ' + url);                                
+        $("#resultBar").html('<a class="close" data-dismiss="alert" href="javascript:hideAlert();">&times;' + '</a>' +jqXHR.responseText );
+        //$(".alert").alert();
+        $("#resultBar").show();
+        
+    });
 }
 function deleteService()
 {
-    
+    var bizid=$("#serviceKey").text();
+    var url='ajax/deleteservice.jsp?id=' + bizid;
+    var postbackdata = new Array();
+    postbackdata.push({
+        name:"nonce", 
+        value: $("#nonce").val()
+    });
+    var request=   $.ajax({
+        url: url,
+        type:"POST",
+        //  dataType: "html", 
+        cache: false, 
+        //  processData: false,f
+        data: postbackdata
+    });
+
+    request.done(function(msg) {
+        window.console && console.log('postback done '  + url);                
+        
+        $("#resultBar").html('<a class="close" data-dismiss="alert" href="javascript:hideAlert();">&times;'  + '</a>' + msg);
+        $("#resultBar").show();
+        
+    });
+
+    request.fail(function(jqXHR, textStatus) {
+        window.console && console.log('postback failed ' + url);                                
+        $("#resultBar").html('<a class="close" data-dismiss="alert" href="javascript:hideAlert();">&times;' + '</a>' + jqXHR.responseText );
+        //$(".alert").alert();
+        $("#resultBar").show();
+        
+    });
 }
\ No newline at end of file

Modified: juddi/branches/juddi-3.2.x/juddi-gui/web/logout.jsp
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/logout.jsp?rev=1462384&r1=1462383&r2=1462384&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/logout.jsp (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/logout.jsp Fri Mar 29 02:43:36 2013
@@ -4,7 +4,7 @@
     Author     : Alex O'Ree
 --%>
 
-<%@page import="org.apache.juddi.webconsole.UddiHub"%>
+<%@page import="org.apache.juddi.webconsole.hub.UddiHub"%>
 <%@page contentType="text/html" pageEncoding="UTF-8"%>
 <%
     UddiHub hub = UddiHub.getInstance(application, session);



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@juddi.apache.org
For additional commands, e-mail: commits-help@juddi.apache.org