[openempi~source-repository:60] Added support for the web application for starting and stopping the embed
- From: odysseas@kenai.com
- To: commits@openempi.kenai.com
- Subject: [openempi~source-repository:60] Added support for the web application for starting and stopping the embed
- Date: Thu, 18 Mar 2010 14:45:00 +0000
Project: openempi
Repository: source-repository
Revision: 60
Author: odysseas
Date: 2010-03-18 14:44:56 UTC
Link:
Log Message:
------------
Added support for the web application for starting and stopping the embedded
PIX/PDQ server.
Revisions:
----------
60
Modified Paths:
---------------
branches/2.0.4-development/openempi/webapp-web/src/main/java/org/openempi/webapp/Application.gwt.xml
branches/2.0.4-development/openempi/webapp-web/war/WEB-INF/web.xml
branches/2.0.4-development/openempi/webapp-web/src/main/java/org/openempi/webapp/public/Application.css
branches/2.0.4-development/openempi/webapp-web/src/main/java/org/openempi/webapp/client/MainApp.java
branches/2.0.4-development/openempi/webapp-web/src/main/resources/jdbc.properties
branches/2.0.4-development/openempi/webapp-web/src/main/java/org/openempi/webapp/client/Constants.java
branches/2.0.4-development/openempi/webapp-web/src/main/java/org/openempi/webapp/client/AppEvents.java
branches/2.0.4-development/openempi/webapp-web/src/main/java/org/openempi/webapp/client/mvc/AbstractController.java
branches/2.0.4-development/openempi/webapp-web/src/main/java/org/openempi/webapp/client/mvc/search/BasicSearchView.java
branches/2.0.4-development/openempi/core/src/test/resources/log4j.xml
branches/2.0.4-development/openempi/webapp-web/src/main/java/org/openempi/webapp/client/mvc/MenuToolbarView.java
Diffs:
------
Index: branches/2.0.4-development/openempi/core/src/test/resources/log4j.xml
===================================================================
--- branches/2.0.4-development/openempi/core/src/test/resources/log4j.xml
(revision 59)
+++ branches/2.0.4-development/openempi/core/src/test/resources/log4j.xml
(revision 60)
@@ -78,6 +78,10 @@
<level value="TRACE"/>
</logger>
+ <logger name="org.openempi">
+ <level value="TRACE"/>
+ </logger>
+
<root>
<level value="WARN"/>
<appender-ref ref="CONSOLE"/>
Index:
branches/2.0.4-development/openempi/webapp-web/src/main/java/org/openempi/webapp/Application.gwt.xml
===================================================================
---
branches/2.0.4-development/openempi/webapp-web/src/main/java/org/openempi/webapp/Application.gwt.xml
(revision 59)
+++
branches/2.0.4-development/openempi/webapp-web/src/main/java/org/openempi/webapp/Application.gwt.xml
(revision 60)
@@ -27,5 +27,6 @@
<servlet path="/referenceDataService"
class="org.openempi.webapp.server.ReferenceDataServiceImpl"/>
<servlet path="/personDataService"
class="org.openempi.webapp.server.PersonDataServiceImpl"/>
+ <servlet path="/adminService"
class="org.openempi.webapp.server.AdminServiceImpl"/>
</module>
Index:
branches/2.0.4-development/openempi/webapp-web/src/main/java/org/openempi/webapp/client/AppEvents.java
===================================================================
---
branches/2.0.4-development/openempi/webapp-web/src/main/java/org/openempi/webapp/client/AppEvents.java
(revision 59)
+++
branches/2.0.4-development/openempi/webapp-web/src/main/java/org/openempi/webapp/client/AppEvents.java
(revision 60)
@@ -15,6 +15,10 @@
public static final EventType Login = new EventType();
+ public static final EventType AdminStartPixPdqServer = new EventType();
+
+ public static final EventType AdminStopPixPdqServer = new EventType();
+
public static final EventType BasicSearchView = new EventType();
public static final EventType BasicSearchInitiate = new EventType();
Index:
branches/2.0.4-development/openempi/webapp-web/src/main/java/org/openempi/webapp/client/MainApp.java
===================================================================
---
branches/2.0.4-development/openempi/webapp-web/src/main/java/org/openempi/webapp/client/MainApp.java
(revision 59)
+++
branches/2.0.4-development/openempi/webapp-web/src/main/java/org/openempi/webapp/client/MainApp.java
(revision 60)
@@ -9,6 +9,7 @@
import org.openempi.webapp.client.mvc.AppController;
import org.openempi.webapp.client.mvc.MenuToolbarController;
+import org.openempi.webapp.client.mvc.admin.AdminController;
import org.openempi.webapp.client.mvc.search.BasicSearchController;
import org.openempi.webapp.client.mvc.user.UserFileController;
@@ -37,8 +38,15 @@
endpoint.setServiceEntryPoint(moduleRelativeURL);
Registry.register(Constants.PERSON_DATA_SERVICE,
personDataService);
+ AdminServiceAsync adminService = (AdminServiceAsync)
GWT.create(AdminService.class);
+ endpoint = (ServiceDefTarget) adminService;
+ moduleRelativeURL = Constants.ADMIN_SERVICE;
+ endpoint.setServiceEntryPoint(moduleRelativeURL);
+ Registry.register(Constants.ADMIN_SERVICE, adminService);
+
Dispatcher dispatcher = Dispatcher.get();
dispatcher.addController(new AppController());
+ dispatcher.addController(new AdminController());
dispatcher.addController(new BasicSearchController());
dispatcher.addController(new MenuToolbarController());
dispatcher.addController(new UserFileController());
Index:
branches/2.0.4-development/openempi/webapp-web/src/main/java/org/openempi/webapp/client/mvc/AbstractController.java
===================================================================
---
branches/2.0.4-development/openempi/webapp-web/src/main/java/org/openempi/webapp/client/mvc/AbstractController.java
(revision 59)
+++
branches/2.0.4-development/openempi/webapp-web/src/main/java/org/openempi/webapp/client/mvc/AbstractController.java
(revision 60)
@@ -1,5 +1,6 @@
package org.openempi.webapp.client.mvc;
+import org.openempi.webapp.client.AdminServiceAsync;
import org.openempi.webapp.client.Constants;
import org.openempi.webapp.client.PersonDataServiceAsync;
@@ -9,12 +10,19 @@
public abstract class AbstractController extends Controller
{
private PersonDataServiceAsync personDataService;
+ private AdminServiceAsync adminService;
-
protected synchronized PersonDataServiceAsync getPersonDataService() {
if (personDataService == null) {
personDataService = (PersonDataServiceAsync)
Registry.get(Constants.PERSON_DATA_SERVICE);
}
return personDataService;
}
+
+ protected synchronized AdminServiceAsync getAdminService() {
+ if (adminService == null) {
+ adminService = (AdminServiceAsync)
Registry.get(Constants.ADMIN_SERVICE);
+ }
+ return adminService;
+ }
}
Index:
branches/2.0.4-development/openempi/webapp-web/src/main/java/org/openempi/webapp/client/mvc/MenuToolbarView.java
===================================================================
---
branches/2.0.4-development/openempi/webapp-web/src/main/java/org/openempi/webapp/client/mvc/MenuToolbarView.java
(revision 59)
+++
branches/2.0.4-development/openempi/webapp-web/src/main/java/org/openempi/webapp/client/mvc/MenuToolbarView.java
(revision 60)
@@ -62,13 +62,29 @@
}
}));
MenuBarItem files = new MenuBarItem("File", fileList);
+
+ Menu adminSubmenu = new Menu();
+ adminSubmenu.add(new MenuItem("Start PIX/PDQ Server", new
SelectionListener<MenuEvent>() {
+ @Override
+ public void componentSelected(MenuEvent ce) {
+
Dispatcher.get().dispatch(AppEvents.AdminStartPixPdqServer);
+ }
+ }));
+ adminSubmenu.add(new MenuItem("Stop PIX/PDQ Server", new
SelectionListener<MenuEvent>() {
+ @Override
+ public void componentSelected(MenuEvent ce) {
+
Dispatcher.get().dispatch(AppEvents.AdminStopPixPdqServer);
+ }
+ }));
+ MenuBarItem admin = new MenuBarItem("Admin", adminSubmenu);
MenuBar bar = new MenuBar();
bar.setBorders(true);
bar.add(files);
// bar.setStyleAttribute("borderTop", "none");
bar.add(search);
-
+ bar.add(admin);
+
container.add(bar); // , new MarginData(5,0,0,0));
ToolBar toolbar = new ToolBar();
Index:
branches/2.0.4-development/openempi/webapp-web/src/main/java/org/openempi/webapp/client/mvc/search/BasicSearchView.java
===================================================================
---
branches/2.0.4-development/openempi/webapp-web/src/main/java/org/openempi/webapp/client/mvc/search/BasicSearchView.java
(revision 59)
+++
branches/2.0.4-development/openempi/webapp-web/src/main/java/org/openempi/webapp/client/mvc/search/BasicSearchView.java
(revision 60)
@@ -50,7 +50,7 @@
private LayoutContainer container;
private LayoutContainer gridContainer;
- private Status status = new Status();
+ private Status status;
private Button searchButton;
@@ -156,7 +156,11 @@
return "<p class=\"identifierBlock\">" +
"<b>Person Identifiers:</b><br>" +
"<table class=\"identifierTable\"> " +
- "<tr><th>Identifier</th><th>Namespace
Identifier</th><th>Universal Identifier</th><th>Universal Identifier
Type</th></tr> " +
+ "<tr>" +
+ "<th
class=\"identifierColumn\">Identifier</th>" +
+ "<th class=\"namespaceColumn\">Namespace
Identifier</th>" +
+ "<th
class=\"universalIdentifierColumn\">Universal Identifier</th>" +
+ "<th
class=\"universalIdentifierTypeColumn\">Universal Identifier Type</th></tr> "
+
"<tpl for=\"personIdentifiers\"> " +
"<tr> " +
"<td>{identifier}</td><td>{namespaceIdentifier}</td><td>{universalIdentifier}</td><td>{universalIdentifierTypeCode}</td>"
+
@@ -231,6 +235,7 @@
searchButton.mask();
}
});
+ status = new Status();
status.setBusy("please wait...");
panel.getButtonBar().add(status);
status.hide();
Index:
branches/2.0.4-development/openempi/webapp-web/src/main/java/org/openempi/webapp/client/Constants.java
===================================================================
---
branches/2.0.4-development/openempi/webapp-web/src/main/java/org/openempi/webapp/client/Constants.java
(revision 59)
+++
branches/2.0.4-development/openempi/webapp-web/src/main/java/org/openempi/webapp/client/Constants.java
(revision 60)
@@ -14,6 +14,7 @@
public static final String SERVICE = "mailservice";
public static final String REF_DATA_SERVICE = "referenceDataService";
public static final String PERSON_DATA_SERVICE = "personDataService";
+ public static final String ADMIN_SERVICE = "adminService";
public static final String IDENTITY_DOMAIN_TYPE_CODES =
"identityDomainTypeCodes";
}
Index:
branches/2.0.4-development/openempi/webapp-web/src/main/java/org/openempi/webapp/public/Application.css
===================================================================
---
branches/2.0.4-development/openempi/webapp-web/src/main/java/org/openempi/webapp/public/Application.css
(revision 59)
+++
branches/2.0.4-development/openempi/webapp-web/src/main/java/org/openempi/webapp/public/Application.css
(revision 60)
@@ -46,20 +46,35 @@
table.identifierTable {
font-weight: normal;
font-size: 11px;
+ width: 90%;
}
table.identifierTable th {
font-weight: bold;
font-size: 11px;
- width: 25%;
}
table.identifierTable td {
font-weight: normal;
font-size: 11px;
- width: 25%;
}
+.identifierColumn {
+ width: 20%;
+}
+
+.namespaceColumn {
+ width: 30%;
+}
+
+.universalIdentifierColumn {
+ width: 30%;
+}
+
+.universalIdentifierTypeColumn {
+ width: 20%;
+}
+
.userFileGrid {
position: absolute;
left: 50%;
Index:
branches/2.0.4-development/openempi/webapp-web/src/main/resources/jdbc.properties
===================================================================
---
branches/2.0.4-development/openempi/webapp-web/src/main/resources/jdbc.properties
(revision 59)
+++
branches/2.0.4-development/openempi/webapp-web/src/main/resources/jdbc.properties
(revision 60)
@@ -16,14 +16,14 @@
*
*/
jdbc.driverClassName=org.postgresql.Driver
-jdbc.url=jdbc:postgresql://localhost/openempi
+jdbc.url=jdbc:postgresql://localhost/openempi2
jdbc.username=openempi
jdbc.password=openempi
hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
# Needed by Hibernate3 Maven Plugin defined in pom.xml
-hibernate.connection.username=openempi
-hibernate.connection.password=openempi
-hibernate.connection.url=jdbc:postgresql://localhost/openempi
-hibernate.connection.driver_class=org.postgresql.Driver
\ No newline at end of file
+hibernate.connection.username=${jdbc.username}
+hibernate.connection.password=${jdbc.password}
+hibernate.connection.url=${jdbc.url}
+hibernate.connection.driver_class=${jdbc.driverClassName}
\ No newline at end of file
Index: branches/2.0.4-development/openempi/webapp-web/war/WEB-INF/web.xml
===================================================================
--- branches/2.0.4-development/openempi/webapp-web/war/WEB-INF/web.xml
(revision 59)
+++ branches/2.0.4-development/openempi/webapp-web/war/WEB-INF/web.xml
(revision 60)
@@ -9,13 +9,19 @@
<servlet-class>org.openempi.webapp.server.ReferenceDataServiceImpl</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
-
+
<servlet>
<servlet-name>personDataService</servlet-name>
<servlet-class>org.openempi.webapp.server.PersonDataServiceImpl</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
+ <servlet>
+ <servlet-name>adminService</servlet-name>
+
<servlet-class>org.openempi.webapp.server.AdminServiceImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
<servlet>
<servlet-name>logging</servlet-name>
<servlet-class>com.google.gwt.libideas.logging.server.RemoteLoggingServiceImpl</servlet-class>
@@ -45,6 +51,11 @@
<servlet-name>personDataService</servlet-name>
<url-pattern>/org.openempi.webapp.Application/personDataService</url-pattern>
</servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>adminService</servlet-name>
+ <url-pattern>/org.openempi.webapp.Application/adminService</url-pattern>
+ </servlet-mapping>
<servlet-mapping>
<servlet-name>logging</servlet-name>
|
[openempi~source-repository:60] Added support for the web application for starting and stopping the embed |
odysseas | 03/18/2010 |





