[Comsuite-svn] SF.net SVN: comsuite: [188] trunk/code
Brought to you by:
zduniak
|
From: <sku...@us...> - 2006-10-02 22:11:58
|
Revision: 188
http://svn.sourceforge.net/comsuite/?rev=188&view=rev
Author: skuzniak
Date: 2006-10-02 15:11:31 -0700 (Mon, 02 Oct 2006)
Log Message:
-----------
deleting messages provided
Modified Paths:
--------------
trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/LanguageSelectionBean.java
trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/messages/SearchMessageBean.java
trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/SearchServerBean.java
trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_en.properties
trunk/code/CSAdminPanel/WebContent/pages/messages/CSMessages.jsp
trunk/code/CSCommon/src/org/commsuite/ws/ICommunicateWS.java
trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java
trunk/code/CSMiddleware/src/org/commsuite/ws/services/MessagesService.java
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/LanguageSelectionBean.java
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/LanguageSelectionBean.java 2006-10-02 19:46:09 UTC (rev 187)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/LanguageSelectionBean.java 2006-10-02 22:11:31 UTC (rev 188)
@@ -188,6 +188,10 @@
LOCALE_CLASSNAME, messageCode, null,
FacesContext.getCurrentInstance().getViewRoot().getLocale());
logger.debug("****************************************************************");
+ logger.debug("message: "+ message);
+ logger.debug("exception: "+ exception);
+ logger.debug("parent component: "+ parentComponent);
+ logger.debug("****************************************************************");
FacesContext.getCurrentInstance().addMessage(parentComponent,
new FacesMessage(message+ "caused by: "+ exception));
}
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/messages/SearchMessageBean.java
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/messages/SearchMessageBean.java 2006-10-02 19:46:09 UTC (rev 187)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/messages/SearchMessageBean.java 2006-10-02 22:11:31 UTC (rev 188)
@@ -241,5 +241,26 @@
end);
}
}
+
+ public String deleteMesage() {
+ final ICommunicateWS ws = SpringAdminPanelContext.getCommunicateWS();
+ try {
+ ws.deleteMessage(this.messageId);
+ } catch (WebServiceException wse) {
+ logger.fatal("Exception while deleting message with id: "+ this.messageId, wse);
+ LanguageSelectionBean.showMessage(
+ BeansUtils.MESSAGE_ERROR_DATABASE,
+ BeansUtils.MESSAGE_MESSAGE_ERROR_FETCH,
+ BeansUtils.SEARCH_MESSAGES_NAVIGATION);
+ return BeansUtils.SHOW_MESSAGES_NAVIGATION;
+ } catch (Throwable t) {
+ logger.fatal("Exception", t);
+ LanguageSelectionBean.showMessage(BeansUtils.MESSAGE_ERROR_GENERAL,
+ BeansUtils.MESSAGE_MESSAGE_ERROR_FETCH,
+ BeansUtils.SHOW_MESSAGES_NAVIGATION);
+ return BeansUtils.SHOW_MESSAGES_NAVIGATION;
+ }
+ return BeansUtils.SHOW_MESSAGES_NAVIGATION;
+ }
}
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/SearchServerBean.java
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/SearchServerBean.java 2006-10-02 19:46:09 UTC (rev 187)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/SearchServerBean.java 2006-10-02 22:11:31 UTC (rev 188)
@@ -59,6 +59,8 @@
private static final Logger logger = Logger.getLogger(SearchServerBean.class);
private static final String CHOICE_ALL_LABEL = "CHOICE_ALL";
+
+ private String lastTestException = null;
private List<ServerExtended> servers;
@@ -211,7 +213,7 @@
if (null == testResult) {
this.serverStates.set(i, TEST_OK_ICON_PATH);
} else {
- LanguageSelectionBean.showMessageWithException(BeansUtils.SERVER_TEST_FAIL, testResult,
+ LanguageSelectionBean.showMessageWithException(BeansUtils.SERVER_TEST_FAIL, lastTestException,
BeansUtils.SHOW_SERVERS_NAVIGATION);
this.serverStates.set(i, TEST_FAIL_ICON_PATH);
}
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_en.properties
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_en.properties 2006-10-02 19:46:09 UTC (rev 187)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_en.properties 2006-10-02 22:11:31 UTC (rev 188)
@@ -128,14 +128,14 @@
SERVER_UNICODE=Unicode
SERVER_ACTIVE_INSTANCE=Activate
SERVER_ACTIVE=Server active
-SERVER_GWHOST=GWHost \ SAPRouter
+SERVER_GWHOST=GWHost \\ SAPRouter
SERVER_GWSERVER=GWServer
SERVER_MANDANT=Client (mandant)
SERVER_USER=User
SERVER_PASSWORD=Password
SERVER_PASSWORD_REPEAT=Repeat password
SERVER_ADM_EMAIL=Admin e-mail
-SERVER_HOST=Host \ SAPRouter
+SERVER_HOST=Host \\ SAPRouter
# messages
MESSAGE_TITLE_LIST=Messages
MESSAGE_TITLE_SEARCH=Searching for messages
Modified: trunk/code/CSAdminPanel/WebContent/pages/messages/CSMessages.jsp
===================================================================
--- trunk/code/CSAdminPanel/WebContent/pages/messages/CSMessages.jsp 2006-10-02 19:46:09 UTC (rev 187)
+++ trunk/code/CSAdminPanel/WebContent/pages/messages/CSMessages.jsp 2006-10-02 22:11:31 UTC (rev 188)
@@ -30,7 +30,7 @@
var="mes" styleClass="listView" id="messages" rowClasses="listView-header-odd,listView-header-even">
<h:column>
<h:panelGrid columns="1">
- <h:panelGrid columns="5">
+ <h:panelGrid columns="6">
<h:panelGrid columns="2">
<h:outputText value="#{Locale.MESSAGE_DESCRIPTION}"
styleClass="listView-title" />
@@ -66,6 +66,13 @@
<h:outputText value="#{Locale.LABEL_DETAILS}" styleClass="listView-header-value"/>
</h:panelGrid>
</h:commandLink>
+ <h:commandLink actionListener="#{searchMessageBean.selectMessage}" action="#{searchMessageBean.deleteMesage}">
+ <f:param value="#{mes.id}" name="messageId" />
+ <h:panelGrid columns="1">
+ <h:graphicImage value="#{pageContext.request.contextPath}/pages/files/gif/list-delete.gif" styleClass="header-icon"/>
+ <h:outputText value="#{Locale.LABEL_DELETE}" styleClass="listView-header-value"/>
+ </h:panelGrid>
+ </h:commandLink>
</h:panelGrid>
</h:panelGrid>
</h:column>
Modified: trunk/code/CSCommon/src/org/commsuite/ws/ICommunicateWS.java
===================================================================
--- trunk/code/CSCommon/src/org/commsuite/ws/ICommunicateWS.java 2006-10-02 19:46:09 UTC (rev 187)
+++ trunk/code/CSCommon/src/org/commsuite/ws/ICommunicateWS.java 2006-10-02 22:11:31 UTC (rev 188)
@@ -50,6 +50,14 @@
public Collection<WSMessage> getAllMessages() throws WebServiceException;
/**
+ * Allows to delete message from databse
+ *
+ * @param id id of message to delete
+ * @throws WebServiceException on any error
+ */
+ public void deleteMessage(String id) throws WebServiceException ;
+
+ /**
* this method returns number of masseagess stored in database.
* if wsMessage argument is null, method returns size of all
* messages, else method returns size of collection of messages
Modified: trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java 2006-10-02 19:46:09 UTC (rev 187)
+++ trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java 2006-10-02 22:11:31 UTC (rev 188)
@@ -79,6 +79,15 @@
}
}
+ public void deleteMessage(String id) throws WebServiceException {
+ try {
+ final MessagesService service = MessagesService.getMessagesService();
+ service.deleteMessage(id);
+ } catch(Throwable t) {
+ throw new WebServiceException("Exception during deleting message with id: "+ id);
+ }
+ }
+
public int getMessagesSize(SearchMessageModel wsMessage) throws WebServiceException {
try {
MessagesService service = MessagesService.getMessagesService();
Modified: trunk/code/CSMiddleware/src/org/commsuite/ws/services/MessagesService.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/ws/services/MessagesService.java 2006-10-02 19:46:09 UTC (rev 187)
+++ trunk/code/CSMiddleware/src/org/commsuite/ws/services/MessagesService.java 2006-10-02 22:11:31 UTC (rev 188)
@@ -283,5 +283,15 @@
+ messageId);
}
}
+
+ public void deleteMessage(String id) throws WebServiceException {
+ final MessageManager msgManager = SpringMiddlewareContext
+ .getMessageManager();
+ try {
+ msgManager.deleteMessage(id);
+ } catch (Throwable t) {
+ throw new WebServiceException("Exception during deleting mesage");
+ }
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|