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/04/07 18:47:34 UTC

svn commit: r1465423 - in /juddi/branches/juddi-3.2.x/juddi-gui: src/java/org/apache/juddi/webconsole/hub/ src/java/org/apache/juddi/webconsole/resources/ web/

Author: alexoree
Date: Sun Apr  7 16:47:34 2013
New Revision: 1465423

URL: http://svn.apache.org/r1465423
Log:
adding "view as xml" functions for within the gui, useful for advanced users, troubleshooting, or whatever.
work items remaining: internationalize the signing applet, search by publisher, signature validation, all interactions with subscriptions and custody transfer, and support for expired tokens

Modified:
    juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/hub/UddiHub.java
    juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/resources/web.properties
    juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/resources/web_es.properties
    juddi/branches/juddi-3.2.x/juddi-gui/web/businessEditor2.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/header-bottom.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/header-top.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/serviceEditor.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/settings.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/tmodelEditor.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/viewSubscriptions.jsp

Modified: juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/hub/UddiHub.java
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/hub/UddiHub.java?rev=1465423&r1=1465422&r2=1465423&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/hub/UddiHub.java (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/hub/UddiHub.java Sun Apr  7 16:47:34 2013
@@ -18,11 +18,13 @@ package org.apache.juddi.webconsole.hub;
 
 import java.io.ByteArrayInputStream;
 import java.io.InputStream;
+import java.net.URISyntaxException;
 import java.net.URL;
 import java.rmi.RemoteException;
 import java.security.cert.CertificateFactory;
 import java.security.cert.X509Certificate;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
@@ -117,6 +119,17 @@ public class UddiHub {
     }
     String locale = "en";
 
+    public String GetRawConfigurationPath() throws URISyntaxException
+    {
+        return propertiesurl.toString();
+    }
+    
+    public Properties GetRawConfiguration()
+    {
+        return properties;
+    }
+    
+    
     private UddiHub(ServletContext application, HttpSession _session) throws Exception {
         URL prop = application.getResource("/META-INF/config.properties");
         if (prop == null) {
@@ -1104,6 +1117,7 @@ public class UddiHub {
     }
 
     private String FindPublishers(CriteriaType criteria, String parameters, String lang, String[] fq) {
+        //TODO implement
         throw new UnsupportedOperationException("Not yet implemented");
     }
 
@@ -1114,9 +1128,7 @@ public class UddiHub {
             if (fq != null) {
                 fb.setFindQualifiers(new org.uddi.api_v3.FindQualifiers());
                 if (fq != null) {
-                    for (int i = 0; i < fq.length; i++) {
-                        fb.getFindQualifiers().getFindQualifier().add(fq[i]);
-                    }
+                    fb.getFindQualifiers().getFindQualifier().addAll(Arrays.asList(fq));
                 }
             }
             ServiceList findBusiness = null;
@@ -1206,6 +1218,7 @@ public class UddiHub {
                     fb.setName(n);
                     break;
                 case tmodel:
+                    
                     //TODO
                     break;
                 case uid:

Modified: juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/resources/web.properties
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/resources/web.properties?rev=1465423&r1=1465422&r2=1465423&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/resources/web.properties (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/resources/web.properties Sun Apr  7 16:47:34 2013
@@ -232,3 +232,6 @@ items.contact.type=Contact Type
 items.contact.default=(Job Title, Role)
 items.addresstype.default=(headquarters. sales office, billing)
 items.welcome=Welcome
+items.expires=Expires
+items.actions=Actions
+actions.asxml=View as XML

Modified: juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/resources/web_es.properties
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/resources/web_es.properties?rev=1465423&r1=1465422&r2=1465423&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/resources/web_es.properties (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/resources/web_es.properties Sun Apr  7 16:47:34 2013
@@ -233,3 +233,6 @@ items.contact.type=Tipo de Contacto
 items.contact.default=(T\u00edtulo del trabajo, Papel)
 items.addresstype.default=(headquarters. oficina de ventas, facturaci\u00f3n)
 items.welcome=Bienvenido
+items.expires=Expira
+items.actions=Acciones
+actions.asxml=Ver como XML

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=1465423&r1=1465422&r2=1465423&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 Sun Apr  7 16:47:34 2013
@@ -4,7 +4,6 @@
     Author     : Alex O'Ree
 --%>
 
-<%@page import="org.apache.derby.impl.store.access.RAMAccessManager"%>
 <%@page import="java.net.URLEncoder"%>
 <%@page import="org.uddi.api_v3.IdentifierBag"%>
 <%@page import="org.uddi.api_v3.CategoryBag"%>
@@ -584,12 +583,23 @@
                 <a class="btn btn-danger " href="javascript:deleteBusiness();"><%=ResourceLoader.GetResource(session, "actions.delete")%></a> |
                 <a class="btn btn-success " href="signer.jsp?id=<%=URLEncoder.encode(bizid, "UTF-8")%>&type=business"><%=ResourceLoader.GetResource(session, "actions.sign")%></a> |
                 <a class="btn btn-info " href="#" title="Alert me when this entity changes"><%=ResourceLoader.GetResource(session, "actions.subscribe")%></a> |
-                <a class="btn btn-warning " href="#" title="Transfer this entity to another UDDI node"><%=ResourceLoader.GetResource(session, "actions.transfer")%></a>
+                <a class="btn btn-warning " href="#" title="Transfer this entity to another UDDI node"><%=ResourceLoader.GetResource(session, "actions.transfer")%></a> |
+                <a class="btn "  href="javascript:ViewAsXML();"><%=ResourceLoader.GetResource(session, "actions.asxml")%></a>
                 <%}%>
                 <script type="text/javascript" src="js/businessEditor.js"></script>
                 <script type="text/javascript">
                     Reedit();
+                    function ViewAsXML()
+                    {
+                        $.get("ajax/toXML.jsp?id=<%=URLEncoder.encode(bizid, "UTF-8")%>&type=business", function(data){
+                            window.console && console.log('asXml success');                
+                            $("#viewAsXmlContent").html(safe_tags_replace(data));
+                            $( "#viewAsXml" ).modal('show');
+                        });
+                       
+                    }
                 </script>
+
             </div>
         </div>
     </div>

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=1465423&r1=1465422&r2=1465423&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 Sun Apr  7 16:47:34 2013
@@ -10,12 +10,24 @@
 <hr>
 
 <footer>
-    <p><%=ResourceLoader.GetResource(session,"footer.apachecopyright")%></p>
+    <p><%=ResourceLoader.GetResource(session, "footer.apachecopyright")%></p>
 </footer>
- 
 
 
-<div class="modal hide fade" id="viewAsXml"></div>
+
+<div class="modal hide fade" id="viewAsXml">
+    <div class="modal-header">
+        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
+        <h3>As XML</h3>
+    </div>
+    <div class="modal-body" id="viewAsXmlContent">
+        
+        
+    </div>
+    <div class="modal-footer">
+        <a href="#" class="btn"><%=ResourceLoader.GetResource(session, "modal.close")%></a>
+    </div>
+</div>
 </div> <!-- /container -->
 </form>
 </body>

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=1465423&r1=1465422&r2=1465423&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 Sun Apr  7 16:47:34 2013
@@ -124,7 +124,7 @@
                                 <li class="dropdown"><a href="#" data-toggle="dropdown" class="dropdowb-town"><%=ResourceLoader.GetResource(session, "navbar.subscriptions")%><b class="caret"></b></a>
                                     <ul class="dropdown-menu">
                                         <li><a href="viewSubscriptions.jsp" title="<%=ResourceLoader.GetResource(session, "navbar.subscriptions.view.tooltip")%>"><%=ResourceLoader.GetResource(session, "navbar.subscriptions.view")%></a></li>
-                                        <li><a href="serviceBrowse.jsp" title="<%=ResourceLoader.GetResource(session, "navbar.subscriptions.create.tooltip")%>"><%=ResourceLoader.GetResource(session, "navbar.subscriptions.create")%></a></li>
+                                        <li><a href="createSubscription.jsp" title="<%=ResourceLoader.GetResource(session, "navbar.subscriptions.create.tooltip")%>"><%=ResourceLoader.GetResource(session, "navbar.subscriptions.create")%></a></li>
                                     </ul>
                                 </li>
 

Modified: juddi/branches/juddi-3.2.x/juddi-gui/web/serviceEditor.jsp
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/serviceEditor.jsp?rev=1465423&r1=1465422&r2=1465423&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/serviceEditor.jsp (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/serviceEditor.jsp Sun Apr  7 16:47:34 2013
@@ -186,7 +186,7 @@
 
 
 
-                         <b><%=ResourceLoader.GetResource(session, "items.name")%> </b>- 
+                        <b><%=ResourceLoader.GetResource(session, "items.name")%> </b>- 
                         <%=ResourceLoader.GetResource(session, "items.name.descriptions")%><br>
                         <a href="javascript:AddName();"><i class="icon-plus-sign"></i></a><%=ResourceLoader.GetResource(session, "items.name.add")%>
                         <div id="nameContainer" style="border-width: 2px; border-style: solid;" >
@@ -228,7 +228,7 @@
                         <%=ResourceLoader.GetResource(session, "items.categories.description")%>
                         <br><br>
                         <b><%=ResourceLoader.GetResource(session, "items.keyrefcats")%>:</b><br>
-                                                    <a href="javascript:AddCategoryKeyReference();"><i class="icon-plus-sign"></i></a> <%=ResourceLoader.GetResource(session, "items.keyrefcat.add")%> <Br>
+                        <a href="javascript:AddCategoryKeyReference();"><i class="icon-plus-sign"></i></a> <%=ResourceLoader.GetResource(session, "items.keyrefcat.add")%> <Br>
                         <div id="catContainer" style="border-width: 2px; border-style: solid;" >
 
 
@@ -257,7 +257,7 @@
                         <a href="javascript:AddCategoryKeyReferenceGroup();"><i class="icon-plus-sign"></i></a> <%=ResourceLoader.GetResource(session, "items.keyrefgroup.add")%><br>
                         <div id="catContainerGrp" style="border-width: 2px; border-style: solid;" >
 
-                            
+
                             <%
                                 for (int i = 0; i < bd.getCategoryBag().getKeyedReferenceGroup().size(); i++) {
 
@@ -271,8 +271,8 @@
                                             + "<div style=\"float:left;height:100%\"><a href=\"javascript:AddCategoryKeyReferenceGroupKeyRef('" + PostBackConstants.CATBAG_KEY_REF_GRP + i + PostBackConstants.KEY_REF + "');\"><i class=\"icon-plus-sign\"></i></a></div>"
                                             + ResourceLoader.GetResource(session, "items.keyrefcat.add")
                                             + "</div>");
-                                  
-                                    
+
+
                                     for (int k = 0; k < bd.getCategoryBag().getKeyedReferenceGroup().get(i).getKeyedReference().size(); k++) {
 
                                         out.write("<div id=\"" + PostBackConstants.CATBAG_KEY_REF_GRP + i + "keyref" + k + "\" style=\"border-width:1px; border-style:solid\">");
@@ -285,7 +285,7 @@
                                                 + "<div class=\"edit\" id=\"" + PostBackConstants.CATBAG_KEY_REF_GRP + i + "keyref" + k + "KeyValue\">" + StringEscapeUtils.escapeHtml(bd.getCategoryBag().getKeyedReferenceGroup().get(i).getKeyedReference().get(k).getKeyValue()) + "</div>");
                                         out.write("</div>");
                                     }
-                                 
+
                                     out.write("</div>");
                                 }
 
@@ -296,14 +296,14 @@
 
                     <div class="tab-pane" id="bindingtemplates">
                         <b><%=ResourceLoader.GetResource(session, "items.bindingtemplate")%> </b>- <%=ResourceLoader.GetResource(session, "items.bindingtemplate.description")%> <br>
-                        <a href="javascript:AddBindingTemplate();"><i class="icon-plus-sign"></i></a> <%=ResourceLoader.GetResource(session, "items.bindingtemplate.add") %> <Br>
+                        <a href="javascript:AddBindingTemplate();"><i class="icon-plus-sign"></i></a> <%=ResourceLoader.GetResource(session, "items.bindingtemplate.add")%> <Br>
                         <div id="bindingTemplatesContainer" style="border-width: 2px; border-style: solid">
                             <%
                                 for (int i = 0; i < bd.getBindingTemplates().getBindingTemplate().size(); i++) {
                                     out.write("<div id=\"bindingTemplate" + i + "\"  style=\"border-width: 2px; border-style: dashed;; border-color: lightseagreen\" >");
                                     out.write("<div style=\"float:left\">"
                                             + "<a href=\"javascript:Remove('" + PostBackConstants.BINDINGTEMPLATE + i + "');\"><i class=\"icon-remove-sign\"></i></a>"
-                                            + ResourceLoader.GetResource(session, "items.bindingtemplate.key") +": &nbsp;</div>"
+                                            + ResourceLoader.GetResource(session, "items.bindingtemplate.key") + ": &nbsp;</div>"
                                             + "<div class=\"");
                                     if (!newitem) {
                                         out.write("no");
@@ -313,7 +313,7 @@
                                         out.write(StringEscapeUtils.escapeHtml(bd.getBindingTemplates().getBindingTemplate().get(i).getBindingKey()));
                                     }
                                     // out.write("</div>");
-                            %>          
+%>          
                             <br>
                             <a href="javascript:AddDescriptionSpecific('<%=PostBackConstants.BINDINGTEMPLATE + i + PostBackConstants.DESCRIPTION%>');">
                                 <i class="icon-plus-sign"></i></a><%=ResourceLoader.GetResource(session, "items.bindingtemplate.description.add")%> <Br>
@@ -336,7 +336,7 @@
                                     }
                                 %>
                             </div>
-                                <b><%=ResourceLoader.GetResource(session, "items.accesspoint")%></b> - <%=ResourceLoader.GetResource(session, "items.accesspoint.description")%><br>
+                            <b><%=ResourceLoader.GetResource(session, "items.accesspoint")%></b> - <%=ResourceLoader.GetResource(session, "items.accesspoint.description")%><br>
                             <%
 
 
@@ -358,7 +358,7 @@
                             %>
 
                             <br>
-                            <b><%=ResourceLoader.GetResource(session, "items.tmodelinstance.info") %></b> - <%=ResourceLoader.GetResource(session, "items.tmodelinstance.info.desc")%> <br>
+                            <b><%=ResourceLoader.GetResource(session, "items.tmodelinstance.info")%></b> - <%=ResourceLoader.GetResource(session, "items.tmodelinstance.info.desc")%> <br>
                             <a href="javascript:AddTmodelInstance('<%=PostBackConstants.BINDINGTEMPLATE + i + PostBackConstants.TMODELINSTANCE%>');"><i class="icon-plus-sign"></i></a> <%=ResourceLoader.GetResource(session, "items.tmodelinstance.add")%><br>
                             <div id="<%=PostBackConstants.BINDINGTEMPLATE + i + PostBackConstants.TMODELINSTANCE%>" style="border-width: 1px; border-style: solid; border-color: red" >        
                                 <%
@@ -371,11 +371,10 @@
                                                 + "<a href=\"javascript:Remove('" + PostBackConstants.BINDINGTEMPLATE + i + PostBackConstants.TMODELINSTANCE + k + "');\"><i class=\"icon-remove-sign\"></i></a></div>");
 
                                         out.write("<div style=\"float:left\"><b>" + ResourceLoader.GetResource(session, "items.tmodel.key") + ": </b>&nbsp;</div>"
-                                                 
                                                 + "<div class=\"edit\" id=\"" + PostBackConstants.BINDINGTEMPLATE + i + PostBackConstants.TMODELINSTANCE + k + PostBackConstants.KEYNAME + "\">" + StringEscapeUtils.escapeHtml(bd.getBindingTemplates().getBindingTemplate().get(i).getTModelInstanceDetails().getTModelInstanceInfo().get(k).getTModelKey()) + "</div>");
                                         //  out.write("<div style=\"float:left\"><span title=\"Instance Params\">Value</span>:&nbsp;</div>"
                                         //          + "<div class=\"edit\" id=\"" + PostBackConstants.BINDINGTEMPLATE + i + PostBackConstants.TMODELINSTANCE + k + PostBackConstants.VALUE + "\">" + ((bd.getBindingTemplates().getBindingTemplate().get(i).getTModelInstanceDetails().getTModelInstanceInfo().get(k).getInstanceDetails() != null) ? StringEscapeUtils.escapeHtml(bd.getBindingTemplates().getBindingTemplate().get(i).getTModelInstanceDetails().getTModelInstanceInfo().get(k).getInstanceDetails().getInstanceParms()) : "") + "</div>");
-                                    %>
+%>
                                     <br>
                                     <%
 
@@ -449,7 +448,7 @@
                                 </div>
 
                                 <%    } //end of instance details
-                                %>
+%>
                             </div>                                        
                             <%
                                 }
@@ -514,7 +513,7 @@
                         <%
 
                             } //end of binding templates loop
-%>
+                        %>
 
 
                         <%//end of tmodel instance%>
@@ -526,30 +525,30 @@
 
 
 
-               <div class="tab-pane" id="signatures"><b><%=ResourceLoader.GetResource(session, "items.dsigs")%></b>
-                        <br>
-                        <%
-                            if (bd.getSignature().isEmpty()) {
-                                out.write(ResourceLoader.GetResource(session, "items.signed.not"));
-                            } else {
-                                out.write(ResourceLoader.GetResource(session, "items.signed") + " " + bd.getSignature().size());
-                        %>
-                        <table class="table">
+                <div class="tab-pane" id="signatures"><b><%=ResourceLoader.GetResource(session, "items.dsigs")%></b>
+                    <br>
+                    <%
+                        if (bd.getSignature().isEmpty()) {
+                            out.write(ResourceLoader.GetResource(session, "items.signed.not"));
+                        } else {
+                            out.write(ResourceLoader.GetResource(session, "items.signed") + " " + bd.getSignature().size());
+                    %>
+                    <table class="table">
 
 
-                            <%
-                                    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.getServiceKey(), "UTF-8") + "&index=" + k + "\">" + ResourceLoader.GetResource(session, "items.signed.viewcert") + "</a>");
-                                        out.write("</td></tr>");
-                                    }
+                        <%
+                                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.getServiceKey(), "UTF-8") + "&index=" + k + "\">" + ResourceLoader.GetResource(session, "items.signed.viewcert") + "</a>");
+                                    out.write("</td></tr>");
                                 }
+                            }
 
-                            %>
-                        </table>
-                    </div>
+                        %>
+                    </table>
+                </div>
 
                 <div class="tab-pane" id="opinfo">
                     <script type="text/javascript">
@@ -576,17 +575,29 @@
 
         <%        }
             //        <a class="btn btn-primary " href="javascript:saveService();">Save</a> | 
-%>
+        %>
 
 
         <a class="btn btn-danger " href="javascript:deleteService();"><%=ResourceLoader.GetResource(session, "actions.delete")%></a> |
         <a class="btn btn-success " href="signer.jsp?id=<%=URLEncoder.encode(bd.getServiceKey(), "UTF8")%>&type=service"><%=ResourceLoader.GetResource(session, "actions.sign")%></a> |
         <a class="btn btn-info " href="#" title="Alert me when this entity changes"><%=ResourceLoader.GetResource(session, "actions.subscribe")%></a> |
-        <a class="btn btn-warning " href="#" title="Transfer this entity to another UDDI node"><%=ResourceLoader.GetResource(session, "actions.transfer")%></a>
+        <a class="btn btn-warning " href="#" title="Transfer this entity to another UDDI node"><%=ResourceLoader.GetResource(session, "actions.transfer")%></a> |
+        <a class="btn "  href="javascript:ViewAsXML();"><%=ResourceLoader.GetResource(session, "actions.asxml")%></a>
     </div>
     <script type="text/javascript" src="js/businessEditor.js"></script>
     <script type="text/javascript" src="js/serviceEditor.js"></script>
 
+    <script type="text/javascript">
+        function ViewAsXML()
+        {
+            $.get("ajax/toXML.jsp?id=<%=URLEncoder.encode(serviceid, "UTF-8")%>&type=business", function(data){
+                window.console && console.log('asXml success');                
+                $("#viewAsXmlContent").html(safe_tags_replace(data));
+                $( "#viewAsXml" ).modal('show');
+            });
+                       
+        }
+    </script>
     <div class="modal hide fade" id="confirmDialog">
         <div class="modal-header">
             <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>

Modified: juddi/branches/juddi-3.2.x/juddi-gui/web/settings.jsp
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/settings.jsp?rev=1465423&r1=1465422&r2=1465423&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/settings.jsp (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/settings.jsp Sun Apr  7 16:47:34 2013
@@ -4,21 +4,104 @@
     Author     : Alex O'Ree
 --%>
 
+<%@page import="java.util.Iterator"%>
+<%@page import="java.util.Map.Entry"%>
+<%@page import="java.util.Set"%>
+<%@page import="java.util.Properties"%>
 <%@page contentType="text/html" pageEncoding="UTF-8"%>
 <%@include file="header-top.jsp" %>
-        <div class="container">
+<div class="container">
 
-            <!-- Main hero unit for a primary marketing message or call to action -->
-            <div class="well">
-                <h1><%=ResourceLoader.GetResource(session, "navbar.settings")%></h1>
-            </div>
-
-            <!-- Example row of columns -->
-            <div class="row">
-                <div class="span12">
-                    <h2><%=ResourceLoader.GetResource(session, "navbar.settings")%></h2>
-                    <p><%=ResourceLoader.GetResource(session, "items.settings.description")%></p>
-                    <p><a class="btn" href="businessBrowse.jsp"><%=ResourceLoader.GetResource(session, "viewdetails")%> &raquo;</a></p>
-                </div>
-            </div>
-<%@include file="header-bottom.jsp" %>
\ No newline at end of file
+    <!-- Main hero unit for a primary marketing message or call to action -->
+    <div class="well">
+        <h1><%=ResourceLoader.GetResource(session, "navbar.settings")%></h1>
+    </div>
+
+    <!-- Example row of columns -->
+    <div class="row">
+        <div class="span12">
+            <h2><%=ResourceLoader.GetResource(session, "navbar.settings")%></h2>
+            <p><%=ResourceLoader.GetResource(session, "items.settings.description")%></p>
+
+            <table class="table table-hover">
+                <tr><th>Key</th><th>Value</th></tr>
+                <%
+
+                    UddiHub x = UddiHub.getInstance(application, session);
+                    Properties p = x.GetRawConfiguration();
+                    Set<Entry<Object, Object>> set = p.entrySet();
+                    Iterator<Entry<Object, Object>> it = set.iterator();
+                    while (it.hasNext()) {
+                        out.write("<tr><td>");
+                        Entry<Object, Object> item = (Entry<Object, Object>) it.next();
+                        String key = (String) item.getKey();
+                        String value = (String) item.getValue();
+                        out.write(StringEscapeUtils.escapeHtml(key));
+                        out.write("</td><td><div class=\"edit\" id=\"" + StringEscapeUtils.escapeHtml(key) + "\">");
+                        out.write(StringEscapeUtils.escapeHtml(value));
+                        out.write("</div></td></tr>");
+                    }
+                %>
+            </table>
+            <a class="btn btn-primary " href="javascript:saveSettings();"><%=ResourceLoader.GetResource(session, "actions.save")%></a>
+            <script type="text/javascript">
+                
+                Reedit();
+                function saveSettings()
+                {
+                    var url='ajax/settings.jsp';
+                    var postbackdata = new Array();
+                    $("div.edit").each(function()
+                    {
+                        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",
+                        //  data" + i18n_type + ": "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();
+        
+                    });
+                }
+            </script>
+        </div>
+    </div>
+    <%@include file="header-bottom.jsp" %>
\ No newline at end of file

Modified: juddi/branches/juddi-3.2.x/juddi-gui/web/tmodelEditor.jsp
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/tmodelEditor.jsp?rev=1465423&r1=1465422&r2=1465423&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/tmodelEditor.jsp (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/tmodelEditor.jsp Sun Apr  7 16:47:34 2013
@@ -57,7 +57,7 @@
                 <li><a href="#categories" ><%=ResourceLoader.GetResource(session, "pages.editor.tabnav.categories")%></a></li>
 
                 <li><a href="#identifiers" ><%=ResourceLoader.GetResource(session, "pages.editor.tabnav.identifiers")%></a></li>
-                  
+
                 <li><a href="#signatures" ><%=ResourceLoader.GetResource(session, "pages.editor.tabnav.signatures")%></a></li>
             </ul>
             <script type="text/javascript">
@@ -129,7 +129,7 @@
                         %></div><br>
 
 
-                        <%=ResourceLoader.GetResource(session, "items.tmodel.name")%>
+                    <%=ResourceLoader.GetResource(session, "items.tmodel.name")%>
 
                     <%
 
@@ -140,7 +140,7 @@
                         out.write("<div style=\"float:left; height:100%\"><a href=\"javascript:Remove('Name');\"><i class=\"icon-remove-sign\"></i></a></div>");
                         out.write("<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.value") + ":&nbsp;</div>"
                                 + "<div class=\"edit\" id=\"" + PostBackConstants.NAME + PostBackConstants.VALUE + "\">" + (bd.getName().getValue() == null ? " " : StringEscapeUtils.escapeHtml(bd.getName().getValue())) + "</div>");
-                        out.write("<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.lang") +":&nbsp;</div>"
+                        out.write("<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.lang") + ":&nbsp;</div>"
                                 + "<div class=\"edit\" id=\"" + PostBackConstants.NAME + PostBackConstants.LANG + "\">"
                                 + ((bd.getName().getLang() == null ? " " : StringEscapeUtils.escapeHtml(bd.getName().getLang())))
                                 + "</div>");
@@ -160,7 +160,7 @@
                                     out.write("<div style=\"float:left;height:100%\"><a href=\"javascript:Remove('Description" + i + "');\"><i class=\"icon-remove-sign\"></i></a></div>");
                                     out.write("<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.value") + ":&nbsp;</div>"
                                             + "<div class=\"edit\" id=\"" + PostBackConstants.DESCRIPTION + i + PostBackConstants.VALUE + "\">" + StringEscapeUtils.escapeHtml(bd.getDescription().get(i).getValue()) + "</div>");
-                                    out.write("<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.lang") +":&nbsp;</div>"
+                                    out.write("<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.lang") + ":&nbsp;</div>"
                                             + "<div class=\"edit\" id=\"" + PostBackConstants.DESCRIPTION + i + PostBackConstants.LANG + "\">"
                                             + (bd.getDescription().get(i).getLang() != null
                                             ? StringEscapeUtils.escapeHtml(bd.getDescription().get(i).getLang()) : "")
@@ -182,7 +182,7 @@
                             out.write("<div style=\"float:left;height:100%\"><a href=\"javascript:Remove('" + PostBackConstants.OVERVIEW + i + "');\"><i class=\"icon-remove-sign\"></i></a></div>");
                             out.write("<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.value") + ":&nbsp;</div>"
                                     + "<div class=\"edit\" id=\"" + PostBackConstants.OVERVIEW + i + PostBackConstants.VALUE + "\">" + StringEscapeUtils.escapeHtml(bd.getOverviewDoc().get(i).getOverviewURL().getValue()) + "</div>");
-                            out.write("<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.type") +":&nbsp;</div>"
+                            out.write("<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.type") + ":&nbsp;</div>"
                                     + "<div class=\"edit\" id=\"" + PostBackConstants.OVERVIEW + i + PostBackConstants.TYPE + "\">" + StringEscapeUtils.escapeHtml(bd.getOverviewDoc().get(i).getOverviewURL().getUseType()) + "</div>");
 
                     %>
@@ -195,7 +195,7 @@
                                 out.write("<div style=\"float:left;height:100%\"><a href=\"javascript:Remove('" + PostBackConstants.OVERVIEW + i + PostBackConstants.DESCRIPTION + k + "');\"><i class=\"icon-remove-sign\"></i></a></div>");
                                 out.write("<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.value") + ":&nbsp;</div>"
                                         + "<div class=\"edit\" id=\"" + PostBackConstants.OVERVIEW + i + PostBackConstants.DESCRIPTION + k + PostBackConstants.VALUE + "\">" + StringEscapeUtils.escapeHtml(bd.getOverviewDoc().get(i).getDescription().get(k).getValue()) + "</div>");
-                                out.write("<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.lang") +":&nbsp;</div>"
+                                out.write("<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.lang") + ":&nbsp;</div>"
                                         + "<div class=\"edit\" id=\"" + PostBackConstants.OVERVIEW + i + PostBackConstants.DESCRIPTION + k + PostBackConstants.LANG + "\">" + StringEscapeUtils.escapeHtml(bd.getOverviewDoc().get(i).getDescription().get(k).getLang()) + "</div>");
                                 out.write("</div>"); //end of this instance of overview doc description
                             }
@@ -220,13 +220,13 @@
                             for (int i = 0; i < bd.getCategoryBag().getKeyedReference().size(); i++) {
 
                                 out.write("<div id=\"" + PostBackConstants.CATBAG_KEY_REF + i + "\" style=\"border-width:2px; border-style:solid\">");
-                                out.write("<div style=\"float:left;height:100%\"><a href=\"javascript:Remove('"+ PostBackConstants.CATBAG_KEY_REF + i + "');\"><i class=\"icon-remove-sign\"></i></a></div>");
+                                out.write("<div style=\"float:left;height:100%\"><a href=\"javascript:Remove('" + PostBackConstants.CATBAG_KEY_REF + i + "');\"><i class=\"icon-remove-sign\"></i></a></div>");
                                 out.write("<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.key") + ": &nbsp;</div>"
-                                        + "<div class=\"edit\" id=\""+ PostBackConstants.CATBAG_KEY_REF + i + "Value\">" + StringEscapeUtils.escapeHtml(bd.getCategoryBag().getKeyedReference().get(i).getTModelKey()) + "</div>");
+                                        + "<div class=\"edit\" id=\"" + PostBackConstants.CATBAG_KEY_REF + i + "Value\">" + StringEscapeUtils.escapeHtml(bd.getCategoryBag().getKeyedReference().get(i).getTModelKey()) + "</div>");
                                 out.write("<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.name") + ": &nbsp;</div>"
-                                        + "<div class=\"edit\" id=\""+ PostBackConstants.CATBAG_KEY_REF + i + "KeyName\">" + StringEscapeUtils.escapeHtml(bd.getCategoryBag().getKeyedReference().get(i).getKeyName()) + "</div>");
+                                        + "<div class=\"edit\" id=\"" + PostBackConstants.CATBAG_KEY_REF + i + "KeyName\">" + StringEscapeUtils.escapeHtml(bd.getCategoryBag().getKeyedReference().get(i).getKeyName()) + "</div>");
                                 out.write("<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.value") + ": &nbsp;</div>"
-                                        + "<div class=\"edit\" id=\""+ PostBackConstants.CATBAG_KEY_REF + i + "KeyValue\">" + StringEscapeUtils.escapeHtml(bd.getCategoryBag().getKeyedReference().get(i).getKeyValue()) + "</div>");
+                                        + "<div class=\"edit\" id=\"" + PostBackConstants.CATBAG_KEY_REF + i + "KeyValue\">" + StringEscapeUtils.escapeHtml(bd.getCategoryBag().getKeyedReference().get(i).getKeyValue()) + "</div>");
                                 out.write("</div>");
                             }
                         %>
@@ -291,12 +291,18 @@
                     <%        }
                     %>
 
-                    <a class="btn btn-danger " href="javascript:deletetModel();"><%=ResourceLoader.GetResource(session, "actions.delete")%></a> |
+
+                    <a class="btn btn-danger " href="javascript:deletetModel();"><%=ResourceLoader.GetResource(session, "actions.delete")%></a>
+                    <%
+                        if (!newitem) {
+                    %>|
                     <a class="btn btn-success " href="signer.jsp?id=<%=URLEncoder.encode(bd.getTModelKey(), "UTF8")%>&type=business"><%=ResourceLoader.GetResource(session, "actions.sign")%></a> |
                     <a class="btn btn-info " href="#" title="Alert me when this entity changes"><%=ResourceLoader.GetResource(session, "actions.subscribe")%></a> |
-                    <a class="btn btn-warning " href="#" title="Transfer this entity to another UDDI node"><%=ResourceLoader.GetResource(session, "actions.transfer")%></a>
-
-
+                    <a class="btn btn-warning " href="#" title="Transfer this entity to another UDDI node"><%=ResourceLoader.GetResource(session, "actions.transfer")%></a> |
+                    <a class="btn "  href="javascript:ViewAsXML();"><%=ResourceLoader.GetResource(session, "actions.asxml")%></a>
+                    <%
+                        }
+                    %>
 
 
                 </div>
@@ -305,6 +311,15 @@
             <script src="js/businessEditor.js"></script>
             <script type="text/javascript">
                 Reedit();
+                function ViewAsXML()
+                {
+                    $.get("ajax/toXML.jsp?id=<%=URLEncoder.encode(bd.getTModelKey(), "UTF-8")%>&type=business", function(data){
+                        window.console && console.log('asXml success');                
+                        $("#viewAsXmlContent").html(safe_tags_replace(data));
+                        $( "#viewAsXml" ).modal('show');
+                    });
+                       
+                }
             </script>
 
             </p>

Modified: juddi/branches/juddi-3.2.x/juddi-gui/web/viewSubscriptions.jsp
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/viewSubscriptions.jsp?rev=1465423&r1=1465422&r2=1465423&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/viewSubscriptions.jsp (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/viewSubscriptions.jsp Sun Apr  7 16:47:34 2013
@@ -1,4 +1,20 @@
 <%-- 
+/*
+ * Copyright 2001-2013 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
     Document   : view subscriptions
     Created on : March 28, 2013, 9:31:19 PM
     Author     : Alex O'Ree
@@ -18,15 +34,15 @@
 
     <!-- Main hero unit for a primary marketing message or call to action -->
     <div class="well">
-        <h1>Subscriptions</h1>
+        <h1><%=ResourceLoader.GetResource(session, "navbar.subscriptions")%></h1>
     </div>
 
     <!-- Example row of columns -->
     <div class="row">
         <div class="span12">
             <p>
-               <%=ResourceLoader.GetResource(session, "pages.viewsubscriptions.content")%>
-                
+                <%=ResourceLoader.GetResource(session, "pages.viewsubscriptions.content")%>
+
             </p>
             <h2><%=ResourceLoader.GetResource(session, "pages.viewsubscriptions.listingheader")%></h2>
             <%
@@ -38,32 +54,38 @@
                 }
 
             %>
-            <table class="table">
+
+            <%
+                if (list != null) {
+                    if (!list.isEmpty()) {
+            %>
+            <table class="table table-hover">
+                <tr><th><%=ResourceLoader.GetResource(session, "items.key")%></th><th><%=ResourceLoader.GetResource(session, "items.expires")%></th><th><%=ResourceLoader.GetResource(session, "items.actions")%></th></tr>
+
                 <%
-                    if (list != null) {
-                        for (int i = 0; i < list.size(); i++) {
-                            out.write("<tr><td>");
-                            out.write(StringEscapeUtils.escapeHtml(list.get(i).getSubscriptionKey()));
-                            out.write("</td><td>");
-                            out.write(StringEscapeUtils.escapeHtml(list.get(i).getExpiresAfter().toString()));
-                            out.write("</td></tr>");
-                        }
-                        if (list.isEmpty()) {
-                            out.write(ResourceLoader.GetResource(session, "pages.viewsubscriptions.nosubs"));
-                        }
+                    for (int i = 0; i < list.size(); i++) {
+                        out.write("<tr><td>");
+                        out.write(StringEscapeUtils.escapeHtml(list.get(i).getSubscriptionKey()));
+                        out.write("</td><td>");
+                        out.write(StringEscapeUtils.escapeHtml(list.get(i).getExpiresAfter().toString()));
+                        out.write("</td><td>");
+                        out.write("<i class=\"icon-edit\"></i> ");
+                        out.write("<i class=\"icon-remove\"></i> ");
+                        out.write("<i class=\"icon-zoom-in\"></i> ");
+
+                        out.write("</td></tr>");
+                        out.write("<tr><td colspan=\"3\"><div id=\"" + StringEscapeUtils.escapeHtml(list.get(i).getSubscriptionKey()) + "\"></div></td></tr>");
                     }
                 %>
             </table>
-            
-            <h2>jUDDI Callback Subscriptions</h2>
             <%
-            if (!x.IsJuddiRegistry())
-                out.write(ResourceLoader.GetResource(session, "errors.juddiapi.without.juddi"));
-            else
-                               {
-                   // x.getJUDDISubscriptions
-            }
+                    } else
+                        out.write(ResourceLoader.GetResource(session, "pages.viewsubscriptions.nosubs"));
+
+                }
             %>
+
+
         </div>
     </div>
     <%@include file="header-bottom.jsp" %>
\ No newline at end of file



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