added method isAllowedOnMap
authorVictor Kirhenshtein <victor@netxms.org>
Fri, 5 Apr 2013 17:25:08 +0000 (17:25 +0000)
committerVictor Kirhenshtein <victor@netxms.org>
Fri, 5 Apr 2013 17:25:08 +0000 (17:25 +0000)
src/java/netxms-client/src/main/java/org/netxms/client/objects/AbstractObject.java
src/java/netxms-client/src/main/java/org/netxms/client/objects/AccessPoint.java
src/java/netxms-client/src/main/java/org/netxms/client/objects/Cluster.java
src/java/netxms-client/src/main/java/org/netxms/client/objects/Condition.java
src/java/netxms-client/src/main/java/org/netxms/client/objects/Container.java
src/java/netxms-client/src/main/java/org/netxms/client/objects/MobileDevice.java
src/java/netxms-client/src/main/java/org/netxms/client/objects/NetworkMap.java
src/java/netxms-client/src/main/java/org/netxms/client/objects/Node.java
src/java/netxms-client/src/main/java/org/netxms/client/objects/Rack.java
src/java/netxms-client/src/main/java/org/netxms/client/objects/Subnet.java
src/java/netxms-client/src/main/java/org/netxms/client/objects/Zone.java

index 418b42a..e376a35 100644 (file)
@@ -620,6 +620,17 @@ public abstract class AbstractObject
                                return true;
                return false;
        }
+       
+       /**
+        * If this method returns true object is allowed to be on custom network map.
+        * Default implementation always returns false.
+        * 
+        * @return true if object is allowed to be on custom network map
+        */
+       public boolean isAllowedOnMap()
+       {
+               return false;
+       }
 
        /**
         * @return the objectClass
@@ -748,5 +759,4 @@ public abstract class AbstractObject
        {
                this.session = session;
        }
-
 }
index fa65a05..0a12a09 100644 (file)
@@ -42,6 +42,15 @@ public class AccessPoint extends GenericObject
                return "AccessPoint";
        }
 
+       /* (non-Javadoc)
+        * @see org.netxms.client.objects.AbstractObject#isAllowedOnMap()
+        */
+       @Override
+       public boolean isAllowedOnMap()
+       {
+               return true;
+       }
+
        /**
         * @return the nodeId
         */
index 940db12..0f357bf 100644 (file)
@@ -96,6 +96,15 @@ public class Cluster extends GenericObject
                return inetAddr;\r
        }\r
 \r
+       /* (non-Javadoc)\r
+        * @see org.netxms.client.objects.AbstractObject#isAllowedOnMap()\r
+        */\r
+       @Override\r
+       public boolean isAllowedOnMap()\r
+       {\r
+               return true;\r
+       }\r
+\r
        /**\r
         * @return the clusterType\r
         */\r
index f563001..9bf776a 100644 (file)
@@ -75,6 +75,15 @@ public class Condition extends GenericObject
                return "Condition";\r
        }\r
 \r
+       /* (non-Javadoc)\r
+        * @see org.netxms.client.objects.AbstractObject#isAllowedOnMap()\r
+        */\r
+       @Override\r
+       public boolean isAllowedOnMap()\r
+       {\r
+               return true;\r
+       }\r
+\r
        /**\r
         * @return the script\r
         */\r
index 1b8d6fd..cc25744 100644 (file)
@@ -45,6 +45,15 @@ public class Container extends GenericObject
                autoBindFilter = msg.getVariableAsString(NXCPCodes.VID_AUTOBIND_FILTER);\r
        }\r
 \r
+       /* (non-Javadoc)\r
+        * @see org.netxms.client.objects.AbstractObject#isAllowedOnMap()\r
+        */\r
+       @Override\r
+       public boolean isAllowedOnMap()\r
+       {\r
+               return true;\r
+       }\r
+\r
        /**\r
         * @return the category\r
         */\r
index b4f5580..ef44b7d 100644 (file)
@@ -56,6 +56,15 @@ public class MobileDevice extends GenericObject
                lastReportTime = msg.getVariableAsDate(NXCPCodes.VID_LAST_CHANGE_TIME);
        }
 
+       /* (non-Javadoc)
+        * @see org.netxms.client.objects.AbstractObject#isAllowedOnMap()
+        */
+       @Override
+       public boolean isAllowedOnMap()
+       {
+               return true;
+       }
+
        /**
         * @return the deviceId
         */
index e438a65..b6eb3eb 100644 (file)
@@ -114,6 +114,15 @@ public class NetworkMap extends GenericObject
                return "NetworkMap";\r
        }\r
 \r
+       /* (non-Javadoc)\r
+        * @see org.netxms.client.objects.AbstractObject#isAllowedOnMap()\r
+        */\r
+       @Override\r
+       public boolean isAllowedOnMap()\r
+       {\r
+               return true;\r
+       }\r
+\r
        /**\r
         * @return the mapType\r
         */\r
index c3b0549..2c97a13 100644 (file)
@@ -56,4 +56,13 @@ public class Node extends AbstractNode
        {\r
                return "Node";\r
        }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.netxms.client.objects.AbstractObject#isAllowedOnMap()\r
+        */\r
+       @Override\r
+       public boolean isAllowedOnMap()\r
+       {\r
+               return true;\r
+       }\r
 }\r
index bcb0030..574866d 100644 (file)
@@ -48,6 +48,15 @@ public class Rack extends GenericObject
                return "Rack";
        }
 
+       /* (non-Javadoc)
+        * @see org.netxms.client.objects.AbstractObject#isAllowedOnMap()
+        */
+       @Override
+       public boolean isAllowedOnMap()
+       {
+               return true;
+       }
+
        /**
         * @return the height
         */
index e4f9a51..6aab62e 100644 (file)
@@ -22,7 +22,6 @@ import java.net.InetAddress;
 import org.netxms.base.*;
 import org.netxms.client.NXCSession;
 
-
 /**
  * Subnet object
  */
@@ -41,7 +40,6 @@ public class Subnet extends GenericObject
                subnetMask = msg.getVariableAsInetAddress(NXCPCodes.VID_IP_NETMASK);
                zoneId = msg.getVariableAsInt64(NXCPCodes.VID_ZONE_ID);
        }
-
        
        /**
         * @return Subnet mask
@@ -51,7 +49,6 @@ public class Subnet extends GenericObject
                return subnetMask;
        }
 
-
        /* (non-Javadoc)
         * @see org.netxms.client.NXCObject#getObjectClassName()
         */
@@ -61,6 +58,14 @@ public class Subnet extends GenericObject
                return "Subnet";
        }
 
+       /* (non-Javadoc)
+        * @see org.netxms.client.objects.AbstractObject#isAllowedOnMap()
+        */
+       @Override
+       public boolean isAllowedOnMap()
+       {
+               return true;
+       }
 
        /**
         * @return the zoneId
index 0fa0f16..ae68acc 100644 (file)
@@ -47,6 +47,15 @@ public class Zone extends GenericObject
                icmpProxy = msg.getVariableAsInt64(NXCPCodes.VID_ICMP_PROXY);\r
        }\r
 \r
+       /* (non-Javadoc)\r
+        * @see org.netxms.client.objects.AbstractObject#isAllowedOnMap()\r
+        */\r
+       @Override\r
+       public boolean isAllowedOnMap()\r
+       {\r
+               return true;\r
+       }\r
+\r
        /**\r
         * @return the zoneId\r
         */\r