Android compilation issues fixed
authorAlex Kirhenshtein <alk@netxms.org>
Mon, 25 Sep 2017 22:24:54 +0000 (18:24 -0400)
committerAlex Kirhenshtein <alk@netxms.org>
Mon, 25 Sep 2017 22:24:54 +0000 (18:24 -0400)
android/src/console/app/src/main/java/org/netxms/ui/android/main/activities/ConnectionPointBrowser.java
android/src/console/app/src/main/java/org/netxms/ui/android/main/activities/GraphBrowser.java
android/src/console/app/src/main/java/org/netxms/ui/android/main/activities/NodeBrowser.java
android/src/console/app/src/main/java/org/netxms/ui/android/service/tasks/ExecObjectToolTask.java

index 24d7de3..cd5ba3f 100644 (file)
@@ -6,8 +6,8 @@ import java.util.List;
 
 import org.json.JSONArray;
 import org.json.JSONException;
-import org.netxms.client.MacAddress;
-import org.netxms.client.MacAddressFormatException;
+import org.netxms.base.MacAddress;
+import org.netxms.base.MacAddressFormatException;
 import org.netxms.client.NXCException;
 import org.netxms.client.NXCSession;
 import org.netxms.client.objects.Interface;
index 4f414f2..83b09b3 100644 (file)
@@ -111,7 +111,7 @@ public class GraphBrowser extends AbstractClientActivity
                        ChartConfig config;
                        try
                        {
-                               config = ChartConfig.createFromXml(gs.getFiltersAsXML());
+                               config = ChartConfig.createFromXml(gs.createXml());
                        }
                        catch (Exception e)
                        {
index 5a8792a..4be6485 100644 (file)
@@ -192,7 +192,7 @@ public class NodeBrowser extends AbstractClientActivity
                                while (tl.hasNext())
                                {
                                        tool = tl.next();
-                                       switch (tool.getType())
+                                       switch (tool.getToolType())
                                        {
                                                case ObjectTool.TYPE_INTERNAL:
                                                case ObjectTool.TYPE_ACTION:
index e41190a..bb149dd 100644 (file)
@@ -41,22 +41,25 @@ public class ExecObjectToolTask extends AsyncTask<Object, Void, Exception>
         service = (ClientConnectorService)params[3];
         try
         {
-            switch(((ObjectTool)params[2]).getType())
+            ObjectTool objectTool = (ObjectTool) params[2];
+            NXCSession session = (NXCSession) params[0];
+            Long objectId = (Long) params[1];
+            switch(objectTool.getToolType())
             {
                 case ObjectTool.TYPE_INTERNAL:
-                    if (((ObjectTool)params[2]).getData().equals("wakeup"))
+                    if (objectTool.getData().equals("wakeup"))
                     {
-                        ((NXCSession)params[0]).wakeupNode((Long)params[1]);
+                        session.wakeupNode(objectId);
                         break;
                     }
                 case ObjectTool.TYPE_ACTION:
-                    ((NXCSession)params[0]).executeAction((Long)params[1], ((ObjectTool)params[2]).getData(), null);
+                    session.executeAction(objectId, objectTool.getData(), null);
                     break;
                 case ObjectTool.TYPE_SERVER_COMMAND:
-                    ((NXCSession)params[0]).executeServerCommand((Long)params[1], ((ObjectTool)params[2]).getData(), null);
+                    session.executeServerCommand(objectId, objectTool.getData(), null);
                     break;
                 case ObjectTool.TYPE_SERVER_SCRIPT:
-                    ((NXCSession)params[0]).executeLibraryScript((Long)params[1], ((ObjectTool)params[2]).getData(), null, null);
+                    session.executeLibraryScript(objectId, objectTool.getData(), null, null);
                     break;
             }
         }