Source Code Cross Referenced for WebServicePanel.java in  » Net » Coadunation_1.0.1 » com » rift » coad » web » admin » client » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » Coadunation_1.0.1 » com.rift.coad.web.admin.client 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * CoadunationAdmin: The admin frontend for coadunation.
003:         * Copyright (C) 2007 - 2008  Rift IT Contracting
004:         *
005:         * This library is free software; you can redistribute it and/or
006:         * modify it under the terms of the GNU Lesser General Public
007:         * License as published by the Free Software Foundation; either
008:         * version 2.1 of the License, or (at your option) any later version.
009:         *
010:         * This library is distributed in the hope that it will be useful,
011:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
012:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
013:         * Lesser General Public License for more details.
014:         *
015:         * You should have received a copy of the GNU Lesser General Public
016:         * License along with this library; if not, write to the Free Software
017:         * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
018:         *
019:         * WebServicePancle.java
020:         */
021:
022:        // package path
023:        package com.rift.coad.web.admin.client;
024:
025:        // imports
026:        import com.google.gwt.user.client.Window;
027:        import com.google.gwt.user.client.ui.AbstractImagePrototype;
028:        import com.google.gwt.user.client.ui.Composite;
029:        import com.google.gwt.user.client.ui.ImageBundle;
030:        import com.google.gwt.user.client.ui.ScrollPanel;
031:        import com.google.gwt.user.client.ui.VerticalPanel;
032:        import com.google.gwt.user.client.ui.DockPanel;
033:        import com.google.gwt.user.client.ui.HTML;
034:        import com.google.gwt.user.client.ui.Label;
035:        import com.google.gwt.user.client.ui.ClickListener;
036:        import com.google.gwt.user.client.ui.Widget;
037:        import com.google.gwt.core.client.GWT;
038:        import com.google.gwt.user.client.rpc.AsyncCallback;
039:        import com.google.gwt.user.client.rpc.ServiceDefTarget;
040:
041:        /**
042:         * This panel is responsible for displaying the web servicde information.
043:         *
044:         * @author brett chaldecott
045:         */
046:        public class WebServicePanel extends Composite implements 
047:                ObjectsListener, ClickListener {
048:
049:            // private member variables
050:            private DockPanel dockPanel = null;
051:            private ObjectsPanel objectsPanel = null;
052:            private WSDLPanel wsdlPanel = null;
053:            private WebServiceManagerAsync service = null;
054:            private String webService = null;
055:            private Label help = null;
056:
057:            /**
058:             * Creates a new instance of WebServicePancle
059:             */
060:            public WebServicePanel() {
061:                VerticalPanel lhs = new VerticalPanel();
062:                lhs.setSpacing(2);
063:                objectsPanel = new ObjectsPanel(this , 450);
064:                lhs.add(objectsPanel);
065:
066:                help = new Label("Help");
067:                help.addClickListener(this );
068:                help.setStyleName("click-Label");
069:                help.setWidth("100%");
070:                lhs.add(help);
071:
072:                VerticalPanel rhs = new VerticalPanel();
073:                rhs.setWidth("100%");
074:                rhs.setSpacing(2);
075:                wsdlPanel = new WSDLPanel();
076:                wsdlPanel.setWidth("100%");
077:                rhs.add(wsdlPanel);
078:
079:                dockPanel = new DockPanel();
080:                dockPanel.setWidth("100%");
081:                dockPanel.add(lhs, DockPanel.WEST);
082:                dockPanel.add(rhs, DockPanel.CENTER);
083:                dockPanel.setSpacing(2);
084:                dockPanel.setCellWidth(rhs, "100%");
085:
086:                // init the daemon manager
087:                initWebServiceManager();
088:
089:                // Create an asynchronous callback to handle the result.
090:                service.getServices(new AsyncCallback() {
091:                    public void onSuccess(Object result) {
092:                        objectsPanel.setObjects((String[]) result);
093:                    }
094:
095:                    public void onFailure(Throwable caught) {
096:                        Window.alert("Failed to load the list of objects : "
097:                                + caught.getMessage());
098:                    }
099:                });
100:
101:                // init the widget
102:                initWidget(dockPanel);
103:            }
104:
105:            /**
106:             * init the daemon manager
107:             */
108:            private void initWebServiceManager() {
109:                // Create the client proxy. Note that although you are creating the
110:                // service interface proper, you cast the result to the asynchronous
111:                // version of
112:                // the interface. The cast is always safe because the generated proxy
113:                // implements the asynchronous interface automatically.
114:                service = (WebServiceManagerAsync) GWT
115:                        .create(WebServiceManager.class);
116:                // Specify the URL at which our service implementation is running.
117:                // Note that the target URL must reside on the same domain and port from
118:                // which the host page was served.
119:                //
120:                ServiceDefTarget endpoint = (ServiceDefTarget) service;
121:                String moduleRelativeURL = GWT.getModuleBaseURL()
122:                        + "webservicemanager";
123:                endpoint.setServiceEntryPoint(moduleRelativeURL);
124:            }
125:
126:            /**
127:             * This method is called when a wsdl object is selected.
128:             *
129:             * @param key The selected key.
130:             */
131:            public void objectSelected(String key) {
132:                webService = key;
133:                // Create an asynchronous callback to handle the result.
134:                service.getWebServiceDef(webService, new AsyncCallback() {
135:                    public void onSuccess(Object result) {
136:                        wsdlPanel.setWebServiceDef((WebServiceDef) result);
137:                    }
138:
139:                    public void onFailure(Throwable caught) {
140:                        Window.alert("Failed to load the list of objects :"
141:                                + caught.getMessage());
142:                    }
143:                });
144:            }
145:
146:            /**
147:             * This method is responsible for displaying the help information.
148:             */
149:            public void onClick(Widget widget) {
150:                if (help == widget) {
151:                    HelpDialog
152:                            .getInstance()
153:                            .setContent(
154:                                    "The Web Services Admin Panel enables users to view the "
155:                                            + "<br>web service information for the Coadunation managed "
156:                                            + "<br>web services."
157:                                            + "<br>"
158:                                            + "<br>Follow these steps to view the information for a "
159:                                            + "<br>deployed web service."
160:                                            + "<br>"
161:                                            + "<br><b>Step 1:</b>"
162:                                            + "<br>Select the web service by name from the objects panel."
163:                                            + "<br><img src='images/WebServiceObjects.gif'/>"
164:                                            + "<br>"
165:                                            + "<br><b>Step 2:</b>"
166:                                            + "<br>View the WSDL information displayed in the right hand "
167:                                            + "<br>side panel."
168:                                            + "<br><img src='images/WSDL.gif'/>");
169:                    //HelpDialog.getInstance().show();
170:                }
171:            }
172:
173:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.