Class DataCollectionConfiguration


  • public class DataCollectionConfiguration
    extends Object
    Data collection configuration for node
    • Constructor Detail

      • DataCollectionConfiguration

        public DataCollectionConfiguration​(NXCSession session,
                                           long nodeId)
        Create empty data collection configuration.
        Parameters:
        session - The NXCSession
        nodeId - The node ID
    • Method Detail

      • refreshDataCollectionList

        public void refreshDataCollectionList()
                                       throws IOException,
                                              NXCException
        Force refresh DCI list
        Throws:
        IOException - if socket I/O error occurs
        NXCException - if NetXMS server returns an error or operation was timed out
      • getItems

        public DataCollectionObject[] getItems()
        Get list of data collection items
        Returns:
        List of data collection items
      • findItem

        public DataCollectionObject findItem​(long id)
        Find data collection object by ID.
        Parameters:
        id - DCI ID
        Returns:
        Data collection item or null if item with given ID does not exist
      • findItem

        public DataCollectionObject findItem​(long id,
                                             Class<? extends DataCollectionObject> classFilter)
        Find data collection object by ID.
        Parameters:
        id - data collection object ID
        classFilter - class filter for found object
        Returns:
        Data collection item or null if item with given ID does not exist
      • createItem

        @Deprecated
        public long createItem​(DataCollectionObject object)
                        throws IOException,
                               NXCException
        Deprecated.
        Create new data collection item. This method is deprecated - new code should call modifyObject().
        Parameters:
        object - The DataCollectionObject to create
        Returns:
        Identifier assigned to created item
        Throws:
        IOException - if socket I/O error occurs
        NXCException - if NetXMS server returns an error or operation was timed out
      • createTable

        @Deprecated
        public long createTable​(DataCollectionObject object)
                         throws IOException,
                                NXCException
        Deprecated.
        Create new data collection table. This method is deprecated - new code should call modifyObject().
        Parameters:
        object - The DataCollectionObject to create
        Returns:
        Identifier assigned to created item
        Throws:
        IOException - if socket I/O error occurs
        NXCException - if NetXMS server returns an error or operation was timed out
      • modifyObject

        public void modifyObject​(long dcObjectId)
                          throws IOException,
                                 NXCException
        Modify data collection object.
        Parameters:
        dcObjectId - Data collection object identifier
        Throws:
        IOException - if socket I/O error occurs
        NXCException - if NetXMS server returns an error or operation was timed out
      • modifyObject

        public long modifyObject​(DataCollectionObject dco)
                          throws IOException,
                                 NXCException
        Modify data collection object.
        Parameters:
        dco - Data collection object
        Returns:
        Identifier assigned to created item
        Throws:
        IOException - if socket I/O error occurs
        NXCException - if NetXMS server returns an error or operation was timed out
      • copyObjects

        public void copyObjects​(long destNodeId,
                                long[] items)
                         throws IOException,
                                NXCException
        Copy data collection objects.
        Parameters:
        destNodeId - Destination node ID
        items - List of data collection items to copy
        Throws:
        IOException - if socket I/O error occurs
        NXCException - if NetXMS server returns an error or operation was timed out
      • moveObjects

        public void moveObjects​(long destNodeId,
                                long[] items)
                         throws IOException,
                                NXCException
        Move data collection objects.
        Parameters:
        destNodeId - Destination node ID
        items - List of data collection items to move
        Throws:
        IOException - if socket I/O error occurs
        NXCException - if NetXMS server returns an error or operation was timed out
      • clearCollectedData

        public void clearCollectedData​(long itemId)
                                throws IOException,
                                       NXCException
        Clear collected data for given DCI.
        Parameters:
        itemId - Data collection item ID
        Throws:
        IOException - if socket I/O error occurs
        NXCException - if NetXMS server returns an error or operation was timed out
      • setObjectStatus

        public void setObjectStatus​(long[] items,
                                    int status)
                             throws IOException,
                                    NXCException
        Set status of data collection objects.
        Parameters:
        items - Data collection items' identifiers
        status - New status
        Throws:
        IOException - if socket I/O error occurs
        NXCException - if NetXMS server returns an error or operation was timed out
      • deleteObject

        public void deleteObject​(long itemId)
                          throws IOException,
                                 NXCException
        Delete data collection object.
        Parameters:
        itemId - Data collection item identifier
        Throws:
        IOException - if socket I/O error occurs
        NXCException - if NetXMS server returns an error or operation was timed out
      • getNodeId

        public long getNodeId()
        Returns:
        the nodeId
      • getUserData

        public Object getUserData()
        Returns:
        the userData
      • setUserData

        public void setUserData​(Object userData)
        Parameters:
        userData - the userData to set
      • getSession

        protected final NXCSession getSession()
        Returns:
        the session