[prev in list] [next in list] [prev in thread] [next in thread] 

List:       juddi-cvs
Subject:    svn commit: r1462384 [4/4] - in /juddi/branches/juddi-3.2.x/juddi-gui: src/java/org/apache/juddi/web
From:       alexoree () apache ! org
Date:       2013-03-29 2:43:38
Message-ID: 20130329024341.1B97B2388A38 () eris ! apache ! org
[Download RAW message or body]

Copied: juddi/branches/juddi-3.2.x/juddi-gui/web/viewSubscriptions.jsp (from \
                r1460942, 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/viewSubscri \
ptions.jsp?p2=juddi/branches/juddi-3.2.x/juddi-gui/web/viewSubscriptions.jsp&p1=juddi/ \
branches/juddi-3.2.x/juddi-gui/web/tmodelEditor.jsp&r1=1460942&r2=1462384&rev=1462384&view=diff
 ==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/web/tmodelEditor.jsp (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/web/viewSubscriptions.jsp Fri Mar 29 \
02:43:36 2013 @@ -1,18 +1,17 @@
 <%-- 
-    Document   : tmodelEditor
-    Created on : Feb 27, 2013, 9:31:19 PM
+    Document   : view subscriptions
+    Created on : March 28, 2013, 9:31:19 PM
     Author     : Alex O'Ree
 --%>
 
 
 
-<%@page import="org.uddi.api_v3.Description"%>
-<%@page import="org.uddi.api_v3.Name"%>
-<%@page import="org.uddi.api_v3.CategoryBag"%>
-<%@page import="org.uddi.api_v3.IdentifierBag"%>
+<%@page import="java.util.List"%>
+<%@page import="org.uddi.sub_v3.Subscription"%>
+<%@page import="java.net.URLEncoder"%>
+<%@page import="org.uddi.api_v3.*"%>
 <%@page import="org.apache.juddi.webconsole.PostBackConstants"%>
-<%@page import="org.uddi.api_v3.TModel"%>
-<%@page import="org.uddi.api_v3.TModelDetail"%>
+<%@page import="org.apache.juddi.webconsole.hub.*"%>
 <%@page import="org.apache.juddi.query.FindBusinessByNameQuery"%>
 <%@page contentType="text/html" pageEncoding="UTF-8"%>
 <%@include file="header-top.jsp" %>
@@ -20,253 +19,36 @@
 
     <!-- Main hero unit for a primary marketing message or call to action -->
     <div class="well">
-        <h1>tModel Editor</h1>
+        <h1>Subscriptions</h1>
     </div>
 
     <!-- Example row of columns -->
     <div class="row">
         <div class="span12">
-            <p>
-                <%                    
-                    UddiHub x = UddiHub.getInstance(application, session);
-                    TModel bd = hub.getTmodelDetails(request.getParameter("id"));
-                    boolean newitem = false;
-                    if (bd == null) {
-                        bd = new TModel();
-                        newitem = true;
-                    }
-                %>
-
-            <ul class="nav nav-tabs" id="myTab">
-                <li class="active"><a  href="#general">General</a></li>
-
-                <li><a href="#discovery" >Overview Documents</a></li>
+            <%
+                UddiHub x = UddiHub.getInstance(application, session);
 
-                <li><a href="#categories" >Categories</a></li>
-
-                <li><a href="#identifiers" >Identifiers</a></li>
-                <li><a href="#signatures" >Signatures</a></li>
-            </ul>
-            <script type="text/javascript">
-                $(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=#categories]').click(function (e) {
-                    e.preventDefault();
-                    $(this).tab('show');
-                });
-                $('#myTab a[href=#identifiers]').click(function (e) {
-                    e.preventDefault();
-                    $(this).tab('show');
-                });
-
-                $('#myTab a[href=#signatures]').click(function (e) {
-                    e.preventDefault();
-                    $(this).tab('show');
-                });
-                    
-                var currentDescriptionEntries=<%=bd.getDescription().size()%>;
-                var currentOverviewDocs=<%=bd.getOverviewDoc().size()%>;
-                <%                    
-                    int currentDescriptionSpecific = 0;
-                    for (int i = 0; i < bd.getOverviewDoc().size(); i++) {
-                        currentDescriptionSpecific += \
                bd.getOverviewDoc().get(i).getDescription().size();
-                    }
-                    
-                    int currentcatkeyref = 0;
-                    if (bd.getCategoryBag() != null) {
-                        currentcatkeyref = \
                bd.getCategoryBag().getKeyedReference().size();
-                    }
-                    int currentident = 0;
-                    if (bd.getIdentifierBag() != null) {
-                        currentident = \
bd.getIdentifierBag().getKeyedReference().size(); +                List<Subscription> \
list = x.GetSubscriptions(); +                if (list == null) {
+                    out.write("Either an error occured or you're not signed in.");
+                }
+
+            %>
+            <table class="table">
+                <%
+                    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("No subscriptions are currently defined.");
                     }
                 %>
-                    var currentcatkeyref =<%=currentcatkeyref%>;
-                    var currentDescriptionSpecific=<%=currentDescriptionSpecific%>;
-                    var currentident=<%=currentident%>;
-            </script>
-            <div class="tab-content">
-                <div class="tab-pane active" id="general">
-                    <%                        
-                        if (!newitem) {
-                            out.write("<i class=\"icon-lock\"></i>");
-                        }
-                    %>
-                    The tModel Key is the unique identifier. If you specify a \
                tModel, it must be prefixed with
-                    an existing partition (key generator), other one is generated \
                for you.
-                    
-                    <div style="border-width: 2px; border-style: solid;" <%          \
                
-                        if (!newitem) {
-                            out.write("class=\"noedit\"");
-                        } else {
-                            out.write("class=\"edit\"");
-                        }
-                         %>
-                         id="<%=PostBackConstants.SERVICEKEY%>"><%                   \
                
-                            \
                out.write(StringEscapeUtils.escapeHtml(bd.getTModelKey()));
-                        %></div><br>
-
-
-                    Name - The name describes this tModel. It is a required field.
-
-                    <%                        
-                        
-                        if (bd.getName() == null) {
-                            bd.setName(new Name());
-                        }
-                        out.write("<div id=\"" + PostBackConstants.NAME + "\" \
                style=\"border-width:2px; border-style:solid\" >");
-                        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\">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\">Language:&nbsp;</div>"
-                                + "<div class=\"edit\" id=\"" + \
                PostBackConstants.NAME + PostBackConstants.LANG + "\">"
-                                + ((bd.getName().getLang() == null ? " " : \
                StringEscapeUtils.escapeHtml(bd.getName().getLang())))
-                                + "</div>");
-                        
-                        out.write("</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;" >
-                        <%                            
-                            if (bd.getDescription() != null) //bd.(new \
                Description());
-                            {
-                                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:&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\">Language:&nbsp;</div>"
-                                            + "<div class=\"edit\" id=\"" + \
                PostBackConstants.DESCRIPTION + i + PostBackConstants.LANG + "\">"
-                                            + (bd.getDescription().get(i).getLang() \
                != null
-                                            ? \
                StringEscapeUtils.escapeHtml(bd.getDescription().get(i).getLang()) : \
                "")
-                                            + "</div>");
-                                    
-                                    out.write("</div>");
-                                }
-                            }
-                        %>
-                    </div>
-                </div>
-
-                <div class="tab-pane " id="discovery">
-                    <a href="javascript:AddOverviewDocument();"><i \
class="icon-plus-sign"></i></a>Overview Documents - These are typically URLs to web \
                pages that describe this tModel's details and usage scenarios.
-                    <%                        
-                        out.write("<div id=\"" + PostBackConstants.OVERVIEW + "\" \
                style=\"border-width:2px; border-style:solid\">");
-                        for (int i = 0; i < bd.getOverviewDoc().size(); i++) {
-                            out.write("<div id=\"" + PostBackConstants.OVERVIEW + i \
                + "\" style=\"border-width:1px; border-style:solid\">");
-                            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\">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\">Use \
                type:&nbsp;</div>"
-                                    + "<div class=\"edit\" id=\"" + \
PostBackConstants.OVERVIEW + i + PostBackConstants.TYPE + "\">" + \
StringEscapeUtils.escapeHtml(bd.getOverviewDoc().get(i).getOverviewURL().getUseType()) \
                + "</div>");
-                            
-                    %>
-
-                    <a \
href="javascript:AddDescriptionSpecific('<%=PostBackConstants.OVERVIEW + i + \
PostBackConstants.DESCRIPTION%> ');"><i class="icon-plus-sign"></i></a> Add a \
                description
-                    <%                            
-                            out.write("<div id=\"" + PostBackConstants.OVERVIEW + i \
+ PostBackConstants.DESCRIPTION + "\" style=\"border-width:1px; \
                border-style:dotted\">");
-                            for (int k = 0; k < \
                bd.getOverviewDoc().get(i).getDescription().size(); k++) {
-                                out.write("<div id=\"" + PostBackConstants.OVERVIEW \
+ i + PostBackConstants.DESCRIPTION + k + "\" style=\"border-width:1px; \
                border-style:solid\">");
-                                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\">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\">Language:&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
-                            }
-                            out.write("</div>");//end description
-                            out.write("</div>");//end this block
-                        }
-                        out.write("</div>");//end of overview
-                        %>
-
-                </div>
-
-                <div class="tab-pane " id="categories">
-
-
-                    <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: \
                &nbsp;</div>"
-                                        + "<div class=\"edit\" id=\"catbagkeyref" + \
i + "Value\">" + StringEscapeUtils.escapeHtml(bd.getCategoryBag().getKeyedReference().get(i).getTModelKey()) \
                + "</div>");
-                                out.write("<div style=\"float:left\">Name: \
                &nbsp;</div>"
-                                        + "<div class=\"edit\" id=\"catbagkeyref" + \
i + "KeyName\">" + StringEscapeUtils.escapeHtml(bd.getCategoryBag().getKeyedReference().get(i).getKeyName()) \
                + "</div>");
-                                out.write("<div style=\"float:left\">Value: \
                &nbsp;</div>"
-                                        + "<div class=\"edit\" id=\"catbagkeyref" + \
i + "KeyValue\">" + StringEscapeUtils.escapeHtml(bd.getCategoryBag().getKeyedReference().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;" >
-                        <%                            
-                            if (bd.getIdentifierBag() == null) {
-                                bd.setIdentifierBag(new IdentifierBag());
-                            }
-                            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: \
                &nbsp;</div>"
-                                        + "<div class=\"edit\" id=\"identbagkeyref" \
+ i + "Value\">" + StringEscapeUtils.escapeHtml(bd.getIdentifierBag().getKeyedReference().get(i).getTModelKey()) \
                + "</div>");
-                                out.write("<div style=\"float:left\">Name: \
                &nbsp;</div>"
-                                        + "<div class=\"edit\" id=\"identbagkeyref" \
+ i + "KeyName\">" + \
StringEscapeUtils.escapeHtml(bd.getIdentifierBag().getKeyedReference().get(i).getKeyName()) \
                + "</div>");
-                                out.write("<div style=\"float:left\">Value: \
                &nbsp;</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="signatures">
-
-                    <%                        
-                        if (bd.getSignature().isEmpty()) {
-                            out.write("This item is not signed");
-                        } else {
-                            out.write("This item is signed by " + \
                bd.getSignature().size());
-                        }
-                        
-                    %>
-                </div>
-                <div><br>
-                    <a class="btn btn-primary " \
                href="javascript:savetModel();">Save</a> | 
-                    <a class="btn btn-danger " \
                href="javascript:deletetModel();">Delete</a> |
-                    <a class="btn btn-success " href="#"">Digitally Sign</a>
-                </div>
-            </div>
-            <script src="js/tmodeledit.js"></script>
-            <script src="js/businessEditor.js"></script>
-            <script type="text/javascript">
-                Reedit();
-            </script>
-
-            </p>
+            </table>
         </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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic