[prev in list] [next in list] [prev in thread] [next in thread]
List: juddi-cvs
Subject: svn commit: r1460942 [8/17] - in /juddi/branches/juddi-3.2.x: juddi-client/src/main/java/org/apache/
From: alexoree () apache ! org
Date: 2013-03-26 1:17:48
Message-ID: 20130326011753.888CE2388A74 () eris ! apache ! org
[Download RAW message or body]
Added: 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=1460942&view=auto
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/META-INF/config.properties (added)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/META-INF/config.properties Tue Mar 26 \
01:17:45 2013 @@ -0,0 +1,22 @@
+# To change this template, choose Tools | Templates
+# and open the template in the editor.
+
+
+inquiryurl=http://localhost:8080/juddiv3/services/inquiry?wsdl
+publishurl=http://localhost:8080/juddiv3/services/publish?wsdl
+securityurl=http://localhost:8080/juddiv3/services/security?wsdl
+
+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
+authtype=UDDI_AUTH
+
+registryType=juddi
+#future use
+
+
+#javax.net.ssl.keyStore
+#javax.net.ssl.keyStorePassword
+#javax.net.ssl.trustStore
+#javax.net.ssl.trustStorePassword
\ No newline at end of file
Added: juddi/branches/juddi-3.2.x/juddi-gui/web/META-INF/context.xml
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/META-INF/context.xml?rev=1460942&view=auto
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/META-INF/context.xml (added)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/META-INF/context.xml Tue Mar 26 01:17:45 \
2013 @@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Context antiJARLocking="true" path="/UDDIBrowser"/>
Added: juddi/branches/juddi-3.2.x/juddi-gui/web/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/WEB-INF/web.xml?rev=1460942&view=auto
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/WEB-INF/web.xml (added)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/WEB-INF/web.xml Tue Mar 26 01:17:45 2013
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" \
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" \
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee \
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> + <listener>
+ <listener-class>org.apache.juddi.webconsole.StartupServlet</listener-class>
+ </listener>
+ <session-config>
+ <session-timeout>
+ 30
+ </session-timeout>
+ </session-config>
+ <welcome-file-list>
+ <welcome-file>index.jsp</welcome-file>
+ </welcome-file-list>
+</web-app>
Added: 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=1460942&view=auto
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/businessdetails.jsp (added)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/businessdetails.jsp Tue Mar 26 \
01:17:45 2013 @@ -0,0 +1,14 @@
+<%--
+ Document : businessdetails
+ Created on : Feb 24, 2013, 10:49:18 AM
+ Author : Alex O'Ree
+--%>
+
+<%@page import="org.apache.juddi.webconsole.UddiHub"%>
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+<%@include file="../csrf.jsp" %>
+<!DOCTYPE html>
+<%
+ UddiHub x = UddiHub.getInstance(application, request.getSession());
+ out.write(x.GetBusinessDetailsAsHtml(request.getParameter("id")));
+%>
\ No newline at end of file
Added: 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=1460942&view=auto
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/businesssearch.jsp (added)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/businesssearch.jsp Tue Mar 26 \
01:17:45 2013 @@ -0,0 +1,56 @@
+<%--
+ Document : businessbrowse
+ Created on : Mar 12, 2013, 9:40:19 PM
+ Author : Alex O'Ree
+--%>
+
+<%@page import="org.apache.juddi.webconsole.PostBackConstants"%>
+<%@page import="org.apache.juddi.webconsole.PagableContainer"%>
+<%@page import="org.apache.juddi.webconsole.UddiHub"%>
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+<%@include file="../csrf.jsp" %>
+<%
+
+ UddiHub x = UddiHub.getInstance(application, request.getSession());
+ int offset = 0;
+ int maxrecords = 20;
+ String lang = request.getParameter("lang");
+ if (lang == null || lang.length() == 0) {
+ lang = null;
+ }
+ if (lang!=null && lang.equalsIgnoreCase(PostBackConstants.CLICK_TO_EDIT)) {
+ lang = null;
+ }
+ String keyword = "%";
+ try {
+ offset = Integer.parseInt(request.getParameter("offset"));
+ if (offset < 0) {
+ offset = 0;
+ }
+ } catch (Exception ex) {
+ }
+ try {
+ keyword =(request.getParameter("keyword"));
+ if (keyword==null || keyword.length()==0)
+ keyword="%";
+ } catch (Exception ex) {
+ keyword="%";
+ }
+ try {
+ maxrecords = Integer.parseInt(request.getParameter("maxrecords"));
+ if (maxrecords <= 0 || maxrecords > 50) {
+ maxrecords = 50;
+ }
+ } catch (Exception ex) {
+ }
+//public PagableContainer GetBusinessListAsHtml(int offset, int maxrecords, String \
keyword) { + PagableContainer ret= (x.GetBusinessListAsHtml(offset, maxrecords, \
keyword, lang)); + out.write(ret.renderedHtml);
+%>
+<script type="text/javascript">
+ totalrecords=<%=ret.totalrecords%>;
+ $("#totalrecords").text(totalrecords);
+ $("#offset").text(<%=offset%>);
+ $("#displayreco rds").text (<%=ret.displaycount%>);
+ refresh();
+</script>
\ No newline at end of file
Added: juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/deletebusiness.jsp
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/deletebusiness.jsp?rev=1460942&view=auto
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/deletebusiness.jsp (added)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/deletebusiness.jsp Tue Mar 26 \
01:17:45 2013 @@ -0,0 +1,16 @@
+<%--
+ Document : deletebusiness
+ Created on : Feb 27, 2013, 8:39:54 PM
+ Author : Alex O'Ree
+--%>
+
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+
+<%@include file="../csrf.jsp" %>
+<%
+ if (request.getMethod().equalsIgnoreCase("POST")) {
+ UddiHub x =UddiHub.getInstance(application, session);
+ out.write(x.deleteBusiness(request.getParameter("id")));
+ }
+
+%>
\ No newline at end of file
Added: 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=1460942&view=auto
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/deleteservice.jsp (added)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/deleteservice.jsp Tue Mar 26 \
01:17:45 2013 @@ -0,0 +1,9 @@
+<%--
+ Document : deleteservice
+ Created on : Mar 16, 2013, 12:25:13 PM
+ Author : Alex O'Ree
+--%>
+
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+<!DOCTYPE html>
+
Added: juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/deletetmodel.jsp
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/deletetmodel.jsp?rev=1460942&view=auto
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/deletetmodel.jsp (added)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/deletetmodel.jsp Tue Mar 26 \
01:17:45 2013 @@ -0,0 +1,16 @@
+<%--
+ Document : deleteTmodel
+ Created on : Feb 27, 2013, 8:39:54 PM
+ Author : Alex O'Ree
+--%>
+
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+
+<%@include file="../csrf.jsp" %>
+<%
+ if (request.getMethod().equalsIgnoreCase("POST")) {
+ UddiHub x =UddiHub.getInstance(application, session);
+ out.write(x.deleteTmodel(request.getParameter("id")));
+ }
+
+%>
\ No newline at end of file
Added: 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=1460942&view=auto
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/loginpost.jsp (added)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/loginpost.jsp Tue Mar 26 01:17:45 \
2013 @@ -0,0 +1,36 @@
+<%--
+ Document : loginpost
+ Created on : Feb 24, 2013, 3:36:37 PM
+ Author : Alex O'Ree
+--%>
+
+<%@page import="java.util.Properties"%>
+<%@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 contentType="text/html" pageEncoding="UTF-8"%>
+<!DOCTYPE html>
+<%@include file="../csrf.jsp" %>
+<%
+
+ URL prop = application.getResource("/META-INF/config.properties");
+ if (prop == null) {
+ throw new Exception("Cannot locate the configuration file.");
+ }
+
+ InputStream in = prop.openStream();
+ Properties p = new Properties();
+ p.load(in);
+ in.close();
+ session.setAttribute("username", request.getParameter("username"));
+ session.setAttribute("password", AES.Encrypt(request.getParameter("password"), \
(String)p.get("key"))); +
+
+
+ UddiHub.reset(request.getSession());
+ UddiHub x = UddiHub.getInstance(application, request.getSession());
+
+
+
+%>
\ No newline at end of file
Added: 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=1460942&view=auto
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/saveFromXML.jsp (added)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/saveFromXML.jsp Tue Mar 26 01:17:45 \
2013 @@ -0,0 +1,59 @@
+<%--
+ Document : fromXML
+ Created on : Mar 24, 2013, 9:31:37 AM
+ Author : Alex O'Ree
+--%><%@page import="org.apache.juddi.jaxb.JAXBMarshaller"%>
+<%@page import="org.uddi.api_v3.TModel"%>
+<%@page import="org.uddi.api_v3.BindingTemplate"%>
+<%@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"%><% +
+ UddiHub x = UddiHub.getInstance(application, session);
+ if (request.getMethod().equalsIgnoreCase("POST")) {
+ String type = request.getParameter("type");
+ String id = request.getParameter("id");
+ if ((type != null && type.length() != 0) && (id != null && id.length() != \
0)) { +
+
+ String signedxml = request.getParameter("data");
+ if (signedxml == null) {
+ out.write("no input");
+ } else {
+ signedxml = signedxml.trim();
+ if (signedxml.startsWith("<?xml ")) {
+ int idx=signedxml.indexOf(">");
+ signedxml = signedxml.substring(idx+1, \
signedxml.length()).trim(); +
+ }
+ Object j = JAXBMarshaller.unmarshallFromString(signedxml.trim(), \
JAXBMarshaller.PACKAGE_UDDIAPI); +
+ if (type.equalsIgnoreCase("business")) {
+ BusinessEntity be = (BusinessEntity) j;
+ out.write(x.SaveBusinessDetails(be));
+ } else if (type.equalsIgnoreCase("service")) {
+ BusinessService be = (BusinessService) j;
+ out.write(x.SaveService(be));
+ } else if (type.equalsIgnoreCase("bindingTemplate")) {
+ BindingTemplate be = (BindingTemplate) j;
+ out.write(x.SaveBindingTemplate(be));
+ } else if (type.equalsIgnoreCase("tModel")) {
+ TModel be = (TModel) j;
+ out.write(x.SaveTModel(be));
+ } else {
+ out.write("Unrecongized entity type");
+ }
+ }
+ }
+ }
+
+
+
+ //get parameter type
+ //fetch from UDDI
+ //convert to string and output
+
+
+
+%>
\ No newline at end of file
Added: 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=1460942&view=auto
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/savebusiness.jsp (added)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/savebusiness.jsp Tue Mar 26 \
01:17:45 2013 @@ -0,0 +1,28 @@
+<%--
+ Document : savebusiness
+ Created on : Feb 26, 2013, 6:57:52 AM
+ Author : Alex O'Ree
+--%>
+
+<%@page import="org.apache.juddi.webconsole.UddiHub"%>
+<%@page import="java.util.Enumeration"%>
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+<%@include file="../csrf.jsp" %>
+<%
+ if (request.getMethod().equalsIgnoreCase("POST")) {
+ /* Enumeration it = request.getParameterNames();
+ while (it.hasMoreElements()) {
+ String name = (String) it.nextElement();
+ out.write(name + " " + request.getParameter(name) + "<br>");
+ }*/
+ //out.write("success");
+ UddiHub hub = UddiHub.getInstance(application, session);
+
+ out.write(hub.SaveBusinessDetails(request));
+ /*
+ * first loop through to validate the data
+ * second loop identify counts of each item, we may have to extend the class \
structure to make it countable + */
+ }
+
+%>
\ No newline at end of file
Added: 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=1460942&view=auto
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/saveservicedetails.jsp (added)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/saveservicedetails.jsp Tue Mar 26 \
01:17:45 2013 @@ -0,0 +1,19 @@
+<%--
+ Document : saveservicedetails
+ Created on : Feb 24, 2013, 3:12:11 PM
+ Author : Alex O'Ree
+--%>
+
+<%@page import="org.apache.juddi.webconsole.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);
+ }
+
+
+%>
\ No newline at end of file
Added: 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=1460942&view=auto
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/savetmodel.jsp (added)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/savetmodel.jsp Tue Mar 26 01:17:45 \
2013 @@ -0,0 +1,28 @@
+<%--
+ Document : savebusiness
+ Created on : Feb 26, 2013, 6:57:52 AM
+ Author : Alex O'Ree
+--%>
+
+<%@page import="org.apache.juddi.webconsole.UddiHub"%>
+<%@page import="java.util.Enumeration"%>
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+<%@include file="../csrf.jsp" %>
+<%
+ if (request.getMethod().equalsIgnoreCase("POST")) {
+ /* Enumeration it = request.getParameterNames();
+ while (it.hasMoreElements()) {
+ String name = (String) it.nextElement();
+ out.write(name + " " + request.getParameter(name) + "<br>");
+ }*/
+ //out.write("success");
+ UddiHub hub = UddiHub.getInstance(application, session);
+
+ out.write(hub.SaveTModel(request));
+ /*
+ * first loop through to validate the data
+ * second loop identify counts of each item, we may have to extend the class \
structure to make it countable + */
+ }
+
+%>
\ No newline at end of file
Added: 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=1460942&view=auto
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/search.jsp (added)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/search.jsp Tue Mar 26 01:17:45 2013
@@ -0,0 +1,80 @@
+<%--
+ Document : search
+ Created on : Mar 19, 2013, 2:01:55 PM
+ Author : Alex O'Ree
+--%>
+
+<%@page import="org.apache.juddi.webconsole.UddiHub.FindType"%>
+<%@page import="org.apache.juddi.webconsole.UddiHub.CriteriaType"%>
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+<!DOCTYPE html>
+<%@include file="../csrf.jsp" %>
+<%
+ if (request.getMethod().equalsIgnoreCase("post")) {
+ String lang = request.getParameter("lang");
+ //searchcriteria name category key tmodel
+ String selection = request.getParameter("selection");
+ //searchcontent the thing we're looking for
+ String searchcontent = request.getParameter("searchcontent");
+ //findqualifier - use value as is
+ String[] findqualifier = request.getParameterValues("findqualifier");
+ //type of thing we need business service bindingTemplate tModel
+ String searchfor = request.getParameter("searchfor");
+ boolean ok = true;
+ if (selection == null) {
+ ok = false;
+ }
+
+ if (!ok) {
+ response.sendRedirect("../index.jsp");
+ }
+ CriteriaType criteria = null;
+ if (selection.equalsIgnoreCase("name")) {
+ criteria = CriteriaType.Name;
+ }
+ if (selection.equalsIgnoreCase("category")) {
+ criteria = CriteriaType.Category;
+ }
+ if (selection.equalsIgnoreCase("key")) {
+ criteria = CriteriaType.uid;
+ }
+ if (selection.equalsIgnoreCase("tmodel")) {
+ criteria = CriteriaType.tmodel;
+ }
+
+ if (criteria == null) {
+ ok = false;
+ }
+ if (!ok) {
+ response.sendRedirect("../index.jsp");
+ }
+ FindType type = null;
+ if (searchfor.equalsIgnoreCase("business")) {
+ type = FindType.Business;
+ }
+ if (searchfor.equalsIgnoreCase("service")) {
+ type = FindType.Service;
+ }
+ if (searchfor.equalsIgnoreCase("bindingTemplate")) {
+ type = FindType.BindingTemplate;
+ }
+ if (searchfor.equalsIgnoreCase("tModel")) {
+ type = FindType.tModel;
+ }
+ if (searchfor.equalsIgnoreCase("Publisher")) {
+ type = FindType.Publisher;
+ }
+ if (type == null) {
+ ok = false;
+ }
+ if (!ok) {
+ response.sendRedirect("../index.jsp");
+ }
+
+ UddiHub x = UddiHub.getInstance(application, session);
+ out.write(x.Search(type, criteria, searchcontent, lang, findqualifier));
+ } else {
+ response.sendRedirect("../index.jsp");
+ }
+
+%>
\ No newline at end of file
Added: 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=1460942&view=auto
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/servicedetails.jsp (added)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/servicedetails.jsp Tue Mar 26 \
01:17:45 2013 @@ -0,0 +1,15 @@
+<%--
+ Document : servicedetails
+ Created on : Feb 24, 2013, 1:55:14 PM
+ Author : Alex O'Ree
+--%>
+
+<%@page import="org.apache.juddi.webconsole.UddiHub"%>
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+<%@include file="../csrf.jsp" %>
+<!DOCTYPE html>
+<%
+ UddiHub x = UddiHub.getInstance(application, request.getSession());
+
+ out.write(x.GetServiceDetailAsHtml(request.getParameter("id")));
+%>
\ No newline at end of file
Added: 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=1460942&view=auto
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/servicelist.jsp (added)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/servicelist.jsp Tue Mar 26 01:17:45 \
2013 @@ -0,0 +1,15 @@
+<%--
+ Document : businesslist
+ Created on : Feb 24, 2013, 10:27:22 AM
+ Author : Alex O'Ree
+--%>
+
+
+<%@page import="org.apache.juddi.webconsole.UddiHub"%>
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+<%@include file="../csrf.jsp" %>
+<!DOCTYPE html>
+<%
+ UddiHub x = UddiHub.getInstance(application, request.getSession());
+ out.write(x.GetServiceList(request.getParameter("id")));
+%>
\ No newline at end of file
Added: 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=1460942&view=auto
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/servicesearch.jsp (added)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/servicesearch.jsp Tue Mar 26 \
01:17:45 2013 @@ -0,0 +1,55 @@
+<%--
+ Document : servicesearch
+ Created on : Feb 27, 2013, 4:46:08 PM
+ Author : Alex O'Ree
+--%>
+
+
+<%@page import="org.apache.juddi.webconsole.PostBackConstants"%>
+<%@page import="org.apache.juddi.webconsole.PagableContainer"%>
+<%@page import="org.apache.juddi.webconsole.UddiHub"%>
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+<%@include file="../csrf.jsp" %>
+<!DOCTYPE html>
+<%
+ UddiHub x = UddiHub.getInstance(application, request.getSession());
+ //keyword=' + keyword + "&offset=" + offset + "&maxrecords=" + maxrecords
+ int maxrecords = 50;
+ int offset = 0;
+ String lang = request.getParameter("lang");
+ if (lang == null || lang.length() == 0) {
+ lang = null;
+ }
+ if (lang != null && lang.equalsIgnoreCase(PostBackConstants.CLICK_TO_EDIT)) {
+ lang = null;
+ }
+ String keyword = request.getParameter("keyword");
+ if (keyword == null || keyword.length() == 0) {
+ keyword = "%";
+ }
+ try {
+ maxrecords = Integer.parseInt(request.getParameter("maxrecords"));
+ } catch (Exception ex) {
+ }
+ try {
+ offset = Integer.parseInt(request.getParameter("offset"));
+ } catch (Exception ex) {
+ }
+ if (offset < 0) {
+ offset = 0;
+ }
+ if (maxrecords > 50) {
+ maxrecords = 50;
+ }
+
+ PagableContainer ret = (x.SearchForServices(keyword, lang, maxrecords, offset));
+ out.write(ret.renderedHtml);
+
+%>
+<script type="text/javascript">
+ totalrecords=<%=ret.totalrecords%>;
+ $("#totalrecords").text(totalrecords);
+ $("#offset").text(<%=offset%>);
+ $("#displayrecords").text (<%=ret.displaycount%>);
+ refresh();
+</script>
\ No newline at end of file
Added: 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=1460942&view=auto
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/tmodel.jsp (added)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/tmodel.jsp Tue Mar 26 01:17:45 2013
@@ -0,0 +1,19 @@
+<%--
+ Document : addKeyGenerator
+ Created on : Feb 28, 2013, 8:10:10 AM
+ Author : Alex O'Ree
+--%>
+
+<%@page import="org.apache.juddi.webconsole.UddiHub"%>
+<%@page import="org.apache.juddi.model.UddiEntity"%>
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+<!DOCTYPE html>
+<%
+ UddiHub hub = UddiHub.getInstance(application, session);
+ if (request.getParameter("action") != null) {
+ String action = request.getParameter("action");
+ if (action.equalsIgnoreCase("createKeyGen")) {
+ out.write(hub.AddTmodelKenGenerator(request.getParameter("key"),request.getParameter("name"), \
request.getParameter("lang"))); + }
+ }
+%>
Added: 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=1460942&view=auto
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/tmodelsearch.jsp (added)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/tmodelsearch.jsp Tue Mar 26 \
01:17:45 2013 @@ -0,0 +1,53 @@
+<%--
+ Document : tmodelsearch
+ Created on : Mar 13, 2013, 8:54:47 PM
+ Author : Alex O'Ree
+--%>
+
+<%@page import="org.apache.juddi.webconsole.PostBackConstants"%>
+<%@page import="org.apache.juddi.webconsole.PagableContainer"%>
+<%@page import="org.apache.juddi.webconsole.UddiHub"%>
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+<!DOCTYPE html>
+<%
+ UddiHub x = UddiHub.getInstance(application, request.getSession());
+ int maxrecords = 50;
+ int offset = 0;
+ String lang = request.getParameter("lang");
+ if (lang == null || lang.length() == 0) {
+ lang = null;
+ }
+ if (lang!=null && lang.equalsIgnoreCase(PostBackConstants.CLICK_TO_EDIT)) {
+ lang = null;
+ }
+
+ String keyword = request.getParameter("keyword");
+ if (keyword == null || keyword.length() == 0) {
+ keyword = "%";
+ }
+ try {
+ maxrecords = Integer.parseInt(request.getParameter("maxrecords"));
+ } catch (Exception ex) {
+ }
+ try {
+ offset = Integer.parseInt(request.getParameter("offset"));
+ } catch (Exception ex) {
+ }
+ if (offset < 0) {
+ offset = 0;
+ }
+ if (maxrecords > 50) {
+ maxrecords = 50;
+ }
+
+ PagableContainer ret = (x.tModelListAsHtml(keyword, lang, offset, maxrecords));
+
+ out.write(ret.renderedHtml);
+%>
+<script type="text/javascript">
+ totalrecords=<%=ret.totalrecords%>;
+ $("#totalrecords").text(totalrecords);
+ $("#offset").text(<%=offset%>);
+ $("#displayrecords").text (<%=ret.displaycount%>);
+ refresh();
+</script>
\ No newline at end of file
Added: 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=1460942&view=auto
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/toXML.jsp (added)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/toXML.jsp Tue Mar 26 01:17:45 2013
@@ -0,0 +1,36 @@
+<%--
+ 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"%><% + //org.apache.juddi.jaxb.PrintUDDI p = new PrintUDDI();
+ UddiHub x = UddiHub.getInstance(application, session);
+
+ String type = request.getParameter("type");
+ String id = request.getParameter("id");
+ if ((type != null && type.length() != 0) && (id != null && id.length() != 0)) {
+ Object j = null;
+ if (type.equalsIgnoreCase("business")) {
+ j = x.GetBusinessDetailsAsObject(id);
+ } else if (type.equalsIgnoreCase("service")) {
+ j = x.GetServiceDetailsAsObject(id);
+ } else if (type.equalsIgnoreCase("bindingTemplate")) {
+ j = x.GetBindingDetailsAsObject(id);
+ } else if (type.equalsIgnoreCase("tModel")) {
+ j = x.GettModelDetailsAsObject(id);
+ }
+ if (j != null) {
+ out.write(JAXBMarshaller.marshallToString(j, \
JAXBMarshaller.PACKAGE_UDDIAPI)); + // \
out.write(EntityCreator.outputEntityToString(j, "org.apache.juddi.api_v3")); + \
} else { + out.write("Error, unable to identify which type of object you \
wanted"); + }
+ }
+
+ //get parameter type
+ //fetch from UDDI
+ //convert to string and output
+
+
+
+%>
\ No newline at end of file
Added: juddi/branches/juddi-3.2.x/juddi-gui/web/applets/juddi-gui-dsig.jar
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/web/applets/juddi-gui-dsig.jar?rev=1460942&view=auto
==============================================================================
Binary file - no diff available.
Propchange: juddi/branches/juddi-3.2.x/juddi-gui/web/applets/juddi-gui-dsig.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: 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=1460942&view=auto
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/businessBrowse.jsp (added)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/businessBrowse.jsp Tue Mar 26 01:17:45 \
2013 @@ -0,0 +1,48 @@
+<%--
+ Document : browse
+ Created on : Feb 24, 2013, 9:14:01 AM
+ Author : Alex O'Ree
+--%>
+
+<%@page import="org.apache.juddi.webconsole.UddiHub"%>
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+<%@include file="header-top.jsp" %>
+<div class="container">
+
+ <!-- Main hero unit for a primary marketing message or call to action -->
+ <div class="well" >
+ <h1>Businesses</h1>
+ </div>
+
+ <!-- Example row of columns -->
+ <div class="row">
+ <div class="span12" >
+ Total records: <span id="totalrecords"></span><br>
+ Records returned: <span id="displayrecords"></span><br>
+ Offset: <span id="offset">0</span><br>
+ Lang: <span id="lang" class="edit"></span><br>
+ <a href="javascript:pagedown();"><i class="icon-circle-arrow-left \
disabled " id="pageup"></i></a> + <a \
href="javascript:refreshBusinessList();"><i class="icon-refresh " \
id="refresh"></i></a> + <a href="javascript:pageup();"><i \
class="icon-circle-arrow-right disabled" id="pagedown"></i></a> +
+ <div id="businesslist">
+ <img src="img/bigrollergreen.gif" title="Loading"/>
+ </div>
+
+ <script src="js/businesssearch.js"></script>
+ <script type="text/javascript">
+
+ $('.edit').editable(function(value, settings) {
+ console.log(this);
+ console.log(value);
+ console.log(settings);
+ RenderBusinessListBySearch('%', offset, maxrecords);
+ return(value);
+ }, {
+ type : 'text',
+ submit : 'OK'
+ });
+ </script>
+ </div>
+ </div>
+ <%@include file="header-bottom.jsp" %>
\ No newline at end of file
Added: 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=1460942&view=auto
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/businessEditor2.jsp (added)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/businessEditor2.jsp Tue Mar 26 01:17:45 \
2013 @@ -0,0 +1,543 @@
+<%--
+ Document : businesseditor
+ Created on : Feb 24, 2013, 3:31:39 PM
+ Author : Alex O'Ree
+--%>
+
+<%@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 contentType="text/html" pageEncoding="UTF-8"%>
+<%@include file="header-top.jsp" %>
+<div class="container">
+
+ <!-- Main hero unit for a primary marketing message or call to action -->
+ <div class="well" >
+ <h1>Business Editor</h1>
+ </div>
+
+ <!-- Example row of columns -->
+ <div class="row">
+ <div class="span12" >
+
+ <div id="businesseditor">
+ <%
+ boolean newitem = false;
+
+ UddiHub x = UddiHub.getInstance(application, \
request.getSession()); + String bizid = \
request.getParameter("id"); + if (bizid == null || \
bizid.isEmpty()) { + //response.sendRedirect("browse.jsp");
+ newitem = true;
+ }
+
+ BusinessEntity bd = null;
+ if (!newitem) {
+ bd = x.GetBusinessDetails(bizid);
+ } else {
+ bd = new BusinessEntity();
+ }
+
+ %>
+ <%
+
+ if (!newitem) {
+ out.write("<i class=\"icon-lock\"></i>");
+ }
+ %>
+ Business Key -
+ The Business Key is the unique identifier for this business and \
exists within this registry. It cannot be modified.<br> + <div \
style="border-width: 2px; border-style: solid;" class="<% +
+ if (newitem) {
+ out.write("edit");
+ } else {
+ out.write("noedit");
+ }
+
+ %>" id="<%=PostBackConstants.BUSINESSKEY%>">
+ <%
+ \
out.write(StringEscapeUtils.escapeHtml(bd.getBusinessKey())); +
+ if (bd.getContacts()
+ == null) {
+ bd.setContacts(new Contacts());
+ }
+ if (bd.getCategoryBag() == null) {
+ bd.setCategoryBag(new CategoryBag());
+ }
+ if (bd.getIdentifierBag() == null) {
+ bd.setIdentifierBag(new IdentifierBag());
+ }
+ %></div><br>
+
+ <script type="text/javascript">
+ var currentNameEntries=<%= bd.getName().size() - 1%>;
+ var currentDisco=<%= bd.getContacts().getContact().size() - 1%>;
+ var currentDescriptionEntries=<%= bd.getDescription().size() - \
1%>; + var currentContacts=<%= \
bd.getContacts().getContact().size() - 1%>; + var \
currentcatkeyref=<%=bd.getCategoryBag().getKeyedReference().size()%>; + \
var currentcatkeyrefgrp=<%=bd.getCategoryBag().getKeyedReferenceGroup().size()%>; + \
var currentident=<%=bd.getIdentifierBag().getKeyedReference().size()%>; + \
</script> +
+ <ul class="nav nav-tabs" id="myTab">
+ <li class="active"><a href="#general">General</a></li>
+
+ <li><a href="#discovery" >Discovery</a></li>
+ <li><a href="#contacts" >Contacts</a></li>
+ <li><a href="#categories" >Categories</a></li>
+
+ <li><a href="#identifiers" >Identifiers</a></li>
+ <li><a href="#services" >Services</a></li>
+ <li><a href="#signatures" >Signatures</a></li>
+ </ul>
+ <script>
+ $(function () {
+ $('#myTab').tab;//('show');
+ })
+ $('#myTab a[href=#general]').click(function (e) {
+ e.preventDefault();
+ $(this).tab('show');
+ });
+ $('#myTab a[href=#discovery]').click(function (e) {
+ e.preventDefault();
+ $(this).tab('show');
+ });
+ $('#myTab a[href=#contacts]').click(function (e) {
+ e.preventDefault();
+ $(this).tab('show');
+ });
+ $('#myTab a[href=#categories]').click(function (e) {
+ e.preventDefault();
+ $(this).tab('show');
+ });
+ $('#myTab a[href=#identifiers]').click(function (e) {
+ e.preventDefault();
+ $(this).tab('show');
+ });
+ $('#myTab a[href=#services]').click(function (e) {
+ e.preventDefault();
+ $(this).tab('show');
+ });
+ $('#myTab a[href=#signatures]').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 - + 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;" > + <%
+ for (int i = 0; i < bd.getName().size(); i++) {
+ out.write("<div id=\"" + PostBackConstants.NAME \
+ i + "\" style=\"border-width:1px; border-style:solid\" >"); + \
out.write("<div style=\"float:left; height:100%\"><a href=\"javascript:Remove('Name" \
+ i + "');\"><i class=\"icon-remove-sign\"></i></a></div>"); + \
out.write("<div style=\"float:left\">Value: </div>" + \
+ "<div class=\"edit\" id=\"" + PostBackConstants.NAME + i + PostBackConstants.VALUE \
+ "\">" + StringEscapeUtils.escapeHtml(bd.getName().get(i).getValue()) + "</div>"); + \
out.write("<div style=\"float:left\">Language: </div>" + \
+ "<div class=\"edit\" id=\"" + PostBackConstants.NAME + i + PostBackConstants.LANG + \
"\">" + StringEscapeUtils.escapeHtml(bd.getName().get(i).getLang()) + "</div>"); +
+ out.write("</div>");
+ }
+ %>
+ </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. + <div \
id="Description" style="border-width: 2px; border-style: solid;" > + \
<% + for (int i = 0; i < bd.getDescription().size(); \
i++) { + out.write("<div id=\"" + \
PostBackConstants.DESCRIPTION + i + "\" style=\"border-width:1px; \
border-style:solid\">"); + 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\">Value: </div>" + \
+ "<div class=\"edit\" id=\"" + PostBackConstants.DESCRIPTION + i + \
PostBackConstants.VALUE + "\">" + \
StringEscapeUtils.escapeHtml(bd.getDescription().get(i).getValue()) + "</div>"); + \
out.write("<div style=\"float:left\">Language: </div>" + \
+ "<div class=\"edit\" id=\"" + PostBackConstants.DESCRIPTION + i + \
PostBackConstants.LANG + "\">" + \
StringEscapeUtils.escapeHtml(bd.getDescription().get(i).getLang()) + "</div>"); +
+ out.write("</div>");
+ }
+ %>
+ </div>
+ </div>
+ <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. + Two reserved values are specified in the \
specification, 'homepage' and 'businessEntity'. + <div \
id="discoContainer" style="border-width: 2px; border-style: solid;" > + \
<% + if (bd.getDiscoveryURLs()
+ != null) {
+ for (int i = 0; i < \
bd.getDiscoveryURLs().getDiscoveryURL().size(); i++) { +
+ out.write("<div id=\"disco" + i + "\" \
style=\"border-width:1px; border-style:solid\">"); + \
out.write("<div style=\"float:left;height:100%\"><a href=\"javascript:Remove('disco" \
+ i + "');\"><i class=\"icon-remove-sign\"></i></a></div>"); + \
out.write("<div style=\"float:left\">Value: </div>" + \
+ "<div class=\"edit\" id=\"" + PostBackConstants.DISCOVERYURL + i + \
PostBackConstants.VALUE + "\">" + \
StringEscapeUtils.escapeHtml(bd.getDiscoveryURLs().getDiscoveryURL().get(i).getValue()) \
+ "</div>"); + out.write("<div \
style=\"float:left\">Type: </div>" + \
+ "<div class=\"edit\" id=\"" + PostBackConstants.DISCOVERYURL + i + \
PostBackConstants.TYPE + "\">" + \
StringEscapeUtils.escapeHtml(bd.getDiscoveryURLs().getDiscoveryURL().get(i).getUseType()) \
+ "</div>"); +
+ out.write("</div>");
+
+ /*
+ out.write("<div id=\"disco" + i + "\">");
+ out.write("<div \
style=\"float:left;height:100%\"><a href=\"javascript:Remove('disco" + i + "');\"><i \
class=\"icon-remove-sign\"></i></a></div>"); + \
out.write("Value <div class=\"edit\" id=\"discoValue" + i + "\">" + \
bd.getDiscoveryURLs().getDiscoveryURL().get(i).getValue() + "</div>"); + \
out.write("Type <div class=\"edit\" id=\"discoType" + i + "\">" + \
bd.getDiscoveryURLs().getDiscoveryURL().get(i).getUseType() + "</div>"); +
+ out.write("</div>");*/
+ }
+ }
+
+ %>
+ </div>
+ </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 + 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 + \
contact"<br> +
+ <div id="contactsContainer" style="border-width: 2px; \
border-style: solid;" > + <% if \
(bd.getContacts() + == null) {
+ bd.setContacts(new Contacts());
+ }
+
+ if (bd.getContacts()
+ != null) {
+ for (int i = 0; i < \
bd.getContacts().getContact().size(); i++) { + \
//this is the outer framework, the add buttons + \
out.write("<div id=\"contact" + i + "\" style=\"border-width:2px; border-style:solid; \
border-color:red\" >" + + "<div \
style=\"float:left;height:100%\"><a href=\"javascript:Remove('contact" + i + \
+ "');\"><i class=\"icon-remove-sign\"></i></a></div>" + \
+ "<div style=\"float:left\">Contact Type: </div>" + \
+ "<div class=\"edit\" id=\"contact" + i + "Type\">" + \
+ StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getUseType()) + \
+ "</div>" + + "<a \
href=\"javascript:AddContactName('" + i + "');\"><i \
class=\"icon-plus-sign\"></i></a>Name  " + \
+ "<a href=\"javascript:AddContactEmail('" + i + "');\"><i \
class=\"icon-plus-sign\"></i></a>Email  " + \
+ "<a href=\"javascript:AddContactDescription('" + i + "');\"><i \
class=\"icon-plus-sign\"></i></a>Description  " + \
+ "<a href=\"javascript:AddContactPhone('" + i + "');\"><i \
class=\"icon-plus-sign\"></i></a>Phone  " + \
+ "<a href=\"javascript:AddContactAddress('" + i + "');\"><i \
class=\"icon-plus-sign\"></i></a>Address  "); + \
int contactid = i; + //person name
+ for (int k = 0; k < \
bd.getContacts().getContact().get(i).getPersonName().size(); k++) { +
+ int contactname = k;
+ out.write("<div id=\"contact" + \
contactid + "Name" + contactname + "\" style=\"border-width:1px; border-style:solid\" \
>" + + "<div \
> style=\"float:left;height:100%\"><a href=\"javascript:Remove('contact" + contactid \
> + "Name" + contactname
+ + "');\"><i \
class=\"icon-remove-sign\"></i></a></div>" + \
+ "<div style=\"float:left\">Name: </div>" + \
+ "<div class=\"edit\" id=\"contact" + contactid + "Name" + contactname + "Value\">" \
+ + \
StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getPersonName().get(k).getValue()) \
+ "</div>" + + "<div \
style=\"float:left\">Language: </div>" + \
+ "<div class=\"edit\" id=\"contact" + contactid + "Name" + contactname + "Lang\">" + \
+ StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getPersonName().get(k).getLang()) \
+ "</div>" + + "</div>"
+ + "</div>");
+ }
+ //email
+ for (int k = 0; k < \
bd.getContacts().getContact().get(i).getEmail().size(); k++) { + \
int contactemail = k; + out.write("<div \
id=\"contact" + contactid + "Email" + contactemail + "\" style=\"border-width:1px; \
border-style:solid\" >" + + "<div \
style=\"float:left;height:100%\"><a href=\"javascript:Remove('contact" + contactid + \
"Email" + contactemail + + \
"');\"><i class=\"icon-remove-sign\"></i></a></div>" + \
+ "<div style=\"float:left\">Type: </div>" + \
+ "<div class=\"edit\" id=\"contact" + contactid + "Email" + contactemail + "Type\">" \
+ + \
StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getEmail().get(k).getUseType())
+ + "</div>"
+ //+ "</div>"
+ + "<div \
style=\"float:left\">Value: </div>" + \
+ "<div class=\"edit\" id=\"contact" + contactid + "Email" + contactemail + \
"Value\">" + + \
StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getEmail().get(k).getValue()) \
+ "</div>" + //+ "</div>"
+ + \
"</div>");//.insertAfter("#contact" + contactid); + \
} + out.write("</div>");
+ //contact description
+ for (int k = 0; k < \
bd.getContacts().getContact().get(i).getDescription().size(); k++) { + \
int contactdescription = k; + \
out.write("<div id=\"contact" + contactid + "Description" + contactdescription + "\" \
style=\"border-width:1px; border-style:solid\" >" + \
+ "<div style=\"float:left;height:100%\"><a href=\"javascript:Remove('contact" + \
contactid + "Description" + contactdescription + \
+ "');\"><i class=\"icon-remove-sign\"></i></a></div>" + \
+ "<div style=\"float:left\">Description: </div>" + \
+ "<div class=\"edit\" id=\"contact" + contactid + "Description" + contactdescription \
+ "Value\">" + + "</div>"
+ + \
StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getDescription().get(k).getValue())
+ + "<div \
style=\"float:left\">Language: </div>" + \
+ "<div class=\"edit\" id=\"contact" + contactid + "Description" + contactdescription \
+ "Lang\">" + + \
StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getDescription().get(k).getLang())
+ + "</div>"
+ + "</div>");
+ }
+
+ //contact phone
+ for (int k = 0; k < \
bd.getContacts().getContact().get(i).getPhone().size(); k++) { + \
int contactphone = k; + out.write("<div \
id=\"contact" + + contactid
+ + "Phone"
+ + contactphone
+ + "\" style=\"border-width:1px; \
border-style:solid\" >" + + "<div \
style=\"float:left;height:100%\"><a href=\"javascript:Remove('contact" + contactid + \
"Phone" + contactphone + + \
"');\"><i class=\"icon-remove-sign\"></i></a></div>" + \
+ "<div style=\"float:left\">Phone: </div>" + \
+ "<div class=\"edit\" id=\"contact" + contactid + "Phone" + contactphone + \
"Value\">" + + \
StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getPhone().get(k).getValue())
+ + "</div>"
+ + "<div \
style=\"float:left\">Type: </div>" + \
+ "<div class=\"edit\" id=\"contact" + contactid + "Phone" + contactphone + "Type\">" \
+ + \
StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getPhone().get(k).getUseType())
+ + "</div>"
+ + "</div>");
+
+ }
+
+ //contact addresses
+ for (int k = 0; k < \
bd.getContacts().getContact().get(i).getAddress().size(); k++) { + \
int contactaddress = k; + out.write("<div \
id=\"contact" + contactid + "Address" + contactaddress + "\" \
style=\"border-width:1px; border-style:solid\" >" + \
+ "<div style=\"float:left;height:100%\"><a href=\"javascript:Remove('contact" + \
contactid + "Address" + contactaddress + \
+ "');\"><i class=\"icon-remove-sign\"></i></a>Address</div><br>" + \
+ "<div style=\"float:left\">Language: </div>" + \
+ "<div class=\"edit\" id=\"contact" + contactid + "Address" + contactaddress + \
"Lang\">" + + \
StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getAddress().get(k).getLang())
+ + "</div>"
+ + "<div \
style=\"float:left\">Sort Code: </div>" + \
+ "<div class=\"edit\" id=\"contact" + contactid + "Address" + contactaddress + \
"Sortcode\">" + + \
StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getAddress().get(k).getSortCode())
+ + "</div>"
+ + "<div \
style=\"float:left\">Type: </div>" + \
+ "<div class=\"edit\" id=\"contact" + contactid + "Address" + contactaddress + \
"Type\">" + + \
StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getAddress().get(k).getSortCode())
+ + "</div>"
+ + "<div class=\"edit\" \
id=\"contact" + contactid + "Address" + contactaddress + "KeyName\">" + \
+ StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getAddress().get(k).getTModelKey())
+ + "</div>"
+ + "<div><a \
href=\"javascript:AddContactAddressLine('" + contactid + "Address" + contactaddress + \
"');\"><i class=\"icon-plus-sign\"></i></a> Add an addline (at least one is \
required)</div>"); +
+
+ for (int j = 0; j < \
bd.getContacts().getContact().get(i).getAddress().get(k).getAddressLine().size(); \
j++) { + int contactaddresslines = j;
+ out.write("<div id=\"contact" + \
contactid + "Address" + k + "addressLine" + contactaddresslines + \
+ "\" style=\"border-width:1px; border-style:solid\" >" + \
+ "<div style=\"float:left;height:100%\"><a href=\"javascript:Remove('contact" + \
contactid + "addressLine" + contactaddresslines + \
+ "');\"><i class=\"icon-remove-sign\"></i></a></div>" + \
+ "<div style=\"float:left\">Address Value: </div>" + \
+ "<div class=\"edit\" id=\"contact" + contactid + "Address" + k + "addressLine" + \
contactaddresslines + "Value\">" + \
+ StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getAddress().get(k).getAddressLine().get(k).getValue())
+ + "</div>"
+ + "<div \
style=\"float:left\">Key Name (optional): </div>" + \
+ "<div class=\"edit\" id=\"contact" + contactid + "Address" + k + "addressLine" + \
contactaddresslines + "KeyName\">" + \
+ StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getAddress().get(k).getAddressLine().get(k).getKeyName())
+ + "</div>"
+ + "<div \
style=\"float:left\">Key Value (optional): </div>" + \
+ "<div class=\"edit\" id=\"contact" + contactid + "Address" + k + "addressLine" + \
contactaddresslines + "KeyValue\">" + \
+ StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getAddress().get(k).getAddressLine().get(k).getKeyValue())
+ + "</div>"
+ + "</div>");
+ }
+ }
+
+ }
+ }
+
+ 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 +
+ %>
+ </div>
+ </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 + \
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> + <a \
href="javascript:AddCategoryKeyReference();"><i class="icon-plus-sign"></i></a> Add \
Key Reference Category <Br> + <div id="catContainer" \
style="border-width: 2px; border-style: solid;" > +
+
+
+ <%
+ if (bd.getCategoryBag() == null) {
+ bd.setCategoryBag(new CategoryBag());
+ }
+ // out.write("Keyed Reference \
Categories:"); + for (int i = 0; i < \
bd.getCategoryBag().getKeyedReference().size(); i++) { +
+ out.write("<div id=\"catbagkeyref" + i + "\" \
style=\"border-width:2px; border-style:solid\">"); + \
out.write("<div style=\"float:left;height:100%\"><a \
href=\"javascript:Remove('catbagkeyref" + i + "');\"><i \
class=\"icon-remove-sign\"></i></a></div>"); + \
out.write("<div style=\"float:left\">Key: </div>" + \
+ "<div class=\"edit\" id=\"catbagkeyref" + i + "Value\">" + \
StringEscapeUtils.escapeHtml(bd.getCategoryBag().getKeyedReference().get(i).getTModelKey()) \
+ "</div>"); + out.write("<div \
style=\"float:left\">Name: </div>" + \
+ "<div class=\"edit\" id=\"catbagkeyref" + i + "KeyName\">" + \
StringEscapeUtils.escapeHtml(bd.getCategoryBag().getKeyedReference().get(i).getKeyName()) \
+ "</div>"); + out.write("<div \
style=\"float:left\">Value: </div>" + \
+ "<div class=\"edit\" id=\"catbagkeyref" + i + "KeyValue\">" + \
StringEscapeUtils.escapeHtml(bd.getCategoryBag().getKeyedReference().get(i).getKeyValue()) \
+ "</div>"); + out.write("</div>");
+ }
+ %>
+ </div>
+ <br>
+ Keyed Reference Groups<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;" > +
+
+ <%
+ for (int i = 0; i < \
bd.getCategoryBag().getKeyedReferenceGroup().size(); i++) { +
+ out.write("<div id=\"catbaggrpkeyref" + i + "\" \
style=\"border-width:2px; border-style:solid\">" + \
+ "<div style=\"float:left;height:100%\"><a \
href=\"javascript:Remove('catbaggrpkeyref" + i + "');\"><i \
class=\"icon-remove-sign\"></i></a></div>" + \
+ "<div style=\"float:left\">Key: </div>" + \
+ "<div class=\"edit\" id=\"catbaggrpkeyref" + i + "Value\"></div>" + \
+ "<div id=\"catbaggrpkeyref" + i + "keyref\" style=\"border-width:1px; \
border-style:solid\">" + + "<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: </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\">"); + \
out.write("<div style=\"float:left;height:100%\"><a \
href=\"javascript:Remove('catbaggrpkeyref" + i + "keyref" + k + "');\"><i \
class=\"icon-remove-sign\"></i></a></div>"); + \
out.write("<div style=\"float:left\">Key: </div>" + \
+ "<div class=\"edit\" id=\"catbaggrpkeyref" + i + "keyref" + k + "Value\">" + \
StringEscapeUtils.escapeHtml(bd.getCategoryBag().getKeyedReferenceGroup().get(i).getKeyedReference().get(k).getTModelKey()) \
+ "</div>"); + out.write("<div \
style=\"float:left\">Name: </div>" + \
+ "<div class=\"edit\" id=\"catbaggrpkeyref" + i + "keyref" + k + "KeyName\">" + \
StringEscapeUtils.escapeHtml(bd.getCategoryBag().getKeyedReferenceGroup().get(i).getKeyedReference().get(k).getKeyName()) \
+ "</div>"); + out.write("<div \
style=\"float:left\">Value: </div>" + \
+ "<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 </div>" + //+ "<div \
class=\"edit\" id=\"discoType" + i + "\">" + \
StringEscapeUtils.escapeHtml(bd.getCategoryBag().getKeyedReferenceGroup().get(i).()) \
+ "</div>"); + //out.write("<div \
style=\"float:left\">Value </div>" + //+ \
"<div class=\"edit\" id=\"discoType" + i + "\">" + \
StringEscapeUtils.escapeHtml(bd.getCategoryBag().getKeyedReferenceGroup().get(i).getKeyValue()) \
+ "</div>"); +
+ out.write("</div>");
+ }
+
+
+ %>
+ </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> + <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;" > + <%
+ for (int i = 0; i < \
bd.getIdentifierBag().getKeyedReference().size(); i++) { + \
out.write("<div id=\"identbagkeyref" + i + "\" style=\"border-width:2px; \
border-style:solid\">"); + out.write("<div \
style=\"float:left;height:100%\"><a href=\"javascript:Remove('identbagkeyref" + i + \
"');\"><i class=\"icon-remove-sign\"></i></a></div>"); + \
out.write("<div style=\"float:left\">Key: </div>" + \
+ "<div class=\"edit\" id=\"identbagkeyref" + i + "Value\">" + \
StringEscapeUtils.escapeHtml(bd.getIdentifierBag().getKeyedReference().get(i).getTModelKey()) \
+ "</div>"); + out.write("<div \
style=\"float:left\">Name: </div>" + \
+ "<div class=\"edit\" id=\"identbagkeyref" + i + "KeyName\">" + \
StringEscapeUtils.escapeHtml(bd.getIdentifierBag().getKeyedReference().get(i).getKeyName()) \
+ "</div>"); + out.write("<div \
style=\"float:left\">Value: </div>" + \
+ "<div class=\"edit\" id=\"identbagkeyref" + i + "KeyValue\">" + \
StringEscapeUtils.escapeHtml(bd.getIdentifierBag().getKeyedReference().get(i).getKeyValue()) \
+ "</div>"); + out.write("</div>");
+ }
+ %>
+ </div>
+ </div>
+ <div class="tab-pane " id="services">
+ Business Services -
+ <%
+ if (bd.getBusinessServices() != null) {
+ \
out.write(Integer.toString(bd.getBusinessServices().getBusinessService().size())); + \
} else { + out.write("0");
+ }
+ %> are defined for this business.<br>
+ <table class="table \
table-hover"><tr><th>Key</th><th>Name</th><th>BTs</th></tr> + \
<% + if (bd.getBusinessServices() != null) {
+ for (int i = 0; i < \
bd.getBusinessServices().getBusinessService().size(); i++) { + \
%><tr> + <td><%
+ if \
(!bd.getBusinessServices().getBusinessService().get(i).getName().isEmpty()) { + \
out.write(bd.getBusinessServices().getBusinessService().get(i).getName().get(0).getValue());
+ }
+ %>
+ </td><td><a \
href="serviceEditor.jsp?id=<%=StringEscapeUtils.escapeHtml(bd.getBusinessServices().getBusinessService().get(i).getServiceKey())%>">
+ <%
+ \
out.write(bd.getBusinessServices().getBusinessService().get(i).getServiceKey()); + \
%> + <i class="icon-edit"></i></a>
+ </td><td>
+ <%
+ if \
(bd.getBusinessServices().getBusinessService().get(i).getBindingTemplates() == null) \
{ + out.write("0");
+ } else {
+ \
out.write(Integer.toString(bd.getBusinessServices().getBusinessService().get(i).getBindingTemplates().getBindingTemplate().size()));
+ }
+ %>
+ </td>
+ </tr>
+ <%
+ }
+ }
+ %>
+ </table>
+
+ </div>
+ <div class="tab-pane" id="signatures">Digital Signatures
+ <br>
+ <%
+ if (bd.getSignature().isEmpty()) {
+ out.write("This item is not digitally signed.");
+ } else {
+ out.write("This item is digitally 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></tr>"); + }
+ }
+
+ %>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div><br>
+ <a class="btn btn-primary " \
href="javascript:saveBusiness();">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>
+ </div>
+
+ </div>
+
+
+
+ <!-- container div is in header bottom-->
+ <%@include file="header-bottom.jsp" %>
\ No newline at end of file
Added: 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=1460942&view=auto
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/csrf.jsp (added)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/csrf.jsp Tue Mar 26 01:17:45 2013
@@ -0,0 +1,59 @@
+<%--
+ Document : csrf Provides basic Cross site request forgery protection
+ Created on : Feb 27, 2013, 8:42:07 PM
+ Author : Alex O'Ree
+--%>
+
+<%@page import="org.apache.juddi.webconsole.UddiHub"%>
+<%@page import="org.apache.log4j.Logger"%>
+<%@page import="org.apache.log4j.Level"%>
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+<%
+ String current = null;
+
+ if (request.getMethod().equalsIgnoreCase("post")) {
+
+ if ((request.getParameter("nonce") == null || \
request.getParameter("nonce").isEmpty())) { + //reject it
+ session.removeAttribute("nonce");
+ response.sendRedirect("index.jsp");
+ UddiHub.log.log(Level.WARN, "CSRF Test failed, no nonce guid." + \
request.getRemoteAddr() + request.getRemoteUser()); + throw new \
SecurityException("Cross Site Request Forgery"); + } else {
+
+ String noncestr = (String) session.getAttribute("nonce");
+ if (noncestr == null) {
+ //no session variable to test against, reject it
+ UddiHub.log.log(Level.WARN, "CSRF Test failed, no session guid." + \
request.getRemoteAddr() + request.getRemoteUser()); + \
session.removeAttribute("nonce"); + throw new SecurityException("Cross \
Site Request Forgery"); + }
+ String postedstr = request.getParameter("nonce");
+
+ //check session against existing nonce, if match
+ //generate new one, add to page and session
+ //else redirect to index page
+ if (noncestr.equals(postedstr)) {
+ current = noncestr;
+ //OK
+ // current = UUID.randomUUID();
+ //session.removeAttribute("nonce");
+ // session.setAttribute("nonce", current.toString());
+ UddiHub.log.log(Level.INFO, "CSRF Test passed.");
+ } else {
+ //mismatch, reject it
+ UddiHub.log.log(Level.WARN, "CSRF Test failed, session did not match \
nonce guid." + request.getRemoteAddr() + request.getRemoteUser()); + \
session.removeAttribute("nonce"); + throw new SecurityException("Cross \
Site Request Forgery"); + }
+ }
+ } else {
+ //HTTP GET or otherwise message
+ if ((current == null) || current.isEmpty()) {
+ current = java.util.UUID.randomUUID().toString();
+ session.setAttribute("nonce", current);
+ }
+
+ }
+
+%>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@juddi.apache.org
For additional commands, e-mail: commits-help@juddi.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic