[Comsuite-svn] SF.net SVN: comsuite: [127] trunk/code
Brought to you by:
zduniak
|
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 WebServiceException on any error
+ */
public Collection<WSRole> getRolesByName(String name) throws WebServiceException;
+ /**
+ * returns set of action by role id, they are asigned.
+ *
+ * @param id id of role
+ * @return collection of actions
+ * @throws WebServiceException on any errorz
+ */
public Collection<WSAction> getActionsByRole(String id) throws WebServiceException;
+ /**
+ * returns set of users by role id, they are assigned
+ *
+ * @param id id of role
+ * @return collection of users
+ * @throws WebServiceException on any error
+ */
public Collection<WSUser> getUsersByRole(String id) throws WebServiceException;
+ /**
+ * returns collection of roles assigned to user with <code>id</code>
+ *
+ * @param id id of user
+ * @return collection of roles
+ * @throws WebServiceException on any error
+ */
public Collection<WSRole> getRolesByUser(String id) throws WebServiceException;
+ /**
+ * returns collection of roles, the action with given <code>id</code>
+ * is assigned to.
+ *
+ * @param id id of action
+ * @return collection of roles
+ * @throws WebServiceException on any error
+ */
public Collection<WSRole> getRoleByActionId(String id) throws WebServiceException;
- /* groups methods */
-
+ /**
+ * returns collection of all groups from database.
+ *
+ * @return collection of groups
+ * @throws WebServiceException on any exception
+ */
public Collection<WSGroup> getAllGroups() throws WebServiceException;
+ /**
+ * updates or adds group to database.
+ *
+ * @param wsGroup group object to add/modify
+ * @return added/modified object
+ * @throws WebServiceException on any error
+ */
public WSGroup updateGroup(WSGroup wsGroup) throws WebServiceException;
+ /**
+ * updates roles assigned to <code>group</code>.
+ *
+ * @param wsGroup group to be updated
+ * @param ids array of role ids
+ * @return updated grouop object
+ * @throws WebServiceException on any error
+ */
public WSGroup updateRolesForGroup(WSGroup wsGroup, String[] ids) throws WebServiceException;
+ /**
+ * updates users assigned to <code>group</code>.
+ *
+ * @param wsGroup group to be updated
+ * @param idsToAdd array of user ids to be added
+ * @param idsToDelete array of user ids to be deleted
+ * @return updated group
+ * @throws WebServiceException on any error
+ */
public WSGroup updateUsersForGroup(WSGroup wsGroup, String[] idsToAdd, String[] idsToDelete) throws WebServiceException;
+ /**
+ * deletes group with <code>id</code> from database.
+ *
+ * @param id id of group to be deleted
+ * @throws WebServiceException onany exception
+ */
public void deleteGroupFromDatabase(String id) throws WebServiceException;
+ /**
+ * returns group with given <code>id</code>.
+ *
+ * @param id id of requested group
+ * @return group with <code>id</code>
+ * @throws WebServiceException on any error
+ */
public WSGroup getGroupById(String id) throws WebServiceException;
+ /**
+ * returns groups with name that matches <code>name</code> pattern.
+ *
+ * @param name pattern to match
+ * @return collection of groups
+ * @throws WebServiceException on any error
+ */
public Collection<WSGroup> getGroupsByName(String name) throws WebServiceException;
+ /**
+ * returns users assigned to group with <code>id</code>.
+ *
+ * @param id id of group
+ * @return collection of users
+ * @throws WebServiceException on any error
+ */
public Collection<WSUser> getUsersForGroup(String id) throws WebServiceException;
+ /**
+ * returns roles assigned to group with <code>id</code>
+ *
+ * @param id id of grouop
+ * @return collection of roles
+ * @throws WebServiceException on any error
+ */
public Collection<WSRole> getRolesForGroup(String id) throws WebServiceException;
+ /**
+ * returns all groups, the user with <code>id</code> is assigned to.
+ *
+ * @param name name of user
+ * @return collection of groups.
+ * @throws WebServiceException on any exception
+ */
public Collection<WSGroup> getGroupsByUser(String name) throws WebServiceException;
+ /**
+ * deactivates(or activates, depending on <code>mode</code>) server instance
+ * with <code>id</code>.
+ *
+ * @param id id ofinstance to be activated/deactivated
+ * @param mode determines if instance should be activated or deactivated
+ * @throws WebServiceException on any error
+ */
public void deactivateServer(String id, boolean mode) throws WebServiceException ;
/**
@@ -195,8 +603,14 @@
* @return
* @throws WebServiceException
*/
- public boolean testServer(String serverName) throws WebServiceException;
+ public boolean serverTest(String serverName) throws WebServiceException;
+ /**
+ * resubmits message, to be sent once again.
+ *
+ * @param messageId id of message to be resubmitted
+ * @throws WebServiceException on any exception
+ */
public void resubmitMessageWithId(String messageId) throws WebServiceException;
}
\ No newline at end of file
Modified: trunk/code/CSMiddleware/src/org/commsuite/managers/SAPInstanceDefManager.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/managers/SAPInstanceDefManager.java 2006-09-03 14:59:02 UTC (rev 126)
+++ trunk/code/CSMiddleware/src/org/commsuite/managers/SAPInstanceDefManager.java 2006-09-04 22:33:07 UTC (rev 127)
@@ -34,7 +34,7 @@
public List<SAPInstanceDef> getSAPInstances();
public List<SAPInstanceDef> getSelectedSAPInstances(SAPInstanceDef instance,
- boolean defaultSearch, boolean loadSearch, boolean unicodeSearch) ;
+ boolean defaultSearch, boolean loadSearch, boolean unicodeSearch, boolean activeSearch) ;
public SAPInstanceDef getSAPInstanceDef(String id);
Modified: trunk/code/CSMiddleware/src/org/commsuite/managers/impl/SAPInstanceDefManagerImpl.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/managers/impl/SAPInstanceDefManagerImpl.java 2006-09-03 14:59:02 UTC (rev 126)
+++ trunk/code/CSMiddleware/src/org/commsuite/managers/impl/SAPInstanceDefManagerImpl.java 2006-09-04 22:33:07 UTC (rev 127)
@@ -46,7 +46,7 @@
* Lists selected SAPInstanceDef's
*/
public List<SAPInstanceDef> getSelectedSAPInstances(SAPInstanceDef instance,
- boolean defaultSearch, boolean loadSearch, boolean unicodeSearch) {
+ boolean defaultSearch, boolean loadSearch, boolean unicodeSearch, boolean activeSearch) {
return dao.getMatchingServers(instance, defaultSearch, loadSearch, unicodeSearch);
}
Modified: trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java 2006-09-03 14:59:02 UTC (rev 126)
+++ trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java 2006-09-04 22:33:07 UTC (rev 127)
@@ -161,11 +161,11 @@
}
}
- 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 {
try {
ServersService service = ServersService.getInstance();
- return service.getInstancesSize(def, defaultSearch, loadSearch, unicodeSearch);
+ return service.getInstancesSize(def, defaultSearch, loadSearch, unicodeSearch, activeSearch);
} catch(Throwable t) {
logger.fatal("error in getInstancesSize method", t);
throw new WebServiceException(t);
@@ -206,11 +206,11 @@
}
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 {
try {
ServersService service = ServersService.getInstance();
- return service.getSelectedInstancesSubset(def, defaultSearch, loadSearch, unicodeSearch, begin, end);
+ return service.getSelectedInstancesSubset(def, defaultSearch, loadSearch, unicodeSearch, activeSearch, begin, end);
} catch (Throwable t) {
logger.fatal("error in getAllInstances method", t);
throw new WebServiceException(t);
@@ -218,11 +218,11 @@
}
public Collection<WSSAPInstanceDef> getSelectedInstances(WSSAPInstanceDef def,
- boolean defaultSearch, boolean loadSearch, boolean unicodeSearch)
+ boolean defaultSearch, boolean loadSearch, boolean unicodeSearch, boolean activeSearch)
throws WebServiceException {
try {
ServersService service = ServersService.getInstance();
- return service.getSelectedInstances(def, defaultSearch, loadSearch, unicodeSearch);
+ return service.getSelectedInstances(def, defaultSearch, loadSearch, unicodeSearch, activeSearch);
} catch (Throwable t) {
logger.fatal("error in getAllInstances method", t);
throw new WebServiceException(t);
@@ -458,7 +458,7 @@
}
}
- public boolean testServer(String serverName) throws WebServiceException {
+ public boolean serverTest(String serverName) throws WebServiceException {
try {
ServersService service = ServersService.getInstance();
;
Modified: trunk/code/CSMiddleware/src/org/commsuite/ws/services/ServersService.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/ws/services/ServersService.java 2006-09-03 14:59:02 UTC (rev 126)
+++ trunk/code/CSMiddleware/src/org/commsuite/ws/services/ServersService.java 2006-09-04 22:33:07 UTC (rev 127)
@@ -73,14 +73,14 @@
* @throws WebServiceException when something goes wrong
*/
public int getInstancesSize(WSSAPInstanceDef def,
- boolean defaultSearch, boolean loadSearch, boolean unicodeSearch) throws WebServiceException {
+ boolean defaultSearch, boolean loadSearch, boolean unicodeSearch, boolean activeSearch) throws WebServiceException {
try {
final SAPInstanceDefManager instManager = (SAPInstanceDefManager) SpringMiddlewareContext
.getSAPInstanceDefManager();
if (null == def) {
return instManager.getSAPInstances().size();
} else {
- return instManager.getSelectedSAPInstances(new SAPInstanceDef(def), defaultSearch, loadSearch, unicodeSearch).size();
+ return instManager.getSelectedSAPInstances(new SAPInstanceDef(def), defaultSearch, loadSearch, unicodeSearch, activeSearch).size();
}
} catch(Throwable t) {
logger.fatal("error in getInstancesSize method", t);
@@ -145,13 +145,13 @@
* @throws WebServiceException when something goes wrong
*/
public Collection<WSSAPInstanceDef> getSelectedInstances(WSSAPInstanceDef def,
- boolean defaultSearch, boolean loadSearch, boolean unicodeSearch) throws WebServiceException {
+ boolean defaultSearch, boolean loadSearch, boolean unicodeSearch, boolean activeSearch) throws WebServiceException {
try {
final SAPInstanceDefManager instManager = (SAPInstanceDefManager) SpringMiddlewareContext
.getSAPInstanceDefManager();
final Collection<SAPInstanceDef> saps = instManager
- .getSelectedSAPInstances(new SAPInstanceDef(def), defaultSearch, loadSearch, unicodeSearch);
+ .getSelectedSAPInstances(new SAPInstanceDef(def), defaultSearch, loadSearch, unicodeSearch, activeSearch);
final Collection<WSSAPInstanceDef> result = new FastTable<WSSAPInstanceDef>();
for (final SAPInstanceDef sap : saps) {
result.add(sap);
@@ -177,14 +177,14 @@
* @throws WebServiceException when something goes wrong
*/
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 {
try {
final SAPInstanceDefManager instManager = (SAPInstanceDefManager) SpringMiddlewareContext
.getSAPInstanceDefManager();
final List<SAPInstanceDef> saps = instManager
- .getSelectedSAPInstances(new SAPInstanceDef(def), defaultSearch, loadSearch, unicodeSearch);
+ .getSelectedSAPInstances(new SAPInstanceDef(def), defaultSearch, loadSearch, unicodeSearch, activeSearch);
final Collection<WSSAPInstanceDef> result = new FastTable<WSSAPInstanceDef>();
for (int i = begin; i <= end; i++) {
result.add(saps.get(i));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|