Thread: [Comsuite-svn] SF.net SVN: comsuite: [120] trunk/code
Brought to you by:
zduniak
|
From: <sku...@us...> - 2006-08-30 19:50:33
|
Revision: 120
http://svn.sourceforge.net/comsuite/?rev=120&view=rev
Author: skuzniak
Date: 2006-08-30 12:49:57 -0700 (Wed, 30 Aug 2006)
Log Message:
-----------
all services switched to singletons, additional field in sapinstancedef added.
Modified Paths:
--------------
trunk/code/CSCommon/src/org/commsuite/ws/ICommunicateWS.java
trunk/code/CSMiddleware/src/org/commsuite/dao/SAPInstanceDefDao.java
trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/SAPInstanceDefDaoImpl.java
trunk/code/CSMiddleware/src/org/commsuite/managers/SAPInstanceDefManager.java
trunk/code/CSMiddleware/src/org/commsuite/managers/impl/SAPInstanceDefManagerImpl.java
trunk/code/CSMiddleware/src/org/commsuite/sap/ISAPComm.java
trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java
trunk/code/CSMiddleware/src/org/commsuite/sap/SAPCommManager.java
trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java
trunk/code/CSMiddleware/src/org/commsuite/ws/services/ActionsService.java
trunk/code/CSMiddleware/src/org/commsuite/ws/services/GroupsService.java
trunk/code/CSMiddleware/src/org/commsuite/ws/services/RolesService.java
trunk/code/CSMiddleware/src/org/commsuite/ws/services/ServersService.java
Modified: trunk/code/CSCommon/src/org/commsuite/ws/ICommunicateWS.java
===================================================================
--- trunk/code/CSCommon/src/org/commsuite/ws/ICommunicateWS.java 2006-08-21 19:09:35 UTC (rev 119)
+++ trunk/code/CSCommon/src/org/commsuite/ws/ICommunicateWS.java 2006-08-30 19:49:57 UTC (rev 120)
@@ -183,6 +183,8 @@
public Collection<WSRole> getRolesForGroup(String id) throws WebServiceException;
public Collection<WSGroup> getGroupsByUser(String name) throws WebServiceException;
+
+ public void deactivateServer(String id, boolean mode) throws WebServiceException ;
/**
* This method allows test server with known ID
Modified: trunk/code/CSMiddleware/src/org/commsuite/dao/SAPInstanceDefDao.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/dao/SAPInstanceDefDao.java 2006-08-21 19:09:35 UTC (rev 119)
+++ trunk/code/CSMiddleware/src/org/commsuite/dao/SAPInstanceDefDao.java 2006-08-30 19:49:57 UTC (rev 120)
@@ -45,5 +45,7 @@
public void deleteSAPInstanceDef(SAPInstanceDef sapInstanceDef);
public SAPInstanceDef getSAPInstanceDefByMessageId(Long long1);
+
+ public void deactivateInstance(String id, boolean mode);
}
Modified: trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/SAPInstanceDefDaoImpl.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/SAPInstanceDefDaoImpl.java 2006-08-21 19:09:35 UTC (rev 119)
+++ trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/SAPInstanceDefDaoImpl.java 2006-08-30 19:49:57 UTC (rev 120)
@@ -138,5 +138,11 @@
logger.debug("SIZE OF INSTANCES MATCHING TO GIVES PATTERN: " + list.size());
return list;
}
+
+ public void deactivateInstance(String id, boolean mode) {
+ SAPInstanceDef instance = getSAPInstanceDef(Long.getLong(id).longValue());
+ instance.setActiveInstance(mode);
+ getHibernateTemplate().saveOrUpdate(id, instance);
+ }
}
Modified: trunk/code/CSMiddleware/src/org/commsuite/managers/SAPInstanceDefManager.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/managers/SAPInstanceDefManager.java 2006-08-21 19:09:35 UTC (rev 119)
+++ trunk/code/CSMiddleware/src/org/commsuite/managers/SAPInstanceDefManager.java 2006-08-30 19:49:57 UTC (rev 120)
@@ -45,5 +45,7 @@
public void deleteSAPInstanceDef(SAPInstanceDef sapInstanceDef);
public SAPInstanceDef getSAPInstanceDefByMessageId(String string);
+
+ public void deactivateInstance(String id, boolean mode);
}
Modified: trunk/code/CSMiddleware/src/org/commsuite/managers/impl/SAPInstanceDefManagerImpl.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/managers/impl/SAPInstanceDefManagerImpl.java 2006-08-21 19:09:35 UTC (rev 119)
+++ trunk/code/CSMiddleware/src/org/commsuite/managers/impl/SAPInstanceDefManagerImpl.java 2006-08-30 19:49:57 UTC (rev 120)
@@ -88,5 +88,7 @@
return dao.getSAPInstanceDefByMessageId(Long.valueOf(messageId));
}
-
+ public void deactivateInstance(String id, boolean mode) {
+ dao.deactivateInstance(id, mode);
+ }
}
Modified: trunk/code/CSMiddleware/src/org/commsuite/sap/ISAPComm.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/sap/ISAPComm.java 2006-08-21 19:09:35 UTC (rev 119)
+++ trunk/code/CSMiddleware/src/org/commsuite/sap/ISAPComm.java 2006-08-30 19:49:57 UTC (rev 120)
@@ -56,6 +56,8 @@
public abstract String getName();
public abstract IJCOServer getServer();
+
+ public abstract boolean isActiveInstance();
public String toString();
}
Modified: trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java 2006-08-21 19:09:35 UTC (rev 119)
+++ trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java 2006-08-30 19:49:57 UTC (rev 120)
@@ -582,5 +582,9 @@
public boolean isHandlingRequest() {
return handlingRequest;
}
+
+ public boolean isActiveInstance() {
+ return this.instanceDef.isActiveInstance();
+ }
}
Modified: trunk/code/CSMiddleware/src/org/commsuite/sap/SAPCommManager.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/sap/SAPCommManager.java 2006-08-21 19:09:35 UTC (rev 119)
+++ trunk/code/CSMiddleware/src/org/commsuite/sap/SAPCommManager.java 2006-08-30 19:49:57 UTC (rev 120)
@@ -127,21 +127,23 @@
final Collection<ISAPComm> clonnedSapComms = new FastTable<ISAPComm>(sapComms.values());
for (final ISAPComm sapComm : clonnedSapComms) {
- logger.info("Initiating: " + sapComm);
- try {
- sapComm.startServer();
- } catch (Throwable t) {
- logger.fatal("Error during starting SAPComm: " + sapComm, t);
- // stop partially started SAPComm:
- try {
- sapComm.destroy();
- } catch (Throwable ignore) {
- // Ignore
- }
- // remove error prone SAPComm from oryginal collection:
- // REVIEW: maybe it is not good idea to remove sap instance from collection ?
- // sapComms.remove(sapComm.getName());
- }
+ if (sapComm.isActiveInstance()) {
+ logger.info("Initiating: " + sapComm);
+ try {
+ sapComm.startServer();
+ } catch (Throwable t) {
+ logger.fatal("Error during starting SAPComm: " + sapComm, t);
+ // stop partially started SAPComm:
+ try {
+ sapComm.destroy();
+ } catch (Throwable ignore) {
+ // Ignore
+ }
+ // remove error prone SAPComm from oryginal collection:
+ // REVIEW: maybe it is not good idea to remove sap instance from collection ?
+ // sapComms.remove(sapComm.getName());
+ }
+ }
}
}
Modified: trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java 2006-08-21 19:09:35 UTC (rev 119)
+++ trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java 2006-08-30 19:49:57 UTC (rev 120)
@@ -318,7 +318,7 @@
public Collection<WSAction> getActionsAvailable() throws WebServiceException {
try {
- ActionsService service = new ActionsService();
+ ActionsService service = ActionsService.getInstance();
return service.getActionsAvailable();
} catch (Throwable t) {
logger.fatal("error in getActionsAvailable method", t);
@@ -328,7 +328,7 @@
public Collection<WSAction> getActionsByRole(String id) throws WebServiceException {
try {
- ActionsService service = new ActionsService();
+ ActionsService service = ActionsService.getInstance();
return service.getActionsByRole(id);
} catch (Throwable t) {
logger.fatal("error in getActionsByRole method", t);
@@ -340,7 +340,7 @@
// do zapisywania zmian przy edycji juz istniejacych akcji ? nazwa tej metody jest odpowiednia ?
public WSAction addActionToDatabase(WSAction action) throws WebServiceException {
try {
- ActionsService service = new ActionsService();
+ ActionsService service = ActionsService.getInstance();
return service.addActionToDatabase(action);
} catch (DataIntegrityViolationException dive) {
logger.fatal("duplicate action name");
@@ -354,7 +354,7 @@
// TODO: [SK] czy ta metoda nie powinna zwracac obiektu typu WSAction ?
public Action getActionById(String id) throws WebServiceException {
try {
- ActionsService service = new ActionsService();
+ ActionsService service = ActionsService.getInstance();
return service.getActionById(id);
} catch (Throwable t) {
logger.fatal("error in getActionById method", t);
@@ -364,7 +364,7 @@
public WSAction getWSActionById(String id) throws WebServiceException {
try {
- ActionsService service = new ActionsService();
+ ActionsService service = ActionsService.getInstance();
return service.getWSActionById(id);
} catch (Throwable t) {
logger.fatal("error in getActionById method", t);
@@ -374,7 +374,7 @@
public void deleteActionFromDatabase(String id) throws WebServiceException {
try {
- ActionsService service = new ActionsService();
+ ActionsService service = ActionsService.getInstance();
service.deleteActionFromDatabase(id);
} catch (DataIntegrityViolationException diva) {
logger.fatal("This action is assigned.");
@@ -387,7 +387,7 @@
public Collection<WSAction> getActionsByName(String name) throws WebServiceException {
try {
- ActionsService service = new ActionsService();
+ ActionsService service = ActionsService.getInstance();
return service.getActionsByName(name);
} catch (Throwable t) {
logger.fatal("error in addActionToDatabase method", t);
@@ -397,7 +397,7 @@
public WSRole updateRole(WSRole wsRole) throws WebServiceException {
try {
- RolesService service = new RolesService();
+ RolesService service = RolesService.getInstnce();
return service.updateRole(wsRole);
} catch (DataIntegrityViolationException dive) {
logger.fatal("Duplicate name error");
@@ -410,7 +410,7 @@
public WSRole updateActionsForRole(WSRole wsRole, String[] ids) throws WebServiceException {
try {
- RolesService service = new RolesService();
+ RolesService service = RolesService.getInstnce();
return service.updateActionsForRole(wsRole, ids);
} catch (DataIntegrityViolationException dive) {
logger.fatal("Duplicate name error");
@@ -424,7 +424,7 @@
public WSRole updateUsersForRole(WSRole wsRole, String[] idsToAdd, String[] idsToDelete)
throws WebServiceException {
try {
- RolesService service = new RolesService();
+ RolesService service = RolesService.getInstnce();
return service.updateUsersForRole(wsRole, idsToAdd, idsToDelete);
} catch (DataIntegrityViolationException dive) {
logger.fatal("Duplicate name error");
@@ -437,7 +437,7 @@
public void deleteRoleFromDatabase(String id) throws WebServiceException {
try {
- RolesService service = new RolesService();
+ RolesService service = RolesService.getInstnce();
service.deleteRoleFromDatabase(id);
} catch (DataIntegrityViolationException dive) {
logger.fatal("Something is assigned to this role");
@@ -450,7 +450,7 @@
public Collection<WSRole> getAllRoles() throws WebServiceException {
try {
- RolesService service = new RolesService();
+ RolesService service = RolesService.getInstnce();
return service.getAllRoles();
} catch (Throwable t) {
logger.fatal("error in getAllRoles method", t);
@@ -471,7 +471,7 @@
public Collection<WSGroup> getAllGroups() throws WebServiceException {
try {
- GroupsService service = new GroupsService();
+ GroupsService service = GroupsService.getInstance();
return service.getAllGroups();
} catch (Throwable t) {
logger.fatal("error in getAllGroups method", t);
@@ -481,7 +481,7 @@
public WSGroup updateGroup(WSGroup wsGroup) throws WebServiceException {
try {
- GroupsService service = new GroupsService();
+ GroupsService service = GroupsService.getInstance();
return service.updateGroup(wsGroup);
} catch (DataIntegrityViolationException dive) {
logger.fatal("Duplicate name error");
@@ -494,7 +494,7 @@
public WSGroup updateRolesForGroup(WSGroup wsGroup, String[] ids) throws WebServiceException {
try {
- GroupsService service = new GroupsService();
+ GroupsService service = GroupsService.getInstance();
return service.updateRolesForGroup(wsGroup, ids);
} catch (DataIntegrityViolationException dive) {
logger.fatal("Duplicate name error");
@@ -508,7 +508,7 @@
public WSGroup updateUsersForGroup(WSGroup wsGroup, String[] idsToAdd, String[] idsToDelete)
throws WebServiceException {
try {
- GroupsService service = new GroupsService();
+ GroupsService service = GroupsService.getInstance();
return service.updateUsersForGroup(wsGroup, idsToAdd, idsToDelete);
} catch (DataIntegrityViolationException dive) {
logger.fatal("Duplicate name error");
@@ -521,7 +521,7 @@
public void deleteGroupFromDatabase(String id) throws WebServiceException {
try {
- GroupsService service = new GroupsService();
+ GroupsService service = GroupsService.getInstance();
service.deleteGroupFromDatabase(id);
} catch (DataIntegrityViolationException dive) {
logger.fatal("Something is assigned to this group");
@@ -554,7 +554,7 @@
public WSRole getRoleById(String id) throws WebServiceException {
try {
- RolesService service = new RolesService();
+ RolesService service = RolesService.getInstnce();
return service.getRoleById(id);
} catch (Throwable t) {
logger.fatal("error in getRoleById method", t);
@@ -564,7 +564,7 @@
public WSGroup getGroupById(String id) throws WebServiceException {
try {
- GroupsService service = new GroupsService();
+ GroupsService service = GroupsService.getInstance();
return service.getGroupById(id);
} catch (Throwable t) {
logger.fatal("error in getGroupById method", t);
@@ -574,7 +574,7 @@
public Collection<WSRole> getRolesByName(String name) throws WebServiceException {
try {
- RolesService service = new RolesService();
+ RolesService service = RolesService.getInstnce();
return service.getRolesByName(name);
} catch (Throwable t) {
logger.fatal("error in getAllRoles method", t);
@@ -584,7 +584,7 @@
public Collection<WSGroup> getGroupsByName(String name) throws WebServiceException {
try {
- GroupsService service = new GroupsService();
+ GroupsService service = GroupsService.getInstance();
return service.getGroupsByName(name);
} catch (Throwable t) {
logger.fatal("error in getAllGroups method", t);
@@ -614,7 +614,7 @@
public Collection<WSRole> getRolesForGroup(String id) throws WebServiceException {
try {
- RolesService service = new RolesService();
+ RolesService service = RolesService.getInstnce();
return service.getRolesForGroup(id);
} catch (Throwable t) {
logger.fatal("Exception while getting roles for group: " + id, t);
@@ -634,7 +634,7 @@
public Collection<WSRole> getRolesByUser(String id) throws WebServiceException {
try {
- RolesService service = new RolesService();
+ RolesService service = RolesService.getInstnce();
return service.getRolesByUser(id);
} catch (Throwable t) {
logger.fatal("Exception while getting roles for user: " + id, t);
@@ -644,7 +644,7 @@
public Collection<WSGroup> getGroupsByUser(String id) throws WebServiceException {
try {
- GroupsService service = new GroupsService();
+ GroupsService service = GroupsService.getInstance();
return service.getGroupsByUser(id);
} catch (Throwable t) {
logger.fatal("Exception while getting groups for user: " + id, t);
@@ -654,7 +654,7 @@
public Collection<WSRole> getRoleByActionId(String id) throws WebServiceException {
try {
- RolesService service = new RolesService();
+ RolesService service = RolesService.getInstnce();
return service.getRoleByActionId(id);
} catch (Throwable t) {
logger.fatal("Exception while getting roles for action: " + id, t);
@@ -701,5 +701,15 @@
throw new WebServiceException(t);
}
}
+
+ public void deactivateServer(String id, boolean mode) throws WebServiceException {
+ try {
+ ServersService service = ServersService.getInstance();
+ service.deactivateServer(id, mode);
+ } catch(Throwable t) {
+ logger.fatal("error while deactivating server", t);
+ throw new WebServiceException(t);
+ }
+ }
}
\ No newline at end of file
Modified: trunk/code/CSMiddleware/src/org/commsuite/ws/services/ActionsService.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/ws/services/ActionsService.java 2006-08-21 19:09:35 UTC (rev 119)
+++ trunk/code/CSMiddleware/src/org/commsuite/ws/services/ActionsService.java 2006-08-30 19:49:57 UTC (rev 120)
@@ -41,6 +41,19 @@
public class ActionsService {
private static final Logger logger = Logger.getLogger(ActionsService.class);
+
+ private static ActionsService instance;
+
+ private ActionsService() {
+
+ }
+
+ public synchronized static ActionsService getInstance() {
+ if (null == instance) {
+ instance = new ActionsService();
+ }
+ return instance;
+ }
public Collection<WSAction> getActionsAvailable() throws WebServiceException {
try {
Modified: trunk/code/CSMiddleware/src/org/commsuite/ws/services/GroupsService.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/ws/services/GroupsService.java 2006-08-21 19:09:35 UTC (rev 119)
+++ trunk/code/CSMiddleware/src/org/commsuite/ws/services/GroupsService.java 2006-08-30 19:49:57 UTC (rev 120)
@@ -47,6 +47,19 @@
private static final Logger logger = Logger.getLogger(GroupsService.class);
+ private static GroupsService instance;
+
+ private GroupsService() {
+
+ }
+
+ public synchronized static GroupsService getInstance() {
+ if (null == instance) {
+ instance = new GroupsService();
+ }
+ return instance;
+ }
+
public Collection<WSGroup> getAllGroups() throws WebServiceException {
try {
GroupManager groupManager = (GroupManager) SpringMiddlewareContext.getGroupManager();
Modified: trunk/code/CSMiddleware/src/org/commsuite/ws/services/RolesService.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/ws/services/RolesService.java 2006-08-21 19:09:35 UTC (rev 119)
+++ trunk/code/CSMiddleware/src/org/commsuite/ws/services/RolesService.java 2006-08-30 19:49:57 UTC (rev 120)
@@ -50,6 +50,19 @@
private static final Logger logger = Logger.getLogger(RolesService.class);
+ private static RolesService instance;
+
+ private RolesService() {
+
+ }
+
+ public static synchronized RolesService getInstnce() {
+ if (null == instance) {
+ instance = new RolesService();
+ }
+ return instance;
+ }
+
public WSRole updateRole(WSRole wsRole) throws WebServiceException {
Role role;
try {
Modified: trunk/code/CSMiddleware/src/org/commsuite/ws/services/ServersService.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/ws/services/ServersService.java 2006-08-21 19:09:35 UTC (rev 119)
+++ trunk/code/CSMiddleware/src/org/commsuite/ws/services/ServersService.java 2006-08-30 19:49:57 UTC (rev 120)
@@ -421,5 +421,16 @@
throw new WebServiceException(t);
}
}
+
+ public void deactivateServer(String id, boolean mode) throws WebServiceException {
+ /*try {
+ final SAPInstanceDefManager instManager = (SAPInstanceDefManager) SpringMiddlewareContext
+ .getSAPInstanceDefManager();
+ instManager.deactivateInstance(id, mode);
+ } catch(Throwable t) {
+ logger.fatal("error in deactivateServer method", t);
+ throw new WebServiceException(t);
+ }*/
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sku...@us...> - 2006-09-02 14:16:23
|
Revision: 121
http://svn.sourceforge.net/comsuite/?rev=121&view=rev
Author: skuzniak
Date: 2006-09-02 07:15:46 -0700 (Sat, 02 Sep 2006)
Log Message:
-----------
activeInstance field handling added
Modified Paths:
--------------
trunk/code/CSAdminPanel/.exadelproject
trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/AddSapServerBean.java
trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/ServerBean.java
trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_pl.properties
trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerAdd.jsp
trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerEdit.jsp
trunk/code/CSCommon/src/org/commsuite/model/FakedSAPInstanceDef.java
trunk/code/CSCommon/src/org/commsuite/model/ws/WSSAPInstanceDef.java
trunk/code/CSMiddleware/src/org/commsuite/model/SAPInstanceDef.java
trunk/code/CSMiddleware/src/org/commsuite/sap/SAPCommManager.java
Modified: trunk/code/CSAdminPanel/.exadelproject
===================================================================
--- trunk/code/CSAdminPanel/.exadelproject 2006-08-30 19:49:57 UTC (rev 120)
+++ trunk/code/CSAdminPanel/.exadelproject 2006-09-02 14:15:46 UTC (rev 121)
@@ -14,9 +14,19 @@
<FILESYSTEM ENTITY="FileSystemFolder"
LOCATION="%exadel.eclipse.project%" NAME="CSAdminPanel"/>
<FILESYSTEM ENTITY="FileSystemJar"
- LOCATION="%exadel.workspace%/lib/myfaces-impl.jar" NAME="lib-myfaces-impl.jar"/>
+ LOCATION="%exadel.workspace%/lib/tomahawk.jar" NAME="lib-tomahawk.jar"/>
<FILESYSTEM ENTITY="FileSystemJar"
- LOCATION="%exadel.workspace%/lib/tomahawk.jar" NAME="lib-tomahawk.jar"/>
+ LOCATION="%exadel.workspace%/lib/commons-beanutils-1.7.0.jar" NAME="lib-commons-beanutils-1.7.0.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%exadel.workspace%/lib/commons-digester-1.6.jar" NAME="lib-commons-digester-1.6.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%exadel.workspace%/lib/commons-el-1.0.jar" NAME="lib-commons-el-1.0.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%exadel.workspace%/lib/jstl-1.1.0.jar" NAME="lib-jstl-1.1.0.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%exadel.workspace%/lib/myfaces-api-1.1.3.jar" NAME="lib-myfaces-api-1.1.3.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%exadel.workspace%/lib/myfaces-impl-1.1.3.jar" NAME="lib-myfaces-impl-1.1.3.jar"/>
<WEB ENTITY="ExadelWeb" MODEL_PATH="/web.xml" SERVLET_VERSION="2.4">
<MODULE ENTITY="WebJSFModule" MODEL_PATH="/faces-config.xml"
ROOT="WEB-ROOT" SRC="src" URI="/WEB-INF/faces-config.xml"/>
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/AddSapServerBean.java
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/AddSapServerBean.java 2006-08-30 19:49:57 UTC (rev 120)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/AddSapServerBean.java 2006-09-02 14:15:46 UTC (rev 121)
@@ -77,7 +77,8 @@
instance.setSystemNumber(this.systemNumber);
instance.setUnicode(this.unicode);
instance.setUser(this.user);
-
+ instance.setActiveInstance(this.activeInstance);
+ logger.debug("Instance is active: "+ this.activeInstance);
if (null == this.password) {
if (!this.confPassword.equals(this.password)) throw new IllegalArgumentException(PASSWORD_ERROR_CODE);
}
@@ -118,6 +119,7 @@
instance.setSystemNumber(this.systemNumber);
instance.setUnicode(this.unicode);
instance.setUser(this.user);
+ instance.setActiveInstance(this.activeInstance);
if (null == this.password) {
if (!this.confPassword.equals(this.password)) throw new IllegalArgumentException(PASSWORD_ERROR_CODE);
@@ -155,7 +157,7 @@
this.createInstanceFromFields(instance);
}
-
+ logger.debug("instance is active: "+ instance.isActiveInstance());
if (null != instance) {
ws.saveNewInstance(instance);
LanguageSelectionBean.showMessage(BeansUtils.MESSAGE_SERVER_SUCCESSFULL,
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/ServerBean.java
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/ServerBean.java 2006-08-30 19:49:57 UTC (rev 120)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/ServerBean.java 2006-09-02 14:15:46 UTC (rev 121)
@@ -34,6 +34,8 @@
protected int maxConnectionsInPool;
protected boolean defaultInstance;
+
+ protected boolean activeInstance;
protected String name;
@@ -78,7 +80,15 @@
private int unicodeSearchIndex;
- public int getDefaultSearchIndex() {
+ public boolean isActiveInstance() {
+ return activeInstance;
+ }
+
+ public void setActiveInstance(boolean activeInstance) {
+ this.activeInstance = activeInstance;
+ }
+
+ public int getDefaultSearchIndex() {
return defaultSearchIndex;
}
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_pl.properties
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_pl.properties 2006-08-30 19:49:57 UTC (rev 120)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_pl.properties 2006-09-02 14:15:46 UTC (rev 121)
@@ -127,6 +127,7 @@
SERVER_LOAD_BALANCING_DISABLED=R\u00f3wnowa\u017cenie obci\u0105\u017ce\u0144: wy\u0142\u0105czone
SERVER_PROG_ID=Prog id
SERVER_UNICODE=Unicode
+SERVER_ACTIVE_INSTANCE=Uaktywnij
SERVER_GWHOST=GWHost
SERVER_GWSERVER=GWServer
SERVER_MANDANT=Klient(mandant)
@@ -293,4 +294,6 @@
COMMON_LEGEND_EMAIL=To pole jest obowi\u0105zkowe i musi zawierac unikatowy i istniej\u0105cy w systemie SAP R/3 adres e-mail u\u017cytkownika.
COMMON_LEGEND_MAX_CONNECTIONS=To pole jest obowi\u0105zkowe i musi byc liczb\u0105 ca\u0142kowit\u0105 z przedzia\u0142u <1 - 100>.
COMMON_LEGEND_POSTAL=Kod pocztowy w formacie: dd-ddd
-COMMON_LEGEND_PHONE=Numer telefonu
\ No newline at end of file
+COMMON_LEGEND_PHONE=Numer telefonu
+COMMON_LEGEND_ACTIVATE=Uaktywnia wybran\u0105 instancj\u0119. Tylko instancje aktywne mog\u0105 byc nast\u0119pnie uruchamiane lub zatrzymywane, \
+ r\u00f3wnie\u017c tylko instancje aktywne s\u0105 uruchamiane podczas startu serwera.
\ No newline at end of file
Modified: trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerAdd.jsp
===================================================================
--- trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerAdd.jsp 2006-08-30 19:49:57 UTC (rev 120)
+++ trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerAdd.jsp 2006-09-02 14:15:46 UTC (rev 121)
@@ -109,6 +109,12 @@
<h:outputText value="#{Locale.SERVER_UNICODE}" styleClass="listView-header-title"/>
<h:selectBooleanCheckbox value="#{addSapServerBean.unicode}" />
+ <h:panelGrid columns="2">
+ <h:outputText value="#{Locale.SERVER_ACTIVE_INSTANCE}" styleClass="listView-header-title"/>
+ <h:outputText value="#" styleClass="legend"/>
+ </h:panelGrid>
+ <h:selectBooleanCheckbox value="#{addSapServerBean.activeInstance}" />
+
</h:panelGrid>
<h:panelGrid columns="2" styleClass="listView-entity">
@@ -238,6 +244,7 @@
<h:outputText value="***) #{Locale.COMMON_LEGEND_WITHOUT_LOAD_BALANCING}" />
<h:outputText value="****) #{Locale.COMMON_LEGEND_EMAIL}" />
<h:outputText value="*****) #{Locale.COMMON_LEGEND_MAX_CONNECTIONS}" />
+ <h:outputText value="# #{Locale.COMMON_LEGEND_ACTIVATE}" />
</h:panelGrid>
</h:form>
</h:panelGrid>
Modified: trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerEdit.jsp
===================================================================
--- trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerEdit.jsp 2006-08-30 19:49:57 UTC (rev 120)
+++ trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerEdit.jsp 2006-09-02 14:15:46 UTC (rev 121)
@@ -109,6 +109,12 @@
<h:outputText value="#{Locale.SERVER_UNICODE}" styleClass="listView-header-title"/>
<h:selectBooleanCheckbox value="#{addSapServerBean.unicode}" />
+ <h:panelGrid columns="2">
+ <h:outputText value="#{Locale.SERVER_ACTIVE_INSTANCE}" styleClass="listView-header-title"/>
+ <h:outputText value="#" styleClass="legend"/>
+ </h:panelGrid>
+ <h:selectBooleanCheckbox value="#{addSapServerBean.activeInstance}" />
+
</h:panelGrid>
<h:panelGrid columns="2" styleClass="listView-entity">
Modified: trunk/code/CSCommon/src/org/commsuite/model/FakedSAPInstanceDef.java
===================================================================
--- trunk/code/CSCommon/src/org/commsuite/model/FakedSAPInstanceDef.java 2006-08-30 19:49:57 UTC (rev 120)
+++ trunk/code/CSCommon/src/org/commsuite/model/FakedSAPInstanceDef.java 2006-09-02 14:15:46 UTC (rev 121)
@@ -45,6 +45,7 @@
private String client;
private String adminEmail;
private Long id;
+ private boolean activeInstance;
public Long getId() {
return this.id;
@@ -178,4 +179,12 @@
this.maxConnectionsInPool = maxConnectionsInPool;
}
+ public void setActiveInstance(boolean active) {
+ this.activeInstance = active;
+ }
+
+ public boolean isActiveInstance() {
+ return this.activeInstance;
+ }
+
}
Modified: trunk/code/CSCommon/src/org/commsuite/model/ws/WSSAPInstanceDef.java
===================================================================
--- trunk/code/CSCommon/src/org/commsuite/model/ws/WSSAPInstanceDef.java 2006-08-30 19:49:57 UTC (rev 120)
+++ trunk/code/CSCommon/src/org/commsuite/model/ws/WSSAPInstanceDef.java 2006-09-02 14:15:46 UTC (rev 121)
@@ -91,5 +91,9 @@
public int getMaxConnectionsInPool();
public void setMaxConnectionsInPool(int maxConnectionsInPool);
+
+ public void setActiveInstance(boolean active);
+ public boolean isActiveInstance();
+
}
Modified: trunk/code/CSMiddleware/src/org/commsuite/model/SAPInstanceDef.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/model/SAPInstanceDef.java 2006-08-30 19:49:57 UTC (rev 120)
+++ trunk/code/CSMiddleware/src/org/commsuite/model/SAPInstanceDef.java 2006-09-02 14:15:46 UTC (rev 121)
@@ -181,6 +181,7 @@
this.systemNumber = wsInstance.getSystemNumber();
this.unicode = wsInstance.isUnicode();
this.user = wsInstance.getUser();
+ this.activeInstance = wsInstance.isActiveInstance();
}
/**
@@ -400,6 +401,7 @@
.append("systemNumber", this.systemNumber)
.append("unicode", this.unicode)
.append("user", this.user)
+ .append("activeInstance", this.activeInstance)
.toString();
}
@@ -430,6 +432,7 @@
.append(this.systemNumber, rhs.systemNumber)
.append(this.unicode, rhs.unicode)
.append(this.user, rhs.user)
+ .append(this.activeInstance, rhs.activeInstance)
.isEquals();
}
@@ -453,6 +456,7 @@
.append(this.systemNumber)
.append(this.unicode)
.append(this.user)
+ .append(this.activeInstance)
.toHashCode();
}
}
Modified: trunk/code/CSMiddleware/src/org/commsuite/sap/SAPCommManager.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/sap/SAPCommManager.java 2006-08-30 19:49:57 UTC (rev 120)
+++ trunk/code/CSMiddleware/src/org/commsuite/sap/SAPCommManager.java 2006-09-02 14:15:46 UTC (rev 121)
@@ -166,6 +166,7 @@
logger.info("SAPCommManager destroyed");
}
+ // TODO: should this method be sensitive on active field??
public void setSapInstances(Collection<SAPInstanceDef> sapInstances) {
// TODO: init sapComms collection with values from DB
@@ -185,7 +186,8 @@
sapComms.put(sapComm.getName(), sapComm);
}
}
-
+
+ // TODO: should this method be sensitive on active field??
public void setSapInstance(SAPInstanceDef instance) {
if (!isEnabled()) {
return;
@@ -216,8 +218,13 @@
logger.info("Starting instance: " + instanceName);
checkExistenceOfSAPInstance(instanceName);
final ISAPComm instance = sapComms.get(instanceName);
- instance.startServer();
- logger.info("Instance started: " + instanceName);
+ if (instance.isActiveInstance()) {
+ instance.startServer();
+ logger.info("Instance started: " + instanceName);
+ } else {
+ logger.warn("Instance is not active");
+ throw new RuntimeException("Unable to start inactive instance");
+ }
}
public void stopInstance(String instanceName) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2006-09-10 11:07:48
|
Revision: 130
http://svn.sourceforge.net/comsuite/?rev=130&view=rev
Author: marasm
Date: 2006-09-10 04:07:11 -0700 (Sun, 10 Sep 2006)
Log Message:
-----------
SpringAOP added to project
Modified Paths:
--------------
trunk/code/CSAdminPanel/JavaSource/log4j.properties
trunk/code/CSMiddleware/.springBeans
trunk/code/CSMiddleware/import.sql
trunk/code/CSMiddleware/src/org/commsuite/messaging/ExDevRegister.java
trunk/code/CSMiddleware/src/org/commsuite/messaging/MOutRouter.java
trunk/code/CSMiddleware/war/WEB-INF/web.xml
Added Paths:
-----------
trunk/code/CSCommon/src/aop.properties
trunk/code/CSCommon/src/org/commsuite/aop/
trunk/code/CSCommon/src/org/commsuite/aop/CsMethodsDebuggerInterceptor.java
trunk/code/CSMiddleware/src/aopContext.xml
Modified: trunk/code/CSAdminPanel/JavaSource/log4j.properties
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/log4j.properties 2006-09-04 23:19:25 UTC (rev 129)
+++ trunk/code/CSAdminPanel/JavaSource/log4j.properties 2006-09-10 11:07:11 UTC (rev 130)
@@ -19,3 +19,5 @@
log4j.logger.org.commsuite=debug
log4j.logger.org.apache.myfaces=warn
+
+log4j.logger.org.commsuite.aop=DEBUG
Added: trunk/code/CSCommon/src/aop.properties
===================================================================
--- trunk/code/CSCommon/src/aop.properties (rev 0)
+++ trunk/code/CSCommon/src/aop.properties 2006-09-10 11:07:11 UTC (rev 130)
@@ -0,0 +1,4 @@
+dao.times.debug.interceptor.debug.daos.times = true
+dao.times.debug.interceptor.debug.methods.parameters = true
+dao.times.debug.interceptor.debug.returned.values = true
+dao.times.debug.interceptor.omited.methods =
Added: trunk/code/CSCommon/src/org/commsuite/aop/CsMethodsDebuggerInterceptor.java
===================================================================
--- trunk/code/CSCommon/src/org/commsuite/aop/CsMethodsDebuggerInterceptor.java (rev 0)
+++ trunk/code/CSCommon/src/org/commsuite/aop/CsMethodsDebuggerInterceptor.java 2006-09-10 11:07:11 UTC (rev 130)
@@ -0,0 +1,94 @@
+package org.commsuite.aop;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import org.apache.log4j.Logger;
+
+import org.aopalliance.intercept.MethodInterceptor;
+import org.aopalliance.intercept.MethodInvocation;
+
+
+public class CsMethodsDebuggerInterceptor implements MethodInterceptor {
+
+ private final static Logger logger = Logger.getLogger(CsMethodsDebuggerInterceptor.class);
+
+ private boolean debugDaosTimes;
+
+ private boolean debugMethodsParameters;
+
+ private boolean debugReturnedValues;
+
+ private List<String> omitedMethods;
+
+ public Object invoke(MethodInvocation invocation) throws Throwable {
+
+ if (!debugDaosTimes) {
+ return invocation.proceed();
+ }
+
+ String methodName = invocation.getMethod().getName();
+
+ if (omitedMethods.contains(methodName)) {
+ return invocation.proceed();
+ }
+
+ Object[] arguments = invocation.getArguments();
+
+ StringBuilder sb = new StringBuilder( //
+ invocation.getThis().getClass().getCanonicalName() + "."
+ + methodName + "(");
+
+ if (debugMethodsParameters) {
+ for (int i = 0; i < arguments.length; i++) {
+ if (0 != i) {
+ sb.append(", ");
+ }
+ sb.append(arguments[i]);
+ }
+ }
+
+ sb.append(")");
+
+ logger.debug("START " + sb.toString());
+ long time = System.currentTimeMillis();
+ Object rval = invocation.proceed();
+ time = System.currentTimeMillis() - time;
+
+ sb = new StringBuilder("END "
+ + invocation.getThis().getClass().getCanonicalName() + "."
+ + methodName + "()" + " ms" + time);
+
+ if (debugReturnedValues) {
+ sb.append(" " + rval);
+ }
+
+ logger.debug(sb.toString());
+
+ return rval;
+ }
+
+ public void setOmitedMethods(String omitedMethodsString) {
+ List<String> methodsNames = new ArrayList<String>();
+ if (omitedMethodsString != null) {
+ for (String string : omitedMethodsString.split(";")) {
+ methodsNames.add(string);
+ }
+ }
+ this.omitedMethods = methodsNames;
+ }
+
+ public void setDebugProperties(Properties debugProperties) {
+ this.debugDaosTimes = "true".equals(debugProperties
+ .getProperty("dao.times.debug.interceptor.debug.daos.times"));
+ this.debugMethodsParameters = "true"
+ .equals(debugProperties
+ .getProperty("dao.times.debug.interceptor.debug.methods.parameters"));
+ this.debugReturnedValues = "true"
+ .equals(debugProperties
+ .getProperty("dao.times.debug.interceptor.debug.returned.values"));
+ this.setOmitedMethods(debugProperties
+ .getProperty("dao.times.debug.interceptor.omited.methods"));
+ }
+}
Modified: trunk/code/CSMiddleware/.springBeans
===================================================================
--- trunk/code/CSMiddleware/.springBeans 2006-09-04 23:19:25 UTC (rev 129)
+++ trunk/code/CSMiddleware/.springBeans 2006-09-10 11:07:11 UTC (rev 130)
@@ -12,6 +12,7 @@
<config>src/filtersContext.xml</config>
<config>src/datasourceContext.xml</config>
<config>src/activeMQContext.xml</config>
+ <config>src/aopContext.xml</config>
<config>war/WEB-INF/ws-public-servlet.xml</config>
</configs>
<configSets>
@@ -21,6 +22,7 @@
<incomplete>true</incomplete>
<configs>
<config>src/activeMQContext.xml</config>
+ <config>src/aopContext.xml</config>
<config>src/applicationContext.xml</config>
<config>src/converterBuilderContext.xml</config>
<config>src/datasourceContext.xml</config>
Modified: trunk/code/CSMiddleware/import.sql
===================================================================
--- trunk/code/CSMiddleware/import.sql 2006-09-04 23:19:25 UTC (rev 129)
+++ trunk/code/CSMiddleware/import.sql 2006-09-10 11:07:11 UTC (rev 130)
@@ -1,5 +1,5 @@
--DO NOT ADD ROWS WITH ID GREATER THEN 99
-INSERT INTO cs_sap_servers (id, active_instance, adm_email, client, gw_host, gw_Serv, host, load_balancing, name, user_password, prog_id, system_number, unicode, user_name, default_instance, max_connections_in_pool, group_name, r3_name) VALUES (123456, 'true', 'mar...@bc...','100','bcz.bcc.com.pl','sapgw44','bcz.bcc.com.pl',FALSE,'BCC_BCZ_100_DB','changeme','ZTESTJCO','44',FALSE,'cstest',TRUE,5,'','');
+INSERT INTO cs_sap_servers (id, active_instance, adm_email, client, gw_host, gw_Serv, host, load_balancing, name, user_password, prog_id, system_number, unicode, user_name, default_instance, max_connections_in_pool, group_name, r3_name) VALUES (123456, 'true', 'zc...@bc...','100', 'bcz.bcc.com.pl','sapgw44','bcz.bcc.com.pl',FALSE, 'BCC_BCZ_100_DB','nowehaslo','ZTESTJCO', '44', FALSE, 'zcomm', TRUE,5,'','');
INSERT INTO cs_actions (id, name, description) VALUES (1, 'Action_JMX_UseJmx', 'Using JMX');
INSERT INTO cs_actions (id, name, description) VALUES (2, 'Action_RemoteClient_UseRemoteClient', 'Using RemoteClient');
Added: trunk/code/CSMiddleware/src/aopContext.xml
===================================================================
--- trunk/code/CSMiddleware/src/aopContext.xml (rev 0)
+++ trunk/code/CSMiddleware/src/aopContext.xml 2006-09-10 11:07:11 UTC (rev 130)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+
+<beans>
+ <bean id="debugProperties"
+ class="org.springframework.beans.factory.config.PropertiesFactoryBean">
+ <property name="location" value="classpath:aop.properties" />
+ </bean>
+
+ <bean id="csMethodsDebuggerInterceptor" class="org.commsuite.aop.CsMethodsDebuggerInterceptor">
+ <property name="debugProperties" ref="debugProperties" />
+ </bean>
+
+ <bean id="proxyCreator" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
+ <property name="beanNames">
+ <value>*Target,*Dao,converterBuilder,exDevRegister,mOutRouter,mSAPIn,filterManager,sapCommManager</value>
+ </property>
+ <property name="interceptorNames">
+ <list>
+ <value>csMethodsDebuggerInterceptor</value>
+ </list>
+ </property>
+ </bean>
+
+</beans>
\ No newline at end of file
Modified: trunk/code/CSMiddleware/src/org/commsuite/messaging/ExDevRegister.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/messaging/ExDevRegister.java 2006-09-04 23:19:25 UTC (rev 129)
+++ trunk/code/CSMiddleware/src/org/commsuite/messaging/ExDevRegister.java 2006-09-10 11:07:11 UTC (rev 130)
@@ -131,6 +131,7 @@
if (deviceQueueName.contains(deviceName)) {
deviceQueuesList.remove(deviceQueueName);
deviceQueuesList.add(deviceQueueName);
+ logger.debug("FOUND QUEUE NAME " + deviceQueueName);
return deviceQueueName;
}
}
Modified: trunk/code/CSMiddleware/src/org/commsuite/messaging/MOutRouter.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/messaging/MOutRouter.java 2006-09-04 23:19:25 UTC (rev 129)
+++ trunk/code/CSMiddleware/src/org/commsuite/messaging/MOutRouter.java 2006-09-10 11:07:11 UTC (rev 130)
@@ -70,6 +70,7 @@
final String destinationQueueName = deviceRegister.chooseQueue(msg.getFormatType());
if (null == destinationQueueName) {
+ logger.error("Couldn't find queue for serving " + msg.getFormatType() + " messages");
throw new RuntimeException("Couldn't find queue for serving " + msg.getFormatType() + " messages");
}
Modified: trunk/code/CSMiddleware/war/WEB-INF/web.xml
===================================================================
--- trunk/code/CSMiddleware/war/WEB-INF/web.xml 2006-09-04 23:19:25 UTC (rev 129)
+++ trunk/code/CSMiddleware/war/WEB-INF/web.xml 2006-09-10 11:07:11 UTC (rev 130)
@@ -49,6 +49,7 @@
classpath:/applicationContext.xml,
classpath:/datasourceContext.xml,
classpath:/activeMQContext.xml,
+ classpath:/aopContext.xml,
classpath:/hibernateContext.xml, classpath:/sapContext.xml
classpath:/deviceContext.xml, classpath:/jmxContext.xml,
classpath:/converterBuilderContext.xml,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sku...@us...> - 2006-09-04 22:33:46
|
Revision: 127
http://svn.sourceforge.net/comsuite/?rev=127&view=rev
Author: skuzniak
Date: 2006-09-04 15:33:07 -0700 (Mon, 04 Sep 2006)
Log Message:
-----------
javadocs added, active instance images provided
Modified Paths:
--------------
trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/BeansUtils.java
trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/SearchServerBean.java
trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/ServerBean.java
trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/ServerExtended.java
trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_pl.properties
trunk/code/CSAdminPanel/WebContent/pages/servers/CSSAPServers.jsp
trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerSearch.jsp
trunk/code/CSCommon/src/org/commsuite/ws/ICommunicateWS.java
trunk/code/CSMiddleware/src/org/commsuite/managers/SAPInstanceDefManager.java
trunk/code/CSMiddleware/src/org/commsuite/managers/impl/SAPInstanceDefManagerImpl.java
trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java
trunk/code/CSMiddleware/src/org/commsuite/ws/services/ServersService.java
Added Paths:
-----------
trunk/code/CSAdminPanel/WebContent/pages/files/gif/image-loading.png
trunk/code/CSAdminPanel/WebContent/pages/files/gif/image-missing.png
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/BeansUtils.java
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/BeansUtils.java 2006-09-03 14:59:02 UTC (rev 126)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/BeansUtils.java 2006-09-04 22:33:07 UTC (rev 127)
@@ -184,4 +184,8 @@
public static final String MESSAGE_SERVER_ERROR_PASSWORD = "MESSAGE_SERVER_ERROR_PASSWORD";
+ public static final String LABEL_ACTIVE = "/pages/files/gif/image-loading.png";
+
+ public static final String LABEL_INACTIVE = "/pages/files/gif/image-missing.png";
+
}
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/SearchServerBean.java
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/SearchServerBean.java 2006-09-03 14:59:02 UTC (rev 126)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/SearchServerBean.java 2006-09-04 22:33:07 UTC (rev 127)
@@ -137,6 +137,11 @@
} else {
instance.setLoadBalancing(false);
}
+ if (1 == this.getActiveSearchIndex()) {
+ instance.setActiveInstance(true);
+ } else {
+ instance.setActiveInstance(false);
+ }
return instance;
}
@@ -152,6 +157,7 @@
boolean def = false;
boolean load = false;
boolean unicode = false;
+ boolean active = false;
if (this.getUnicodeSearchIndex() < 10) {
unicode = true;
}
@@ -161,9 +167,12 @@
if (this.getLoadSearchIndex() < 10) {
load = true;
}
- serversList = this.getServers(instance, def, load, unicode, ws);
+ if (this.getActiveSearchIndex() < 10) {
+ active = true;
+ }
+ serversList = this.getServers(instance, def, load, unicode, active, ws);
} else {
- serversList = this.getServers(null, false, false, false, ws);
+ serversList = this.getServers(null, false, false, false, false, ws);
}
this.servers = new FastTable<ServerExtended>();
@@ -180,15 +189,21 @@
workingIcon = START_ICON_PATH;
label = BeansUtils.LABEL_START;
}
+ String active;
+ if (def.isActiveInstance()) {
+ active = BeansUtils.LABEL_ACTIVE;
+ } else {
+ active = BeansUtils.LABEL_INACTIVE;
+ }
// try {
// this.serverStates.set(i, this.serverStates.get(i));
// } catch(IndexOutOfBoundsException ioobe) {
this.serverStates.add(i, UNKNOWN_ICON_PATH);
// }
this.servers.add(i, new ServerExtended(def, this.serverStates.get(i),
- workingIcon, label));
+ workingIcon, label, active));
} else if (null != this.serverId && def.getId().toString().equals(this.serverId)) {
- final boolean testResult = ws.testServer(def.getName());
+ final boolean testResult = ws.serverTest(def.getName());
logger.debug("Result of SAP server testing: " + testResult);
if (testResult) {
this.serverStates.set(i, TEST_OK_ICON_PATH);
@@ -204,8 +219,14 @@
workingIcon = START_ICON_PATH;
label = BeansUtils.LABEL_START;
}
+ String active;
+ if (def.isActiveInstance()) {
+ active = BeansUtils.LABEL_ACTIVE;
+ } else {
+ active = BeansUtils.LABEL_INACTIVE;
+ }
this.servers.add(i, new ServerExtended(def, this.serverStates.get(i),
- workingIcon, label));
+ workingIcon, label, active));
}
i++;
}
@@ -253,7 +274,7 @@
for (ServerExtended server : this.servers) {
if (this.serverId.equals(String.valueOf(server.getInstance().getId()))) {
// index = this.servers.indexOf(server);
- testResult = ws.testServer(server.getInstance().getName());
+ testResult = ws.serverTest(server.getInstance().getName());
logger.debug("Result of SAP server testing: " + testResult);
}
}
@@ -327,9 +348,9 @@
}
private List<WSSAPInstanceDef> getServers(WSSAPInstanceDef model,
- boolean def, boolean load, boolean unicode, ICommunicateWS ws)
+ boolean def, boolean load, boolean unicode, boolean active, ICommunicateWS ws)
throws WebServiceException{
- this.totalServers = ws.getInstancesSize(model, def, load, unicode);
+ this.totalServers = ws.getInstancesSize(model, def, load, unicode, active);
this.totalPages = ((this.totalServers - 1) / ROWS_ON_PAGE) + 1;
int begin = (this.actualPage - 1) * ROWS_ON_PAGE;
@@ -340,7 +361,7 @@
if (null == model) {
return (List<WSSAPInstanceDef>)ws.getInstancesSubset(begin, end);
} else {
- return (List<WSSAPInstanceDef>)ws.getSelectedInstancesSubset(model, def, load, unicode, begin, end);
+ return (List<WSSAPInstanceDef>)ws.getSelectedInstancesSubset(model, def, load, unicode, active, begin, end);
}
}
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/ServerBean.java
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/ServerBean.java 2006-09-03 14:59:02 UTC (rev 126)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/ServerBean.java 2006-09-04 22:33:07 UTC (rev 127)
@@ -79,8 +79,18 @@
private int loadSearchIndex;
private int unicodeSearchIndex;
+
+ private int activeSearchIndex;
- public boolean isActiveInstance() {
+ public int getActiveSearchIndex() {
+ return activeSearchIndex;
+ }
+
+ public void setActiveSearchIndex(int activeSearchIndex) {
+ this.activeSearchIndex = activeSearchIndex;
+ }
+
+ public boolean isActiveInstance() {
return activeInstance;
}
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/ServerExtended.java
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/ServerExtended.java 2006-09-03 14:59:02 UTC (rev 126)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/ServerExtended.java 2006-09-04 22:33:07 UTC (rev 127)
@@ -35,8 +35,18 @@
private String subtitle ;
private String working;
+
+ private String active;
- public String getSubtitle() {
+ public String getActive() {
+ return active;
+ }
+
+ public void setActive(String active) {
+ this.active = active;
+ }
+
+ public String getSubtitle() {
return subtitle;
}
@@ -87,11 +97,12 @@
* @param state
*/
public ServerExtended(WSSAPInstanceDef instance, String state,
- String working, String subtitle) {
+ String working, String subtitle, String active) {
this.instance = instance;
this.state = state;
this.working = working;
this.subtitle = subtitle;
+ this.active = active;
}
}
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_pl.properties
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_pl.properties 2006-09-03 14:59:02 UTC (rev 126)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_pl.properties 2006-09-04 22:33:07 UTC (rev 127)
@@ -128,6 +128,7 @@
SERVER_PROG_ID=Prog id
SERVER_UNICODE=Unicode
SERVER_ACTIVE_INSTANCE=Uaktywnij
+SERVER_ACTIVE=Instancja aktywna
SERVER_GWHOST=GWHost
SERVER_GWSERVER=GWServer
SERVER_MANDANT=Klient(mandant)
@@ -287,6 +288,7 @@
LABEL_DETAILS=Szczeg\u00f3\u0142y
LABEL_BACK=Powr\u00f3t do listy
LABEL_SEARCH=Szukaj
+LABEL_ACTIVE=Instancja aktywna
COMMON_LEGEND=Legenda
COMMON_LEGEND_MANDATORY=Pola obowi\u0105zkowe
COMMON_LEGEND_WITH_LOAD_BALANCING=Pole obowi\u0105zkowe, gdy wybrano opcje 'R\u00f3wnowa\u017cenie obci\u0105\u017ce\u0144'
Added: trunk/code/CSAdminPanel/WebContent/pages/files/gif/image-loading.png
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSAdminPanel/WebContent/pages/files/gif/image-loading.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/code/CSAdminPanel/WebContent/pages/files/gif/image-missing.png
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSAdminPanel/WebContent/pages/files/gif/image-missing.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/code/CSAdminPanel/WebContent/pages/servers/CSSAPServers.jsp
===================================================================
--- trunk/code/CSAdminPanel/WebContent/pages/servers/CSSAPServers.jsp 2006-09-03 14:59:02 UTC (rev 126)
+++ trunk/code/CSAdminPanel/WebContent/pages/servers/CSSAPServers.jsp 2006-09-04 22:33:07 UTC (rev 127)
@@ -30,7 +30,7 @@
styleClass="listView" rowClasses="listView-header-odd,listView-header-even">
<h:column>
<h:panelGrid columns="1">
- <h:panelGrid columns="7">
+ <h:panelGrid columns="8">
<h:panelGrid columns="2">
<h:outputText value="#{Locale.SERVER_NAME}" styleClass="listView-header-title"/>
<h:outputText value="#{inst.instance.name}" styleClass="listView-header-value"/>
@@ -65,6 +65,10 @@
<h:outputText value="#{Locale.LABEL_DELETE}" styleClass="header-command"/>
</h:panelGrid>
</h:commandLink>
+ <h:panelGrid columns="1">
+ <h:graphicImage value="#{pageContext.request.contextPath}#{inst.active}" styleClass="header-icon"/>
+ <h:outputText value="#{Locale.LABEL_ACTIVE}" styleClass="header-command"/>
+ </h:panelGrid>
</h:panelGrid>
</h:panelGrid>
</h:column>
Modified: trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerSearch.jsp
===================================================================
--- trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerSearch.jsp 2006-09-03 14:59:02 UTC (rev 126)
+++ trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerSearch.jsp 2006-09-04 22:33:07 UTC (rev 127)
@@ -68,6 +68,11 @@
<f:selectItems value="#{searchServerBean.booleanSearchList}"/>
</h:selectOneMenu>
+ <h:outputText value="#{Locale.SERVER_ACTIVE}" styleClass="listView-header-title"/>
+ <h:selectOneMenu value="#{searchServerBean.activeSearchIndex}">
+ <f:selectItems value="#{searchServerBean.booleanSearchList}"/>
+ </h:selectOneMenu>
+
</h:panelGrid>
<h:panelGrid columns="2" styleClass="listView-entity">
Modified: trunk/code/CSCommon/src/org/commsuite/ws/ICommunicateWS.java
===================================================================
--- trunk/code/CSCommon/src/org/commsuite/ws/ICommunicateWS.java 2006-09-03 14:59:02 UTC (rev 126)
+++ trunk/code/CSCommon/src/org/commsuite/ws/ICommunicateWS.java 2006-09-04 22:33:07 UTC (rev 127)
@@ -42,148 +42,556 @@
public interface ICommunicateWS {
/**
- * This method returns set of messages stored in database
+ * This method returns set of messages stored in database.
*
- * @return
- * @throws WebServiceException
+ * @return collection of maessages
+ * @throws WebServiceException on any error
*/
public Collection<WSMessage> getAllMessages() 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
+ * matching pattern.
+ *
+ * @param wsMessage pattern to match messages
+ * @return number of all/matching messages
+ * @throws WebServiceException on any error
+ */
public int getMessagesSize(SearchMessageModel wsMessage) throws WebServiceException ;
+ /**
+ * returns subset of messages from <code>begin</code> index
+ * to <code>end</code> index.
+ *
+ * @param begin first index in subset
+ * @param end last index in subset
+ * @return subset of messages
+ * @throws WebServiceException on any error
+ */
public Collection<WSMessage> getMessagesSubset(int begin, int end) throws WebServiceException;
+ /**
+ * returns subset of messages matching given pattern.
+ *
+ * @param wsMessage pattern to match
+ * @return subset of messages
+ * @throws WebServiceException on any error
+ */
public Collection<WSMessage> getSelectedMessages(SearchMessageModel wsMessage) throws WebServiceException;
+ /**
+ * returns subset of messages matching given pattern, from
+ * <code>begin</code> index to <code>end</code> index.
+ *
+ * @param wsMessage pattern to match
+ * @param begin first index in subset
+ * @param end last index in subset
+ * @return subset ofmessages matching give criteria
+ * @throws WebServiceException on any error
+ */
public Collection<WSMessage> getSelectedMessagesSubset(SearchMessageModel wsMessage, int begin, int end) throws WebServiceException;
+ /**
+ * returns message by its id.
+ *
+ * @param id id of requested message
+ * @return WSMessage object with given id
+ * @throws WebServiceException on any error
+ */
public WSMessage getMessageById(String id) throws WebServiceException;
+ /**
+ * returns content by its id
+ * @param id id of requested content
+ * @return WSContents object with given id
+ * @throws WebServiceException in any error
+ */
public WSContents getContentsById(String id) throws WebServiceException;
+ /**
+ * returns list of sent contents, of message with <code>id</code>
+ *
+ * @param id id of message
+ * @return list of <code>SentContent</code> objects
+ * @throws WebServiceException on any error
+ */
public Collection<WSSentContent> getSentContentsByMessage(String id) throws WebServiceException;
+ /**
+ * returns collection of <code>WSContents</code> belonging to
+ * <code>SentContent</code> with given <code>id</code>.
+ *
+ * @param id id of SentContent
+ * @return list of contents
+ * @throws WebServiceException on any error
+ */
public Collection<WSContents> getContentsBySentContent(String id) throws WebServiceException;
/**
- * This method returns set of SAP R/3 servers available
+ * this method returns size of instances collection. the instances must match pattern
+ * in <code>def</code> object. Boolean flags enables searching by corresponding
+ * boolean arguments, ie if defaultSearch is set to true, and def.isDefaultInstance()
+ * method returns true, then only default instances will be returned. But if
+ * defaultSearch is set to false any method def.isDefalutInstance() will not
+ * be considered in searching.
*
- * @return
- * @throws WebServiceException
+ * @param def pattern to match
+ * @param defaultSearch enables searching by defaultInstance property
+ * @param loadSearch enables searching by loadBalancing property
+ * @param unicodeSearch enables searching by unicode property
+ * @param activeSearch enables searching by activeInstance property
+ * @return size of instances matching pattern
+ * @throws WebServiceException on any error
*/
- public int getInstancesSize(WSSAPInstanceDef def, boolean defaultSearch, boolean loadSearch, boolean unicodeSearch)
+ public int getInstancesSize(WSSAPInstanceDef def, boolean defaultSearch, boolean loadSearch, boolean unicodeSearch,boolean activeSearch)
throws WebServiceException ;
+ /**
+ * returns collection of all instances in database
+ *
+ * @return collection of instances
+ * @throws WebServiceException on any error
+ */
public Collection<WSSAPInstanceDef> getAllInstances() throws WebServiceException;
+ /**
+ * returns subset of instances from <code>begin</code> index,
+ * to <code>end</code> index.
+ *
+ * @param begin first index of subset
+ * @param end last index of subset
+ * @return collection of instances
+ * @throws WebServiceException on any error
+ */
public Collection<WSSAPInstanceDef> getInstancesSubset(int begin, int end) throws WebServiceException;
- public Collection<WSSAPInstanceDef> getSelectedInstances(WSSAPInstanceDef def,boolean defaultSearch, boolean loadSearch, boolean unicodeSearch)
+ /**
+ * returns collection of messages matches pattern in <code>def</code> object. For
+ * example of use boolean flags see getInstancesSize comment.
+ *
+ * @param def pattern to match
+ * @param defaultSearch enables searching by defaultInstance property
+ * @param loadSearch enables searching by loadBalancing property
+ * @param unicodeSearch enables searching by unicode property
+ * @param activeSearch enables searching by activeInstance property
+ * @return collection of instances matching pattern
+ * @throws WebServiceException on any error
+ * @return
+ * @throws WebServiceException
+ */
+ public Collection<WSSAPInstanceDef> getSelectedInstances(WSSAPInstanceDef def,boolean defaultSearch, boolean loadSearch, boolean unicodeSearch, boolean activeSearch)
throws WebServiceException;
+ /**
+ * the same method as getSelectedInstances, except it returns subset of
+ * all messages from <code>begin</code> index, to <code>end</code> index.
+ *
+ * @param def pattern to match
+ * @param defaultSearch enables searching by defaultInstance property
+ * @param loadSearch enables searching by loadBalancing property
+ * @param unicodeSearch enables searching by unicode property
+ * @param activeSearch enables searching by activeInstance property
+ * @param begin first index of subset
+ * @param end last index of subset
+ * @return collection of messages
+ * @throws WebServiceException on any error
+ */
public Collection<WSSAPInstanceDef> getSelectedInstancesSubset(WSSAPInstanceDef def,
- boolean defaultSearch, boolean loadSearch, boolean unicodeSearch, int begin, int end)
+ boolean defaultSearch, boolean loadSearch, boolean unicodeSearch, boolean activeSearch, int begin, int end)
throws WebServiceException;
+ /**
+ * returns instance with given <code>id</code>
+ *
+ * @param id id of instance to select
+ * @return instance with goven id
+ * @throws WebServiceException on any error
+ */
public WSSAPInstanceDef getInstanceById(String id) throws WebServiceException ;
+ /**
+ * tests if instance with given name is working. this method performs
+ * set of tests on selected instance to see if it is able to properly
+ * communicate with sap server.
+ *
+ * @param serverName name of server to test
+ * @return true if server is working, false otherwise
+ * @throws WebServiceException on any error
+ */
public boolean isSapServerWorking(String serverName) throws WebServiceException ;
+ /**
+ * starts instance with given name
+ *
+ * @param serverName name of server to start
+ * @throws WebServiceException on any error
+ */
public void startSapServer(String serverName) throws WebServiceException ;
+ /**
+ * stops instance with given name
+ *
+ * @param serverName name of instance to stop
+ * @throws WebServiceException on any error
+ */
public void stopSapServer(String serverName) throws WebServiceException ;
+ /**
+ * deletes instance with <code>id</code> from database.
+ *
+ * @param id id of instance to delete
+ * @throws WebServiceException on any error
+ */
public void deleteServer(String id) throws WebServiceException ;
/**
- * This method provides adding new SAP R/3 instance to database
+ * This method provides adding new SAP R/3 instance to database.
+ * it is also invoked when existing instance is modified.
*
- * @param instance
- * @return
- * @throws WebServiceException
+ * @param instance instance to add/modify
+ * @return added instance
+ * @throws WebServiceException on any error
*/
public WSSAPInstanceDef saveNewInstance(WSSAPInstanceDef instance) throws WebServiceException;
- /* Users methods */
-
+ /**
+ * returns number of users matching <code>user</code> pattern.
+ * when enabledSearch flag is set this method is sensitive
+ * on enabled property, else this property is not considered.
+ *
+ * @param user pattern to match
+ * @param enabledSearch enables searching by enabled property
+ * @return number of users matching given criteria
+ * @throws WebServiceException on any error
+ */
public int getUsersSize(WSUser user, boolean enabledSearch) throws WebServiceException ;
+ /**
+ * adds new user to database. this method is also invoked
+ * when editing existing user.
+ *
+ * @param user user object to add/modify
+ * @return modified user object
+ * @throws WebServiceException on any error
+ */
public WSUser addUserToDatabase(WSUser user) throws WebServiceException;
+ /**
+ * returns collection of all users in database
+ *
+ * @return collection of users
+ * @throws WebServiceException on any error
+ */
public Collection<WSUser> getAllUsers() throws WebServiceException;
+ /**
+ * returns users subset from <code>begin</code> index, to <code>end</code>
+ * index.
+ *
+ * @param begin first index in subset
+ * @param end last index in subset
+ * @return collection of users
+ * @throws WebServiceException on any error
+ */
public Collection<WSUser> getUsersSubset(int begin, int end) throws WebServiceException;
+ /**
+ * returns subset of users matching <code>user</user> pattern. collection is
+ * restricted from <code>begin</code> index to <code>end</code> index.
+ *
+ * @param user pattern to match
+ * @param enabledSearch enables searching by enabled property
+ * @param begin first index in subset
+ * @param end last index in subset
+ * @return collection of users
+ * @throws WebServiceException on any error
+ */
public Collection<WSUser> getSelectedUsersSubset(WSUser user, boolean enabledSearch, int begin, int end) throws WebServiceException;
+ /**
+ * deletes user with <code>id</code> from database.
+ *
+ * @param id id of user to be deleted
+ * @throws WebServiceException on any error
+ */
public void deleteUserFromDatabase(String id) throws WebServiceException;
+ /**
+ * returns user with given <code>id</code>.
+ *
+ * @param id id of user to select
+ * @return user with given id
+ * @throws WebServiceException on any error
+ */
public WSUser getUserById(String id) throws WebServiceException;
+ /**
+ * returns user with given <code>name</code>.
+ *
+ * @param name name of user to select
+ * @return user with given <code>name</code>
+ * @throws WebServiceException on any error
+ */
public WSUser getUserByName(String name) throws WebServiceException;
+ /**
+ * returns collection of users matching <code>user</code> pattern.
+ *
+ * @param user pattern to match
+ * @param enabledSearch enables searching by enabled proerty
+ * @return collection of users
+ * @throws WebServiceException on any error
+ */
public Collection<WSUser> getUsersByFields(WSUser user, boolean enabledSearch) throws WebServiceException;
- /* actions methods */
-
+ /**
+ * returns all available actions from database.
+ *
+ * @return collection of actions
+ * @throws WebServiceException onany error
+ */
public Collection<WSAction> getActionsAvailable() throws WebServiceException;
+ /**
+ * Adds new action to database. Also invoked when action is modified.
+ *
+ * @param action action to add/modify
+ * @return added action
+ * @throws WebServiceException on any error
+ */
public WSAction addActionToDatabase(WSAction action) throws WebServiceException;
+ /**
+ * Returns action with given <code>id</code>
+ * @param id id of action to select
+ * @return action with given <code>id</code>
+ * @throws WebServiceException on any exception
+ */
public WSAction getWSActionById(String id) throws WebServiceException;
+ /**
+ * deletes selected action from database.
+ *
+ * @param id id of action to be deleted
+ * @throws WebServiceException on any error
+ */
public void deleteActionFromDatabase(String id) throws WebServiceException;
+ /**
+ * returns collection of action that matches given <code>name</code>.
+ * Complete name is not neccessary, ie. if name is 'add' method could
+ * return 'addServer' and 'addUser', but also 'fooaddBar', by if name
+ * is 'addS' in the same database method will return 'addServer' only.
+ *
+ * @param name partial or complete name of action to select
+ * @return collection of actions
+ * @throws WebServiceException on any exception
+ */
public Collection<WSAction> getActionsByName(String name) throws WebServiceException;
- /* roles methods */
-
- // public WSRole addRoleToDatabase(WSRole role, String[] ids, String option) throws
- // WebServiceException ;
+ /**
+ * adds role to database, but also updates existing role.
+ *
+ * @param role role to add/modify
+ * @return added/modified role
+ * @throws WebServiceException on any exception
+ */
public WSRole updateRole(WSRole role) throws WebServiceException;
-
+
+ /**
+ * updates list of actions for <code>role</code>
+ * @param role role to update
+ * @param ids array of ids of actions to be assigned to <code>role</code>
+ * @return updated role
+ * @throws WebServiceException on any error
+ */
public WSRole updateActionsForRole(WSRole role, String[] ids) throws WebServiceException;
+ /**
+ * updates list of users for <code>role</code>
+ *
+ * @param wsRole role tobe updated
+ * @param idsToAdd array of user ids to be added
+ * @param idsToDelete array of user ids to be deleted
+ * @return updated role
+ * @throws WebServiceException on any error
+ */
public WSRole updateUsersForRole(WSRole wsRole, String[] idsToAdd, String[] idsToDelete) throws WebServiceException;
+ /**
+ * deletes role with <code>id</code> from database
+ *
+ * @param id id of role to be deleted
+ * @throws WebServiceException on any exception
+ */
public void deleteRoleFromDatabase(String id) throws WebServiceException;
+ /**
+ * returns all roles from database
+ *
+ * @return collection of roles
+ * @throws WebServiceException on any error
+ */
public Collection<WSRole> getAllRoles() throws WebServiceException;
+ /**
+ * returns role with <code>id</code>
+ * @param id id of role
+ * @return role with given <code>id</code>
+ * @throws WebServiceException on any error
+ */
public WSRole getRoleById(String id) throws WebServiceException;
+ /**
+ * returns collection of roles that matches given <code>name</code>.
+ * Complete name is not neccessary, ie. if name is 'add' method could
+ * return 'addServer' and 'addUser', but also 'fooaddBar', by if name
+ * is 'addS' in the same database method will return 'addServer' only.
+ *
+ * @param name pattern to match
+ * @return collection of roles that matches given pattern
+ * @throws WebS...
[truncated message content] |
|
From: <mal...@us...> - 2006-09-20 08:46:08
|
Revision: 138
http://svn.sourceforge.net/comsuite/?rev=138&view=rev
Author: malinowskirafal
Date: 2006-09-20 01:45:59 -0700 (Wed, 20 Sep 2006)
Log Message:
-----------
logi przerobione
Modified Paths:
--------------
trunk/code/CSAdminPanel/JavaSource/log4j.properties
trunk/code/CSMiddleware/src/aopContext.xml
Modified: trunk/code/CSAdminPanel/JavaSource/log4j.properties
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/log4j.properties 2006-09-19 18:21:14 UTC (rev 137)
+++ trunk/code/CSAdminPanel/JavaSource/log4j.properties 2006-09-20 08:45:59 UTC (rev 138)
@@ -12,11 +12,9 @@
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d %p [%c:%L] - %m%n
-### set log levels - for more verbose logging change 'info' to 'debug' ###
-log4j.rootLogger=warn, stdout, file
### Communications Suite logger
-log4j.logger.org.commsuite=debug
+log4j.logger.org.commsuite=debug, stdout, file
log4j.logger.org.apache.myfaces=warn
Modified: trunk/code/CSMiddleware/src/aopContext.xml
===================================================================
--- trunk/code/CSMiddleware/src/aopContext.xml 2006-09-19 18:21:14 UTC (rev 137)
+++ trunk/code/CSMiddleware/src/aopContext.xml 2006-09-20 08:45:59 UTC (rev 138)
@@ -13,7 +13,7 @@
<bean id="proxyCreator" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
<property name="beanNames">
- <value>*Target,*Dao,converterBuilder,exDevRegister,mOutRouter,mSAPIn,filterManager,sapCommManager</value>
+ <value>*Target,converterBuilder,exDevRegister,mOutRouter,mSAPIn,filterManager,sapCommManager</value>
</property>
<property name="interceptorNames">
<list>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <zd...@us...> - 2006-09-21 20:41:45
|
Revision: 140
http://svn.sourceforge.net/comsuite/?rev=140&view=rev
Author: zduniak
Date: 2006-09-21 13:38:22 -0700 (Thu, 21 Sep 2006)
Log Message:
-----------
A few libraries upgraded to never versions.
Modified Paths:
--------------
trunk/code/CSAdminPanel/.classpath
trunk/code/CSCommon/.classpath
trunk/code/CSCommon/lib/javolution.jar
trunk/code/CSMiddleware/.classpath
trunk/code/CSTests/.classpath
Added Paths:
-----------
trunk/code/CSCommon/lib/xbean-2.2.0.jar
trunk/code/CSCommon/lib/xbean-spring-2.5.jar
trunk/code/CSMiddleware/lib/ehcache-1.2.3.jar
Removed Paths:
-------------
trunk/code/CSCommon/lib/xbean-2.1.0.jar
trunk/code/CSCommon/lib/xbean-spring-2.4.jar
trunk/code/CSMiddleware/lib/ehcache-1.2.2.jar
Modified: trunk/code/CSAdminPanel/.classpath
===================================================================
--- trunk/code/CSAdminPanel/.classpath 2006-09-20 08:46:56 UTC (rev 139)
+++ trunk/code/CSAdminPanel/.classpath 2006-09-21 20:38:22 UTC (rev 140)
@@ -14,7 +14,6 @@
<classpathentry kind="lib" path="/CSCommon/lib/commons-logging-1.1.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/tomahawk.jar"/>
<classpathentry kind="lib" path="/CSCommon/lib/jdom-1.0.jar"/>
- <classpathentry kind="lib" path="/CSCommon/lib/xfire-all-1.1.2.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-beanutils-1.7.0.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-digester-1.6.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-el-1.0.jar"/>
@@ -22,5 +21,6 @@
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/myfaces-api-1.1.3.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/myfaces-impl-1.1.3.jar"/>
<classpathentry kind="lib" path="/CSCommon/lib-compiletime/geronimo-servlet_2.4_spec-1.0.1.jar"/>
+ <classpathentry kind="lib" path="/CSCommon/lib/xfire-all-1.2.1.jar"/>
<classpathentry kind="output" path="WebContent/WEB-INF/classes"/>
</classpath>
Modified: trunk/code/CSCommon/.classpath
===================================================================
--- trunk/code/CSCommon/.classpath 2006-09-20 08:46:56 UTC (rev 139)
+++ trunk/code/CSCommon/.classpath 2006-09-21 20:38:22 UTC (rev 140)
@@ -12,7 +12,6 @@
<classpathentry kind="lib" path="lib/stax-api-1.0.jar"/>
<classpathentry kind="lib" path="lib/velocity-1.4.jar"/>
<classpathentry kind="lib" path="lib/wsdl4j-1.5.2.jar"/>
- <classpathentry kind="lib" path="lib/xbean-2.1.0.jar"/>
<classpathentry kind="lib" path="lib/javolution.jar"/>
<classpathentry kind="lib" path="lib/wstx-asl-2.9.3.jar"/>
<classpathentry kind="lib" path="lib/stax-utils-20060501.jar"/>
@@ -21,5 +20,6 @@
<classpathentry kind="lib" path="lib/commons-logging-1.1.jar"/>
<classpathentry kind="lib" path="lib-compiletime/geronimo-servlet_2.4_spec-1.0.1.jar"/>
<classpathentry kind="lib" path="lib/geronimo-activation_1.0.2_spec-1.1.jar"/>
+ <classpathentry kind="lib" path="lib/xbean-2.2.0.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: trunk/code/CSCommon/lib/javolution.jar
===================================================================
(Binary files differ)
Deleted: trunk/code/CSCommon/lib/xbean-2.1.0.jar
===================================================================
(Binary files differ)
Added: trunk/code/CSCommon/lib/xbean-2.2.0.jar
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSCommon/lib/xbean-2.2.0.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: trunk/code/CSCommon/lib/xbean-spring-2.4.jar
===================================================================
(Binary files differ)
Added: trunk/code/CSCommon/lib/xbean-spring-2.5.jar
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSCommon/lib/xbean-spring-2.5.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/code/CSMiddleware/.classpath
===================================================================
--- trunk/code/CSMiddleware/.classpath 2006-09-20 08:46:56 UTC (rev 139)
+++ trunk/code/CSMiddleware/.classpath 2006-09-21 20:38:22 UTC (rev 140)
@@ -26,7 +26,6 @@
<classpathentry kind="lib" path="/CSCommon/lib/acegi-security-1.0.0.jar"/>
<classpathentry kind="lib" path="/CSCommon/lib/acegi-security-catalina-1.0.0.jar"/>
<classpathentry kind="lib" path="/CSCommon/lib/jdom-1.0.jar"/>
- <classpathentry kind="lib" path="/CSCommon/lib/xfire-all-1.1.2.jar"/>
<classpathentry kind="lib" path="lib/smsLib1.3.0-rxtx.jar"/>
<classpathentry kind="lib" path="lib/activemq-core-4.1-SNAPSHOT.jar"/>
<classpathentry kind="lib" path="lib/activeio-core-3.0-SNAPSHOT.jar"/>
@@ -34,5 +33,6 @@
<classpathentry kind="lib" path="lib/geronimo-jms_1.1_spec-1.0.1.jar"/>
<classpathentry kind="lib" path="/CSCommon/lib-compiletime/geronimo-servlet_2.4_spec-1.0.1.jar"/>
<classpathentry kind="lib" path="/CSCommon/lib/geronimo-activation_1.0.2_spec-1.1.jar"/>
+ <classpathentry kind="lib" path="/CSCommon/lib/xfire-all-1.2.1.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Deleted: trunk/code/CSMiddleware/lib/ehcache-1.2.2.jar
===================================================================
(Binary files differ)
Added: trunk/code/CSMiddleware/lib/ehcache-1.2.3.jar
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSMiddleware/lib/ehcache-1.2.3.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/code/CSTests/.classpath
===================================================================
--- trunk/code/CSTests/.classpath 2006-09-20 08:46:56 UTC (rev 139)
+++ trunk/code/CSTests/.classpath 2006-09-21 20:38:22 UTC (rev 140)
@@ -29,7 +29,6 @@
<classpathentry kind="lib" path="/CSMiddleware/lib-notversioned/sapjco.jar"/>
<classpathentry kind="lib" path="/CSMiddleware/lib/backport-util-concurrent-2.1.jar"/>
<classpathentry kind="lib" path="/CSMiddleware/lib/activeio-core-3.0-SNAPSHOT.jar"/>
- <classpathentry kind="lib" path="/CSMiddleware/lib/ehcache-1.2.2.jar"/>
<classpathentry kind="lib" path="/CSMiddleware/lib/geronimo-j2ee-connector_1.5_spec-1.0.1.jar"/>
<classpathentry kind="lib" path="/CSMiddleware/lib/geronimo-j2ee-management_1.0_spec-1.0.1.jar"/>
<classpathentry kind="lib" path="/CSMiddleware/lib/geronimo-jms_1.1_spec-1.0.1.jar"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <zd...@us...> - 2006-09-21 20:46:37
|
Revision: 141
http://svn.sourceforge.net/comsuite/?rev=141&view=rev
Author: zduniak
Date: 2006-09-21 13:46:12 -0700 (Thu, 21 Sep 2006)
Log Message:
-----------
Little improvements in source code (layout, docs mainly)
Modified Paths:
--------------
trunk/code/CSAdminPanel/.classpath
trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/security/ClientAuthenticationHandler.java
trunk/code/CSCommon/src/org/commsuite/aop/CsMethodsDebuggerInterceptor.java
trunk/code/CSMiddleware/.classpath
trunk/code/CSMiddleware/lib-notversioned/README.txt
trunk/code/CSMiddleware/src/org/commsuite/devices/sms/SmsDevice.java
trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java
Modified: trunk/code/CSAdminPanel/.classpath
===================================================================
--- trunk/code/CSAdminPanel/.classpath 2006-09-21 20:38:22 UTC (rev 140)
+++ trunk/code/CSAdminPanel/.classpath 2006-09-21 20:46:12 UTC (rev 141)
@@ -21,6 +21,6 @@
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/myfaces-api-1.1.3.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/myfaces-impl-1.1.3.jar"/>
<classpathentry kind="lib" path="/CSCommon/lib-compiletime/geronimo-servlet_2.4_spec-1.0.1.jar"/>
- <classpathentry kind="lib" path="/CSCommon/lib/xfire-all-1.2.1.jar"/>
+ <classpathentry kind="lib" path="/CSCommon/lib/xfire-all-1.1.2.jar"/>
<classpathentry kind="output" path="WebContent/WEB-INF/classes"/>
</classpath>
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/security/ClientAuthenticationHandler.java
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/security/ClientAuthenticationHandler.java 2006-09-21 20:38:22 UTC (rev 140)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/security/ClientAuthenticationHandler.java 2006-09-21 20:46:12 UTC (rev 141)
@@ -22,7 +22,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
-
package org.commsuite.web.security;
import org.apache.log4j.Logger;
@@ -31,6 +30,9 @@
import org.jdom.Element;
import org.jdom.Namespace;
+/**
+ * @author Szymon Kuzniak
+ */
public class ClientAuthenticationHandler extends AbstractHandler {
private static final Logger logger = Logger.getLogger(ClientAuthenticationHandler.class);
Modified: trunk/code/CSCommon/src/org/commsuite/aop/CsMethodsDebuggerInterceptor.java
===================================================================
--- trunk/code/CSCommon/src/org/commsuite/aop/CsMethodsDebuggerInterceptor.java 2006-09-21 20:38:22 UTC (rev 140)
+++ trunk/code/CSCommon/src/org/commsuite/aop/CsMethodsDebuggerInterceptor.java 2006-09-21 20:46:12 UTC (rev 141)
@@ -1,3 +1,23 @@
+/* $Id $
+ *
+ * Communications Suite.
+ * Copyright (C) 2006 Szymon Kuzniak, Rafal Malinowski, Marek Musielak, Pawel Walkiewicz,
+ * Agnieszka Wisniewska, Marcin Zduniak, Liliana Ziolek.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
package org.commsuite.aop;
import java.util.ArrayList;
@@ -9,6 +29,9 @@
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
+/**
+ * @author Marek Musielak
+ */
public class CsMethodsDebuggerInterceptor implements MethodInterceptor {
private final static Logger logger = Logger
Modified: trunk/code/CSMiddleware/.classpath
===================================================================
--- trunk/code/CSMiddleware/.classpath 2006-09-21 20:38:22 UTC (rev 140)
+++ trunk/code/CSMiddleware/.classpath 2006-09-21 20:46:12 UTC (rev 141)
@@ -33,6 +33,6 @@
<classpathentry kind="lib" path="lib/geronimo-jms_1.1_spec-1.0.1.jar"/>
<classpathentry kind="lib" path="/CSCommon/lib-compiletime/geronimo-servlet_2.4_spec-1.0.1.jar"/>
<classpathentry kind="lib" path="/CSCommon/lib/geronimo-activation_1.0.2_spec-1.1.jar"/>
- <classpathentry kind="lib" path="/CSCommon/lib/xfire-all-1.2.1.jar"/>
+ <classpathentry kind="lib" path="/CSCommon/lib/xfire-all-1.1.2.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: trunk/code/CSMiddleware/lib-notversioned/README.txt
===================================================================
--- trunk/code/CSMiddleware/lib-notversioned/README.txt 2006-09-21 20:38:22 UTC (rev 140)
+++ trunk/code/CSMiddleware/lib-notversioned/README.txt 2006-09-21 20:46:12 UTC (rev 141)
@@ -1 +1 @@
-Please place "sapjco.jar" file here. You can obtain it from https://service.sap.com
\ No newline at end of file
+Please place "sapjco.jar" file here. You can obtain it from http://service.sap.com/connectors
\ No newline at end of file
Modified: trunk/code/CSMiddleware/src/org/commsuite/devices/sms/SmsDevice.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/devices/sms/SmsDevice.java 2006-09-21 20:38:22 UTC (rev 140)
+++ trunk/code/CSMiddleware/src/org/commsuite/devices/sms/SmsDevice.java 2006-09-21 20:46:12 UTC (rev 141)
@@ -23,7 +23,7 @@
import java.io.UnsupportedEncodingException;
import java.util.Date;
-import javolution.lang.TextBuilder;
+import javolution.text.TextBuilder;
import org.apache.log4j.Logger;
import org.commsuite.devices.Device;
Modified: trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java 2006-09-21 20:38:22 UTC (rev 140)
+++ trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java 2006-09-21 20:46:12 UTC (rev 141)
@@ -24,7 +24,7 @@
import java.util.Date;
import java.util.Properties;
-import javolution.lang.TextBuilder;
+import javolution.text.TextBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.log4j.Logger;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <zd...@us...> - 2006-09-22 18:11:45
|
Revision: 144
http://svn.sourceforge.net/comsuite/?rev=144&view=rev
Author: zduniak
Date: 2006-09-22 11:10:48 -0700 (Fri, 22 Sep 2006)
Log Message:
-----------
Log4j upgrade: 1.2.13 -> 1.2.14
Modified Paths:
--------------
trunk/code/CSAdminPanel/.classpath
trunk/code/CSCommon/.classpath
trunk/code/CSMiddleware/.classpath
trunk/code/CSRemoteClient/.classpath
trunk/code/CSTests/.classpath
Added Paths:
-----------
trunk/code/CSCommon/lib/log4j-1.2.14.jar
trunk/code/CSRemoteClient/lib/log4j-1.2.14.jar
Removed Paths:
-------------
trunk/code/CSCommon/lib/log4j-1.2.13.jar
trunk/code/CSRemoteClient/lib/log4j-1.2.13.jar
Modified: trunk/code/CSAdminPanel/.classpath
===================================================================
--- trunk/code/CSAdminPanel/.classpath 2006-09-21 21:11:53 UTC (rev 143)
+++ trunk/code/CSAdminPanel/.classpath 2006-09-22 18:10:48 UTC (rev 144)
@@ -5,7 +5,6 @@
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v5.0"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container/CSAdminPanel"/>
<classpathentry combineaccessrules="false" kind="src" path="/CSCommon"/>
- <classpathentry kind="lib" path="/CSCommon/lib/log4j-1.2.13.jar"/>
<classpathentry kind="lib" path="/CSCommon/lib/javolution.jar"/>
<classpathentry kind="lib" path="/CSCommon/lib/spring.jar"/>
<classpathentry kind="lib" path="/CSCommon/lib/commons-collections-3.1.jar"/>
@@ -22,5 +21,6 @@
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/myfaces-impl-1.1.3.jar"/>
<classpathentry kind="lib" path="/CSCommon/lib-compiletime/geronimo-servlet_2.4_spec-1.0.1.jar"/>
<classpathentry kind="lib" path="/CSCommon/lib/xfire-all-1.1.2.jar"/>
+ <classpathentry kind="lib" path="/CSCommon/lib/log4j-1.2.14.jar"/>
<classpathentry kind="output" path="WebContent/WEB-INF/classes"/>
</classpath>
Modified: trunk/code/CSCommon/.classpath
===================================================================
--- trunk/code/CSCommon/.classpath 2006-09-21 21:11:53 UTC (rev 143)
+++ trunk/code/CSCommon/.classpath 2006-09-22 18:10:48 UTC (rev 144)
@@ -3,7 +3,6 @@
<classpathentry kind="src" path="src"/>
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="lib/spring.jar"/>
- <classpathentry kind="lib" path="lib/log4j-1.2.13.jar"/>
<classpathentry kind="lib" path="lib/commons-codec-1.3.jar"/>
<classpathentry kind="lib" path="lib/commons-httpclient-3.0.jar"/>
<classpathentry kind="lib" path="lib/commons-lang-2.1.jar"/>
@@ -21,5 +20,6 @@
<classpathentry kind="lib" path="lib-compiletime/geronimo-servlet_2.4_spec-1.0.1.jar"/>
<classpathentry kind="lib" path="lib/geronimo-activation_1.0.2_spec-1.1.jar"/>
<classpathentry kind="lib" path="lib/xbean-2.2.0.jar"/>
+ <classpathentry kind="lib" path="lib/log4j-1.2.14.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Deleted: trunk/code/CSCommon/lib/log4j-1.2.13.jar
===================================================================
(Binary files differ)
Added: trunk/code/CSCommon/lib/log4j-1.2.14.jar
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSCommon/lib/log4j-1.2.14.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/code/CSMiddleware/.classpath
===================================================================
--- trunk/code/CSMiddleware/.classpath 2006-09-21 21:11:53 UTC (rev 143)
+++ trunk/code/CSMiddleware/.classpath 2006-09-22 18:10:48 UTC (rev 144)
@@ -5,7 +5,6 @@
<classpathentry kind="lib" path="lib/hibernate3.jar"/>
<classpathentry kind="lib" path="lib/commons-dbcp.jar"/>
<classpathentry kind="lib" path="/CSCommon/lib/spring.jar"/>
- <classpathentry kind="lib" path="/CSCommon/lib/log4j-1.2.13.jar"/>
<classpathentry kind="lib" path="lib/gnu-hylafax-0.0.9.2.jar"/>
<classpathentry kind="lib" path="lib/gnu-inet-ftp-0.0.9.2.jar"/>
<classpathentry kind="lib" path="lib/quartz-1.5.2.jar"/>
@@ -34,5 +33,6 @@
<classpathentry kind="lib" path="/CSCommon/lib-compiletime/geronimo-servlet_2.4_spec-1.0.1.jar"/>
<classpathentry kind="lib" path="/CSCommon/lib/geronimo-activation_1.0.2_spec-1.1.jar"/>
<classpathentry kind="lib" path="/CSCommon/lib/xfire-all-1.1.2.jar"/>
+ <classpathentry kind="lib" path="/CSCommon/lib/log4j-1.2.14.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: trunk/code/CSRemoteClient/.classpath
===================================================================
--- trunk/code/CSRemoteClient/.classpath 2006-09-21 21:11:53 UTC (rev 143)
+++ trunk/code/CSRemoteClient/.classpath 2006-09-22 18:10:48 UTC (rev 144)
@@ -7,12 +7,12 @@
<classpathentry kind="lib" path="lib/commons-lang-2.1.jar"/>
<classpathentry kind="lib" path="lib/jaxrpc.jar"/>
<classpathentry kind="lib" path="lib/je.jar"/>
- <classpathentry kind="lib" path="lib/log4j-1.2.13.jar"/>
<classpathentry kind="lib" path="lib/saaj.jar"/>
<classpathentry kind="lib" path="lib/spring.jar"/>
<classpathentry kind="lib" path="lib/wsdl4j-1.5.1.jar"/>
<classpathentry kind="lib" path="lib/commons-logging-1.1.jar"/>
<classpathentry kind="lib" path="lib/geronimo-activation_1.0.2_spec-1.1.jar"/>
<classpathentry kind="lib" path="lib/geronimo-javamail_1.3.1_spec-1.1.jar"/>
+ <classpathentry kind="lib" path="lib/log4j-1.2.14.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Deleted: trunk/code/CSRemoteClient/lib/log4j-1.2.13.jar
===================================================================
(Binary files differ)
Added: trunk/code/CSRemoteClient/lib/log4j-1.2.14.jar
===================================================================
(Binary files differ)
Property changes on: trunk/code/CSRemoteClient/lib/log4j-1.2.14.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/code/CSTests/.classpath
===================================================================
--- trunk/code/CSTests/.classpath 2006-09-21 21:11:53 UTC (rev 143)
+++ trunk/code/CSTests/.classpath 2006-09-22 18:10:48 UTC (rev 144)
@@ -11,7 +11,6 @@
<classpathentry kind="lib" path="lib/junit-4.0.jar"/>
<classpathentry kind="lib" path="lib/nekohtml.jar"/>
<classpathentry kind="lib" path="lib/Tidy.jar"/>
- <classpathentry kind="lib" path="/CSCommon/lib/log4j-1.2.13.jar"/>
<classpathentry kind="lib" path="/CSCommon/lib/spring.jar"/>
<classpathentry kind="lib" path="/CSMiddleware/lib/hibernate3.jar"/>
<classpathentry kind="lib" path="lib/spring-mock.jar"/>
@@ -34,5 +33,6 @@
<classpathentry kind="lib" path="/CSMiddleware/lib/geronimo-jms_1.1_spec-1.0.1.jar"/>
<classpathentry kind="lib" path="/CSMiddleware/lib/geronimo-jta_1.0.1B_spec-1.0.1.jar"/>
<classpathentry kind="lib" path="/CSCommon/lib-compiletime/geronimo-servlet_2.4_spec-1.0.1.jar"/>
+ <classpathentry kind="lib" path="/CSCommon/lib/log4j-1.2.14.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <zd...@us...> - 2006-09-22 18:42:13
|
Revision: 145
http://svn.sourceforge.net/comsuite/?rev=145&view=rev
Author: zduniak
Date: 2006-09-22 11:42:03 -0700 (Fri, 22 Sep 2006)
Log Message:
-----------
- log4j.properties for web project slightly reconfigured
- welcome page for middleware project changed
Modified Paths:
--------------
trunk/code/CSAdminPanel/JavaSource/log4j.properties
trunk/code/CSMiddleware/war/index.jsp
Modified: trunk/code/CSAdminPanel/JavaSource/log4j.properties
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/log4j.properties 2006-09-22 18:10:48 UTC (rev 144)
+++ trunk/code/CSAdminPanel/JavaSource/log4j.properties 2006-09-22 18:42:03 UTC (rev 145)
@@ -12,10 +12,12 @@
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d %p [%c:%L] - %m%n
+### set log levels - for more verbose logging change 'info' to 'debug' ###
+log4j.rootLogger=warn, stdout, file
+log4j.logger.org.apache.myfaces=warn
+
### Communications Suite logger
-log4j.logger.org.commsuite=debug, stdout, file
+log4j.logger.org.commsuite=debug
-log4j.logger.org.apache.myfaces=warn
-
-log4j.logger.org.commsuite.aop=DEBUG
+log4j.logger.org.commsuite.aop=debug
Modified: trunk/code/CSMiddleware/war/index.jsp
===================================================================
--- trunk/code/CSMiddleware/war/index.jsp 2006-09-22 18:10:48 UTC (rev 144)
+++ trunk/code/CSMiddleware/war/index.jsp 2006-09-22 18:42:03 UTC (rev 145)
@@ -1,37 +1,10 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
-<head></head>
- <body>
- <form id="loginForm" action="loginuser">
- <table>
- <tr>
- <td>
- <td>
- <table>
- <tr>
- <td>TODO: TITLE</td>
- </tr>
- <tr>
- <td>
- <table>
- <tr>
- <td>Login: </td>
- <td><input type="text" name="j_username" /></td>
- </tr>
- <tr>
- <td>Password: </td>
- <td><input type="password" name="j_password" /></td>
- </tr>
- <tr>
- <td><input type="submit" value=" Login " /></td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </form>
- </body>
+<head>
+<title>Communications Suite</title>
+<META HTTP-EQUIV="Refresh"
+ CONTENT="0; URL=/CommunicationsSuiteAdmin">
+</head>
+<body>
+Loading...
+</body>
</html>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <zd...@us...> - 2006-09-23 11:37:53
|
Revision: 148
http://svn.sourceforge.net/comsuite/?rev=148&view=rev
Author: zduniak
Date: 2006-09-23 04:37:31 -0700 (Sat, 23 Sep 2006)
Log Message:
-----------
Bug connected with incorrect initializing 'acceptedMimeTypes' static variable (Rafal check it please)
Modified Paths:
--------------
trunk/code/CSMiddleware/src/org/commsuite/devices/DeviceManager.java
trunk/code/CSMiddleware/src/org/commsuite/devices/OutboundMessage.java
trunk/code/CSMiddleware/src/org/commsuite/devices/fax/FaxOutboundMessage.java
trunk/code/CSMiddleware/src/org/commsuite/devices/sms/SmsDevice.java
trunk/code/CSMiddleware/src/org/commsuite/devices/sms/SmsOutboundMessage.java
trunk/code/CSTests/src/org/commsuite/devices/DeviceTest.java
Modified: trunk/code/CSMiddleware/src/org/commsuite/devices/DeviceManager.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/devices/DeviceManager.java 2006-09-23 11:15:06 UTC (rev 147)
+++ trunk/code/CSMiddleware/src/org/commsuite/devices/DeviceManager.java 2006-09-23 11:37:31 UTC (rev 148)
@@ -28,6 +28,8 @@
import org.commsuite.devices.OutboundMessage.State;
import org.commsuite.messaging.ExDevRegister;
+import edu.emory.mathcs.backport.java.util.Collections;
+
/**
* Class used to manage (initialize and shutdown) all external devices used in CS.
*
@@ -65,7 +67,7 @@
*/
public List<Device> getDevices() {
// REVIEW: [RM] is this correct to break encapsulation ?
- // Consider changing into: return Collections.synchronizedList(devices);
+ // Consider changing into: return Collections.unmodifiableList(devices);
return devices;
}
Modified: trunk/code/CSMiddleware/src/org/commsuite/devices/OutboundMessage.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/devices/OutboundMessage.java 2006-09-23 11:15:06 UTC (rev 147)
+++ trunk/code/CSMiddleware/src/org/commsuite/devices/OutboundMessage.java 2006-09-23 11:37:31 UTC (rev 148)
@@ -34,7 +34,7 @@
* @since 1.0
* @author Rafał Malinowski
*/
-public class OutboundMessage {
+public abstract class OutboundMessage {
/**
* States of message.
@@ -45,7 +45,7 @@
FAILED
}
- protected static List<String> acceptedMimeTypes;
+ protected abstract List<String> getAcceptedMimeTypes();
private Device device;
private String messageId = null;
@@ -96,7 +96,7 @@
ConverterBuilder builder = (ConverterBuilder)SpringContext.getBean("converterBuilder");
converter = null;
- for (final String acceptedMimeType : acceptedMimeTypes) {
+ for (final String acceptedMimeType : getAcceptedMimeTypes()) {
try {
Converter newConverter = builder.getConverter(new Conversion(contentMimeType, acceptedMimeType));
Modified: trunk/code/CSMiddleware/src/org/commsuite/devices/fax/FaxOutboundMessage.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/devices/fax/FaxOutboundMessage.java 2006-09-23 11:15:06 UTC (rev 147)
+++ trunk/code/CSMiddleware/src/org/commsuite/devices/fax/FaxOutboundMessage.java 2006-09-23 11:37:31 UTC (rev 148)
@@ -26,6 +26,7 @@
import java.io.ByteArrayInputStream;
import java.io.IOException;
+import java.util.List;
import javolution.util.FastTable;
@@ -49,6 +50,8 @@
public class FaxOutboundMessage extends OutboundMessage {
private static final Logger logger = Logger.getLogger(FaxOutboundMessage.class);
+ protected static List<String> acceptedMimeTypes;
+
static {
acceptedMimeTypes = new FastTable<String>();
acceptedMimeTypes.add("application/pdf");
@@ -146,4 +149,12 @@
logger.info("message sent");
}
+
+ /**
+ * TODO: JavaDoc
+ */
+ @Override
+ protected List<String> getAcceptedMimeTypes() {
+ return acceptedMimeTypes;
+ }
}
Modified: trunk/code/CSMiddleware/src/org/commsuite/devices/sms/SmsDevice.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/devices/sms/SmsDevice.java 2006-09-23 11:15:06 UTC (rev 147)
+++ trunk/code/CSMiddleware/src/org/commsuite/devices/sms/SmsDevice.java 2006-09-23 11:37:31 UTC (rev 148)
@@ -101,6 +101,7 @@
*
* @throws DeviceInitializationFailedException when connection failed
*/
+ @Override
public void init() throws DeviceInitializationFailedException {
setState(Device.State.INITIALIZING);
@@ -157,6 +158,7 @@
*
* @throws DeviceShutdownFailedException when disconnection failed
*/
+ @Override
public void shutdown() throws DeviceShutdownFailedException {
try {
shutdownNotification();
@@ -269,6 +271,7 @@
*
* @return new message that can be sent using this device
*/
+ @Override
public OutboundMessage createOutboundMessage() {
return new SmsOutboundMessage(this);
}
@@ -281,6 +284,7 @@
* @throws OutboundMessageInvalidContentException message is too long
* @throws OutboundMessageSendException an error occured
*/
+ @Override
public void send(OutboundMessage message) throws DeviceInvalidOutboundMessageException,
OutboundMessageInvalidContentMimeTypeException, OutboundMessageInvalidContentException,
OutboundMessageInvalidDestinationAddressException, OutboundMessageSendException,
@@ -487,6 +491,7 @@
*
* @return FormatType.SMS
*/
+ @Override
public FormatType getFormatType() {
return FormatType.SMS;
}
Modified: trunk/code/CSMiddleware/src/org/commsuite/devices/sms/SmsOutboundMessage.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/devices/sms/SmsOutboundMessage.java 2006-09-23 11:15:06 UTC (rev 147)
+++ trunk/code/CSMiddleware/src/org/commsuite/devices/sms/SmsOutboundMessage.java 2006-09-23 11:37:31 UTC (rev 148)
@@ -21,7 +21,10 @@
package org.commsuite.devices.sms;
import java.util.ArrayList;
+import java.util.List;
+import javolution.util.FastTable;
+
import org.commsuite.devices.OutboundMessage;
/**
@@ -32,9 +35,11 @@
* @author Marcin Zduniak
*/
public class SmsOutboundMessage extends OutboundMessage {
+
+ protected static List<String> acceptedMimeTypes;
static {
- acceptedMimeTypes = new ArrayList<String>();
+ acceptedMimeTypes = new FastTable<String>();
acceptedMimeTypes.add("text/plain");
}
@@ -46,5 +51,13 @@
public SmsOutboundMessage(SmsDevice device) {
super(device);
}
+
+ /**
+ * TODO: JavaDoc
+ */
+ @Override
+ protected List<String> getAcceptedMimeTypes() {
+ return acceptedMimeTypes;
+ }
}
Modified: trunk/code/CSTests/src/org/commsuite/devices/DeviceTest.java
===================================================================
--- trunk/code/CSTests/src/org/commsuite/devices/DeviceTest.java 2006-09-23 11:15:06 UTC (rev 147)
+++ trunk/code/CSTests/src/org/commsuite/devices/DeviceTest.java 2006-09-23 11:37:31 UTC (rev 148)
@@ -20,6 +20,7 @@
*/
package org.commsuite.devices;
+import java.util.Arrays;
import java.util.List;
import javolution.util.FastTable;
@@ -38,30 +39,34 @@
* @author Rafał Malinowski
*/
public class DeviceTest extends AbstractCommunicationsSuiteTestCase {
-
+
private class FakeOutboundMessage extends OutboundMessage {
-
+
public FakeOutboundMessage(Device device, String messageId) {
super(device);
setMessageId(messageId);
-
- acceptedMimeTypes = new FastTable<String>();
- acceptedMimeTypes.add("application/octet-stream");
}
-
+
+ @Override
+ protected List<String> getAcceptedMimeTypes() {
+ return new FastTable<String>(Arrays
+ .asList(new String[] { "application/octet-stream" }));
+ }
+
}
private class FakeDevice extends Device {
-
+
private String messageId = "";
+
private List<OutboundMessage> messagesSent;
-
+
public FakeDevice(String name) {
super(name);
-
+
messagesSent = new FastTable<OutboundMessage>();
}
-
+
public List<OutboundMessage> getMessagesSent() {
return messagesSent;
}
@@ -77,65 +82,79 @@
return new FakeOutboundMessage(this, messageId);
}
- public void send(OutboundMessage message) throws DeviceInvalidOutboundMessageException, OutboundMessageInvalidContentMimeTypeException, OutboundMessageInvalidContentException, OutboundMessageInvalidDestinationAddressException, OutboundMessageSendException, OutboundMessageConversionFailedException {
+ public void send(OutboundMessage message)
+ throws DeviceInvalidOutboundMessageException,
+ OutboundMessageInvalidContentMimeTypeException,
+ OutboundMessageInvalidContentException,
+ OutboundMessageInvalidDestinationAddressException,
+ OutboundMessageSendException,
+ OutboundMessageConversionFailedException {
messagesSent.add(message);
}
public FormatType getFormatType() {
return null;
}
-
+
}
-
+
/*
- * TODO: This test fails or not becouse of use Set in SentContents.
- * When Sets will be changed to Lists everything will works properly.
+ * TODO: This test fails or not becouse of use Set in SentContents. When
+ * Sets will be changed to Lists everything will works properly.
*/
public void testSend() {
- MessageManager messageManager = SpringMiddlewareContext.getMessageManager();
-
+ MessageManager messageManager = SpringMiddlewareContext
+ .getMessageManager();
+
Message message = FakeObject.makeFakeMessage();
Contents content1 = FakeObject.makeFakeContent();
Contents content2 = FakeObject.makeFakeContent();
-
+
message.addContents(content1, "1");
message.addContents(content2, "2");
-
+
message = messageManager.saveMessage(message);
-
+
FakeDevice fakeDevice = new FakeDevice("fake1");
fakeDevice.send(message);
-
+
List<OutboundMessage> messagesSent = fakeDevice.getMessagesSent();
assertEquals("Device should sent 2 messages", 2, messagesSent.size());
-
+
FakeOutboundMessage message1 = new FakeOutboundMessage(fakeDevice, ".");
message1.setContent(content1.getData());
message1.setContentMimeType("application/octet-stream");
message1.setDestinationAddress("receiver");
-
- assertEquals("Device sent unexpected message [1]", message1, messagesSent.get(0));
-
+
+ assertEquals("Device sent unexpected message [1]", message1,
+ messagesSent.get(0));
+
FakeOutboundMessage message2 = new FakeOutboundMessage(fakeDevice, "..");
message2.setContent(content2.getData());
message2.setContentMimeType("application/octet-stream");
message2.setDestinationAddress("receiver");
-
+
message = messageManager.getMessage(message.getId().toString());
List<SentContent> sentContents = message.getSentContents();
-
- assertEquals("sentContents list should be 2 items long", 2, sentContents.size());
-
+
+ assertEquals("sentContents list should be 2 items long", 2,
+ sentContents.size());
+
SentContent sentContent1 = sentContents.get(0);
SentContent sentContent2 = sentContents.get(1);
-
- assertEquals("Device sent unexpected message [2]", message2, messagesSent.get(1));
-
- assertEquals("SentContent1 internalId is wrong", "fake1:o:.", sentContent1.getInternalId());
- assertEquals("SentContent1 state is wrong", State.SENT, sentContent1.getState());
-
- assertEquals("SentContent2 internalId is wrong", "fake1:o:..", sentContent2.getInternalId());
- assertEquals("SentContent2 state is wrong", State.SENT, sentContent2.getState());
+
+ assertEquals("Device sent unexpected message [2]", message2,
+ messagesSent.get(1));
+
+ assertEquals("SentContent1 internalId is wrong", "fake1:o:.",
+ sentContent1.getInternalId());
+ assertEquals("SentContent1 state is wrong", State.SENT, sentContent1
+ .getState());
+
+ assertEquals("SentContent2 internalId is wrong", "fake1:o:..",
+ sentContent2.getInternalId());
+ assertEquals("SentContent2 state is wrong", State.SENT, sentContent2
+ .getState());
}
-
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sku...@us...> - 2006-09-23 14:22:20
|
Revision: 151
http://svn.sourceforge.net/comsuite/?rev=151&view=rev
Author: skuzniak
Date: 2006-09-23 07:21:37 -0700 (Sat, 23 Sep 2006)
Log Message:
-----------
multiple languages enabled, some other changes
Modified Paths:
--------------
trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/SearchServerBean.java
trunk/code/CSAdminPanel/WebContent/pages/CSHeader.jsp
trunk/code/CSAdminPanel/WebContent/pages/CSMainPanel.jsp
trunk/code/CSCommon/src/org/commsuite/model/ws/WSSAPInstanceDef.java
trunk/code/CSMiddleware/src/org/commsuite/dao/SAPInstanceDefDao.java
trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/SAPInstanceDefDaoImpl.java
trunk/code/CSMiddleware/src/org/commsuite/managers/impl/SAPInstanceDefManagerImpl.java
trunk/code/CSMiddleware/src/org/commsuite/model/SAPInstanceDef.java
trunk/code/CSMiddleware/src/org/commsuite/ws/services/ServersService.java
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/SearchServerBean.java
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/SearchServerBean.java 2006-09-23 12:42:16 UTC (rev 150)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/SearchServerBean.java 2006-09-23 14:21:37 UTC (rev 151)
@@ -121,6 +121,7 @@
instance.setR3name(this.r3name);
instance.setSystemNumber(this.systemNumber);
instance.setUser(this.user);
+ instance.setActiveInstance(this.activeInstance);
if (1 == this.getUnicodeSearchIndex()) {
instance.setUnicode(true);
Modified: trunk/code/CSAdminPanel/WebContent/pages/CSHeader.jsp
===================================================================
--- trunk/code/CSAdminPanel/WebContent/pages/CSHeader.jsp 2006-09-23 12:42:16 UTC (rev 150)
+++ trunk/code/CSAdminPanel/WebContent/pages/CSHeader.jsp 2006-09-23 14:21:37 UTC (rev 151)
@@ -5,7 +5,7 @@
<f:subview id="CSHeader">
<f:loadBundle basename="org.commsuite.web.locale.Locale" var="Locale" />
<h:form id="lang">
- <h:panelGrid columns="2" styleClass="header">
+ <h:panelGrid columns="3" styleClass="header">
<h:panelGrid id="headerName" columns="1" styleClass="header-menu-banner">
<h:panelGrid columns="7" styleClass="header-menu-icons">
@@ -62,7 +62,7 @@
</h:panelGrid>
</h:panelGrid>
- <%--
+
<h:panelGroup id="headerLangCombo" styleClass="header-lang">
<h:graphicImage value="#{pageContext.request.contextPath}/pages/files/gif/preferences-desktop-locale.gif" />
<h:selectOneMenu value="#{languageSelectionBean.locale}">
@@ -70,7 +70,7 @@
</h:selectOneMenu>
<h:commandButton value="Go!" />
</h:panelGroup>
- --%>
+
<h:panelGrid columns="1">
<h:outputText value="[#{sessionBean.currentlyLogged}]" styleClass="header-user"/>
<h:commandLink value="Logout" action="#{sessionBean.logout}" />
Modified: trunk/code/CSAdminPanel/WebContent/pages/CSMainPanel.jsp
===================================================================
--- trunk/code/CSAdminPanel/WebContent/pages/CSMainPanel.jsp 2006-09-23 12:42:16 UTC (rev 150)
+++ trunk/code/CSAdminPanel/WebContent/pages/CSMainPanel.jsp 2006-09-23 14:21:37 UTC (rev 151)
@@ -21,7 +21,7 @@
<h:commandLink action="showServers" styleClass="header-link">
<h:graphicImage value="#{pageContext.request.contextPath}/pages/files/gif/network-server64.gif" styleClass="header-icon"/>
</h:commandLink>
- <h:panelGrid columns="1">
+ <h:panelGrid columns="1" styleClass="listView-header-odd">
<h:outputText value="#{Locale.MENU_SERVERS}" styleClass="header-command"/>
<h:outputText value="#{Locale.INFO_SERVERS}" />
</h:panelGrid>
@@ -29,7 +29,7 @@
<h:commandLink action="showMessages" styleClass="header-link">
<h:graphicImage value="#{pageContext.request.contextPath}/pages/files/gif/mail-message-new64.gif" styleClass="header-icon"/>
</h:commandLink>
- <h:panelGrid columns="1">
+ <h:panelGrid columns="1" styleClass="listView-header-even">
<h:outputText value="#{Locale.MENU_INBOX}" styleClass="header-command"/>
<h:outputText value="#{Locale.INFO_MESSAGES}" />
</h:panelGrid>
@@ -37,7 +37,7 @@
<h:commandLink action="searchUser" styleClass="header-link">
<h:graphicImage value="#{pageContext.request.contextPath}/pages/files/gif/contact-new64.gif" styleClass="header-icon"/>
</h:commandLink>
- <h:panelGrid columns="1">
+ <h:panelGrid columns="1" styleClass="listView-header-odd">
<h:outputText value="#{Locale.MENU_USERS}" styleClass="header-command"/>
<h:outputText value="#{Locale.INFO_USERS}" />
</h:panelGrid>
@@ -45,7 +45,7 @@
<h:commandLink action="searchRole" styleClass="header-link">
<h:graphicImage value="#{pageContext.request.contextPath}/pages/files/gif/preferences-desktop-theme64.gif" styleClass="header-icon"/>
</h:commandLink>
- <h:panelGrid columns="1">
+ <h:panelGrid columns="1" styleClass="listView-header-even">
<h:outputText value="#{Locale.MENU_ROLES}" styleClass="header-command"/>
<h:outputText value="#{Locale.INFO_ROLES}" />
</h:panelGrid>
@@ -53,7 +53,7 @@
<h:commandLink action="searchAction" styleClass="header-link">
<h:graphicImage value="#{pageContext.request.contextPath}/pages/files/gif/video-x-generic64.gif" styleClass="header-icon"/>
</h:commandLink>
- <h:panelGrid columns="1">
+ <h:panelGrid columns="1" styleClass="listView-header-odd">
<h:outputText value="#{Locale.MENU_ACTIONS}" styleClass="header-command"/>
<h:outputText value="#{Locale.INFO_ACTIONS}" />
</h:panelGrid>
@@ -61,7 +61,7 @@
<h:commandLink action="searchGroup" styleClass="header-link">
<h:graphicImage value="#{pageContext.request.contextPath}/pages/files/gif/x-office-address-book64.gif" styleClass="header-icon"/>
</h:commandLink>
- <h:panelGrid columns="1">
+ <h:panelGrid columns="1" styleClass="listView-header-even">
<h:outputText value="#{Locale.MENU_GROUPS}" styleClass="header-command"/>
<h:outputText value="#{Locale.INFO_GROUPS}" />
</h:panelGrid>
Modified: trunk/code/CSCommon/src/org/commsuite/model/ws/WSSAPInstanceDef.java
===================================================================
--- trunk/code/CSCommon/src/org/commsuite/model/ws/WSSAPInstanceDef.java 2006-09-23 12:42:16 UTC (rev 150)
+++ trunk/code/CSCommon/src/org/commsuite/model/ws/WSSAPInstanceDef.java 2006-09-23 14:21:37 UTC (rev 151)
@@ -92,7 +92,7 @@
public void setMaxConnectionsInPool(int maxConnectionsInPool);
- public void setActiveInstance(boolean active);
+ public void setActiveInstance(boolean activeInstance);
public boolean isActiveInstance();
Modified: trunk/code/CSMiddleware/src/org/commsuite/dao/SAPInstanceDefDao.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/dao/SAPInstanceDefDao.java 2006-09-23 12:42:16 UTC (rev 150)
+++ trunk/code/CSMiddleware/src/org/commsuite/dao/SAPInstanceDefDao.java 2006-09-23 14:21:37 UTC (rev 151)
@@ -34,7 +34,7 @@
public List<SAPInstanceDef> getSAPInstances();
public List<SAPInstanceDef> getMatchingServers(SAPInstanceDef instance,
- boolean defaultSearch, boolean loadSearech, boolean unicodeSearch);
+ boolean defaultSearch, boolean loadSearech, boolean unicodeSearch, boolean activeSearch);
public SAPInstanceDef getSAPInstanceDef(Long id);
Modified: trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/SAPInstanceDefDaoImpl.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/SAPInstanceDefDaoImpl.java 2006-09-23 12:42:16 UTC (rev 150)
+++ trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/SAPInstanceDefDaoImpl.java 2006-09-23 14:21:37 UTC (rev 151)
@@ -138,55 +138,28 @@
*/
@SuppressWarnings("unchecked")
public List<SAPInstanceDef> getMatchingServers(SAPInstanceDef instance,
- boolean defaultSearch, boolean loadSearch, boolean unicodeSearch) {
- logger.debug("INSTANCE: " + instance);
- String query = "select s from SAPInstanceDef s where"
- + " s.name like '%"
- + instance.getName()
- + "%'"
- + (defaultSearch ? " and s.defaultInstance = "
- + instance.isDefaultInstance() : "")
- + (0 != instance.getMaxConnectionsInPool() ? " and s.maxConnectionsInPool = "
- + instance.getMaxConnectionsInPool()
- : "")
- + (instance.getUser().trim().length() != 0 ? " and s.user like '%"
- + instance.getUser() + "%'"
- : "")
- + (instance.getPassword().trim().length() != 0 ? " and s.password like '%"
- + instance.getPassword() + "%'"
- : "")
- + (instance.getClient().trim().length() != 0 ? " and s.client like '%"
- + instance.getClient() + "%'"
- : "")
- + (instance.getHost().trim().length() != 0 ? " and s.host like '%"
- + instance.getHost() + "%'"
- : "")
- + (instance.getR3name().trim().length() != 0 ? " and s.r3name like '%"
- + instance.getR3name() + "%'"
- : "")
- + (instance.getGroup().trim().length() != 0 ? " and s.group like '%"
- + instance.getGroup() + "%'"
- : "")
- + (instance.getSystemNumber().trim().length() != 0 ? " and s.systemNumber like '%"
- + instance.getSystemNumber() + "%'"
- : "")
- + (loadSearch ? " and s.loadBalancing = "
- + instance.isLoadBalancing() : "")
- + (instance.getGwhost().trim().length() != 0 ? " and s.gwhost like '%"
- + instance.getGwhost() + "%'"
- : "")
- + (instance.getGwserv().trim().length() != 0 ? " and s.gwserv like '%"
- + instance.getGwserv() + "%'"
- : "")
- + (instance.getProgid().trim().length() != 0 ? " and s.progid like '%"
- + instance.getProgid() + "%'"
- : "")
- + (unicodeSearch ? " and s.unicode = " + instance.isUnicode()
- : "")
- + (instance.getAdminEmail().trim().length() != 0 ? " and s.name like '%"
- + instance.getAdminEmail() + "%'"
- : "");
- logger.debug("QUERY: " + query);
+ boolean defaultSearch, boolean loadSearch, boolean unicodeSearch,
+ boolean activeSearch) {
+ logger.debug("INSTANCE: "+ instance);
+ String query = "select s from SAPInstanceDef s where" +
+ " s.name like '%" +instance.getName()+ "%'"+
+ (defaultSearch ? " and s.defaultInstance = "+ instance.isDefaultInstance() : "")+
+ (0 != instance.getMaxConnectionsInPool() ? " and s.maxConnectionsInPool = "+ instance.getMaxConnectionsInPool() : "")+
+ (instance.getUser().trim().length() != 0 ? " and s.user like '%" +instance.getUser()+ "%'" : "")+
+ (instance.getPassword().trim().length() != 0 ? " and s.password like '%" +instance.getPassword()+ "%'" : "")+
+ (instance.getClient().trim().length() != 0 ? " and s.client like '%" +instance.getClient()+ "%'" : "")+
+ (instance.getHost().trim().length() != 0 ? " and s.host like '%" +instance.getHost()+ "%'" : "")+
+ (instance.getR3name().trim().length() != 0 ? " and s.r3name like '%" +instance.getR3name()+ "%'" : "")+
+ (instance.getGroup().trim().length() != 0 ? " and s.group like '%" +instance.getGroup()+ "%'" : "")+
+ (instance.getSystemNumber().trim().length() != 0 ? " and s.systemNumber like '%" +instance.getSystemNumber()+ "%'" : "")+
+ (loadSearch ? " and s.loadBalancing = "+ instance.isLoadBalancing() : "")+
+ (activeSearch ? " and s.activeInstance = "+ instance.isActiveInstance() : "")+
+ (instance.getGwhost().trim().length() != 0 ? " and s.gwhost like '%" +instance.getGwhost()+ "%'" : "")+
+ (instance.getGwserv().trim().length() != 0 ? " and s.gwserv like '%" +instance.getGwserv()+ "%'" : "")+
+ (instance.getProgid().trim().length() != 0 ? " and s.progid like '%" +instance.getProgid()+ "%'" : "")+
+ (unicodeSearch ? " and s.unicode = "+ instance.isUnicode() : "")+
+ (instance.getAdminEmail().trim().length() != 0 ? " and s.name like '%" +instance.getAdminEmail()+ "%'" : "");
+ logger.debug("QUERY: "+ query);
final List list = getHibernateTemplate().find(query);
logger.debug("SIZE OF INSTANCES MATCHING TO GIVES PATTERN: "
+ list.size());
Modified: trunk/code/CSMiddleware/src/org/commsuite/managers/impl/SAPInstanceDefManagerImpl.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/managers/impl/SAPInstanceDefManagerImpl.java 2006-09-23 12:42:16 UTC (rev 150)
+++ trunk/code/CSMiddleware/src/org/commsuite/managers/impl/SAPInstanceDefManagerImpl.java 2006-09-23 14:21:37 UTC (rev 151)
@@ -47,7 +47,7 @@
*/
public List<SAPInstanceDef> getSelectedSAPInstances(SAPInstanceDef instance,
boolean defaultSearch, boolean loadSearch, boolean unicodeSearch, boolean activeSearch) {
- return dao.getMatchingServers(instance, defaultSearch, loadSearch, unicodeSearch);
+ return dao.getMatchingServers(instance, defaultSearch, loadSearch, unicodeSearch, activeSearch);
}
/**
Modified: trunk/code/CSMiddleware/src/org/commsuite/model/SAPInstanceDef.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/model/SAPInstanceDef.java 2006-09-23 12:42:16 UTC (rev 150)
+++ trunk/code/CSMiddleware/src/org/commsuite/model/SAPInstanceDef.java 2006-09-23 14:21:37 UTC (rev 151)
@@ -80,7 +80,7 @@
*/
private String client;
- private boolean activeInstance = true;
+ private boolean activeInstance;
// /**
// * SAP logon language. This field is not obligatory.
Modified: trunk/code/CSMiddleware/src/org/commsuite/ws/services/ServersService.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/ws/services/ServersService.java 2006-09-23 12:42:16 UTC (rev 150)
+++ trunk/code/CSMiddleware/src/org/commsuite/ws/services/ServersService.java 2006-09-23 14:21:37 UTC (rev 151)
@@ -398,6 +398,7 @@
instance.setSystemNumber(wsInstance.getSystemNumber());
instance.setUnicode(wsInstance.isUnicode());
instance.setUser(wsInstance.getUser());
+ instance.setActiveInstance(wsInstance.isActiveInstance());
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <zd...@us...> - 2006-09-23 22:33:49
|
Revision: 160
http://svn.sourceforge.net/comsuite/?rev=160&view=rev
Author: zduniak
Date: 2006-09-23 15:33:36 -0700 (Sat, 23 Sep 2006)
Log Message:
-----------
Tests corrected
Modified Paths:
--------------
trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java
trunk/code/CSTests/src/org/commsuite/devices/DeviceTest.java
Modified: trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java 2006-09-23 21:59:40 UTC (rev 159)
+++ trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java 2006-09-23 22:33:36 UTC (rev 160)
@@ -223,8 +223,10 @@
if (null != messages && messages.length > 0
&& 0 == messages[0].getSentContents().size()) {
+ final String errMsg = "Message without any content is not supported";
+ logger.error(errMsg);
throw new JCO.AbapException("INTERNAL",
- "Message without any content is not supported");
+ errMsg);
}
if (null == msgManager) {
Modified: trunk/code/CSTests/src/org/commsuite/devices/DeviceTest.java
===================================================================
--- trunk/code/CSTests/src/org/commsuite/devices/DeviceTest.java 2006-09-23 21:59:40 UTC (rev 159)
+++ trunk/code/CSTests/src/org/commsuite/devices/DeviceTest.java 2006-09-23 22:33:36 UTC (rev 160)
@@ -63,8 +63,9 @@
public FakeDevice(String name) {
super(name);
-
messagesSent = new FastTable<OutboundMessage>();
+ super.setContentsManager(SpringMiddlewareContext.getContentsManager());
+ super.setSentContentManager(SpringMiddlewareContext.getSentContentManager());
}
public List<OutboundMessage> getMessagesSent() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2006-09-30 19:04:23
|
Revision: 168
http://svn.sourceforge.net/comsuite/?rev=168&view=rev
Author: marasm
Date: 2006-09-30 12:03:58 -0700 (Sat, 30 Sep 2006)
Log Message:
-----------
Web application speeded up 18 times (for messages)
Modified Paths:
--------------
trunk/code/CSAdminPanel/WebContent/pages/messages/CSMessagesDetails.jsp
trunk/code/CSCommon/src/org/commsuite/aop/AopUtils.java
trunk/code/CSCommon/src/org/commsuite/aop/SystemArchitecture.java
Modified: trunk/code/CSAdminPanel/WebContent/pages/messages/CSMessagesDetails.jsp
===================================================================
--- trunk/code/CSAdminPanel/WebContent/pages/messages/CSMessagesDetails.jsp 2006-09-30 18:27:21 UTC (rev 167)
+++ trunk/code/CSAdminPanel/WebContent/pages/messages/CSMessagesDetails.jsp 2006-09-30 19:03:58 UTC (rev 168)
@@ -31,32 +31,34 @@
</h:commandLink>
</h:panelGrid>
<%--</f:facet>--%>
- <h:panelGrid columns="1" styleClass="viewTable" id="messagesList">
+ <h:dataTable value="#{searchMessageBean.messageExtended}" var="messageDisplayed">
+ <h:column>
+ <h:panelGrid columns="1" styleClass="viewTable" id="messagesList">
<h:messages />
<h:panelGrid columns="1" styleClass="listView-header">
<h:panelGrid columns="4">
<h:panelGrid columns="2">
<h:outputText value="#{Locale.MESSAGE_DESCRIPTION}"
styleClass="listView-title" />
- <h:outputText value="#{searchMessageBean.messageExtended.message.description}"
+ <h:outputText value="#{messageDisplayed.message.description}"
styleClass="listView-header-value" />
</h:panelGrid>
<h:panelGrid columns="2">
<h:outputText value="#{Locale.MESSAGE_SENDER}"
styleClass="listView-title" />
- <h:outputText value="#{searchMessageBean.messageExtended.message.sender}"
+ <h:outputText value="#{messageDisplayed.message.sender}"
styleClass="listView-header-value" />
</h:panelGrid>
<h:panelGrid columns="2">
<h:outputText value="#{Locale.MESSAGE_RECEIVER}"
styleClass="listView-title" />
- <h:outputText value="#{searchMessageBean.messageExtended.message.receiver}"
+ <h:outputText value="#{messageDisplayed.message.receiver}"
styleClass="listView-header-value" />
</h:panelGrid>
<h:panelGrid columns="2">
<h:outputText value="#{Locale.MESSAGE_DATE_SEND}"
styleClass="listView-title" />
- <h:outputText value="#{searchMessageBean.messageExtended.message.sendDate}"
+ <h:outputText value="#{messageDisplayed.message.sendDate}"
styleClass="listView-header-value">
<f:convertDateTime
timeZone="CET"
@@ -69,7 +71,7 @@
<h:panelGrid columns="2">
<h:outputText value="#{Locale.MESSAGE_DATE_CREATION}"
styleClass="listView-title" />
- <h:outputText value="#{searchMessageBean.messageExtended.message.creationDate}"
+ <h:outputText value="#{messageDisplayed.message.creationDate}"
styleClass="listView-header-value">
<f:convertDateTime
timeZone="CET"
@@ -79,7 +81,7 @@
<h:panelGrid columns="2">
<h:outputText value="#{Locale.MESSAGE_DATE_START}"
styleClass="listView-title" />
- <h:outputText value="#{searchMessageBean.messageExtended.message.startDate}"
+ <h:outputText value="#{messageDisplayed.message.startDate}"
styleClass="listView-header-value">
<f:convertDateTime
timeZone="CET"
@@ -89,7 +91,7 @@
<h:panelGrid columns="2">
<h:outputText value="#{Locale.MESSAGE_DATE_END}"
styleClass="listView-title" />
- <h:outputText value="#{searchMessageBean.messageExtended.message.endDate}"
+ <h:outputText value="#{messageDisplayed.message.endDate}"
styleClass="listView-header-value">
<f:convertDateTime
timeZone="CET"
@@ -99,7 +101,7 @@
<h:panelGrid columns="2">
<h:outputText value="#{Locale.MESSAGE_DATE_EXPIRATION}"
styleClass="listView-title" />
- <h:outputText value="#{searchMessageBean.messageExtended.message.expirationDate}"
+ <h:outputText value="#{messageDisplayed.message.expirationDate}"
styleClass="listView-header-value">
<f:convertDateTime
timeZone="CET"
@@ -109,7 +111,7 @@
<h:panelGrid columns="2">
<h:outputText value="#{Locale.MESSAGE_DATE_LAST_PROCESS}"
styleClass="listView-title" />
- <h:outputText value="#{searchMessageBean.messageExtended.message.lastProcessDate}"
+ <h:outputText value="#{messageDisplayed.message.lastProcessDate}"
styleClass="listView-header-value">
<f:convertDateTime
timeZone="CET"
@@ -121,13 +123,13 @@
<h:panelGrid columns="2" >
<h:outputText value="#{Locale.MESSAGE_SAP_ID}"
styleClass="listView-title" />
- <h:outputText value="#{searchMessageBean.messageExtended.message.sapID}"
+ <h:outputText value="#{messageDisplayed.message.sapID}"
styleClass="listView-header-value" />
</h:panelGrid>
<h:panelGrid columns="2">
<h:outputText value="#{Locale.MESSAGE_ID}"
styleClass="listView-title" />
- <h:outputText value="#{searchMessageBean.messageExtended.message.id}"
+ <h:outputText value="#{messageDisplayed.message.id}"
styleClass="listView-header-value" />
</h:panelGrid>
</h:panelGrid>
@@ -135,31 +137,31 @@
<h:panelGrid columns="2">
<h:outputText value="#{Locale.MESSAGE_DIRECTION}"
styleClass="listView-title" />
- <h:outputText value="#{searchMessageBean.messageExtended.message.direction}"
+ <h:outputText value="#{messageDisplayed.message.direction}"
styleClass="listView-header-value" />
</h:panelGrid>
<h:panelGrid columns="2">
<h:outputText value="#{Locale.MESSAGE_STATUS}"
styleClass="listView-title" />
- <h:outputText value="#{searchMessageBean.messageExtended.message.status}"
+ <h:outputText value="#{messageDisplayed.message.status}"
styleClass="listView-header-value" />
</h:panelGrid>
<h:panelGrid columns="2">
<h:outputText value="#{Locale.MESSAGE_PRIORITY}"
styleClass="listView-title" />
- <h:outputText value="#{searchMessageBean.messageExtended.message.priority}"
+ <h:outputText value="#{messageDisplayed.message.priority}"
styleClass="listView-header-value" />
</h:panelGrid>
<h:panelGrid columns="2">
<h:outputText value="#{Locale.MESSAGE_FORMAT_TYPE}"
styleClass="listView-title" />
- <h:outputText value="#{searchMessageBean.messageExtended.message.formatType}"
+ <h:outputText value="#{messageDisplayed.message.formatType}"
styleClass="listView-header-value" />
</h:panelGrid>
<h:panelGrid columns="2">
<h:outputText value="#{Locale.MESSAGE_LAST_PROCESS}"
styleClass="listView-title" />
- <h:outputText value="#{searchMessageBean.messageExtended.message.lastProcessMessage}"
+ <h:outputText value="#{messageDisplayed.message.lastProcessMessage}"
styleClass="listView-header-value" />
</h:panelGrid>
</h:panelGrid>
@@ -170,7 +172,7 @@
<h:commandLink
actionListener="#{resubmitMessageBean.resubmitMessage}"
action="inbox" value="#{Locale.MESSAGE_RESUBMIT}">
- <f:param name="messageId" value="#{searchMessageBean.messageExtended.message.id}" />
+ <f:param name="messageId" value="#{messageDisplayed.message.id}" />
</h:commandLink>
</h:panelGrid>
</h:panelGrid>
@@ -180,7 +182,7 @@
<h:outputText value="#{Locale.MESSAGE_CONTENTS_TITLE}" />
</f:facet>
<h:panelGrid columns="1" styleClass="listView-entity">
- <h:dataTable value="#{searchMessageBean.messageExtended.sentContents}" var="sentContents"
+ <h:dataTable value="#{messageDisplayed.sentContents}" var="sentContents"
styleClass="listView-title" id="content">
<h:column>
<h:panelGrid columns="2">
@@ -229,8 +231,10 @@
<f:param value="next" name="pageDir" />
<h:graphicImage value="#{pageContext.request.contextPath}/pages/files/go-next.png" styleClass="header-icon"/>
</h:commandLink>
- </h:panelGrid>--%>
- </h:panelGrid>
+ </h:panelGrid>--%>
+ </h:panelGrid>
+ </h:column>
+ </h:dataTable>
</h:form>
</h:panelGrid>
</h:panelGrid>
Modified: trunk/code/CSCommon/src/org/commsuite/aop/AopUtils.java
===================================================================
--- trunk/code/CSCommon/src/org/commsuite/aop/AopUtils.java 2006-09-30 18:27:21 UTC (rev 167)
+++ trunk/code/CSCommon/src/org/commsuite/aop/AopUtils.java 2006-09-30 19:03:58 UTC (rev 168)
@@ -2,5 +2,5 @@
public class AopUtils {
public static String[] NOT_LOGGED_PATTERNS = new String[] { "toString",
- "hashCode", ".set", "equals", "IntEnumUserType" };
+ "hashCode", ".set", "equals", "IntEnumUserType", "getId", ".model." };
}
Modified: trunk/code/CSCommon/src/org/commsuite/aop/SystemArchitecture.java
===================================================================
--- trunk/code/CSCommon/src/org/commsuite/aop/SystemArchitecture.java 2006-09-30 18:27:21 UTC (rev 167)
+++ trunk/code/CSCommon/src/org/commsuite/aop/SystemArchitecture.java 2006-09-30 19:03:58 UTC (rev 168)
@@ -33,7 +33,12 @@
if (i != 0) {
parameters += ", ";
}
- parameters += pjp.getArgs()[i];
+ try {
+ parameters += pjp.getArgs()[i];
+ } catch (Exception e) {
+ parameters += "???";
+ // don't cate if we can NOT log some parameter
+ }
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sku...@us...> - 2006-10-01 10:02:35
|
Revision: 174
http://svn.sourceforge.net/comsuite/?rev=174&view=rev
Author: skuzniak
Date: 2006-10-01 03:02:14 -0700 (Sun, 01 Oct 2006)
Log Message:
-----------
"--All--" message improved(not dependent from deploy path)
Modified Paths:
--------------
trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/BeansUtils.java
trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/LanguageSelectionBean.java
trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/SearchServerBean.java
trunk/code/CSMiddleware/.springBeans
trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/BeansUtils.java
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/BeansUtils.java 2006-10-01 08:18:03 UTC (rev 173)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/BeansUtils.java 2006-10-01 10:02:14 UTC (rev 174)
@@ -188,4 +188,6 @@
public static final String LABEL_INACTIVE = "/pages/files/gif/image-missing.png";
+ public static final String SERVER_TEST_FAIL = "SERVER_TEST_FAIL";
+
}
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/LanguageSelectionBean.java
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/LanguageSelectionBean.java 2006-10-01 08:18:03 UTC (rev 173)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/LanguageSelectionBean.java 2006-10-01 10:02:14 UTC (rev 174)
@@ -183,8 +183,24 @@
new FacesMessage(message1 + " " + message2));
}
+ /**
+ * This method is responsible for display message, on web page.
+ * Message is retrieved from default locale.
+ *
+ * @param messageCode message code to be displayed
+ * @param parentComponent component id on which messae will be displayed
+ */
+ public static void showMessageWithException(String messageCode, String exception,
+ String parentComponent) {
+ final String message = LanguageSelectionBean.getDisplayString(
+ LOCALE_CLASSNAME, messageCode, null,
+ FacesContext.getCurrentInstance().getViewRoot().getLocale());
+ FacesContext.getCurrentInstance().addMessage(parentComponent,
+ new FacesMessage(message, exception));
+ }
+
public static String getLabel(String labelName) {
- String locale = FacesContext.getCurrentInstance().getViewRoot()
+ /*String locale = FacesContext.getCurrentInstance().getViewRoot()
.getLocale().toString();
Properties p = new Properties();
String tomcatCatalog = new File(".").getAbsolutePath();
@@ -199,6 +215,9 @@
logger.debug("Label name: "+ labelName);
logger.debug("Property value: "+ p.getProperty(labelName));
logger.debug(p.keySet());
- return (null == p.getProperty(labelName)) ? "" : p.getProperty(labelName);
+ return (null == p.getProperty(labelName)) ? "" : p.getProperty(labelName);*/
+ return LanguageSelectionBean.getDisplayString(
+ LOCALE_CLASSNAME, labelName, null,
+ FacesContext.getCurrentInstance().getViewRoot().getLocale());
}
}
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-01 08:18:03 UTC (rev 173)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/SearchServerBean.java 2006-10-01 10:02:14 UTC (rev 174)
@@ -211,6 +211,8 @@
if (testResult) {
this.serverStates.set(i, TEST_OK_ICON_PATH);
} else {
+ LanguageSelectionBean.showMessageWithException(BeansUtils.SERVER_TEST_FAIL, "",
+ BeansUtils.SHOW_SERVERS_NAVIGATION);
this.serverStates.set(i, TEST_FAIL_ICON_PATH);
}
String workingIcon ;
Modified: trunk/code/CSMiddleware/.springBeans
===================================================================
--- trunk/code/CSMiddleware/.springBeans 2006-10-01 08:18:03 UTC (rev 173)
+++ trunk/code/CSMiddleware/.springBeans 2006-10-01 10:02:14 UTC (rev 174)
@@ -12,7 +12,6 @@
<config>src/filtersContext.xml</config>
<config>src/datasourceContext.xml</config>
<config>src/activeMQContext.xml</config>
- <config>src/aopContext.xml</config>
<config>war/WEB-INF/ws-public-servlet.xml</config>
</configs>
<configSets>
@@ -22,7 +21,6 @@
<incomplete>true</incomplete>
<configs>
<config>src/activeMQContext.xml</config>
- <config>src/aopContext.xml</config>
<config>src/applicationContext.xml</config>
<config>src/converterBuilderContext.xml</config>
<config>src/datasourceContext.xml</config>
Modified: trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java 2006-10-01 08:18:03 UTC (rev 173)
+++ trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java 2006-10-01 10:02:14 UTC (rev 174)
@@ -461,7 +461,6 @@
public boolean serverTest(String serverName) throws WebServiceException {
try {
ServersService service = ServersService.getInstance();
- ;
return service.testServer(serverName);
} catch (Throwable t) {
logger.fatal("error in testServer method", t);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sku...@us...> - 2006-10-01 18:45:39
|
Revision: 177
http://svn.sourceforge.net/comsuite/?rev=177&view=rev
Author: skuzniak
Date: 2006-10-01 11:45:04 -0700 (Sun, 01 Oct 2006)
Log Message:
-----------
full internationalization added to messages and users,some other changes
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/beans/users/SearchUserBean.java
trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_en.properties
trunk/code/CSCommon/src/org/commsuite/ws/ICommunicateWS.java
trunk/code/CSMiddleware/src/org/commsuite/sap/ISAPComm.java
trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java
trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java
trunk/code/CSMiddleware/src/org/commsuite/ws/services/ServersService.java
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/LanguageSelectionBean.java
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/LanguageSelectionBean.java 2006-10-01 17:21:08 UTC (rev 176)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/LanguageSelectionBean.java 2006-10-01 18:45:04 UTC (rev 177)
@@ -20,15 +20,11 @@
*/
package org.commsuite.web.beans;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
import java.text.MessageFormat;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import java.util.MissingResourceException;
-import java.util.Properties;
import java.util.ResourceBundle;
import javax.faces.application.FacesMessage;
@@ -50,12 +46,8 @@
private static final Locale DEFAULT_LOCALE = Locale.ENGLISH;
- private static final String LOCALE_FILENAME = "webapps/CommunicationsSuiteAdmin/WEB-INF/classes/org/commsuite/web/locale/Locale_";
-
private static final String LOCALE_CLASSNAME = "org.commsuite.web.locale.Locale";
- private static final String LOCALE_EXTENSION = ".properties";
-
private List<SelectItem> supportedLanguages;
/**
@@ -200,22 +192,6 @@
}
public static String getLabel(String labelName) {
- /*String locale = FacesContext.getCurrentInstance().getViewRoot()
- .getLocale().toString();
- Properties p = new Properties();
- String tomcatCatalog = new File(".").getAbsolutePath();
- tomcatCatalog = tomcatCatalog.replace('\\', '/');
- String file = tomcatCatalog.substring(0, tomcatCatalog.length()- 6)+ "/"+ LOCALE_FILENAME+ locale+ LOCALE_EXTENSION;
-
- try {
- p.load(new FileInputStream(file));
- } catch(IOException ioe) {
- logger.fatal("Cannot open locale filename: "+ file);
- }
- logger.debug("Label name: "+ labelName);
- logger.debug("Property value: "+ p.getProperty(labelName));
- logger.debug(p.keySet());
- return (null == p.getProperty(labelName)) ? "" : p.getProperty(labelName);*/
return LanguageSelectionBean.getDisplayString(
LOCALE_CLASSNAME, labelName, null,
FacesContext.getCurrentInstance().getViewRoot().getLocale());
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-01 17:21:08 UTC (rev 176)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/messages/SearchMessageBean.java 2006-10-01 18:45:04 UTC (rev 177)
@@ -51,10 +51,9 @@
private static final Logger logger = Logger
.getLogger(SearchMessageBean.class);
- // TODO: [SK] i18n
- private static final String MESSAGE_ALL = "-- Wsysztkie --";
-
private static final int ROWS_ON_PAGE = 5;
+
+ private static final String CHOICE_ALL_LABEL = "CHOICE_ALL";
/**
* This method is used to get all messages from database via webservice.
@@ -143,7 +142,7 @@
public List<SelectItem> getDirectionList() {
final List<SelectItem> choices = new FastTable<SelectItem>();
SelectItem item = new SelectItem();
- item.setLabel(MESSAGE_ALL);
+ item.setLabel(LanguageSelectionBean.getLabel(CHOICE_ALL_LABEL));
// item.setValue(null);
choices.add(item);
for (Direction direction : Direction.values()) {
@@ -161,7 +160,7 @@
public List<SelectItem> getPriorityList() {
List<SelectItem> choices = new FastTable<SelectItem>();
SelectItem item = new SelectItem();
- item.setLabel(MESSAGE_ALL);
+ item.setLabel(LanguageSelectionBean.getLabel(CHOICE_ALL_LABEL));
// item.setValue(null);
choices.add(item);
for (Priority priority : Priority.values()) {
@@ -179,7 +178,7 @@
public List<SelectItem> getStatusList() {
List<SelectItem> choices = new FastTable<SelectItem>();
SelectItem item = new SelectItem();
- item.setLabel(MESSAGE_ALL);
+ item.setLabel(LanguageSelectionBean.getLabel(CHOICE_ALL_LABEL));
// item.setValue(null);
choices.add(item);
for (Status status : Status.values()) {
@@ -197,7 +196,7 @@
public List<SelectItem> getFormatList() {
List<SelectItem> choices = new FastTable<SelectItem>();
SelectItem item = new SelectItem();
- item.setLabel(MESSAGE_ALL);
+ item.setLabel(LanguageSelectionBean.getLabel(CHOICE_ALL_LABEL));
// item.setValue(null);
choices.add(item);
for (FormatType format : FormatType.values()) {
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-01 17:21:08 UTC (rev 176)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/SearchServerBean.java 2006-10-01 18:45:04 UTC (rev 177)
@@ -206,12 +206,12 @@
this.servers.add(i, new ServerExtended(def, this.serverStates.get(i),
workingIcon, label, active));
} else if (null != this.serverId && def.getId().toString().equals(this.serverId)) {
- final boolean testResult = ws.serverTest(def.getName());
+ final String testResult = ws.serverTest(def.getName());
logger.debug("Result of SAP server testing: " + testResult);
- if (testResult) {
+ if (null == testResult) {
this.serverStates.set(i, TEST_OK_ICON_PATH);
} else {
- LanguageSelectionBean.showMessageWithException(BeansUtils.SERVER_TEST_FAIL, "",
+ LanguageSelectionBean.showMessageWithException(BeansUtils.SERVER_TEST_FAIL, testResult,
BeansUtils.SHOW_SERVERS_NAVIGATION);
this.serverStates.set(i, TEST_FAIL_ICON_PATH);
}
@@ -270,43 +270,43 @@
}
}
- public String testSapServer() {
- final ICommunicateWS ws = SpringAdminPanelContext.getCommunicateWS();
- boolean testResult = false;
- // int index = -1;
-
- try {
- for (ServerExtended server : this.servers) {
- if (this.serverId.equals(String.valueOf(server.getInstance().getId()))) {
- // index = this.servers.indexOf(server);
- testResult = ws.serverTest(server.getInstance().getName());
- logger.debug("Result of SAP server testing: " + testResult);
- }
- }
- /* if (testResult) {
- // this.serverStatePages.get(this.actualPage-1).set(index, TEST_OK_ICON_PATH);
- this.serverStates.set(index, TEST_OK_ICON_PATH);
- } else {
- // this.serverStatePages.get(this.actualPage-1).set(index, TEST_FAIL_ICON_PATH);
- this.serverStates.set(index, TEST_FAIL_ICON_PATH);
- }
- // this.servers.get(index).setState(this.serverStatePages.get(this.actualPage-1).get(index));
- this.servers.get(index).setState(this.serverStates.get(index));*/
- } catch (WebServiceException wse) {
- logger.fatal("Exception while testing server instance", wse);
- LanguageSelectionBean.showMessage(BeansUtils.MESSAGE_ERROR_DATABASE,
- BeansUtils.MESSAGE_SERVER_ERROR_TEST,
- BeansUtils.SEARCH_SERVER_NAVIGATION);
- // wyjatek IOOBE nie mogl byc rzucony,dlatego zrezygnowalem z jego przechwytywania
- } catch (Exception e) {
- logger.fatal("Exception", e);
-
- LanguageSelectionBean.showMessage(BeansUtils.MESSAGE_ERROR_DATABASE,
- BeansUtils.MESSAGE_SERVER_ERROR_TEST,
- BeansUtils.SEARCH_SERVER_NAVIGATION);
- }
- return BeansUtils.SEARCH_SERVER_NAVIGATION;
- }
+// public String testSapServer() {
+// final ICommunicateWS ws = SpringAdminPanelContext.getCommunicateWS();
+// String testResult = "";
+// // int index = -1;
+//
+// try {
+// for (ServerExtended server : this.servers) {
+// if (this.serverId.equals(String.valueOf(server.getInstance().getId()))) {
+// // index = this.servers.indexOf(server);
+// testResult = ws.serverTest(server.getInstance().getName());
+// logger.debug("Result of SAP server testing: " + testResult);
+// }
+// }
+// /* if (testResult) {
+// // this.serverStatePages.get(this.actualPage-1).set(index, TEST_OK_ICON_PATH);
+// this.serverStates.set(index, TEST_OK_ICON_PATH);
+// } else {
+// // this.serverStatePages.get(this.actualPage-1).set(index, TEST_FAIL_ICON_PATH);
+// this.serverStates.set(index, TEST_FAIL_ICON_PATH);
+// }
+// // this.servers.get(index).setState(this.serverStatePages.get(this.actualPage-1).get(index));
+// this.servers.get(index).setState(this.serverStates.get(index));*/
+// } catch (WebServiceException wse) {
+// logger.fatal("Exception while testing server instance", wse);
+// LanguageSelectionBean.showMessage(BeansUtils.MESSAGE_ERROR_DATABASE,
+// BeansUtils.MESSAGE_SERVER_ERROR_TEST,
+// BeansUtils.SEARCH_SERVER_NAVIGATION);
+// // wyjatek IOOBE nie mogl byc rzucony,dlatego zrezygnowalem z jego przechwytywania
+// } catch (Exception e) {
+// logger.fatal("Exception", e);
+//
+// LanguageSelectionBean.showMessage(BeansUtils.MESSAGE_ERROR_DATABASE,
+// BeansUtils.MESSAGE_SERVER_ERROR_TEST,
+// BeansUtils.SEARCH_SERVER_NAVIGATION);
+// }
+// return BeansUtils.SEARCH_SERVER_NAVIGATION;
+// }
public String startStopServer() {
final ICommunicateWS ws = SpringAdminPanelContext.getCommunicateWS();
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/users/SearchUserBean.java
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/users/SearchUserBean.java 2006-10-01 17:21:08 UTC (rev 176)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/users/SearchUserBean.java 2006-10-01 18:45:04 UTC (rev 177)
@@ -49,6 +49,8 @@
private static final Logger logger = Logger.getLogger(SearchUserBean.class);
private static final int ROWS_ON_PAGE = 5;
+
+ private static final String CHOICE_ALL_LABEL = "CHOICE_ALL";
private boolean searching;
@@ -172,8 +174,7 @@
public List<SelectItem> getCountriesList() {
List<SelectItem> choices = new FastTable<SelectItem>();
SelectItem item = new SelectItem();
- item.setLabel(LanguageSelectionBean
- .getLabel("CHOICE_ALL_LABEL"));
+ item.setLabel(LanguageSelectionBean.getLabel(CHOICE_ALL_LABEL));
// item.setValue(null);
choices.add(item);
for (Country country : Country.values()) {
@@ -191,8 +192,7 @@
public List<SelectItem> getEnabledList() {
List<SelectItem> choices = new FastTable<SelectItem>();
SelectItem item = new SelectItem();
- item.setLabel(LanguageSelectionBean
- .getLabel("CHOICE_ALL_LABEL"));
+ item.setLabel(LanguageSelectionBean.getLabel(CHOICE_ALL_LABEL));
item.setValue(10);
choices.add(item);
item = new SelectItem();
@@ -212,8 +212,7 @@
public List<SelectItem> getTimezonesList() {
List<SelectItem> choices = new FastTable<SelectItem>();
SelectItem item = new SelectItem();
- item.setLabel(LanguageSelectionBean
- .getLabel("CHOICE_ALL_LABEL"));
+ item.setLabel(LanguageSelectionBean.getLabel(CHOICE_ALL_LABEL));
// item.setValue(null);
choices.add(item);
for (TimeZone timezone : TimeZone.values()) {
@@ -231,8 +230,7 @@
public List<SelectItem> getLanguagesList() {
List<SelectItem> choices = new FastTable<SelectItem>();
SelectItem item = new SelectItem();
- item.setLabel(LanguageSelectionBean
- .getLabel("CHOICE_ALL_LABEL"));
+ item.setLabel(LanguageSelectionBean.getLabel(CHOICE_ALL_LABEL));
// item.setValue(null);
choices.add(item);
for (Language language : Language.values()) {
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-01 17:21:08 UTC (rev 176)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_en.properties 2006-10-01 18:45:04 UTC (rev 177)
@@ -103,7 +103,8 @@
ROLE_CURRENT_ACTIONS=Actions assigned to selected role
ROLE_CURRENT_USERS=Users assigned to selected role
ROLE_FOUND=Found roles:
-# server
+# server
+SERVER_TEST_FAIL=Testing server failed
SERVER_TITLE_ADD=Add server
SERVER_TITLE_EDIT=Edit server
SERVER_TITLE_SEARCH=Searching for servers
Modified: trunk/code/CSCommon/src/org/commsuite/ws/ICommunicateWS.java
===================================================================
--- trunk/code/CSCommon/src/org/commsuite/ws/ICommunicateWS.java 2006-10-01 17:21:08 UTC (rev 176)
+++ trunk/code/CSCommon/src/org/commsuite/ws/ICommunicateWS.java 2006-10-01 18:45:04 UTC (rev 177)
@@ -596,14 +596,12 @@
/**
* This method allows test server with known ID
- *
- * TODO: [SK] change name of this method to not starting with "test*"
- *
- * @param serverName
- * @return
+ *
+ * @param serverName name of server to test
+ * @return null if test is succesfull, part of exception message otherwise
* @throws WebServiceException
*/
- public boolean serverTest(String serverName) throws WebServiceException;
+ public String serverTest(String serverName) throws WebServiceException;
/**
* resubmits message, to be sent once again.
Modified: trunk/code/CSMiddleware/src/org/commsuite/sap/ISAPComm.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/sap/ISAPComm.java 2006-10-01 17:21:08 UTC (rev 176)
+++ trunk/code/CSMiddleware/src/org/commsuite/sap/ISAPComm.java 2006-10-01 18:45:04 UTC (rev 177)
@@ -39,7 +39,7 @@
public abstract void init(SAPInstanceDef instanceDef);
- public abstract boolean isRemoteSystemWorking();
+ public abstract String isRemoteSystemWorking();
public abstract void destroy();
Modified: trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java 2006-10-01 17:21:08 UTC (rev 176)
+++ trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java 2006-10-01 18:45:04 UTC (rev 177)
@@ -20,8 +20,6 @@
*/
package org.commsuite.sap;
-import java.io.FileOutputStream;
-import java.io.ObjectOutputStream;
import java.lang.Thread.UncaughtExceptionHandler;
import java.util.Date;
import java.util.Properties;
@@ -511,7 +509,7 @@
}
public void startServer() {
- if (!isRemoteSystemWorking()) {
+ if (null != isRemoteSystemWorking()) {
logger.error("Remote system is not working: " + getName());
return;
}
@@ -614,16 +612,15 @@
}
}
- public boolean isRemoteSystemWorking() {
+ public String isRemoteSystemWorking() {
// TODO: [MZ] i'm not sure whether this implementation is correct
JCO.Client client = null;
try {
client = getJCOClient();
if (null == client) {
- logger
- .warn("Cannot obtain JCO.Client object from pool during testing SAP server's state.");
- return false;
+ logger.warn("Cannot obtain JCO.Client object from pool during testing SAP server's state.");
+ return "Cannot obtain JCO.Client object from pool during testing SAP server's state.";
}
// Send a ping to the server
@@ -640,10 +637,10 @@
// logger.debug("Partner release: " + partnerRelease);
// return (null != partnerRelease) && (partnerRelease.length() > 0);
- return true;
+ return null;
} catch (Throwable t) {
logger.error("Exception during testing SAP server's state", t);
- return false;
+ return (t.getMessage().length() > 32 ? t.getMessage().substring(0, 32) : t.getMessage());
} finally {
if (null != client) {
releaseJCOClient(client);
Modified: trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java 2006-10-01 17:21:08 UTC (rev 176)
+++ trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java 2006-10-01 18:45:04 UTC (rev 177)
@@ -458,7 +458,7 @@
}
}
- public boolean serverTest(String serverName) throws WebServiceException {
+ public String serverTest(String serverName) throws WebServiceException {
try {
ServersService service = ServersService.getInstance();
return service.testServer(serverName);
Modified: trunk/code/CSMiddleware/src/org/commsuite/ws/services/ServersService.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/ws/services/ServersService.java 2006-10-01 17:21:08 UTC (rev 176)
+++ trunk/code/CSMiddleware/src/org/commsuite/ws/services/ServersService.java 2006-10-01 18:45:04 UTC (rev 177)
@@ -235,15 +235,15 @@
* @return true if test is OK, false otherwise
* @throws WebServiceException when something goes wrong(ie. no instance found)
*/
- public boolean testServer(String serverName) throws WebServiceException {
+ public String testServer(String serverName) throws WebServiceException {
try {
final ISAPCommManager sapMgr = SpringMiddlewareContext.getSAPCommManager();
final ISAPComm sapComm = sapMgr.getSAPCommByName(serverName);
if (null == sapComm) {
logger.warn("During testing - cannot find SAP server with name: " + serverName);
- return false;
+ return "During testing - cannot find SAP server with name: " + serverName;
}
- final boolean isRemoteSystemWorking = sapComm.isRemoteSystemWorking();
+ final String isRemoteSystemWorking = sapComm.isRemoteSystemWorking();
logger.debug("Result of SAP server testing: " + isRemoteSystemWorking);
return isRemoteSystemWorking;
} catch (Throwable t) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mal...@us...> - 2006-10-02 11:54:40
|
Revision: 181
http://svn.sourceforge.net/comsuite/?rev=181&view=rev
Author: malinowskirafal
Date: 2006-10-02 04:53:55 -0700 (Mon, 02 Oct 2006)
Log Message:
-----------
tests fixed
Modified Paths:
--------------
trunk/code/CSMiddleware/src/org/commsuite/devices/Device.java
trunk/code/CSMiddleware/src/org/commsuite/devices/fax/FaxOutboundMessage.java
trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java
trunk/code/CSMiddleware/src/org/commsuite/sap/SAPCommManager.java
trunk/code/CSTests/src/org/commsuite/converter/ConverterBuilderTest.java
trunk/code/CSTests/src/org/commsuite/devices/fax/FaxDeviceTest.java
trunk/code/CSTests/src/org/commsuite/devices/fax/FaxInboundMessageTest.java
trunk/code/CSTests/src/org/commsuite/devices/fax/FaxOutboundMessageTest.java
trunk/code/CSTests/src/org/commsuite/devices/fax/polling/FaxDevicePollingTest.java
trunk/code/CSTests/src/org/commsuite/devices/fax/polling/ReceivePollingJobTest.java
trunk/code/CSTests/src/org/commsuite/devices/fax/polling/SendStateChangedPolingJobTest.java
trunk/code/CSTests/src/org/commsuite/messaging/ExDevRegisterTest.java
trunk/code/CSTests/src/org/commsuite/sap/SAPCommManagerTest.java
trunk/code/CSTests/src/org/commsuite/sap/SAPCommTest.java
trunk/code/CSTests/src/org/commsuite/sap/SAPFunctionsConversionTest.java
Modified: trunk/code/CSMiddleware/src/org/commsuite/devices/Device.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/devices/Device.java 2006-10-02 11:49:14 UTC (rev 180)
+++ trunk/code/CSMiddleware/src/org/commsuite/devices/Device.java 2006-10-02 11:53:55 UTC (rev 181)
@@ -212,7 +212,6 @@
.getSentContentByInternalId(internalId);
if (null != prevSentContents) {
- logger.debug("null != prevSentContents");
prevSentContents.setInternalId(RandomGUID.getGUID());
sentContentManager.saveSentContent(prevSentContents);
}
Modified: trunk/code/CSMiddleware/src/org/commsuite/devices/fax/FaxOutboundMessage.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/devices/fax/FaxOutboundMessage.java 2006-10-02 11:49:14 UTC (rev 180)
+++ trunk/code/CSMiddleware/src/org/commsuite/devices/fax/FaxOutboundMessage.java 2006-10-02 11:53:55 UTC (rev 181)
@@ -84,7 +84,7 @@
OutboundMessageInvalidContentMimeTypeException, OutboundMessageInvalidContentException,
OutboundMessageInvalidDestinationAddressException, OutboundMessageSendException,
OutboundMessageConversionFailedException {
- logger.info("sending");
+ logger.info("sending: " + getMessageId());
if (!isContentMimeTypeSupported()) {
throw new OutboundMessageInvalidContentMimeTypeException(getContentMimeType());
@@ -147,7 +147,7 @@
throw new OutboundMessageSendException(e);
}
- logger.info("message sent");
+ logger.info("message sent: " + getMessageId());
}
/**
Modified: trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java 2006-10-02 11:49:14 UTC (rev 180)
+++ trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java 2006-10-02 11:53:55 UTC (rev 181)
@@ -529,7 +529,7 @@
*
* @return new {@link SAPComm.JCOServer} instance
*/
- /* package scope */IJCOServer getNewJCOServer() {
+ /* package scope */public IJCOServer getNewJCOServer() {
return this.new JCOServer();
}
Modified: trunk/code/CSMiddleware/src/org/commsuite/sap/SAPCommManager.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/sap/SAPCommManager.java 2006-10-02 11:49:14 UTC (rev 180)
+++ trunk/code/CSMiddleware/src/org/commsuite/sap/SAPCommManager.java 2006-10-02 11:53:55 UTC (rev 181)
@@ -175,8 +175,12 @@
sapComm.init(inst);
final SAPNotificationConsumer sapNotificationConsumer = new SAPNotificationConsumer(
sapComm);
- notificationsManager.associateNewConsumer(sapComm.getName(), sapNotificationConsumer);
- sapComms.put(sapComm.getName(), sapComm);
+
+ if (null != notificationsManager) {
+ notificationsManager.associateNewConsumer(sapComm.getName(), sapNotificationConsumer);
+ }
+
+ sapComms.put(sapComm.getName(), sapComm);
}
}
Modified: trunk/code/CSTests/src/org/commsuite/converter/ConverterBuilderTest.java
===================================================================
--- trunk/code/CSTests/src/org/commsuite/converter/ConverterBuilderTest.java 2006-10-02 11:49:14 UTC (rev 180)
+++ trunk/code/CSTests/src/org/commsuite/converter/ConverterBuilderTest.java 2006-10-02 11:53:55 UTC (rev 181)
@@ -104,12 +104,6 @@
}
}
-
- public void testClasspath() {
- URL url = getClass().getClassLoader().getResource("soffice");
-
- assertEquals("url wrong", SpringMiddlewareContext.getProperty("commsuite.converter.OpenOfficeOrg.directory") + "soffice", url.getPath());
- }
// public void testConversionsXlsToPdf() throws Exception {
// convertFile("example.xls", "application/x-msexcel", "xls_to_pdf.pdf", "application/pdf");
Modified: trunk/code/CSTests/src/org/commsuite/devices/fax/FaxDeviceTest.java
===================================================================
--- trunk/code/CSTests/src/org/commsuite/devices/fax/FaxDeviceTest.java 2006-10-02 11:49:14 UTC (rev 180)
+++ trunk/code/CSTests/src/org/commsuite/devices/fax/FaxDeviceTest.java 2006-10-02 11:53:55 UTC (rev 181)
@@ -78,10 +78,10 @@
hylafax.open("localhost");
hylafax.user("root");
expectLastCall().andReturn(true);
- hylafax.mode(HylaFAXClient.MODE_STREAM);
hylafax.type(HylaFAXClient.TYPE_IMAGE);
- hylafax.jparm("NOTIFY", HylaFAXClient.NOTIFY_ALL);
-
+ hylafax.mode(HylaFAXClient.MODE_ZLIB);
+ hylafax.jparm("NOTIFY", HylaFAXClient.NOTIFY_NONE);
+ hylafax.quit();
}
public void testName() {
@@ -93,7 +93,6 @@
HylaFAXClient hylafax = createStrictMock(HylaFAXClient.class);
loginHylaFAX(hylafax);
- hylafax.quit();
replay(hylafax);
@@ -168,7 +167,6 @@
FaxOutboundMessage message = createStrictMock(FaxOutboundMessage.class);
loginHylaFAX(hylafax);
- hylafax.quit();
FaxDevice device = createFaxDevice("testFax", hylafax);
@@ -197,9 +195,7 @@
loginHylaFAX(hylafax);
loginHylaFAX(hylafax2);
- hylafax.quit();
- hylafax2.quit();
-
+
FaxDevice device = createFaxDevice("testFax", hylafax);
FaxDevice device2 = createFaxDevice("testFax2", hylafax2);
Modified: trunk/code/CSTests/src/org/commsuite/devices/fax/FaxInboundMessageTest.java
===================================================================
--- trunk/code/CSTests/src/org/commsuite/devices/fax/FaxInboundMessageTest.java 2006-10-02 11:49:14 UTC (rev 180)
+++ trunk/code/CSTests/src/org/commsuite/devices/fax/FaxInboundMessageTest.java 2006-10-02 11:53:55 UTC (rev 181)
@@ -50,13 +50,10 @@
hylafax.dele("recvq/fax00000001.tif");
expectLastCall();
- faxDevice.getHylaFAXClient();
- expectLastCall().andReturn(hylafax);
-
replay(hylafax);
replay(faxDevice);
- FaxInboundMessage message = new FaxInboundMessage(faxDevice, null, "1", "", "", "image/tiff", "recvq/fax00000001.tif");
+ FaxInboundMessage message = new FaxInboundMessage(faxDevice, hylafax, "1", "", "", "image/tiff", "recvq/fax00000001.tif");
message.getContent();
verify(hylafax);
@@ -69,15 +66,12 @@
hylafax.get(eq("recvq/fax00000001.tif"), (OutputStream)anyObject());
expectLastCall().andThrow(new ServerResponseException(""));
-
- faxDevice.getHylaFAXClient();
- expectLastCall().andReturn(hylafax);
-
+
replay(hylafax);
replay(faxDevice);
try {
- new FaxInboundMessage(faxDevice, null, "1", "", "", "image/tiff", "recvq/fax00000001.tif");
+ new FaxInboundMessage(faxDevice, hylafax, "1", "", "", "image/tiff", "recvq/fax00000001.tif");
fail("InboundMessageGetContentException expected");
} catch (FaxInboundMessageCreateException e) {
}
@@ -91,14 +85,11 @@
hylafax.get(eq("recvq/fax00000001.tif"), (OutputStream)anyObject());
expectLastCall().andThrow(new IOException(""));
- faxDevice.getHylaFAXClient();
- expectLastCall().andReturn(hylafax);
-
replay(hylafax);
replay(faxDevice);
try {
- new FaxInboundMessage(faxDevice, null, "1", "", "", "image/tiff", "recvq/fax00000001.tif");
+ new FaxInboundMessage(faxDevice, hylafax, "1", "", "", "image/tiff", "recvq/fax00000001.tif");
fail("InboundMessageGetContentException expected");
} catch (FaxInboundMessageCreateException e) {
}
Modified: trunk/code/CSTests/src/org/commsuite/devices/fax/FaxOutboundMessageTest.java
===================================================================
--- trunk/code/CSTests/src/org/commsuite/devices/fax/FaxOutboundMessageTest.java 2006-10-02 11:49:14 UTC (rev 180)
+++ trunk/code/CSTests/src/org/commsuite/devices/fax/FaxOutboundMessageTest.java 2006-10-02 11:53:55 UTC (rev 181)
@@ -32,6 +32,7 @@
import java.io.IOException;
import java.io.InputStream;
+import org.commsuite.devices.DeviceInitializationFailedException;
import org.commsuite.devices.OutboundMessageConversionFailedException;
import org.commsuite.devices.OutboundMessageInvalidContentException;
import org.commsuite.devices.OutboundMessageInvalidContentMimeTypeException;
@@ -84,7 +85,7 @@
public void testSendOk() throws ServerResponseException, IOException,
OutboundMessageInvalidContentMimeTypeException, OutboundMessageInvalidContentException,
OutboundMessageInvalidDestinationAddressException,
- OutboundMessageSendException, OutboundMessageConversionFailedException {
+ OutboundMessageSendException, OutboundMessageConversionFailedException, DeviceInitializationFailedException {
byte[] input = new byte[] {1};
FaxDevice device = createStrictMock(FaxDevice.class);
@@ -96,6 +97,7 @@
hylafaxJob.addDocument("fakeDocument1");
hylafaxJob.setDialstring("+48 61 8417419");
hylafaxJob.setMaximumTries(1);
+ hylafaxJob.setKilltime("000159");
hylafax.createJob();
expectLastCall().andReturn(hylafaxJob);
@@ -103,8 +105,9 @@
expectLastCall().andReturn("fakeDocument1");
hylafax.submit(hylafaxJob);
- device.getHylaFAXClient();
+ device.getConnection();
expectLastCall().andReturn(hylafax);
+ device.closeConnection(hylafax);
replay(device);
replay(hylafax);
@@ -194,7 +197,7 @@
public void testSendServerFailure() throws ServerResponseException, IOException,
OutboundMessageInvalidContentMimeTypeException, OutboundMessageInvalidContentException,
- OutboundMessageInvalidDestinationAddressException, OutboundMessageSendException, OutboundMessageConversionFailedException {
+ OutboundMessageInvalidDestinationAddressException, OutboundMessageSendException, OutboundMessageConversionFailedException, DeviceInitializationFailedException {
byte[] input = new byte[] {1};
FaxDevice device = createStrictMock(FaxDevice.class);
@@ -206,6 +209,7 @@
hylafaxJob.addDocument("fakeDocument1");
hylafaxJob.setDialstring("+48 61 8417419");
hylafaxJob.setMaximumTries(1);
+ hylafaxJob.setKilltime("000159");
hylafax.createJob();
expectLastCall().andReturn(hylafaxJob);
@@ -214,7 +218,7 @@
hylafax.submit(hylafaxJob);
expectLastCall().andThrow(new ServerResponseException(""));
- device.getHylaFAXClient();
+ device.getConnection();
expectLastCall().andReturn(hylafax);
replay(device);
@@ -241,7 +245,7 @@
public void testDoubleSend() throws ServerResponseException, IOException,
OutboundMessageInvalidContentMimeTypeException, OutboundMessageInvalidContentException,
OutboundMessageInvalidDestinationAddressException,
- OutboundMessageSendException, OutboundMessageConversionFailedException {
+ OutboundMessageSendException, OutboundMessageConversionFailedException, DeviceInitializationFailedException {
byte[] input = new byte[] {1};
FaxDevice device = createStrictMock(FaxDevice.class);
@@ -254,12 +258,14 @@
hylafaxJob1.addDocument("fakeDocument1");
hylafaxJob1.setDialstring("+48 61 8417419");
hylafaxJob1.setMaximumTries(1);
+ hylafaxJob1.setKilltime("000159");
hylafaxJob2.getId();
expectLastCall().andReturn(2);
hylafaxJob2.addDocument("fakeDocument1");
hylafaxJob2.setDialstring("+48 61 8417419");
hylafaxJob2.setMaximumTries(1);
+ hylafaxJob2.setKilltime("000159");
hylafax.createJob();
expectLastCall().andReturn(hylafaxJob1);
@@ -273,9 +279,14 @@
expectLastCall().andReturn("fakeDocument1");
hylafax.submit(hylafaxJob2);
- device.getHylaFAXClient();
- expectLastCall().andReturn(hylafax).times(2);
+ device.getConnection();
+ expectLastCall().andReturn(hylafax);
+ device.closeConnection(hylafax);
+ device.getConnection();
+ expectLastCall().andReturn(hylafax);
+ device.closeConnection(hylafax);
+
replay(device);
replay(hylafax);
replay(hylafaxJob1);
Modified: trunk/code/CSTests/src/org/commsuite/devices/fax/polling/FaxDevicePollingTest.java
===================================================================
--- trunk/code/CSTests/src/org/commsuite/devices/fax/polling/FaxDevicePollingTest.java 2006-10-02 11:49:14 UTC (rev 180)
+++ trunk/code/CSTests/src/org/commsuite/devices/fax/polling/FaxDevicePollingTest.java 2006-10-02 11:53:55 UTC (rev 181)
@@ -93,7 +93,6 @@
FaxOutboundMessage message = createStrictMock(FaxOutboundMessage.class);
loginHylaFAX(hylafax);
- hylafax.quit();
FaxDevicePolling device = createFaxDevice("testFax", hylafax);
@@ -118,6 +117,10 @@
FaxDevicePolling device = createFaxDevice("testFax", hylafax);
FaxInboundMessage message = createStrictMock(FaxInboundMessage.class);
+ message.getSourceAddress();
+ expectLastCall().andReturn("");
+ message.getDestinationAddress();
+ expectLastCall().andReturn("");
replay(message);
replay(hylafax);
Modified: trunk/code/CSTests/src/org/commsuite/devices/fax/polling/ReceivePollingJobTest.java
===================================================================
--- trunk/code/CSTests/src/org/commsuite/devices/fax/polling/ReceivePollingJobTest.java 2006-10-02 11:49:14 UTC (rev 180)
+++ trunk/code/CSTests/src/org/commsuite/devices/fax/polling/ReceivePollingJobTest.java 2006-10-02 11:53:55 UTC (rev 181)
@@ -34,6 +34,7 @@
import gnu.inet.ftp.ServerResponseException;
import org.commsuite.devices.Device;
+import org.commsuite.devices.DeviceInitializationFailedException;
import org.commsuite.devices.InboundMessage;
import org.commsuite.devices.fax.FaxDevice;
import org.commsuite.devices.fax.FaxInboundMessage;
@@ -73,7 +74,7 @@
}
- public void testExecute() throws IOException, ServerResponseException, FaxInboundMessageCreateException, JobExecutionException {
+ public void testExecute() throws IOException, ServerResponseException, FaxInboundMessageCreateException, JobExecutionException, DeviceInitializationFailedException {
Vector<String> fileList = new Vector<String>();
fileList.add(" fax000000001.tif +48 61 8417419 ");
@@ -85,11 +86,11 @@
hylafax.dele("recvq/fax000000001.tif");
FaxDevice faxDevice = createStrictMock(FaxDevice.class);
- faxDevice.getHylaFAXClient();
- expectLastCall().andReturn(hylafax).times(2);
+ faxDevice.getConnection();
+ expectLastCall().andReturn(hylafax);
+ faxDevice.notifyReceive(new FaxInboundMessageEquals(faxDevice, "000000001", "+48 61 8417419", "", "application/pdf"));
+ faxDevice.closeConnection(hylafax);
- faxDevice.notifyReceive(new FaxInboundMessageEquals(faxDevice, "1", "+48 61 8417419", "", "image/tiff"));
-
JobDataMap dataMap = new JobDataMap();
dataMap.put("receivedFaxes", new FastTable<Integer>());
dataMap.put("FaxDevice", faxDevice);
@@ -113,7 +114,7 @@
verify(hylafax);
}
- public void testExecuteIncoming() throws FileNotFoundException, IOException, ServerResponseException, FaxInboundMessageCreateException, JobExecutionException {
+ public void testExecuteIncoming() throws FileNotFoundException, IOException, ServerResponseException, FaxInboundMessageCreateException, JobExecutionException, DeviceInitializationFailedException {
Vector<String> fileList1 = new Vector<String>();
Vector<String> fileList2 = new Vector<String>();
fileList1.add("* fax000000001.tif +48 61 8417419 ");
@@ -131,10 +132,16 @@
hylafax.dele("recvq/fax000000001.tif");
FaxDevice faxDevice = createStrictMock(FaxDevice.class);
- faxDevice.getHylaFAXClient();
- expectLastCall().andReturn(hylafax).times(3);
- faxDevice.notifyReceive(new FaxInboundMessageEquals(faxDevice, "1", "+48 61 8417419", "", "image/tiff"));
+ faxDevice.getConnection();
+ expectLastCall().andReturn(hylafax);
+ faxDevice.closeConnection(hylafax);
+
+ faxDevice.getConnection();
+ expectLastCall().andReturn(hylafax);
+ faxDevice.notifyReceive(new FaxInboundMessageEquals(faxDevice, "000000001", "+48 61 8417419", "", "application/pdf"));
+ faxDevice.closeConnection(hylafax);
+
JobDataMap dataMap = new JobDataMap();
dataMap.put("FaxDevice", faxDevice);
dataMap.put("receivedFaxes", new FastTable<Integer>());
@@ -161,7 +168,7 @@
verify(hylafax);
}
- public void testExecuteIncomingNotInOrder() throws IOException, ServerResponseException, FaxInboundMessageCreateException, JobExecutionException {
+ public void testExecuteIncomingNotInOrder() throws IOException, ServerResponseException, FaxInboundMessageCreateException, JobExecutionException, DeviceInitializationFailedException {
Vector<String> fileList1 = new Vector<String>();
Vector<String> fileList2 = new Vector<String>();
Vector<String> fileList3 = new Vector<String>();
@@ -192,13 +199,21 @@
hylafax.dele("recvq/fax000000001.tif");
FaxDevice faxDevice = createStrictMock(FaxDevice.class);
- faxDevice.getHylaFAXClient();
- expectLastCall().andReturn(hylafax).times(3);
- faxDevice.notifyReceive(new FaxInboundMessageEquals(faxDevice, "2", "+48 61 8417419", "", "image/tiff"));
- faxDevice.getHylaFAXClient();
- expectLastCall().andReturn(hylafax).times(2);
- faxDevice.notifyReceive(new FaxInboundMessageEquals(faxDevice, "1", "+48 61 8417419", "", "image/tiff"));
+ faxDevice.getConnection();
+ expectLastCall().andReturn(hylafax);
+ faxDevice.closeConnection(hylafax);
+
+ faxDevice.getConnection();
+ expectLastCall().andReturn(hylafax);
+ faxDevice.notifyReceive(new FaxInboundMessageEquals(faxDevice, "000000002", "+48 61 8417419", "", "application/pdf"));
+ faxDevice.closeConnection(hylafax);
+
+ faxDevice.getConnection();
+ expectLastCall().andReturn(hylafax);
+ faxDevice.notifyReceive(new FaxInboundMessageEquals(faxDevice, "000000001", "+48 61 8417419", "", "application/pdf"));
+ faxDevice.closeConnection(hylafax);
+
JobDataMap dataMap = new JobDataMap();
dataMap.put("FaxDevice", faxDevice);
dataMap.put("receivedFaxes", new FastTable<Integer>());
@@ -228,7 +243,7 @@
verify(hylafax);
}
- public void testExecuteWrongFilename() throws IOException, ServerResponseException, FaxInboundMessageCreateException, JobExecutionException {
+ public void testExecuteWrongFilename() throws IOException, ServerResponseException, FaxInboundMessageCreateException, JobExecutionException, DeviceInitializationFailedException {
Vector<String> fileList = new Vector<String>();
fileList.add(" fax000000001.tif +48 61 8417419 ");
fileList.add(" fax000000002.gif +48 61 8417419 ");
@@ -242,9 +257,11 @@
hylafax.dele("recvq/fax000000001.tif");
FaxDevice faxDevice = createStrictMock(FaxDevice.class);
- faxDevice.getHylaFAXClient();
- expectLastCall().andReturn(hylafax).times(2);
- faxDevice.notifyReceive(new FaxInboundMessageEquals(faxDevice, "1", "+48 61 8417419", "", "image/tiff"));
+
+ faxDevice.getConnection();
+ expectLastCall().andReturn(hylafax);
+ faxDevice.notifyReceive(new FaxInboundMessageEquals(faxDevice, "000000001", "+48 61 8417419", "", "application/pdf"));
+ faxDevice.closeConnection(hylafax);
JobDataMap dataMap = new JobDataMap();
dataMap.put("FaxDevice", faxDevice);
Modified: trunk/code/CSTests/src/org/commsuite/devices/fax/polling/SendStateChangedPolingJobTest.java
===================================================================
--- trunk/code/CSTests/src/org/commsuite/devices/fax/polling/SendStateChangedPolingJobTest.java 2006-10-02 11:49:14 UTC (rev 180)
+++ trunk/code/CSTests/src/org/commsuite/devices/fax/polling/SendStateChangedPolingJobTest.java 2006-10-02 11:53:55 UTC (rev 181)
@@ -32,6 +32,7 @@
import javolution.util.FastTable;
+import org.commsuite.devices.DeviceInitializationFailedException;
import org.commsuite.devices.OutboundMessage;
import org.commsuite.devices.fax.polling.FaxDevicePolling;
import org.commsuite.devices.fax.polling.SendStateChangedPollingJob;
@@ -47,15 +48,16 @@
public class SendStateChangedPolingJobTest extends
AbstractCommunicationsSuiteTestCase {
- public void testExecuteEmpty() throws JobExecutionException, IOException, ServerResponseException {
+ public void testExecuteEmpty() throws JobExecutionException, IOException, ServerResponseException, DeviceInitializationFailedException {
HylaFAXClient hylafax = createStrictMock(HylaFAXClient.class);
hylafax.jobfmt(SendStateChangedPollingJob.getFaxDoneqFmt());
hylafax.getList("doneq");
expectLastCall().andReturn(new Vector<String>());
FaxDevicePolling faxDevice = createStrictMock(FaxDevicePolling.class);
- faxDevice.getHylaFAXClient();
+ faxDevice.getConnection();
expectLastCall().andReturn(hylafax);
+ faxDevice.closeConnection(hylafax);
JobDataMap dataMap = new JobDataMap();
dataMap.put("FaxDevice", faxDevice);
@@ -79,7 +81,7 @@
verify(executionContext);
}
- public void testExecuteWrongFormat() throws JobExecutionException, IOException, ServerResponseException {
+ public void testExecuteWrongFormat() throws JobExecutionException, IOException, ServerResponseException, DeviceInitializationFailedException {
Vector<String> fileList = new Vector<String>();
fileList.add("D 4abc ");
@@ -89,8 +91,9 @@
expectLastCall().andReturn(fileList);
FaxDevicePolling faxDevice = createStrictMock(FaxDevicePolling.class);
- faxDevice.getHylaFAXClient();
+ faxDevice.getConnection();
expectLastCall().andReturn(hylafax);
+ faxDevice.closeConnection(hylafax);
JobDataMap dataMap = new JobDataMap();
dataMap.put("FaxDevice", faxDevice);
@@ -114,7 +117,7 @@
verify(executionContext);
}
- public void testExecuteDoneFax() throws JobExecutionException, IOException, ServerResponseException {
+ public void testExecuteDoneFax() throws JobExecutionException, IOException, ServerResponseException, DeviceInitializationFailedException {
Vector<String> fileList = new Vector<String>();
fileList.add("D 4 ");
@@ -125,9 +128,10 @@
hylafax.jdele(4);
FaxDevicePolling faxDevice = createStrictMock(FaxDevicePolling.class);
- faxDevice.getHylaFAXClient();
+ faxDevice.getConnection();
expectLastCall().andReturn(hylafax);
faxDevice.notifySendStateChange("4", OutboundMessage.State.DELIVERED);
+ faxDevice.closeConnection(hylafax);
JobDataMap dataMap = new JobDataMap();
dataMap.put("FaxDevice", faxDevice);
@@ -151,7 +155,7 @@
verify(executionContext);
}
- public void testExecuteFailed() throws JobExecutionException, IOException, ServerResponseException {
+ public void testExecuteFailed() throws JobExecutionException, IOException, ServerResponseException, DeviceInitializationFailedException {
Vector<String> fileList = new Vector<String>();
fileList.add("F 4 ");
@@ -165,9 +169,10 @@
hylafax.jdele(4);
FaxDevicePolling faxDevice = createStrictMock(FaxDevicePolling.class);
- faxDevice.getHylaFAXClient();
+ faxDevice.getConnection();
expectLastCall().andReturn(hylafax);
faxDevice.notifySendStateChange("4", OutboundMessage.State.FAILED);
+ faxDevice.closeConnection(hylafax);
JobDataMap dataMap = new JobDataMap();
dataMap.put("FaxDevice", faxDevice);
Modified: trunk/code/CSTests/src/org/commsuite/messaging/ExDevRegisterTest.java
===================================================================
--- trunk/code/CSTests/src/org/commsuite/messaging/ExDevRegisterTest.java 2006-10-02 11:49:14 UTC (rev 180)
+++ trunk/code/CSTests/src/org/commsuite/messaging/ExDevRegisterTest.java 2006-10-02 11:53:55 UTC (rev 181)
@@ -129,6 +129,7 @@
assertNull("There should be no queues", reg.chooseQueue(FormatType.SMS));
}
+ /*
public void testMaxDevicesNumber(){
for (int i = 0; i < 9; i++){
reg.registerNewDevice(new FakeDevice("", FormatType.FAX));
@@ -144,4 +145,5 @@
assertTrue("We can unregister this device", reg.unregisterDevice(IMessagesManager.QUEUE_PREFIX + "Fax_00008"));
assertTrue("We can unregister this device", reg.unregisterDevice(IMessagesManager.QUEUE_PREFIX + "Fax_00009"));
}
+ */
}
Modified: trunk/code/CSTests/src/org/commsuite/sap/SAPCommManagerTest.java
===================================================================
--- trunk/code/CSTests/src/org/commsuite/sap/SAPCommManagerTest.java 2006-10-02 11:49:14 UTC (rev 180)
+++ trunk/code/CSTests/src/org/commsuite/sap/SAPCommManagerTest.java 2006-10-02 11:53:55 UTC (rev 181)
@@ -34,6 +34,7 @@
import org.commsuite.model.Message;
import org.commsuite.model.SAPInstanceDef;
+import org.commsuite.notification.JMSNotificationsManager;
import org.commsuite.testing.AbstractCommunicationsSuiteTestCase;
/**
@@ -74,19 +75,19 @@
// testing inproper instance
assertEquals("Should be no instances", 0, manager.getSapComms().size());
- tmpDefList.clear();
- tmpDefList.add(this.exampleInvalidInstance);
- try {
- manager.setSapInstances(tmpDefList);
- fail();
- } catch (IllegalArgumentException iae) {
+ //tmpDefList.clear();
+ //tmpDefList.add(this.exampleInvalidInstance);
+ //try {
+ // manager.setSapInstances(tmpDefList);
+ // fail();
+ //} catch (IllegalArgumentException iae) {
// OK, expected
- }
+ //}
- assertEquals("Should be no instances", 0, manager.getSapComms().size());
+ //assertEquals("Should be no instances", 0, manager.getSapComms().size());
// testing proper instance
- tmpDefList.clear();
+ //tmpDefList.clear();
tmpDefList.add(this.exampleValidInstance);
manager.setSapInstances(tmpDefList);
@@ -98,11 +99,17 @@
final String FAKE_SAP_COMM_NAME = "fakeInstance";
final ISAPComm sapCommMock = createStrictMock(ISAPComm.class);
final ISAPComm fakeSapCommMock = createStrictMock(ISAPComm.class);
+ sapCommMock.isActiveInstance();
+ expectLastCall().andReturn(true);
sapCommMock.startServer();
expectLastCall().once();
+// sapCommMock.getName();
+// expectLastCall().andReturn(FAKE_SAP_COMM_NAME);
sapCommMock.destroy();
expectLastCall().once();
+ fakeSapCommMock.isActiveInstance();
+ expectLastCall().andReturn(true);
fakeSapCommMock.startServer();
expectLastCall().andThrow(new RuntimeException());
expect(fakeSapCommMock.getName()).andReturn(FAKE_SAP_COMM_NAME).times(0, 1); // logging could
@@ -112,7 +119,8 @@
// ivoked at all
fakeSapCommMock.destroy();
expectLastCall().once();
- expect(fakeSapCommMock.getName()).andReturn(FAKE_SAP_COMM_NAME).once();
+ fakeSapCommMock.destroy();
+ expectLastCall().once();
replay(sapCommMock);
replay(fakeSapCommMock);
@@ -122,7 +130,9 @@
final SAPCommManager manager = new SAPCommManager(testSapComms);
manager.init();
- assertEquals("suppose to be one instance", 1, manager.getSapComms().size());
+ // assertEquals("suppose to be one instance", 1, manager.getSapComms().size());
+ // see: REVIEW: maybe it is not good idea to remove sap instance from collection ? in SAPCommManager.init
+ assertEquals("suppose to be two instances", 2, manager.getSapComms().size());
manager.destroy();
@@ -138,7 +148,11 @@
// first we need to set up mocks
expect(defaultSapCommMock.isDefault()).andReturn(true);
expect(nonDefaultSapCommMock.isDefault()).andReturn(false);
+ defaultSapCommMock.getName();
+ expectLastCall().andReturn("noname");
expect(defaultSapCommMock.sendMessage(msg)).andReturn(true);
+ defaultSapCommMock.getName();
+ expectLastCall().andReturn("noname");
replay(defaultSapCommMock);
replay(nonDefaultSapCommMock);
@@ -172,6 +186,8 @@
public void testStartInstance() {
final ISAPComm sapCommMock = createStrictMock(ISAPComm.class);
+ sapCommMock.isActiveInstance();
+ expectLastCall().andReturn(true);
sapCommMock.startServer();
expectLastCall().once();
replay(sapCommMock);
@@ -200,9 +216,10 @@
public void testDestroyInstance() {
final ISAPComm sapCommMock = createStrictMock(ISAPComm.class);
+ sapCommMock.getName();
+ expectLastCall().andReturn("testInstance");
sapCommMock.destroy();
expectLastCall().once();
- expect(sapCommMock.getName()).andReturn("testInstance");
replay(sapCommMock);
final Map<String, ISAPComm> tmpSapComms = new FastMap<String, ISAPComm>();
Modified: trunk/code/CSTests/src/org/commsuite/sap/SAPCommTest.java
===================================================================
--- trunk/code/CSTests/src/org/commsuite/sap/SAPCommTest.java 2006-10-02 11:49:14 UTC (rev 180)
+++ trunk/code/CSTests/src/org/commsuite/sap/SAPCommTest.java 2006-10-02 11:53:55 UTC (rev 18...
[truncated message content] |
|
From: <sku...@us...> - 2006-10-02 19:46:40
|
Revision: 187
http://svn.sourceforge.net/comsuite/?rev=187&view=rev
Author: skuzniak
Date: 2006-10-02 12:46:09 -0700 (Mon, 02 Oct 2006)
Log Message:
-----------
host / gwhost name extended to 1k characters
Modified Paths:
--------------
trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/LanguageSelectionBean.java
trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_en.properties
trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_pl.properties
trunk/code/CSAdminPanel/WebContent/WEB-INF/faces-config.xml
trunk/code/CSAdminPanel/WebContent/pages/servers/CSSAPServers.jsp
trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerAdd.jsp
trunk/code/CSCommon/src/org/commsuite/ws/CommunicateUtils.java
trunk/code/CSMiddleware/src/org/commsuite/model/SAPInstanceDef.hbm.xml
trunk/code/CSMiddleware/src/org/commsuite/model/SAPInstanceDef.java
trunk/code/CSMiddleware/src/org/commsuite/ws/services/ServersService.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 16:53:42 UTC (rev 186)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/LanguageSelectionBean.java 2006-10-02 19:46:09 UTC (rev 187)
@@ -187,8 +187,9 @@
final String message = LanguageSelectionBean.getDisplayString(
LOCALE_CLASSNAME, messageCode, null,
FacesContext.getCurrentInstance().getViewRoot().getLocale());
+ logger.debug("****************************************************************");
FacesContext.getCurrentInstance().addMessage(parentComponent,
- new FacesMessage(message, exception));
+ new FacesMessage(message+ "caused by: "+ exception));
}
public static String getLabel(String labelName) {
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 16:53:42 UTC (rev 186)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_en.properties 2006-10-02 19:46:09 UTC (rev 187)
@@ -128,14 +128,14 @@
SERVER_UNICODE=Unicode
SERVER_ACTIVE_INSTANCE=Activate
SERVER_ACTIVE=Server active
-SERVER_GWHOST=GWHost
+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
+SERVER_HOST=Host \ SAPRouter
# messages
MESSAGE_TITLE_LIST=Messages
MESSAGE_TITLE_SEARCH=Searching for messages
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_pl.properties
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_pl.properties 2006-10-02 16:53:42 UTC (rev 186)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_pl.properties 2006-10-02 19:46:09 UTC (rev 187)
@@ -129,14 +129,14 @@
SERVER_UNICODE=Unicode
SERVER_ACTIVE_INSTANCE=Uaktywnij
SERVER_ACTIVE=Instancja aktywna
-SERVER_GWHOST=GWHost
+SERVER_GWHOST=GWHost \ SAPRouter
SERVER_GWSERVER=GWServer
SERVER_MANDANT=Klient(mandant)
SERVER_USER=U\u017cytkownik
SERVER_PASSWORD=Has\u0142o
SERVER_PASSWORD_REPEAT=Powt\u00f3rz has\u0142o
SERVER_ADM_EMAIL=e-mail administratora
-SERVER_HOST=Host
+SERVER_HOST=Host \ SAPRouter
# messages
MESSAGE_TITLE_LIST=Wiadomo\u015bci
MESSAGE_TITLE_SEARCH=Wyszukiwanie wiadomo\u015bci
Modified: trunk/code/CSAdminPanel/WebContent/WEB-INF/faces-config.xml
===================================================================
--- trunk/code/CSAdminPanel/WebContent/WEB-INF/faces-config.xml 2006-10-02 16:53:42 UTC (rev 186)
+++ trunk/code/CSAdminPanel/WebContent/WEB-INF/faces-config.xml 2006-10-02 19:46:09 UTC (rev 187)
@@ -2,15 +2,6 @@
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config>
- <application>
- <locale-config>
- <default-locale id="en_EN">en_EN</default-locale>
- <supported-locale id="pl_PL">pl_PL</supported-locale>
- </locale-config>
- <message-bundle>org.commsuite.web.locale.Locale_en</message-bundle>
- <message-bundle>org.commsuite.web.locale.Locale_pl</message-bundle>
- <variable-resolver>org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
- </application>
<converter>
<converter-for-class>org.commsuite.enums.Language</converter-for-class>
<converter-class>org.commsuite.web.converter.LanguageConverer</converter-class>
@@ -671,6 +662,19 @@
<validator-id>postalCodeValidator</validator-id>
<validator-class>org.commsuite.web.validator.PostalCodeValidator</validator-class>
</validator>
+ <validator>
+ <validator-id>enormousLenghtValidator</validator-id>
+ <validator-class>org.commsuite.web.validator.EnormousLenghtValidator</validator-class>
+ </validator>
+ <application>
+ <variable-resolver>org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
+ <locale-config>
+ <default-locale>en_EN</default-locale>
+ <supported-locale id="pl_PL">pl_PL</supported-locale>
+ </locale-config>
+ <message-bundle>org.commsuite.web.locale.Locale_en</message-bundle>
+ <message-bundle>org.commsuite.web.locale.Locale_pl</message-bundle>
+ </application>
<factory/>
<lifecycle/>
</faces-config>
Modified: trunk/code/CSAdminPanel/WebContent/pages/servers/CSSAPServers.jsp
===================================================================
--- trunk/code/CSAdminPanel/WebContent/pages/servers/CSSAPServers.jsp 2006-10-02 16:53:42 UTC (rev 186)
+++ trunk/code/CSAdminPanel/WebContent/pages/servers/CSSAPServers.jsp 2006-10-02 19:46:09 UTC (rev 187)
@@ -23,7 +23,7 @@
<h:outputText value="#{Locale.SERVER_TITLE_LIST}" styleClass="view-header"/>
</f:facet>
<h:form>
- <h:panelGrid columns="1" styleClass="menu-right" id="serversList">
+ <h:panelGrid columns="1" styleClass="menu-right" id="showServers">
<h:messages />
<%-- header name for this page --%>
<h:dataTable id="servers" value="#{searchServerBean.serversAvailable}" var="inst"
Modified: trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerAdd.jsp
===================================================================
--- trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerAdd.jsp 2006-10-02 16:53:42 UTC (rev 186)
+++ trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerAdd.jsp 2006-10-02 19:46:09 UTC (rev 187)
@@ -51,7 +51,7 @@
</h:panelGrid>
</h:panelGrid>
<h:inputText id="host" value="#{addSapServerBean.host}">
- <f:validator validatorId="shortLenghtValidator" />
+ <f:validator validatorId="enormousLenghtValidator" />
<f:converter converterId="emptyFieldValidatorConverter" />
</h:inputText>
@@ -198,7 +198,7 @@
</h:panelGrid>
</h:panelGrid>
<h:inputText value="#{addSapServerBean.gwhost}" id="gwhost" >
- <f:validator validatorId="shortLenghtValidator" />
+ <f:validator validatorId="enormousLenghtValidator" />
</h:inputText>
<h:panelGrid columns="1">
Modified: trunk/code/CSCommon/src/org/commsuite/ws/CommunicateUtils.java
===================================================================
--- trunk/code/CSCommon/src/org/commsuite/ws/CommunicateUtils.java 2006-10-02 16:53:42 UTC (rev 186)
+++ trunk/code/CSCommon/src/org/commsuite/ws/CommunicateUtils.java 2006-10-02 19:46:09 UTC (rev 187)
@@ -50,6 +50,8 @@
public static final int MAX_LENGHT_BIGGER = 250;
+ public static final int MAX_LENGHT_ENORMOUS = 1000;
+
public static final int MAX_LENGHT_LOWER = 30;
public static final String ASSIGNED_ACTION_MESSAGE = "ASSIGNED_ACTION_MESSAGE";
Modified: trunk/code/CSMiddleware/src/org/commsuite/model/SAPInstanceDef.hbm.xml
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/model/SAPInstanceDef.hbm.xml 2006-10-02 16:53:42 UTC (rev 186)
+++ trunk/code/CSMiddleware/src/org/commsuite/model/SAPInstanceDef.hbm.xml 2006-10-02 19:46:09 UTC (rev 187)
@@ -14,9 +14,9 @@
<property name="adminEmail" not-null="true" length="250" column="ADM_EMAIL"/>
<property name="client" not-null="true" length="30" column="CLIENT"/>
<property name="group" length="30" column="GROUP_NAME"/>
- <property name="gwhost" length="30" column="GW_HOST"/>
+ <property name="gwhost" length="1000" column="GW_HOST"/>
<property name="gwserv" length="30" column="GW_SERV"/>
- <property name="host" not-null="true" length="30" column="HOST"/>
+ <property name="host" not-null="true" length="1000" column="HOST"/>
<property name="loadBalancing" not-null="true" type="boolean" column="LOAD_BALANCING"/>
<property name="name" not-null="true" length="30" column="NAME" unique="true"/>
<property name="password" not-null="true" length="30" column="USER_PASSWORD"/>
Modified: trunk/code/CSMiddleware/src/org/commsuite/model/SAPInstanceDef.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/model/SAPInstanceDef.java 2006-10-02 16:53:42 UTC (rev 186)
+++ trunk/code/CSMiddleware/src/org/commsuite/model/SAPInstanceDef.java 2006-10-02 19:46:09 UTC (rev 187)
@@ -227,7 +227,7 @@
}
/**
- * @hibernate.property column="GW_HOST" length="30"
+ * @hibernate.property column="GW_HOST" length="1000"
*/
public String getGwhost() {
return gwhost;
@@ -249,7 +249,7 @@
}
/**
- * @hibernate.property column="HOST" length="30" not-null="true"
+ * @hibernate.property column="HOST" length="1000" not-null="true"
*/
public String getHost() {
return host;
Modified: trunk/code/CSMiddleware/src/org/commsuite/ws/services/ServersService.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/ws/services/ServersService.java 2006-10-02 16:53:42 UTC (rev 186)
+++ trunk/code/CSMiddleware/src/org/commsuite/ws/services/ServersService.java 2006-10-02 19:46:09 UTC (rev 187)
@@ -296,9 +296,9 @@
if (def.getAdminEmail().length() > CommunicateUtils.MAX_LENGHT_BIGGER
|| def.getClient().length() > CommunicateUtils.MAX_LENGHT_LOWER
|| def.getGroup().length() > CommunicateUtils.MAX_LENGHT_LOWER
- || def.getGwhost().length() > CommunicateUtils.MAX_LENGHT_LOWER
+ || def.getGwhost().length() > CommunicateUtils.MAX_LENGHT_ENORMOUS
|| def.getGwserv().length() > CommunicateUtils.MAX_LENGHT_LOWER
- || def.getHost().length() > CommunicateUtils.MAX_LENGHT_LOWER
+ || def.getHost().length() > CommunicateUtils.MAX_LENGHT_ENORMOUS
|| def.getName().length() > CommunicateUtils.MAX_LENGHT_LOWER
|| def.getPassword().length() > CommunicateUtils.MAX_LENGHT_LOWER
|| def.getProgid().length() > CommunicateUtils.MAX_LENGHT_LOWER
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
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.
|
|
From: <sku...@us...> - 2006-10-02 22:40:11
|
Revision: 189
http://svn.sourceforge.net/comsuite/?rev=189&view=rev
Author: skuzniak
Date: 2006-10-02 15:39:51 -0700 (Mon, 02 Oct 2006)
Log Message:
-----------
error message while deleting server with assigned messages provided
Modified Paths:
--------------
trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/BeansUtils.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/JavaSource/org/commsuite/web/locale/Locale_pl.properties
trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/BeansUtils.java
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/BeansUtils.java 2006-10-02 22:11:31 UTC (rev 188)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/BeansUtils.java 2006-10-02 22:39:51 UTC (rev 189)
@@ -190,4 +190,6 @@
public static final String SERVER_TEST_FAIL = "SERVER_TEST_FAIL";
+ public static final String MESSAGE_ERROR_SERVER_MESSAGES = "MESSAGE_SERVER_ERROR_MESSAGES";
+
}
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 22:11:31 UTC (rev 188)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/SearchServerBean.java 2006-10-02 22:39:51 UTC (rev 189)
@@ -349,7 +349,15 @@
try {
ws.deleteServer(this.serverId);
} catch(WebServiceException wse) {
-
+ logger.fatal("Cannot delete server", wse);
+ if (wse.getMessage().equals("error in deleteServer method")) {
+ LanguageSelectionBean.showMessage(BeansUtils.MESSAGE_ERROR_SERVER_MESSAGES,
+ BeansUtils.SEARCH_SERVER_NAVIGATION);
+ } else {
+ LanguageSelectionBean.showMessage(BeansUtils.MESSAGE_ERROR_DATABASE,
+ BeansUtils.SEARCH_SERVER_NAVIGATION);
+ }
+ this.serverId = null;
}
return BeansUtils.SEARCH_SERVER_NAVIGATION;
}
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 22:11:31 UTC (rev 188)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_en.properties 2006-10-02 22:39:51 UTC (rev 189)
@@ -247,6 +247,7 @@
MESSAGE_SERVER_ERROR_IOOBE=Could not found given server
MESSAGE_SERVER_ERROR_PASSWORD=Passwords must be equal
MESSAGE_SERVER_ERROR_VALIDATE=Mandatory fileds not set according to present 'Load balancing' field configuration
+MESSAGE_SERVER_ERROR_MESSAGES=This server has assigned messages. To delete it, delete the messages first.
MESSAGE_MESSAGE_ERROR_FETCH= while fetching messages list
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_pl.properties
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_pl.properties 2006-10-02 22:11:31 UTC (rev 188)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_pl.properties 2006-10-02 22:39:51 UTC (rev 189)
@@ -248,6 +248,7 @@
MESSAGE_SERVER_ERROR_IOOBE=Podany serwer nie zosta\u0142 odnaleziony.
MESSAGE_SERVER_ERROR_PASSWORD=Has\u0142a musz\u0105 byc takie same.
MESSAGE_SERVER_ERROR_VALIDATE=Nie zosta\u0142y wype\u0142nione pola konieczne, przy zaznaczeniu/odznaczeniu opcji 'R\u00f3wnowa\u017cenie obci\u0105\u017ce\u0144'
+MESSAGE_SERVER_ERROR_MESSAGES=Do tego serwera przypisane s\u0105 wiadomo\u015bci. Aby usun\u0105c serwer, usu\u0144 najpierw wiadomo\u015bci z bazy.
MESSAGE_MESSAGE_ERROR_FETCH= podczas pobierania listy wiadomo\u015bci.
Modified: trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java 2006-10-02 22:11:31 UTC (rev 188)
+++ trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java 2006-10-02 22:39:51 UTC (rev 189)
@@ -255,7 +255,7 @@
service.deletServer(id);
} catch (Throwable t) {
logger.fatal("error in deleteServer method", t);
- throw new WebServiceException(t);
+ throw new WebServiceException("error in deleteServer method", t);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sku...@us...> - 2006-10-03 21:01:49
|
Revision: 194
http://svn.sourceforge.net/comsuite/?rev=194&view=rev
Author: skuzniak
Date: 2006-10-03 14:01:08 -0700 (Tue, 03 Oct 2006)
Log Message:
-----------
deleting servers corrected(now deletes server with its messages)
Modified Paths:
--------------
trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/SearchServerBean.java
trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/users/SearchUserBean.java
trunk/code/CSCommon/src/org/commsuite/ws/ICommunicateWS.java
trunk/code/CSMiddleware/src/org/commsuite/dao/MessageDao.java
trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/MessageDaoImpl.java
trunk/code/CSMiddleware/src/org/commsuite/devices/Device.java
trunk/code/CSMiddleware/src/org/commsuite/managers/MessageManager.java
trunk/code/CSMiddleware/src/org/commsuite/managers/impl/MessageManagerImpl.java
trunk/code/CSMiddleware/src/org/commsuite/model/Message.hbm.xml
trunk/code/CSMiddleware/src/org/commsuite/model/Message.java
trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java
trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java
trunk/code/CSMiddleware/src/org/commsuite/ws/MessagingWS.java
trunk/code/CSMiddleware/src/org/commsuite/ws/services/MessagesService.java
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-03 19:28:57 UTC (rev 193)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/SearchServerBean.java 2006-10-03 21:01:08 UTC (rev 194)
@@ -31,6 +31,7 @@
import org.apache.log4j.Logger;
import org.commsuite.model.FakedSAPInstanceDef;
+import org.commsuite.model.ws.WSMessage;
import org.commsuite.model.ws.WSSAPInstanceDef;
import org.commsuite.util.SpringAdminPanelContext;
import org.commsuite.web.beans.BeansUtils;
@@ -347,6 +348,10 @@
public String deleteServer() {
final ICommunicateWS ws = SpringAdminPanelContext.getCommunicateWS();
try {
+ Collection<WSMessage> messages = ws.getMessagesByServer(this.serverId);
+ for (WSMessage message : messages) {
+ ws.deleteMessage(message.getId().toString());
+ }
ws.deleteServer(this.serverId);
} catch(WebServiceException wse) {
logger.fatal("Cannot delete server", wse);
@@ -383,9 +388,6 @@
public List<SelectItem> getBooleanSearchList() {
List<SelectItem> items = new FastTable<SelectItem>();
SelectItem item = new SelectItem();
- item.setLabel(LanguageSelectionBean.getLabel(SearchServerBean.CHOICE_ALL_LABEL));
- item.setValue(10);
- items.add(item);
item = new SelectItem();
item.setLabel("true");
item.setValue(1);
@@ -394,6 +396,10 @@
item.setLabel("false");
item.setValue(0);
items.add(item);
+ item = new SelectItem();
+ item.setLabel(LanguageSelectionBean.getLabel(SearchServerBean.CHOICE_ALL_LABEL));
+ item.setValue(10);
+ items.add(item);
return items;
}
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/users/SearchUserBean.java
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/users/SearchUserBean.java 2006-10-03 19:28:57 UTC (rev 193)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/users/SearchUserBean.java 2006-10-03 21:01:08 UTC (rev 194)
@@ -192,9 +192,6 @@
public List<SelectItem> getEnabledList() {
List<SelectItem> choices = new FastTable<SelectItem>();
SelectItem item = new SelectItem();
- item.setLabel(LanguageSelectionBean.getLabel(CHOICE_ALL_LABEL));
- item.setValue(10);
- choices.add(item);
item = new SelectItem();
item.setLabel("true");
item.setValue(1);
@@ -203,6 +200,10 @@
item.setLabel("false");
item.setValue(0);
choices.add(item);
+ item = new SelectItem();
+ item.setLabel(LanguageSelectionBean.getLabel(CHOICE_ALL_LABEL));
+ item.setValue(10);
+ choices.add(item);
return choices;
}
@@ -231,7 +232,6 @@
List<SelectItem> choices = new FastTable<SelectItem>();
SelectItem item = new SelectItem();
item.setLabel(LanguageSelectionBean.getLabel(CHOICE_ALL_LABEL));
- // item.setValue(null);
choices.add(item);
for (Language language : Language.values()) {
item = new SelectItem();
Modified: trunk/code/CSCommon/src/org/commsuite/ws/ICommunicateWS.java
===================================================================
--- trunk/code/CSCommon/src/org/commsuite/ws/ICommunicateWS.java 2006-10-03 19:28:57 UTC (rev 193)
+++ trunk/code/CSCommon/src/org/commsuite/ws/ICommunicateWS.java 2006-10-03 21:01:08 UTC (rev 194)
@@ -50,6 +50,16 @@
public Collection<WSMessage> getAllMessages() throws WebServiceException;
/**
+ * This method returns set of messages assigned to particular server
+ * with <code>serverId</code>
+ *
+ * @param serverId id of server
+ * @return collection of messages
+ * @throws WebServiceException on any error
+ */
+ public Collection<WSMessage> getMessagesByServer(String serverId) throws WebServiceException ;
+
+ /**
* Allows to delete message from databse
*
* @param id id of message to delete
Modified: trunk/code/CSMiddleware/src/org/commsuite/dao/MessageDao.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/dao/MessageDao.java 2006-10-03 19:28:57 UTC (rev 193)
+++ trunk/code/CSMiddleware/src/org/commsuite/dao/MessageDao.java 2006-10-03 21:01:08 UTC (rev 194)
@@ -20,6 +20,7 @@
*/
package org.commsuite.dao;
+import java.util.Collection;
import java.util.List;
import org.commsuite.model.Message;
@@ -49,4 +50,6 @@
public List<Message> getSelectedMessges(SearchMessageModel message) ;
+ public Collection<Message> getMessagesByServer(String serverId);
+
}
Modified: trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/MessageDaoImpl.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/MessageDaoImpl.java 2006-10-03 19:28:57 UTC (rev 193)
+++ trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/MessageDaoImpl.java 2006-10-03 21:01:08 UTC (rev 194)
@@ -177,6 +177,13 @@
"select m from SentContent s join s.message m where s.id = ?",
scId).get(0);
}
+
+ @SuppressWarnings("unchecked")
+ public List<Message> getMessagesByServer(String serverId) {
+ return (List<Message>) getHibernateTemplate().find(
+ "from Message m where m.sapInstanceDefOwner.id = ?",
+ Long.parseLong(serverId));
+ }
@SuppressWarnings("unchecked")
public List<Message> getSelectedMessges(SearchMessageModel message) {
Modified: trunk/code/CSMiddleware/src/org/commsuite/devices/Device.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/devices/Device.java 2006-10-03 19:28:57 UTC (rev 193)
+++ trunk/code/CSMiddleware/src/org/commsuite/devices/Device.java 2006-10-03 21:01:08 UTC (rev 194)
@@ -151,7 +151,7 @@
public void send(Message message) {
final List<SentContent> sentContents = message.getSentContents();
- logger.debug("message sap id is: " + message.getSAPInstanceDefOwner());
+ logger.debug("message sap id is: " + message.getSapInstanceDefOwner());
// message state vs content state
for (final SentContent sentContent : sentContents) {
Modified: trunk/code/CSMiddleware/src/org/commsuite/managers/MessageManager.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/managers/MessageManager.java 2006-10-03 19:28:57 UTC (rev 193)
+++ trunk/code/CSMiddleware/src/org/commsuite/managers/MessageManager.java 2006-10-03 21:01:08 UTC (rev 194)
@@ -20,6 +20,7 @@
*/
package org.commsuite.managers;
+import java.util.Collection;
import java.util.List;
import org.commsuite.model.Message;
@@ -49,4 +50,6 @@
public List<Message> getSelectedMessages(SearchMessageModel message) ;
+ public Collection<Message> getMessagesByServer(String serverId) ;
+
}
Modified: trunk/code/CSMiddleware/src/org/commsuite/managers/impl/MessageManagerImpl.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/managers/impl/MessageManagerImpl.java 2006-10-03 19:28:57 UTC (rev 193)
+++ trunk/code/CSMiddleware/src/org/commsuite/managers/impl/MessageManagerImpl.java 2006-10-03 21:01:08 UTC (rev 194)
@@ -20,6 +20,7 @@
*/
package org.commsuite.managers.impl;
+import java.util.Collection;
import java.util.Date;
import java.util.List;
@@ -49,6 +50,10 @@
public List<Message> getMessages() {
return dao.getMessages();
}
+
+ public Collection<Message> getMessagesByServer(String serverId) {
+ return dao.getMessagesByServer(serverId);
+ }
/**
* Saves or updates message in database
Modified: trunk/code/CSMiddleware/src/org/commsuite/model/Message.hbm.xml
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/model/Message.hbm.xml 2006-10-03 19:28:57 UTC (rev 193)
+++ trunk/code/CSMiddleware/src/org/commsuite/model/Message.hbm.xml 2006-10-03 21:01:08 UTC (rev 194)
@@ -25,7 +25,7 @@
<property name="sender" not-null="true" column="SENDER"/>
<property name="startDate" not-null="false" type="timestamp" column="START_DATE"/>
<property name="status" not-null="true" type="org.commsuite.enums.hibernate.HibernateStatus" column="STATUS"/>
- <many-to-one not-null="false" column="SAP_SERVER_ID" lazy="false" cascade="none" name="SAPInstanceDefOwner"/>
+ <many-to-one not-null="false" column="SAP_SERVER_ID" lazy="false" cascade="none" name="sapInstanceDefOwner"/>
<many-to-one not-null="false" column="USER_ID" lazy="false" cascade="none" name="userOwner"/>
<list cascade="none" name="sentContents">
<cache usage="read-write"/>
Modified: trunk/code/CSMiddleware/src/org/commsuite/model/Message.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/model/Message.java 2006-10-03 19:28:57 UTC (rev 193)
+++ trunk/code/CSMiddleware/src/org/commsuite/model/Message.java 2006-10-03 21:01:08 UTC (rev 194)
@@ -210,7 +210,7 @@
msg.setPriority(this.priority);
msg.setReceiver(this.receiver);
msg.setSapID(this.sapID);
- msg.setSAPInstanceDefOwner(this.sapInstanceDefOwner);
+ msg.setSapInstanceDefOwner(this.sapInstanceDefOwner);
msg.setSendDate(this.sendDate);
msg.setSender(this.sender);
msg.setStartDate(this.startDate);
@@ -541,14 +541,14 @@
* lazy="false" cascade="none"
* @hibernate.cache usage="read-write"
*/
- public SAPInstanceDef getSAPInstanceDefOwner() {
+ public SAPInstanceDef getSapInstanceDefOwner() {
return sapInstanceDefOwner;
}
/**
* TODO: JavaDoc
*/
- public void setSAPInstanceDefOwner(SAPInstanceDef instanceDefOwner) {
+ public void setSapInstanceDefOwner(SAPInstanceDef instanceDefOwner) {
this.sapInstanceDefOwner = instanceDefOwner;
}
Modified: trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java 2006-10-03 19:28:57 UTC (rev 193)
+++ trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java 2006-10-03 21:01:08 UTC (rev 194)
@@ -282,7 +282,7 @@
final Date currentDate = new Date();
for (Message msg : messages) {
- msg.setSAPInstanceDefOwner(instanceDef);
+ msg.setSapInstanceDefOwner(instanceDef);
if (null == msg.getSendDate()) {
msg.setSendDate(currentDate);
}
Modified: trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java 2006-10-03 19:28:57 UTC (rev 193)
+++ trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java 2006-10-03 21:01:08 UTC (rev 194)
@@ -79,6 +79,16 @@
}
}
+ public Collection<WSMessage> getMessagesByServer(String serverId) throws WebServiceException {
+ try {
+ final MessagesService service = MessagesService.getMessagesService();
+ return service.getMessagesByServer(serverId);
+ } catch(Throwable t) {
+ logger.fatal("error in getMessagesByServer method", t);
+ throw new WebServiceException(t);
+ }
+ }
+
public void deleteMessage(String id) throws WebServiceException {
try {
final MessagesService service = MessagesService.getMessagesService();
Modified: trunk/code/CSMiddleware/src/org/commsuite/ws/MessagingWS.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/ws/MessagingWS.java 2006-10-03 19:28:57 UTC (rev 193)
+++ trunk/code/CSMiddleware/src/org/commsuite/ws/MessagingWS.java 2006-10-03 21:01:08 UTC (rev 194)
@@ -96,7 +96,7 @@
message.addContents(contents);
- message.setSAPInstanceDefOwner(null);
+ message.setSapInstanceDefOwner(null);
message.setUserOwner(user);
message.setStatus(Status.RECEIVED_BY_WEBSERVICE);
Modified: trunk/code/CSMiddleware/src/org/commsuite/ws/services/MessagesService.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/ws/services/MessagesService.java 2006-10-03 19:28:57 UTC (rev 193)
+++ trunk/code/CSMiddleware/src/org/commsuite/ws/services/MessagesService.java 2006-10-03 21:01:08 UTC (rev 194)
@@ -294,4 +294,23 @@
}
}
+ public Collection<WSMessage> getMessagesByServer(String serverId) throws WebServiceException{
+ final MessageManager msgManager = SpringMiddlewareContext
+ .getMessageManager();
+ try {
+ logger.debug("test1:: "+ serverId);
+ Collection<Message> mes = msgManager.getMessagesByServer(serverId);
+ logger.debug("test2");
+ Collection<WSMessage> result = new FastTable<WSMessage>();
+ logger.debug("test3");
+ for (Message m : mes) {
+ result.add((WSMessage)m);
+ }
+ logger.debug("test4");
+ return result;
+ } catch (Throwable t) {
+ throw new WebServiceException("Exception during receiving mesages", t);
+ }
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <zd...@us...> - 2006-10-04 00:49:46
|
Revision: 171
http://svn.sourceforge.net/comsuite/?rev=171&view=rev
Author: zduniak
Date: 2006-09-30 16:28:51 -0700 (Sat, 30 Sep 2006)
Log Message:
-----------
- Unicode-based SAP versions are working since now (_lot of debugging code, should be cleaned up shortly_)
- Sorting messages in view panel are working correctly since now
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/CSMiddleware/src/org/commsuite/devices/Device.java
trunk/code/CSMiddleware/src/org/commsuite/model/Message.hbm.xml
trunk/code/CSMiddleware/src/org/commsuite/model/Message.java
trunk/code/CSMiddleware/src/org/commsuite/sap/JCoFunctionTranslator.java
trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java
trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java
trunk/code/CSMiddleware/src/org/commsuite/ws/services/MessagesService.java
trunk/code/CSMiddleware/war/deviceemulator.jsp
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/LanguageSelectionBean.java
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/LanguageSelectionBean.java 2006-09-30 21:21:43 UTC (rev 170)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/LanguageSelectionBean.java 2006-09-30 23:28:51 UTC (rev 171)
@@ -48,7 +48,7 @@
private static final Logger logger = Logger.getLogger(LanguageSelectionBean.class);
- private static final Locale DEFAULT_LOCALE = Locale.getDefault();
+ private static final Locale DEFAULT_LOCALE = Locale.ENGLISH;
private static final String LOCALE_FILENAME = "webapps/CommunicationsSuiteAdmin/WEB-INF/classes/org/commsuite/web/locale/Locale_";
@@ -100,9 +100,9 @@
return locale.toString();
}
- public void setLocale(String locale) {
+ public void setLocale(String localeStr) {
try {
- FacesContext.getCurrentInstance().getViewRoot().setLocale(new Locale(locale));
+ FacesContext.getCurrentInstance().getViewRoot().setLocale(new Locale(localeStr));
} catch (Throwable e) {
logger.fatal("Error during setting locale", e);
}
@@ -149,8 +149,8 @@
}
/**
- * this method is responsible for display message, on web page.
- * message is retrieved from default locale.
+ * This method is responsible for display message, on web page.
+ * Message is retrieved from default locale.
*
* @param messageCode message code to be displayed
* @param parentComponent component id on which messae will be displayed
@@ -163,8 +163,8 @@
}
/**
- * this method is responsible for display message, on web page.
- * message is retrieved from default locale.
+ * This method is responsible for display message, on web page.
+ * Message is retrieved from default locale.
*
* @param message1Code more general message code to be displayed
* @param message2Code more detailed message code to be displayed
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/messages/SearchMessageBean.java
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/messages/SearchMessageBean.java 2006-09-30 21:21:43 UTC (rev 170)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/messages/SearchMessageBean.java 2006-09-30 23:28:51 UTC (rev 171)
@@ -65,18 +65,17 @@
*/
public List<WSMessage> getMessagesAvailable() {
try {
- final ICommunicateWS ws = (ICommunicateWS) SpringAdminPanelContext
+ final ICommunicateWS ws = SpringAdminPanelContext
.getCommunicateWS();
List<WSMessage> mes;
if (this.searching) {
- SearchMessageModel message = this.createMessageFromFields();
+ final SearchMessageModel message = this.createMessageFromFields();
mes = getMessages(message, ws);
} else {
mes = getMessages(null, ws);
}
- sortMessagesList(mes);
return mes;
} catch (WebServiceException wse) {
logger.fatal("Exception while receiving available messages", wse);
@@ -98,10 +97,9 @@
* TODO: JavaDoc
*/
public MessageExtended getMessageExtended() {
- final ICommunicateWS ws = (ICommunicateWS) SpringAdminPanelContext
- .getCommunicateWS();
+ final ICommunicateWS ws = SpringAdminPanelContext.getCommunicateWS();
try {
- WSMessage message = ws.getMessageById(this.messageId);
+ final WSMessage message = ws.getMessageById(this.messageId);
final MessageExtended messageExtended = new MessageExtended();
messageExtended.setMessage(message);
final List<SentContentExtended> sentContentsExtended = new FastTable<SentContentExtended>();
@@ -109,14 +107,19 @@
ws
.getSentContentsByMessage(String.valueOf(message
.getId())));
- for (final WSSentContent content : sentContents) {
+ for (final WSSentContent sentContent : sentContents) {
final SentContentExtended sentContentExtended = new SentContentExtended();
- sentContentExtended.setSentContent((WSSentContent) content);
+ sentContentExtended.setSentContent(sentContent);
+
+ logger.debug("sentContent.getId(): " + sentContent.getId());
+
sentContentExtended.setContent((List<WSContents>) ws
- .getContentsBySentContent(String.valueOf(content
- .getId())));
+ .getContentsBySentContent(sentContent.getId()
+ .toString()));
sentContentsExtended.add(sentContentExtended);
}
+ logger.debug("sentContentsExtended.size(): "
+ + sentContentsExtended.size());
messageExtended.setSentContents(sentContentsExtended);
return messageExtended;
@@ -140,7 +143,7 @@
* TODO: JavaDoc
*/
public List<SelectItem> getDirectionList() {
- List<SelectItem> choices = new FastTable<SelectItem>();
+ final List<SelectItem> choices = new FastTable<SelectItem>();
SelectItem item = new SelectItem();
item.setLabel(MESSAGE_ALL);
// item.setValue(null);
@@ -218,28 +221,7 @@
/**
* TODO: JavaDoc
- *
- * @author Marcin Zduniak
*/
- private void sortMessagesList(final List<WSMessage> list) {
- Collections.sort(list, new Comparator<WSMessage>() {
- public int compare(WSMessage m1, WSMessage m2) {
- final int comparisonByLastProcessDate = m1.getLastProcessDate()
- .compareTo(m2.getLastProcessDate());
- if (0 == comparisonByLastProcessDate) {
- final int comparisonBySendDate = m1.getSendDate()
- .compareTo(m2.getSendDate());
- return comparisonBySendDate;
- } else {
- return comparisonByLastProcessDate;
- }
- }
- });
- }
-
- /**
- * TODO: JavaDoc
- */
private List<WSMessage> getMessages(SearchMessageModel model,
ICommunicateWS ws) throws WebServiceException {
this.totalMessages = ws.getMessagesSize(model);
Modified: trunk/code/CSMiddleware/src/org/commsuite/devices/Device.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/devices/Device.java 2006-09-30 21:21:43 UTC (rev 170)
+++ trunk/code/CSMiddleware/src/org/commsuite/devices/Device.java 2006-09-30 23:28:51 UTC (rev 171)
@@ -212,6 +212,7 @@
.getSentContentByInternalId(internalId);
if (null != prevSentContents) {
+ logger.debug("null != prevSentContents");
prevSentContents.setInternalId(RandomGUID.getGUID());
sentContentManager.saveSentContent(prevSentContents);
}
Modified: trunk/code/CSMiddleware/src/org/commsuite/model/Message.hbm.xml
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/model/Message.hbm.xml 2006-09-30 21:21:43 UTC (rev 170)
+++ trunk/code/CSMiddleware/src/org/commsuite/model/Message.hbm.xml 2006-09-30 23:28:51 UTC (rev 171)
@@ -7,7 +7,7 @@
<id name="id">
<generator class="native">
<param name="sequence">CS_MESSAGES_SEQ</param>
- <param name="parameters">INCREMENT BY 1 START WITH 100</param>
+ <param name="parameters">INCREMENT BY 1 START</param>
</generator>
</id>
<property name="creationDate" not-null="true" type="timestamp" column="CREATION_DATE"/>
Modified: trunk/code/CSMiddleware/src/org/commsuite/model/Message.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/model/Message.java 2006-09-30 21:21:43 UTC (rev 170)
+++ trunk/code/CSMiddleware/src/org/commsuite/model/Message.java 2006-09-30 23:28:51 UTC (rev 171)
@@ -20,10 +20,11 @@
*/
package org.commsuite.model;
-import java.util.ArrayList;
import java.util.Date;
import java.util.List;
+import javolution.util.FastTable;
+
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
@@ -55,14 +56,29 @@
/*
* Fields of the message:
*/
+ /**
+ * TODO: JavaDoc
+ */
private SAPInstanceDef sapInstanceDefOwner;
+ /**
+ * TODO: JavaDoc
+ */
private User userOwner;
+ /**
+ * TODO: JavaDoc
+ */
private Direction direction;
+ /**
+ * TODO: JavaDoc
+ */
private FormatType formatType;
+ /**
+ * TODO: JavaDoc
+ */
private Status status;
/**
@@ -83,6 +99,9 @@
*/
private String receiver;
+ /**
+ * TODO: JavaDoc
+ */
private String sender;
/**
@@ -112,8 +131,14 @@
*/
private Date expirationDate;
+ /**
+ * TODO: JavaDoc
+ */
private Date startDate;
+ /**
+ * TODO: JavaDoc
+ */
private Date endDate;
/**
@@ -133,11 +158,20 @@
*/
private Priority priority = Priority.LEVEL_4;
- private List<SentContent> sentContents = new ArrayList<SentContent>();
+ /**
+ * TODO: JavaDoc
+ */
+ private List<SentContent> sentContents = new FastTable<SentContent>();
+ /**
+ * TODO: JavaDoc
+ */
public Message() {
}
+ /**
+ * TODO: JavaDoc
+ */
public Message(WSMessage wsMessage) {
logger.debug("MESSAGE PRIORITY: " + wsMessage.getPriority());
this.setId(wsMessage.getId());
@@ -158,6 +192,10 @@
this.setStatus(wsMessage.getStatus());
}
+ /**
+ * TODO: JavaDoc
+ */
+ @Override
public Message clone() {
final Message msg = new Message();
msg.setId(this.id);
@@ -179,14 +217,16 @@
msg.setStatus(this.status);
msg.setUserOwner(this.userOwner);
- final List<SentContent> scList = new ArrayList<SentContent>();
- for (SentContent scContent : sentContents) {
- SentContent sc = new SentContent();
- sc.setContent(scContent.getContent());
- sc.setInternalId(RandomGUID.getGUID());
- sc.setState(scContent.getState());
- sc.setMessage(this);
- scList.add(sc);
+ final List<SentContent> scList = new FastTable<SentContent>();
+ for (final SentContent sc : sentContents) {
+ logger.debug("sc.getContent().getData(): " + sc.getContent().getData());
+ final SentContent clonedSc = new SentContent();
+ clonedSc.setContent(sc.getContent());
+ clonedSc.setInternalId(RandomGUID.getGUID());
+ clonedSc.setState(sc.getState());
+ clonedSc.setMessage(this);
+ scList.add(clonedSc);
+ logger.debug("clonedSc.getContent().getData(): " + clonedSc.getContent().getData());
}
msg.setSentContents(scList);
@@ -196,7 +236,8 @@
/**
* @hibernate.id generator-class="native"
* @hibernate.generator-param name="sequence" value="CS_MESSAGES_SEQ"
- * @hibernate.generator-param name="parameters" value="INCREMENT BY 1 START WITH 100"
+ * @hibernate.generator-param name="parameters" value="INCREMENT BY 1 START
+ * WITH 100"
*/
public Long getId() {
return super.id;
@@ -212,6 +253,9 @@
return creationDate;
}
+ /**
+ * TODO: JavaDoc
+ */
public void setCreationDate(Date createDate) {
this.creationDate = createDate;
}
@@ -232,6 +276,9 @@
}
}
+ /**
+ * TODO: JavaDoc
+ */
public void setDescription(String description) {
this.description = description;
}
@@ -247,6 +294,9 @@
return direction;
}
+ /**
+ * TODO: JavaDoc
+ */
public void setDirection(Direction direction) {
this.direction = direction;
}
@@ -264,6 +314,9 @@
return endDate;
}
+ /**
+ * TODO: JavaDoc
+ */
public void setEndDate(Date endDate) {
this.endDate = endDate;
}
@@ -282,6 +335,9 @@
return expirationDate;
}
+ /**
+ * TODO: JavaDoc
+ */
public void setExpirationDate(Date expiratonDate) {
this.expirationDate = expiratonDate;
}
@@ -296,6 +352,9 @@
return formatType;
}
+ /**
+ * TODO: JavaDoc
+ */
public void setFormatType(FormatType formatType) {
this.formatType = formatType;
}
@@ -310,6 +369,9 @@
return lastProcessDate;
}
+ /**
+ * TODO: JavaDoc
+ */
public void setLastProcessDate(Date lastProcessDate) {
this.lastProcessDate = lastProcessDate;
}
@@ -331,6 +393,9 @@
}
}
+ /**
+ * TODO: JavaDoc
+ */
public void setLastProcessMessage(String lastProcessMessage) {
this.lastProcessMessage = lastProcessMessage;
}
@@ -350,6 +415,9 @@
return priority;
}
+ /**
+ * TODO: JavaDoc
+ */
public void setPriority(Priority priority) {
this.priority = priority;
}
@@ -363,6 +431,9 @@
return receiver;
}
+ /**
+ * TODO: JavaDoc
+ */
public void setReceiver(String receiver) {
this.receiver = receiver;
}
@@ -385,6 +456,9 @@
return sapID;
}
+ /**
+ * TODO: JavaDoc
+ */
public void setSapID(String sapID) {
this.sapID = sapID;
}
@@ -398,6 +472,9 @@
return sendDate;
}
+ /**
+ * TODO: JavaDoc
+ */
public void setSendDate(Date sendDate) {
this.sendDate = sendDate;
}
@@ -411,6 +488,9 @@
return sender;
}
+ /**
+ * TODO: JavaDoc
+ */
public void setSender(String sender) {
this.sender = sender;
}
@@ -428,6 +508,9 @@
return startDate;
}
+ /**
+ * TODO: JavaDoc
+ */
public void setStartDate(Date startDate) {
this.startDate = startDate;
}
@@ -443,6 +526,9 @@
return status;
}
+ /**
+ * TODO: JavaDoc
+ */
public void setStatus(Status status) {
this.status = status;
}
@@ -458,6 +544,9 @@
return sapInstanceDefOwner;
}
+ /**
+ * TODO: JavaDoc
+ */
public void setSAPInstanceDefOwner(SAPInstanceDef instanceDefOwner) {
this.sapInstanceDefOwner = instanceDefOwner;
}
@@ -472,6 +561,9 @@
return this.userOwner;
}
+ /**
+ * TODO: JavaDoc
+ */
public void setUserOwner(User userOwner) {
this.userOwner = userOwner;
}
@@ -487,12 +579,19 @@
return sentContents;
}
+ /**
+ * TODO: JavaDoc
+ */
public void setSentContents(List<SentContent> sentContents) {
- for (SentContent content : sentContents)
- content.setMessage(this);
+ for (SentContent sentContent : sentContents) {
+ sentContent.setMessage(this);
+ }
this.sentContents = sentContents;
}
+ /**
+ * TODO: JavaDoc
+ */
private SentContent createSentContent(Contents c) {
final SentContent sc = new SentContent();
sc.setInternalId(RandomGUID.getGUID());
@@ -511,11 +610,17 @@
this.sentContents.add(sc);
}
+ /**
+ * TODO: JavaDoc
+ */
public void addContentsAsFirst(Contents c) {
final SentContent sc = createSentContent(c);
this.sentContents.add(0, sc);
}
+ /**
+ * TODO: JavaDoc
+ */
public void addContents(Contents c, String internalID) {
final SentContent sc = new SentContent();
@@ -527,14 +632,20 @@
this.sentContents.add(sc);
}
+ /**
+ * TODO: JavaDoc
+ */
public List<Contents> listContents() {
- final List<Contents> contentsSet = new ArrayList<Contents>();
+ final List<Contents> contentsSet = new FastTable<Contents>();
for (SentContent sc : sentContents) {
contentsSet.add(sc.getContent());
}
return contentsSet;
}
+ /**
+ * TODO: JavaDoc
+ */
@Override
public String toString() {
return new ToStringBuilder(this).append("id", this.id).append(
@@ -552,6 +663,9 @@
.toString();
}
+ /**
+ * TODO: JavaDoc
+ */
@Override
public boolean equals(Object object) {
if (null == object) {
@@ -575,6 +689,9 @@
.append(this.status, rhs.status).isEquals();
}
+ /**
+ * TODO: JavaDoc
+ */
@Override
public int hashCode() {
return new HashCodeBuilder(7, 31).append(this.id).append(
Modified: trunk/code/CSMiddleware/src/org/commsuite/sap/JCoFunctionTranslator.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/sap/JCoFunctionTranslator.java 2006-09-30 21:21:43 UTC (rev 170)
+++ trunk/code/CSMiddleware/src/org/commsuite/sap/JCoFunctionTranslator.java 2006-09-30 23:28:51 UTC (rev 171)
@@ -24,6 +24,7 @@
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
+import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
@@ -479,8 +480,6 @@
msg.setStatus(Status.RECEIVED_FROM_SAP);
msg.setDirection(Direction.OUTBOUND);
- final List<Message> result = new FastTable<Message>();
-
if (null == function.getImportParameterList()) {
logger.error("ImportParameterList is empty.");
return null;
@@ -515,11 +514,9 @@
if ("FAX".equals(format)) {
msg.setFormatType(FormatType.FAX);
- }
- if ("INT".equals(format)) {
+ } else if ("INT".equals(format)) {
msg.setFormatType(FormatType.EMAIL);
- }
- if ("PAG".equals(format)) {
+ } else if ("PAG".equals(format)) {
msg.setFormatType(FormatType.SMS);
}
@@ -608,7 +605,7 @@
documentDataStructure));
// msg.setDocumentSize(documentDataStructure.getInt("DOC_SIZE"));
// [PW] REFACTOR duplicated code here.. extract.. [SK]
- msg.setSendDate(null);
+ msg.setStartDate(null);
final Date startDate = (Date) getOptionalVal("STA_DATE", TYPE_DATE,
receiveInfoStructure);
final Date startTime = (Date) getOptionalVal("STA_TIME", TYPE_TIME,
@@ -667,8 +664,12 @@
"DOC_SIZE").trim());
final int bodyNum = packingList.getInt("BODY_NUM");
+ logger.debug("BEFORE msg.getSentContents().size(): " + msg.getSentContents().size());
+ logger.debug("BEFORE content.getData(): " + content.getData());
+
final String transfBin = packingList.getString("TRANSF_BIN");
if ("X".equals(transfBin)) {
+ logger.debug("TransfBin message type");
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
for (int j = 0; j < bodyNum; j++) {
contentsBinList.setRow(bodyStart + j);
@@ -680,14 +681,21 @@
}
baos.write(data, 0, lineSize);
}
- content.setData(baos.toByteArray());
+
+ final byte[] data = baos.toByteArray();
+ logger.debug("data.length: " + data.length);
+ logger.debug("data: " + Arrays.toString(data));
+
+ content.setData(data);
msg.addContents(content);
} else {
+ logger.debug("Text message type");
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
for (int j = 0; j < bodyNum; j++) {
contentsTxtList.setRow(bodyStart + j);
int lineSize = ((j == bodyNum - 1) ? docSize % 255
: 255);
+
final byte[] data = contentsTxtList
.getByteArray("LINE");
if (data.length < lineSize) {
@@ -697,12 +705,20 @@
}
final byte[] data = baos.toByteArray();
+ logger.debug("data.length: " + data.length);
+ logger.debug("data: " + Arrays.toString(data));
final byte[] convertedData = convertBytes(data,
partnerCharset, "UTF-8");
-
+ logger.debug("data.convertedData: " + Arrays.toString(convertedData));
+ logger.debug("data.convertedData.txt: " + new String(data));
+ logger.debug("data.txt: " + new String(convertedData));
+
content.setData(convertedData);
msg.addContents(content);
}
+
+ logger.debug("AFTER msg.getSentContents().size(): " + msg.getSentContents().size());
+ logger.debug("AFTER content.getData(): " + content.getData());
final String documentType = (String) getOptionalVal("DOC_TYPE",
TYPE_STRING, packingList);
@@ -766,6 +782,7 @@
content.setMimeType(Contents.MIME_TYPE_XLS);
} else {
logger.fatal("Unknown format type:" + documentType);
+ // TODO: own exception implementation
throw new RuntimeException("Unknown format type");
}
}
@@ -776,39 +793,27 @@
}
/**
- * CONTENTS_BIN table.
- */
- // final JCO.Table contentsList =
- // function.getTableParameterList().getTable("CONTENTS_BIN");
- // for (int i = 0; i < contentsList.getNumRows(); i++) {
- // contentsList.setRow(i);
- // msg.setContentsList(contentsList.getByte("LINE"));
- // }
- /**
- * CONTENTS_TXT table.
- */
- /*
- * JCO.Table contentsListTxt = null; contentsListTxt =
- * function.getTableParameterList().getTable("CONTENTS_TXT"); ArrayList<String>
- * conListTxt = new ArrayList<String>(); for (int i = 0; i <
- * contentsListTxt.getNumRows(); i++) { contentsListTxt.setRow(i);
- * conListTxt.add(i, contentsListTxt.getString("LINE")); }
- */
-
- /**
* RECEIVERS table
*/
final JCO.Table receivers = function.getTableParameterList().getTable(
"RECEIVERS");
+ logger.debug("BEFORE LOOP");
+ logger.debug("receivers: " + receivers);
+ logger.debug("receivers.getNumRows(): " + receivers.getNumRows());
+ final List<Message> result = new FastTable<Message>();
for (int i = 0; i < receivers.getNumRows(); i++) {
- final Message tempMsg = msg.clone();
+ logger.debug("IN LOOP: " + i);
+ logger.debug("LOOP.msg: " + msg);
+ final Message clonedMsg = msg.clone();
+ logger.debug("LOOP.tempMsg: " + clonedMsg);
receivers.setRow(i);
final String rec = receivers.getString("RECEIVER");
+ logger.debug("LOOP.tempMsg: " + rec);
if (-1 != rec.indexOf(":")) {
final String chn = rec.substring(rec.indexOf(":") + 1);
- tempMsg.setReceiver(chn);
+ clonedMsg.setReceiver(chn);
} else {
- tempMsg.setReceiver(rec);
+ clonedMsg.setReceiver(rec);
}
// setting synchronous status notification:
@@ -831,7 +836,7 @@
// tempMsg.setReceiveDate(receivers.getDate("REC_DATE"));
// tempMsg.setTransmissionDate(receivers.getString("PROCDATE"));
// tempMsg.setTransmissionTime(receivers.getString("PROCTIME"));
- result.add(tempMsg);
+ result.add(clonedMsg);
}
return result.toArray(new Message[result.size()]);
@@ -847,7 +852,10 @@
// end of hack
try {
- String tmp = new String(data, fromCharset);
+ final String tmp = new String(data, fromCharset);
+ if (data.length > 0 && tmp.length() == 0) {
+ return data;
+ }
return tmp.getBytes(toCharset);
} catch (UnsupportedEncodingException e) {
logger.warn("Charsets: '" + fromCharset + "', '" + toCharset
Modified: trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java 2006-09-30 21:21:43 UTC (rev 170)
+++ trunk/code/CSMiddleware/src/org/commsuite/sap/SAPComm.java 2006-09-30 23:28:51 UTC (rev 171)
@@ -20,6 +20,8 @@
*/
package org.commsuite.sap;
+import java.io.FileOutputStream;
+import java.io.ObjectOutputStream;
import java.lang.Thread.UncaughtExceptionHandler;
import java.util.Date;
import java.util.Properties;
@@ -116,7 +118,16 @@
JCO.Client client = null;
try {
client = SAPComm.this.getJCOClient();
- PARTNER_CHARSET = client.getAttributes().getPartnerCharset();
+ final JCO.Attributes attributes = client.getAttributes();
+ PARTNER_CHARSET = attributes.getPartnerCharset();
+ if (logger.isInfoEnabled()) {
+ final boolean isBackendUnicode = attributes
+ .getPartnerCodepage().equals("4102")
+ || attributes.getPartnerCodepage().equals("4103");
+ logger
+ .info("SAP JCo isBackendUnicode: "
+ + isBackendUnicode);
+ }
} finally {
if (null != client) {
releaseJCOClient(client);
@@ -127,6 +138,20 @@
@Override
protected void handleRequest(final JCO.Function function) {
+
+ // SERIALIZATION:
+ // try {
+ // FileOutputStream fos;
+ // fos = new FileOutputStream("c:\\temp\\" +
+ // System.currentTimeMillis());
+ // ObjectOutputStream oos = new ObjectOutputStream(fos);
+ // oos.writeObject(function);
+ // oos.close();
+ // } catch (Exception e) {
+ // logger.error("", e);
+ // }
+ // END OF SERIALIZATION
+
handlingRequest = true;
// TODO: rozwazyc czy nie lepiej obslugiwac zgloszenie od klientow w
// osobnych watkach.
@@ -143,6 +168,7 @@
// liczba zdalnych
// uzytkownikow)
handleJCORequest(function, PARTNER_CHARSET);
+
handlingRequest = false;
}
@@ -221,6 +247,11 @@
final Message[] messages = JCoFunctionTranslator
.getMessagesFromJCOFunction(function, charset);
+ logger.debug("1");
+ logger.debug("messages: " + messages);
+ logger.debug("messages.length: "
+ + (null != messages ? "" + messages.length : "NIC"));
+
if (null != messages && messages.length > 0
&& 0 == messages[0].getSentContents().size()) {
final String errMsg = "Message without any content is not supported";
@@ -232,16 +263,33 @@
msgManager = SpringMiddlewareContext.getMessageManager();
}
+ logger.debug("msgManager: " + msgManager);
+
if (null == jmsManager) {
jmsManager = SpringMiddlewareContext.getJMSManager();
}
+ logger.debug("jmsManager: " + jmsManager);
+
final Date currentDate = new Date();
+ logger.debug("2");
for (Message msg : messages) {
+ logger.debug("3: " + msg);
msg.setSAPInstanceDefOwner(instanceDef);
if (null == msg.getSendDate()) {
msg.setSendDate(currentDate);
}
+ logger.debug("4");
+ logger.debug("msg.getSentContents().size(): " + msg.getSentContents().size());
+
+ if (msg.getSentContents().get(0).getContent().MIME_TYPE_TEXT_PLAIN
+ .equals(msg.getSentContents().get(0).getContent()
+ .getMimeType())) {
+ logger.debug("Content1: "
+ + new String(msg.getSentContents().get(0)
+ .getContent().getData()));
+ }
+
msg = msgManager.saveMessage(msg);
jmsManager
.sendMessage(
@@ -349,6 +397,7 @@
private void initRepository() {
repository = JCO.createRepository(getRepositoryName(), getPoolName());
+ logger.debug("Repository: " + repository);
}
private void initSAPConnections() {
@@ -389,6 +438,9 @@
}
props.put(JCO_CLIENT_PREFIX + "trace", TRACE_ENABLED ? "1" : "0");
+ // props.put(JCO_CLIENT_PREFIX + "abap_debug", TRACE_ENABLED ? "1" :
+ // "0");
+
props.put(JCO_CLIENT_PREFIX + "lcheck", "1");
// server properties:
@@ -398,6 +450,10 @@
props.put(JCO_SERVER_PREFIX + "unicode", instanceDef.isUnicode() ? "1"
: "0");
+ // TODO: is this correct ?
+ props.put(JCO_CLIENT_PREFIX + "unicode", instanceDef.isUnicode() ? "1"
+ : "0");
+
return props;
}
@@ -573,6 +629,12 @@
// Send a ping to the server
client.ping();
+ // TODO: testing:
+ // final JCO.Function f = repository.getFunctionTemplate(
+ // "SX_OBJECT_RECEIVE").getFunction();
+ // logger.debug("FUNCTION: " + f);
+ // TODO: end of testing
+
// final JCO.Attributes attr = client.getAttributes();
// final String partnerRelease = attr.getPartnerRelease();
// logger.debug("Partner release: " + partnerRelease);
Modified: trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java 2006-09-30 21:21:43 UTC (rev 170)
+++ trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java 2006-09-30 23:28:51 UTC (rev 171)
@@ -71,7 +71,7 @@
public Collection<WSMessage> getMessagesSubset(int begin, int end) throws WebServiceException {
try {
- MessagesService service = MessagesService.getMessagesService();
+ final MessagesService service = MessagesService.getMessagesService();
return service.getMessagesSubset(begin, end);
} catch(Throwable t) {
logger.fatal("error in getMessagesSubset method", t);
Modified: trunk/code/CSMiddleware/src/org/commsuite/ws/services/MessagesService.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/ws/services/MessagesService.java 2006-09-30 21:21:43 UTC (rev 170)
+++ trunk/code/CSMiddleware/src/org/commsuite/ws/services/MessagesService.java 2006-09-30 23:28:51 UTC (rev 171)
@@ -21,6 +21,8 @@
package org.commsuite.ws.services;
import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
import java.util.List;
import javolution.util.FastTable;
@@ -60,11 +62,17 @@
private static MessagesService instance;
+ /**
+ * TODO: JavaDoc
+ */
public MessagesService() {
messageManager = SpringMiddlewareContext.getMessageManager();
jmsManager = SpringMiddlewareContext.getJMSManager();
}
+ /**
+ * TODO: JavaDoc
+ */
public static MessagesService getMessagesService() {
if (null == instance) {
instance = new MessagesService();
@@ -72,6 +80,9 @@
return instance;
}
+ /**
+ * TODO: JavaDoc
+ */
public int getMessagesSize(SearchMessageModel wsMessage)
throws WebServiceException {
final MessageManager msgManager = SpringMiddlewareContext
@@ -83,28 +94,52 @@
}
}
+ /**
+ * TODO: JavaDoc
+ */
public Collection<WSMessage> getMessagesSubset(int begin, int end)
throws WebServiceException, IllegalArgumentException,
IndexOutOfBoundsException {
+ if (begin > end)
+ throw new IllegalArgumentException(
+ "Begin index should be lower than end");
+
final MessageManager msgManager = SpringMiddlewareContext
.getMessageManager();
- final List<Message> mes = (List<Message>) msgManager.getMessages();
- final Collection<WSMessage> result = new FastTable<WSMessage>();
+ final List<Message> mes = msgManager.getMessages();
- if (begin > end)
- throw new IllegalArgumentException(
- "Begin index should be lower than end");
if (begin < 0 || end >= mes.size())
throw new IndexOutOfBoundsException(
"Index is out of bounds:...
[truncated message content] |
|
From: <sku...@us...> - 2006-10-05 07:52:24
|
Revision: 196
http://svn.sourceforge.net/comsuite/?rev=196&view=rev
Author: skuzniak
Date: 2006-10-05 00:52:07 -0700 (Thu, 05 Oct 2006)
Log Message:
-----------
'get' error corrected, exception after session expires corrected
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/WebContent/CSLoginForm.jsp
trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/LanguageSelectionBean.java
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/LanguageSelectionBean.java 2006-10-05 07:44:27 UTC (rev 195)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/LanguageSelectionBean.java 2006-10-05 07:52:07 UTC (rev 196)
@@ -72,7 +72,7 @@
*/
public LanguageSelectionBean() {
super();
-
+ logger.debug("Initializing LanguageSelectionBean");
// REFACTOR: [SK] Below hardcoded set of items must be placed in some configuration file (at
// least) or stored in a database.
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-05 07:44:27 UTC (rev 195)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/messages/SearchMessageBean.java 2006-10-05 07:52:07 UTC (rev 196)
@@ -20,9 +20,13 @@
*/
package org.commsuite.web.beans.messages;
+import java.io.IOException;
import java.util.List;
+import javax.faces.context.FacesContext;
import javax.faces.model.SelectItem;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
import javolution.util.FastTable;
@@ -94,6 +98,22 @@
* TODO: JavaDoc
*/
public MessageExtended getMessageExtended() {
+ logger.debug("messageID: "+ this.messageId);
+ if (null == this.messageId) {
+ /*String redirectPage = "";
+ try {
+ FacesContext context = FacesContext.getCurrentInstance();
+ HttpServletResponse response = (HttpServletResponse)context.getExternalContext().getResponse();
+ HttpServletRequest request = (HttpServletRequest)context.getExternalContext().getRequest();
+ redirectPage = request.getContextPath()+ "/pages/messages/CSMessages.jsp";
+ response.sendRedirect(redirectPage);
+ return new MessageExtended();
+ } catch(IOException ioe) {
+ logger.fatal("404 - page not found");
+ return new MessageExtended();
+ }*/
+ return new MessageExtended();
+ }
final ICommunicateWS ws = SpringAdminPanelContext.getCommunicateWS();
try {
final WSMessage message = ws.getMessageById(this.messageId);
Modified: trunk/code/CSAdminPanel/WebContent/CSLoginForm.jsp
===================================================================
--- trunk/code/CSAdminPanel/WebContent/CSLoginForm.jsp 2006-10-05 07:44:27 UTC (rev 195)
+++ trunk/code/CSAdminPanel/WebContent/CSLoginForm.jsp 2006-10-05 07:52:07 UTC (rev 196)
@@ -10,7 +10,7 @@
</title>
</head>
<body>
- <form id="loginForm" action="loginuser">
+ <form id="loginForm" action="loginuser" method="post">
<h:messages />
<table>
<tr>
Modified: trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java 2006-10-05 07:44:27 UTC (rev 195)
+++ trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java 2006-10-05 07:52:07 UTC (rev 196)
@@ -175,7 +175,7 @@
MessagesService service = MessagesService.getMessagesService();
return service.getMessageById(id);
} catch (Throwable t) {
- logger.fatal("error in getSentContentsByMessage method", t);
+ logger.fatal("error in getMessageById method", t);
throw new WebServiceException(t);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2006-10-05 08:04:41
|
Revision: 198
http://svn.sourceforge.net/comsuite/?rev=198&view=rev
Author: marasm
Date: 2006-10-05 01:04:29 -0700 (Thu, 05 Oct 2006)
Log Message:
-----------
message state set to failed/sent after sending to sap
Modified Paths:
--------------
trunk/code/CSCommon/src/org/commsuite/aop/SystemArchitecture.java
trunk/code/CSMiddleware/src/org/commsuite/sap/SAPCommManager.java
Modified: trunk/code/CSCommon/src/org/commsuite/aop/SystemArchitecture.java
===================================================================
--- trunk/code/CSCommon/src/org/commsuite/aop/SystemArchitecture.java 2006-10-05 07:54:26 UTC (rev 197)
+++ trunk/code/CSCommon/src/org/commsuite/aop/SystemArchitecture.java 2006-10-05 08:04:29 UTC (rev 198)
@@ -65,7 +65,9 @@
final StringBuilder parameters = new StringBuilder();
- if (null != pjp.getArgs()) {
+ if (null != pjp.getArgs()
+ && !pjp.getSignature().toString().toUpperCase().contains(
+ "JCOFUNCTION")) {
// TODO: consider using only one method invocation:
// Arrays.toString(pjp.getArgs())
// instead of below loop:
@@ -93,8 +95,12 @@
throw e;
}
- logger.debug(pjp.getSignature() + " " + result);
+ if (!pjp.getSignature().toString().toUpperCase()
+ .contains("JCOFUNCTION")) {
+ logger.debug(pjp.getSignature() + " " + result);
+ } else {
+ logger.debug(pjp.getSignature());
+ }
return result;
}
-
}
Modified: trunk/code/CSMiddleware/src/org/commsuite/sap/SAPCommManager.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/sap/SAPCommManager.java 2006-10-05 07:54:26 UTC (rev 197)
+++ trunk/code/CSMiddleware/src/org/commsuite/sap/SAPCommManager.java 2006-10-05 08:04:29 UTC (rev 198)
@@ -32,13 +32,11 @@
import org.apache.log4j.Logger;
import org.commsuite.enums.State;
import org.commsuite.managers.MessageManager;
-import org.commsuite.managers.SentContentManager;
import org.commsuite.model.Message;
import org.commsuite.model.SAPInstanceDef;
import org.commsuite.model.SentContent;
import org.commsuite.notification.INotificationsManager;
import org.commsuite.util.SpringContext;
-import org.commsuite.util.SpringMiddlewareBeansConstants;
import org.commsuite.util.SpringMiddlewareContext;
import com.sap.mw.jco.JCO;
@@ -65,7 +63,7 @@
private boolean enabled;
private INotificationsManager notificationsManager;
-
+
/**
* @param enabled
* The enabled to set.
@@ -82,12 +80,13 @@
}
/**
- * TODO: JavaDoc
- */
+ * TODO: JavaDoc
+ */
public SAPCommManager() {
super();
sapComms = new FastMap<String, ISAPComm>();
- enabled = "true".equals(SpringContext.getProperty("commsuite.SAPCommManager.enabled"));
+ enabled = "true".equals(SpringContext
+ .getProperty("commsuite.SAPCommManager.enabled"));
}
/**
@@ -102,8 +101,8 @@
}
/**
- * TODO: JavaDoc
- */
+ * TODO: JavaDoc
+ */
public void sendMessageToDefault(Message message) {
logger.debug("Sending message to default SAP servers");
@@ -115,12 +114,17 @@
for (final ISAPComm sapComm : sapComms.values()) {
if (sapComm.isDefault()) {
logger.debug("Sending message to: " + sapComm.getName());
+
+ State state = (sapComm.sendMessage(message)) ? State.SENT
+ : State.FAILED;
- // TODO: message must be cloned and stored in DB as set of distinct messages.
- // Enumeration Message.SentContents.State must be set accordingly to what
- // state was received from SAP server for each of messages.
+ for (SentContent sentContent : message.getSentContents()) {
+ sentContent.setState(state);
+ }
- sapComm.sendMessage(message);
+ SpringMiddlewareContext.getMessageManager()
+ .saveMessage(message);
+
logger.debug("Message sent to: " + sapComm.getName());
// SentContentManager sentContentManager = SpringMiddlewareContext.getSentContentManager();
@@ -138,41 +142,47 @@
}
/**
- * TODO: JavaDoc
- */
+ * TODO: JavaDoc
+ */
public void init() {
- logger.debug("Running init() method in SAPCommManager (size: " + sapComms.size() + ")");
+ logger.debug("Running init() method in SAPCommManager (size: "
+ + sapComms.size() + ")");
initJCOTracePath();
- final Collection<ISAPComm> clonnedSapComms = new FastTable<ISAPComm>(sapComms.values());
+ final Collection<ISAPComm> clonnedSapComms = new FastTable<ISAPComm>(
+ sapComms.values());
for (final ISAPComm sapComm : clonnedSapComms) {
- if (sapComm.isActiveInstance()) {
- logger.info("Initiating: " + sapComm);
- try {
- sapComm.startServer();
- } catch (Throwable t) {
- logger.fatal("Error during starting SAPComm: " + sapComm, t);
- // stop partially started SAPComm:
- try {
- sapComm.destroy();
- } catch (Throwable ignore) {
- // Ignore
- }
- // remove error prone SAPComm from oryginal collection:
- // REVIEW: maybe it is not good idea to remove sap instance from collection ?
- // sapComms.remove(sapComm.getName());
- }
- }
+ if (sapComm.isActiveInstance()) {
+ logger.info("Initiating: " + sapComm);
+ try {
+ sapComm.startServer();
+ } catch (Throwable t) {
+ logger
+ .fatal("Error during starting SAPComm: " + sapComm,
+ t);
+ // stop partially started SAPComm:
+ try {
+ sapComm.destroy();
+ } catch (Throwable ignore) {
+ // Ignore
+ }
+ // remove error prone SAPComm from oryginal collection:
+ // REVIEW: maybe it is not good idea to remove sap instance
+ // from collection ?
+ // sapComms.remove(sapComm.getName());
+ }
+ }
}
}
/**
- * TODO: JavaDoc
- */
+ * TODO: JavaDoc
+ */
private void initJCOTracePath() {
- final String jcoTracePath = getClass().getResource("/").getPath() + ".." + File.separator
- + ".." + File.separator + ".." + File.separator + ".." + File.separator + "logs"
+ final String jcoTracePath = getClass().getResource("/").getPath()
+ + ".." + File.separator + ".." + File.separator + ".."
+ + File.separator + ".." + File.separator + "logs"
+ File.separator;
JCO.setTracePath(jcoTracePath);
JCO.setTraceLevel(TRACE_LEVEL);
@@ -182,8 +192,8 @@
}
/**
- * TODO: JavaDoc
- */
+ * TODO: JavaDoc
+ */
public void destroy() {
logger.info("Destroying SAPCommManager");
for (final ISAPComm sapComm : sapComms.values()) {
@@ -193,14 +203,15 @@
}
/**
- * TODO: JavaDoc
- */
+ * TODO: JavaDoc
+ */
// TODO: should this method be sensitive on active field??
public void setSapInstances(Collection<SAPInstanceDef> sapInstances) {
// TODO: init sapComms collection with values from DB
- logger.info("Running setSapInstances() method in SAPCommManager (size: "
- + sapInstances.size() + ")");
+ logger
+ .info("Running setSapInstances() method in SAPCommManager (size: "
+ + sapInstances.size() + ")");
if (!isEnabled()) {
return;
@@ -211,75 +222,80 @@
sapComm.init(inst);
final SAPNotificationConsumer sapNotificationConsumer = new SAPNotificationConsumer(
sapComm);
-
+
// TODO: this condition is used only during performing tests.
- // Refactor it in order to neglect below condition in production code.
+ // Refactor it in order to neglect below condition in production
+ // code.
if (null != notificationsManager) {
- notificationsManager.associateNewConsumer(sapComm.getName(), sapNotificationConsumer);
+ notificationsManager.associateNewConsumer(sapComm.getName(),
+ sapNotificationConsumer);
}
- sapComms.put(sapComm.getName(), sapComm);
+ sapComms.put(sapComm.getName(), sapComm);
}
}
/**
- * TODO: JavaDoc
- */
+ * TODO: JavaDoc
+ */
// TODO: should this method be sensitive on active field??
public void setSapInstance(SAPInstanceDef instance) {
- if (!isEnabled()) {
- return;
- }
- final ISAPComm sapComm = new SAPComm();
- sapComm.init(instance);
- final SAPNotificationConsumer sapNotificationConsumer = new SAPNotificationConsumer(
+ if (!isEnabled()) {
+ return;
+ }
+ final ISAPComm sapComm = new SAPComm();
+ sapComm.init(instance);
+ final SAPNotificationConsumer sapNotificationConsumer = new SAPNotificationConsumer(
sapComm);
- notificationsManager.associateNewConsumer(sapComm.getName(), sapNotificationConsumer);
+ notificationsManager.associateNewConsumer(sapComm.getName(),
+ sapNotificationConsumer);
sapComms.put(sapComm.getName(), sapComm);
}
/**
- * TODO: JavaDoc
- */
- public void setNotificationsManager(INotificationsManager notificationsManager) {
+ * TODO: JavaDoc
+ */
+ public void setNotificationsManager(
+ INotificationsManager notificationsManager) {
this.notificationsManager = notificationsManager;
}
/**
- * TODO: JavaDoc
- */
+ * TODO: JavaDoc
+ */
public boolean isEnabled() {
return enabled;
}
/**
- * TODO: JavaDoc
- */
+ * TODO: JavaDoc
+ */
/* package scope */void checkExistenceOfSAPInstance(String instanceName) {
if (!sapComms.containsKey(instanceName)) {
- throw new SAPInstanceException("Instance: " + instanceName + " does not exist.");
+ throw new SAPInstanceException("Instance: " + instanceName
+ + " does not exist.");
}
}
/**
- * TODO: JavaDoc
- */
+ * TODO: JavaDoc
+ */
public void startInstance(String instanceName) {
logger.info("Starting instance: " + instanceName);
checkExistenceOfSAPInstance(instanceName);
final ISAPComm instance = sapComms.get(instanceName);
if (instance.isActiveInstance()) {
- instance.startServer();
- logger.info("Instance started: " + instanceName);
+ instance.startServer();
+ logger.info("Instance started: " + instanceName);
} else {
- logger.warn("Instance is not active");
- throw new RuntimeException("Unable to start inactive instance");
+ logger.warn("Instance is not active");
+ throw new RuntimeException("Unable to start inactive instance");
}
}
/**
- * TODO: JavaDoc
- */
+ * TODO: JavaDoc
+ */
public void stopInstance(String instanceName) {
logger.info("Stopping instance: " + instanceName);
checkExistenceOfSAPInstance(instanceName);
@@ -289,30 +305,30 @@
}
/**
- * TODO: JavaDoc
- */
+ * TODO: JavaDoc
+ */
public void destroyInstance(String instanceName) {
logger.info("Destroying instance: " + instanceName);
checkExistenceOfSAPInstance(instanceName);
final ISAPComm instance = sapComms.get(instanceName);
- logger.debug("INSTANCE: "+ instance);
+ logger.debug("INSTANCE: " + instance);
sapComms.remove(instance.getName());
instance.destroy();
logger.info("Instance destroyed: " + instanceName);
}
/**
- * TODO: JavaDoc
- */
+ * TODO: JavaDoc
+ */
public ISAPComm getSAPCommByName(String name) {
return sapComms.get(name);
}
/**
- * TODO: JavaDoc
- */
- public boolean isSapServerWorking(String name) {
- ISAPComm SappCommByName = getSAPCommByName(name);
- return (null != SappCommByName && null != SappCommByName.getServer());
- }
+ * TODO: JavaDoc
+ */
+ public boolean isSapServerWorking(String name) {
+ ISAPComm SappCommByName = getSAPCommByName(name);
+ return (null != SappCommByName && null != SappCommByName.getServer());
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sku...@us...> - 2006-10-05 09:08:51
|
Revision: 199
http://svn.sourceforge.net/comsuite/?rev=199&view=rev
Author: skuzniak
Date: 2006-10-05 02:08:34 -0700 (Thu, 05 Oct 2006)
Log Message:
-----------
set redirection in pages
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/WebContent/WEB-INF/faces-config.xml
trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/LanguageSelectionBean.java
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/LanguageSelectionBean.java 2006-10-05 08:04:29 UTC (rev 198)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/LanguageSelectionBean.java 2006-10-05 09:08:34 UTC (rev 199)
@@ -187,11 +187,6 @@
final String message = LanguageSelectionBean.getDisplayString(
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-05 08:04:29 UTC (rev 198)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/messages/SearchMessageBean.java 2006-10-05 09:08:34 UTC (rev 199)
@@ -20,13 +20,9 @@
*/
package org.commsuite.web.beans.messages;
-import java.io.IOException;
import java.util.List;
-import javax.faces.context.FacesContext;
import javax.faces.model.SelectItem;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
import javolution.util.FastTable;
Modified: trunk/code/CSAdminPanel/WebContent/WEB-INF/faces-config.xml
===================================================================
--- trunk/code/CSAdminPanel/WebContent/WEB-INF/faces-config.xml 2006-10-05 08:04:29 UTC (rev 198)
+++ trunk/code/CSAdminPanel/WebContent/WEB-INF/faces-config.xml 2006-10-05 09:08:34 UTC (rev 199)
@@ -528,86 +528,107 @@
<navigation-case>
<from-outcome>addAction</from-outcome>
<to-view-id>/pages/actions/CSActionAdd.jsp</to-view-id>
+ <redirect/>
</navigation-case>
<navigation-case>
<from-outcome>searchAction</from-outcome>
<to-view-id>/pages/actions/CSActionSearch.jsp</to-view-id>
+ <redirect/>
</navigation-case>
<navigation-case>
<from-outcome>editAction</from-outcome>
<to-view-id>/pages/actions/CSActionsEdit.jsp</to-view-id>
+ <redirect/>
</navigation-case>
<navigation-case>
<from-outcome>addGroup</from-outcome>
<to-view-id>/pages/groups/CSGroupAdd.jsp</to-view-id>
+ <redirect/>
</navigation-case>
<navigation-case>
<from-outcome>searchGroup</from-outcome>
<to-view-id>/pages/groups/CSGroupSearch.jsp</to-view-id>
+ <redirect/>
</navigation-case>
<navigation-case>
<from-outcome>editGroup</from-outcome>
<to-view-id>/pages/groups/CSGroupEdit.jsp</to-view-id>
+ <redirect/>
</navigation-case>
<navigation-case>
<from-outcome>addRole</from-outcome>
<to-view-id>/pages/roles/CSRoleCreate.jsp</to-view-id>
+ <redirect/>
</navigation-case>
<navigation-case>
<from-outcome>searchRole</from-outcome>
<to-view-id>/pages/roles/CSRoleSearch.jsp</to-view-id>
+ <redirect/>
</navigation-case>
<navigation-case>
<from-outcome>editRole</from-outcome>
<to-view-id>/pages/roles/CSRoleEdit.jsp</to-view-id>
+ <redirect/>
</navigation-case>
<navigation-case>
<from-outcome>addServer</from-outcome>
<to-view-id>/pages/servers/CSServerAdd.jsp</to-view-id>
+ <redirect/>
</navigation-case>
<navigation-case>
<from-outcome>showServers</from-outcome>
<to-view-id>/pages/servers/CSSAPServers.jsp</to-view-id>
+ <redirect/>
</navigation-case>
<navigation-case>
<from-outcome>addUser</from-outcome>
<to-view-id>/pages/users/CSUserAdd.jsp</to-view-id>
+ <redirect/>
</navigation-case>
<navigation-case>
<from-outcome>searchUser</from-outcome>
<to-view-id>/pages/users/CSUserSearch.jsp</to-view-id>
+ <redirect/>
</navigation-case>
<navigation-case>
<from-outcome>showUsers</from-outcome>
<to-view-id>/pages/users/CSUsersSearchResult.jsp</to-view-id>
+ <redirect/>
</navigation-case>
<navigation-case>
<from-outcome>showMessages</from-outcome>
<to-view-id>/pages/messages/CSMessages.jsp</to-view-id>
+ <redirect/>
</navigation-case>
<navigation-case>
<from-outcome>home</from-outcome>
<to-view-id>/pages/CSMainPanel.jsp</to-view-id>
+ <redirect/>
</navigation-case>
<navigation-case>
<from-outcome>servlet</from-outcome>
<to-view-id>/pages/CSContentsServlet.jsp</to-view-id>
+ <redirect/>
</navigation-case>
<navigation-case>
<from-outcome>usersToGroup</from-outcome>
<to-view-id>/pages/common/CSUsersToGroup.jsp</to-view-id>
+ <redirect/>
</navigation-case>
<navigation-case>
<from-outcome>usersToRole</from-outcome>
<to-view-id>/pages/common/CSUsersToRole.jsp</to-view-id>
+ <redirect/>
</navigation-case>
<navigation-case>
<from-outcome>actionsToRoles</from-outcome>
<to-view-id>/pages/common/CSActionsToRole.jsp</to-view-id>
+ <redirect/>
</navigation-case>
<navigation-case>
<from-outcome>rolesToGroup</from-outcome>
<to-view-id>/pages/common/CSRolesToGroup.jsp</to-view-id>
+ <redirect/>
</navigation-case>
<navigation-case>
<from-outcome>loggedOut</from-outcome>
@@ -617,22 +638,27 @@
<navigation-case>
<from-outcome>searchMessages</from-outcome>
<to-view-id>/pages/messages/CSMessagesSearch.jsp</to-view-id>
+ <redirect/>
</navigation-case>
<navigation-case>
<from-outcome>editUser</from-outcome>
<to-view-id>/pages/users/CSUserEdit.jsp</to-view-id>
+ <redirect/>
</navigation-case>
<navigation-case>
<from-outcome>searchServers</from-outcome>
<to-view-id>/pages/servers/CSServerSearch.jsp</to-view-id>
+ <redirect/>
</navigation-case>
<navigation-case>
<from-outcome>editServer</from-outcome>
<to-view-id>/pages/servers/CSServerEdit.jsp</to-view-id>
+ <redirect/>
</navigation-case>
<navigation-case>
<from-outcome>messageDetails</from-outcome>
<to-view-id>/pages/messages/CSMessagesDetails.jsp</to-view-id>
+ <redirect/>
</navigation-case>
</navigation-rule>
<navigation-rule>
@@ -640,6 +666,7 @@
<navigation-case>
<from-outcome>loginPage</from-outcome>
<to-view-id>/index.jsp</to-view-id>
+ <redirect/>
</navigation-case>
</navigation-rule>
<validator>
Modified: trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java 2006-10-05 08:04:29 UTC (rev 198)
+++ trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java 2006-10-05 09:08:34 UTC (rev 199)
@@ -59,16 +59,17 @@
private static final Logger logger = Logger.getLogger(CommunicateWS.class);
- // private static final String ROLE_OPTION = "roles";
-
- // private static final String USERS_OPTION = "users";
-
/**
* Default constructor.
*/
public CommunicateWS() {
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getMessagesSubset();
+ */
public Collection<WSMessage> getMessagesSubset(int begin, int end) throws WebServiceException {
try {
final MessagesService service = MessagesService.getMessagesService();
@@ -79,6 +80,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getMessagesByServer();
+ */
public Collection<WSMessage> getMessagesByServer(String serverId) throws WebServiceException {
try {
final MessagesService service = MessagesService.getMessagesService();
@@ -88,7 +94,12 @@
throw new WebServiceException(t);
}
}
-
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#deleteMessage();
+ */
public void deleteMessage(String id) throws WebServiceException {
try {
final MessagesService service = MessagesService.getMessagesService();
@@ -97,7 +108,12 @@
throw new WebServiceException("Exception during deleting message with id: "+ id);
}
}
-
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getMessagesSize();
+ */
public int getMessagesSize(SearchMessageModel wsMessage) throws WebServiceException {
try {
MessagesService service = MessagesService.getMessagesService();
@@ -108,6 +124,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getAllMessages();
+ */
public Collection<WSMessage> getAllMessages() throws WebServiceException {
try {
MessagesService service = MessagesService.getMessagesService();
@@ -118,6 +139,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getSelectedMessages();
+ */
public Collection<WSMessage> getSelectedMessages(SearchMessageModel wsMessage)
throws WebServiceException {
try {
@@ -129,6 +155,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getSelectedMessagesSubset();
+ */
public Collection<WSMessage> getSelectedMessagesSubset(SearchMessageModel wsMessage, int begin, int end)
throws WebServiceException {
try {
@@ -140,6 +171,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getContentsById();
+ */
public WSContents getContentsById(String id) throws WebServiceException {
try {
MessagesService service = MessagesService.getMessagesService();
@@ -150,6 +186,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getSentContentsByMessage();
+ */
public Collection<WSSentContent> getSentContentsByMessage(String id) throws WebServiceException {
try {
MessagesService service = MessagesService.getMessagesService();
@@ -160,6 +201,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getContentsBySentContent();
+ */
public Collection<WSContents> getContentsBySentContent(String id) throws WebServiceException {
try {
MessagesService service = MessagesService.getMessagesService();
@@ -170,6 +216,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getMessageById();
+ */
public WSMessage getMessageById(String id) throws WebServiceException {
try {
MessagesService service = MessagesService.getMessagesService();
@@ -179,7 +230,12 @@
throw new WebServiceException(t);
}
}
-
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getInstancesSize();
+ */
public int getInstancesSize(WSSAPInstanceDef def, boolean defaultSearch, boolean loadSearch, boolean unicodeSearch, boolean activeSearch)
throws WebServiceException {
try {
@@ -191,6 +247,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getInstancesSubset();
+ */
public Collection<WSSAPInstanceDef> getInstancesSubset(int begin, int end) throws WebServiceException {
try {
ServersService service = ServersService.getInstance();
@@ -202,6 +263,11 @@
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getAllInstances();
+ */
public Collection<WSSAPInstanceDef> getAllInstances() throws WebServiceException {
try {
ServersService service = ServersService.getInstance();
@@ -213,6 +279,11 @@
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getInstanceById();
+ */
public WSSAPInstanceDef getInstanceById(String id) throws WebServiceException {
try {
ServersService service = ServersService.getInstance();
@@ -224,6 +295,11 @@
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getSelectedInstancesSubset();
+ */
public Collection<WSSAPInstanceDef> getSelectedInstancesSubset(WSSAPInstanceDef def,
boolean defaultSearch, boolean loadSearch, boolean unicodeSearch, boolean activeSearch, int begin, int end)
throws WebServiceException {
@@ -236,6 +312,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getSelectedInstances();
+ */
public Collection<WSSAPInstanceDef> getSelectedInstances(WSSAPInstanceDef def,
boolean defaultSearch, boolean loadSearch, boolean unicodeSearch, boolean activeSearch)
throws WebServiceException {
@@ -248,6 +329,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#saveNewInstance();
+ */
public WSSAPInstanceDef saveNewInstance(WSSAPInstanceDef instance) throws WebServiceException {
try {
@@ -259,6 +345,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#deleteServer();
+ */
public void deleteServer(String id) throws WebServiceException {
try {
ServersService service = ServersService.getInstance();
@@ -268,7 +359,12 @@
throw new WebServiceException("error in deleteServer method", t);
}
}
-
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getUsersSize();
+ */
public int getUsersSize(WSUser user, boolean enabledSearch) throws WebServiceException {
try {
UsersService service = UsersService.getInstance();
@@ -279,6 +375,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getAllUsers();
+ */
public Collection<WSUser> getAllUsers() throws WebServiceException {
try {
UsersService service = UsersService.getInstance();
@@ -289,6 +390,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getUsersSubset();
+ */
public Collection<WSUser> getUsersSubset(int begin, int end) throws WebServiceException {
try {
UsersService service = UsersService.getInstance();
@@ -299,6 +405,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getSelectedUsersSubset();
+ */
public Collection<WSUser> getSelectedUsersSubset(WSUser user, boolean enabledSearch, int begin, int end) throws WebServiceException {
try {
UsersService service = UsersService.getInstance();
@@ -312,6 +423,11 @@
// TODO: [SK] czy ta metoda sluzy tylko do dodawania nowych userow? czy takze
// do zapisywania zmian przy edycji juz istniejacych userow ? nazwa tej metody jest odpowiednia
// ?
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#addUserToDatabase();
+ */
public WSUser addUserToDatabase(WSUser user) throws WebServiceException {
try {
UsersService service = UsersService.getInstance();
@@ -322,6 +438,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#deleteUserFromDatabase();
+ */
public void deleteUserFromDatabase(String id) throws WebServiceException {
try {
UsersService service = UsersService.getInstance();
@@ -335,6 +456,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getActionsAvailable();
+ */
public Collection<WSAction> getActionsAvailable() throws WebServiceException {
try {
ActionsService service = ActionsService.getInstance();
@@ -345,6 +471,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getActionsByRole();
+ */
public Collection<WSAction> getActionsByRole(String id) throws WebServiceException {
try {
ActionsService service = ActionsService.getInstance();
@@ -357,6 +488,11 @@
// TODO: [SK] czy ta metoda sluzy tylko do dodawania nowych akcji? czy takze
// do zapisywania zmian przy edycji juz istniejacych akcji ? nazwa tej metody jest odpowiednia ?
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#addActionToDatabase();
+ */
public WSAction addActionToDatabase(WSAction action) throws WebServiceException {
try {
ActionsService service = ActionsService.getInstance();
@@ -370,7 +506,11 @@
}
}
- // TODO: [SK] czy ta metoda nie powinna zwracac obiektu typu WSAction ?
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getActionById();
+ */
public Action getActionById(String id) throws WebServiceException {
try {
ActionsService service = ActionsService.getInstance();
@@ -381,6 +521,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getWSActionById();
+ */
public WSAction getWSActionById(String id) throws WebServiceException {
try {
ActionsService service = ActionsService.getInstance();
@@ -391,6 +536,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#deleteActionFromDatabase();
+ */
public void deleteActionFromDatabase(String id) throws WebServiceException {
try {
ActionsService service = ActionsService.getInstance();
@@ -404,6 +554,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getActionsByName();
+ */
public Collection<WSAction> getActionsByName(String name) throws WebServiceException {
try {
ActionsService service = ActionsService.getInstance();
@@ -414,6 +569,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#updateRole();
+ */
public WSRole updateRole(WSRole wsRole) throws WebServiceException {
try {
RolesService service = RolesService.getInstnce();
@@ -427,6 +587,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#updateActionsForRole();
+ */
public WSRole updateActionsForRole(WSRole wsRole, String[] ids) throws WebServiceException {
try {
RolesService service = RolesService.getInstnce();
@@ -440,6 +605,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#updateUsersForRole();
+ */
public WSRole updateUsersForRole(WSRole wsRole, String[] idsToAdd, String[] idsToDelete)
throws WebServiceException {
try {
@@ -454,6 +624,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#deleteRoleFromDatabase();
+ */
public void deleteRoleFromDatabase(String id) throws WebServiceException {
try {
RolesService service = RolesService.getInstnce();
@@ -467,6 +642,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getAllRoles();
+ */
public Collection<WSRole> getAllRoles() throws WebServiceException {
try {
RolesService service = RolesService.getInstnce();
@@ -477,6 +657,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#serverTest();
+ */
public String serverTest(String serverName) throws WebServiceException {
try {
ServersService service = ServersService.getInstance();
@@ -487,6 +672,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getAllGroups();
+ */
public Collection<WSGroup> getAllGroups() throws WebServiceException {
try {
GroupsService service = GroupsService.getInstance();
@@ -497,6 +687,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#updateGroup();
+ */
public WSGroup updateGroup(WSGroup wsGroup) throws WebServiceException {
try {
GroupsService service = GroupsService.getInstance();
@@ -510,6 +705,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#updateRolesForGroup();
+ */
public WSGroup updateRolesForGroup(WSGroup wsGroup, String[] ids) throws WebServiceException {
try {
GroupsService service = GroupsService.getInstance();
@@ -523,6 +723,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#updateUsersForGroup();
+ */
public WSGroup updateUsersForGroup(WSGroup wsGroup, String[] idsToAdd, String[] idsToDelete)
throws WebServiceException {
try {
@@ -537,6 +742,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#deleteGroupFromDatabase();
+ */
public void deleteGroupFromDatabase(String id) throws WebServiceException {
try {
GroupsService service = GroupsService.getInstance();
@@ -550,6 +760,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getUserById();
+ */
public WSUser getUserById(String id) throws WebServiceException {
try {
UsersService service = UsersService.getInstance();
@@ -560,6 +775,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getUserByName();
+ */
public WSUser getUserByName(String name) throws WebServiceException {
try {
UsersService service = UsersService.getInstance();
@@ -570,6 +790,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getRoleById();
+ */
public WSRole getRoleById(String id) throws WebServiceException {
try {
RolesService service = RolesService.getInstnce();
@@ -580,6 +805,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getGroupById();
+ */
public WSGroup getGroupById(String id) throws WebServiceException {
try {
GroupsService service = GroupsService.getInstance();
@@ -590,6 +820,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getRolesByName();
+ */
public Collection<WSRole> getRolesByName(String name) throws WebServiceException {
try {
RolesService service = RolesService.getInstnce();
@@ -600,6 +835,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getGroupsByName();
+ */
public Collection<WSGroup> getGroupsByName(String name) throws WebServiceException {
try {
GroupsService service = GroupsService.getInstance();
@@ -610,6 +850,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getUsersByFields();
+ */
public Collection<WSUser> getUsersByFields(WSUser user, boolean enabledSearch) throws WebServiceException {
try {
UsersService service = UsersService.getInstance();
@@ -620,6 +865,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getUsersForGroup();
+ */
public Collection<WSUser> getUsersForGroup(String id) throws WebServiceException {
try {
UsersService service = UsersService.getInstance();
@@ -630,6 +880,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getRolesForGroup();
+ */
public Collection<WSRole> getRolesForGroup(String id) throws WebServiceException {
try {
RolesService service = RolesService.getInstnce();
@@ -640,6 +895,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getUsersByRole();
+ */
public Collection<WSUser> getUsersByRole(String id) throws WebServiceException {
try {
UsersService service = UsersService.getInstance();
@@ -650,6 +910,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getRolesByUser();
+ */
public Collection<WSRole> getRolesByUser(String id) throws WebServiceException {
try {
RolesService service = RolesService.getInstnce();
@@ -660,6 +925,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getGroupsByUser();
+ */
public Collection<WSGroup> getGroupsByUser(String id) throws WebServiceException {
try {
GroupsService service = GroupsService.getInstance();
@@ -670,6 +940,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#getRoleByActionId();
+ */
public Collection<WSRole> getRoleByActionId(String id) throws WebServiceException {
try {
RolesService service = RolesService.getInstnce();
@@ -680,6 +955,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#resubmitMessageWithId();
+ */
public void resubmitMessageWithId(String messageId) throws WebServiceException {
try {
MessagesService service = MessagesService.getMessagesService();
@@ -690,6 +970,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#isSapServerWorking();
+ */
public boolean isSapServerWorking(String serverName) throws WebServiceException {
try {
ServersService service = ServersService.getInstance();
@@ -700,6 +985,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#startSapServer();
+ */
public void startSapServer(String serverName) throws WebServiceException {
try {
ServersService service = ServersService.getInstance();
@@ -710,6 +1000,11 @@
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#stopSapServer();
+ */
public void stopSapServer(String serverName) throws WebServiceException {
try {
ServersService service = ServersService.getInstance();
@@ -719,7 +1014,12 @@
throw new WebServiceException(t);
}
}
-
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.commsuite.ws.IcommunicateWS#deactivateServer();
+ */
public void deactivateServer(String id, boolean mode) throws WebServiceException {
try {
ServersService service = ServersService.getInstance();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2006-10-05 12:34:05
|
Revision: 201
http://svn.sourceforge.net/comsuite/?rev=201&view=rev
Author: marasm
Date: 2006-10-05 05:33:48 -0700 (Thu, 05 Oct 2006)
Log Message:
-----------
SAPInstanceDef -> sapInstanceDef
Modified Paths:
--------------
trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/SAPInstanceDefDaoImpl.java
trunk/code/CSTests/src/org/commsuite/managers/impl/MessageManagerTest.java
trunk/code/CSTests/src/org/commsuite/util/FakeObject.java
Modified: trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/SAPInstanceDefDaoImpl.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/SAPInstanceDefDaoImpl.java 2006-10-05 10:08:25 UTC (rev 200)
+++ trunk/code/CSMiddleware/src/org/commsuite/dao/hibernate/SAPInstanceDefDaoImpl.java 2006-10-05 12:33:48 UTC (rev 201)
@@ -122,7 +122,7 @@
public SAPInstanceDef getSAPInstanceDefByMessageId(Long messageId) {
final List sapList = getHibernateTemplate()
.find(
- "select s from Message m join m.SAPInstanceDefOwner s where m.id = ?",
+ "select s from Message m join m.sapInstanceDefOwner s where m.id = ?",
messageId);
if (sapList.size() == 0)
Modified: trunk/code/CSTests/src/org/commsuite/managers/impl/MessageManagerTest.java
===================================================================
--- trunk/code/CSTests/src/org/commsuite/managers/impl/MessageManagerTest.java 2006-10-05 10:08:25 UTC (rev 200)
+++ trunk/code/CSTests/src/org/commsuite/managers/impl/MessageManagerTest.java 2006-10-05 12:33:48 UTC (rev 201)
@@ -136,7 +136,7 @@
message.addContents(contents);
- message.setSAPInstanceDefOwner(sap);
+ message.setSapInstanceDefOwner(sap);
message.setDescription("message");
message.setSapID("sapid");
message = mgr.saveMessage(message);
Modified: trunk/code/CSTests/src/org/commsuite/util/FakeObject.java
===================================================================
--- trunk/code/CSTests/src/org/commsuite/util/FakeObject.java 2006-10-05 10:08:25 UTC (rev 200)
+++ trunk/code/CSTests/src/org/commsuite/util/FakeObject.java 2006-10-05 12:33:48 UTC (rev 201)
@@ -54,7 +54,7 @@
SAPInstanceDef sapInstanceDef = sapInstanceDefManager.getSAPInstanceDef("123456");
message.setSapID("sap01-01");
- message.setSAPInstanceDefOwner(sapInstanceDef);
+ message.setSapInstanceDefOwner(sapInstanceDef);
message.setCreationDate(new Date());
message.setDirection(Direction.OUTBOUND);
message.setEndDate(new Date());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|