juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexo...@apache.org
Subject svn commit: r1566300 [1/2] - in /juddi/trunk/juddi-gui/src/main: java/org/apache/juddi/webconsole/hub/UddiHub.java webapp/bindingEditor.jsp webapp/serviceEditor.jsp
Date Sun, 09 Feb 2014 15:14:14 GMT
Author: alexoree
Date: Sun Feb  9 15:14:13 2014
New Revision: 1566300

URL: http://svn.apache.org/r1566300
Log:
JUDDI-806 done note that the workflow has now changed to create business, save, create service,
create bindingEditor.jsp(s), save

Modified:
    juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/hub/UddiHub.java
    juddi/trunk/juddi-gui/src/main/webapp/bindingEditor.jsp
    juddi/trunk/juddi-gui/src/main/webapp/serviceEditor.jsp

Modified: juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/hub/UddiHub.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/hub/UddiHub.java?rev=1566300&r1=1566299&r2=1566300&view=diff
==============================================================================
--- juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/hub/UddiHub.java (original)
+++ juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/hub/UddiHub.java Sun Feb
 9 15:14:13 2014
@@ -940,8 +940,9 @@ public class UddiHub implements Serializ
                         SaveBinding sb = new SaveBinding();
                         sb.setAuthInfo(GetToken());
                         sb.getBindingTemplate().add(be);
+                        BindingDetail saveBinding=null;
                         try {
-                                publish.saveBinding(sb);
+                                 saveBinding = publish.saveBinding(sb);
                         } catch (Exception ex) {
                                 if (isExceptionExpiration(ex)) {
                                         token = null;
@@ -952,7 +953,9 @@ public class UddiHub implements Serializ
                                         throw ex;
                                 }
                         }
-                        return ResourceLoader.GetResource(session, "actions.save.bindingtemplate");
+                                        return ResourceLoader.GetResource(session, "actions.saved")
+ " "
+                             + "<a href=\"bindingEditor.jsp?id=" + URLEncoder.encode(saveBinding.getBindingTemplate().get(0).getBindingKey(),
"UTF8")
+                             + "\">" + StringEscapeUtils.escapeHtml(saveBinding.getBindingTemplate().get(0).getBindingKey())
+ "</a>";
                 } catch (Exception ex) {
                         return HandleException(ex);
                 }
@@ -979,11 +982,17 @@ public class UddiHub implements Serializ
                 }
 
                 be.getName().addAll(Builders.BuildNames(Builders.MapFilter(request.getParameterMap(),
PostBackConstants.NAME), PostBackConstants.NAME, ResourceLoader.GetResource(session, "items.clicktoedit"),
getLocale()));
+                //JUDDI-806get existing service details and copy over binding templates
+                BusinessService GetServiceDetail = GetServiceDetail(request.getParameter(PostBackConstants.SERVICEKEY).trim());
+                if (GetServiceDetail!=null){
+                        be.setBindingTemplates(GetServiceDetail.getBindingTemplates());
+                }
+                /*JUDDI-806
                 BindingTemplates bt = new BindingTemplates();
                 bt.getBindingTemplate().addAll(Builders.BuildBindingTemplates(Builders.MapFilter(request.getParameterMap(),
PostBackConstants.BINDINGTEMPLATE), PostBackConstants.BINDINGTEMPLATE, ResourceLoader.GetResource(session,
"items.clicktoedit"), getLocale()));
                 if (!bt.getBindingTemplate().isEmpty()) {
                         be.setBindingTemplates(bt);
-                }
+                }*/
 
                 be.getDescription().addAll(Builders.BuildDescription(Builders.MapFilter(request.getParameterMap(),
PostBackConstants.DESCRIPTION), PostBackConstants.DESCRIPTION, ResourceLoader.GetResource(session,
"items.clicktoedit"), getLocale()));
 

Modified: juddi/trunk/juddi-gui/src/main/webapp/bindingEditor.jsp
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-gui/src/main/webapp/bindingEditor.jsp?rev=1566300&r1=1566299&r2=1566300&view=diff
==============================================================================
--- juddi/trunk/juddi-gui/src/main/webapp/bindingEditor.jsp (original)
+++ juddi/trunk/juddi-gui/src/main/webapp/bindingEditor.jsp Sun Feb  9 15:14:13 2014
@@ -59,7 +59,7 @@
                         //incase an invalid business id was passed in
                         response.sendRedirect("index.jsp");
                 } else {
-                        bd.setServiceKey(be.getBusinessKey());
+                        bd.setServiceKey(be.getServiceKey());
                 }
         }
 
@@ -322,18 +322,27 @@
 
                            //items.hostingredirector
                                                         //TODO need an html select in here?
-                                                        if (bd.getHostingRedirector() !=
null) {
-                                                                out.write("<div style=\"float:left\">"
+ ResourceLoader.GetResource(session, "items.hostingredirector") + ": &nbsp;</div>"
-                                                                     + "<div class=\"edit\"
id=\"" + PostBackConstants.HOSTINGREDIRECTOR + "\">" + StringEscapeUtils.escapeHtml(bd.getHostingRedirector().getBindingKey())
+ "</div>");
-                                                        }
-                                                        if (bd.getAccessPoint() != null)
{
+                                                
+                                                if (bd.getHostingRedirector() == null &&

+                                                     bd.getAccessPoint()==null)
+                                                {
+                                                        bd.setAccessPoint(new AccessPoint());
+                                                }
+                                                if (bd.getHostingRedirector() != null) {
+                                                        out.write("<div style=\"float:left\">"
+ ResourceLoader.GetResource(session, "items.hostingredirector") + ": &nbsp;</div>"
+                                                             + "<div class=\"edit\" id=\""
+ PostBackConstants.HOSTINGREDIRECTOR + "\">" + 
+                                                            (bd.getHostingRedirector().getBindingKey()==null
? "" :StringEscapeUtils.escapeHtml(bd.getHostingRedirector().getBindingKey())) + "</div>");
+                                                }
+                                                if (bd.getAccessPoint() != null) {
 
-                                                                out.write("<div style=\"float:left\">"
+ ResourceLoader.GetResource(session, "items.accesspoint.type") + ": &nbsp;</div>"
-                                                                     + "<div class=\"edit\"
id=\"" + PostBackConstants.ACCESSPOINT_TYPE + "\">" + StringEscapeUtils.escapeHtml(bd.getAccessPoint().getUseType())
+ "</div>");
-                                                                out.write("<div style=\"float:left\">"
+ ResourceLoader.GetResource(session, "items.accesspoint.value") + ": &nbsp;</div>"
-                                                                     + "<div class=\"edit\"
id=\"" + PostBackConstants.ACCESSPOINT_VALUE + "\">" + StringEscapeUtils.escapeHtml(bd.getAccessPoint().getValue())
+ "</div>");
-                                                                // this was an unbalanced
divout.write("</div>");
-                                                        }
+                                                        out.write("<div style=\"float:left\">"
+ ResourceLoader.GetResource(session, "items.accesspoint.type") + ": &nbsp;</div>"
+                                                             + "<div class=\"edit\" id=\""
+ PostBackConstants.ACCESSPOINT_TYPE + "\">" + 
+                                                             (bd.getAccessPoint().getUseType()==null?"":StringEscapeUtils.escapeHtml(bd.getAccessPoint().getUseType()))
+ "</div>");
+                                                        out.write("<div style=\"float:left\">"
+ ResourceLoader.GetResource(session, "items.accesspoint.value") + ": &nbsp;</div>"
+                                                             + "<div class=\"edit\" id=\""
+ PostBackConstants.ACCESSPOINT_VALUE + "\">" + 
+                                                             (bd.getAccessPoint().getValue()==null?"":StringEscapeUtils.escapeHtml(bd.getAccessPoint().getValue()))
+ "</div>");
+                                                        // this was an unbalanced divout.write("</div>");
+                                                }
                                                 %>
 
                                         </div>



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


Mime
View raw message