Skip to content
Snippets Groups Projects
Commit 8735ef17 authored by Edileuton Henrique de Oliveira's avatar Edileuton Henrique de Oliveira
Browse files

webservice: Add OS parameter to getUpdateLink and getAgentVersion functions

parent 26e8c47e
No related branches found
No related tags found
No related merge requests found
...@@ -42,6 +42,9 @@ import javax.xml.validation.SchemaFactory; ...@@ -42,6 +42,9 @@ import javax.xml.validation.SchemaFactory;
public class DataSID { public class DataSID {
private static final int LINUX = 0;
private static final int WINDOWS = 1;
private static final String SA_INVENTORY = "telecenter_inventory"; private static final String SA_INVENTORY = "telecenter_inventory";
private static final String SA_NET_USAGE = "telecenter_net_usage"; private static final String SA_NET_USAGE = "telecenter_net_usage";
private static final String SA_USER_HISTORY = "telecenter_user_history"; private static final String SA_USER_HISTORY = "telecenter_user_history";
...@@ -52,6 +55,9 @@ public class DataSID { ...@@ -52,6 +55,9 @@ public class DataSID {
private static final String AGENT_VERSION = "1.0.0"; private static final String AGENT_VERSION = "1.0.0";
private static final String AGENT_UPDATE_LINK = "http://bisimmcdev.c3sl.ufpr.br/download/datasid-1.0.0-update.run"; private static final String AGENT_UPDATE_LINK = "http://bisimmcdev.c3sl.ufpr.br/download/datasid-1.0.0-update.run";
private static final String WINDOWS_AGENT_VERSION = "1.0.0";
private static final String WINDOWS_UPDATE_LINK = "http://bisimmcdev.c3sl.ufpr.br/download/datasid-1.0.0-update.exe";
// enum does not work as expected inside an axis web service // enum does not work as expected inside an axis web service
// using simple constants instead // using simple constants instead
private static final int ERROR = 0; private static final int ERROR = 0;
...@@ -123,10 +129,19 @@ public class DataSID { ...@@ -123,10 +129,19 @@ public class DataSID {
* Return a string with current agent version. * Return a string with current agent version.
* *
* @author Eduardo Luis Buratti * @author Eduardo Luis Buratti
* @param OS Integer of OS Type
* @return String * @return String
*/ */
public static String getAgentVersion() { public static String getAgentVersion(int OS) {
switch(OS){
case LINUX:
return AGENT_VERSION; return AGENT_VERSION;
case WINDOWS:
return WINDOWS_AGENT_VERSION;
default:
return "ERROR: invalid OS";
}
} }
/** /**
...@@ -134,10 +149,19 @@ public class DataSID { ...@@ -134,10 +149,19 @@ public class DataSID {
* agent. * agent.
* *
* @author Eduardo Luis Buratti * @author Eduardo Luis Buratti
* @param OS Integer of OS Type
* @return String * @return String
*/ */
public static String getUpdateLink() { public static String getUpdateLink(int OS)
{
switch(OS){
case LINUX:
return AGENT_UPDATE_LINK; return AGENT_UPDATE_LINK;
case WINDOWS:
return WINDOWS_UPDATE_LINK;
default:
return "ERROR: invalid OS";
}
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment