Package org.netxms.client.datacollection
Class DataCollectionConfiguration
java.lang.Object
org.netxms.client.datacollection.DataCollectionConfiguration
Data collection configuration for node
-
Constructor Summary
ConstructorsConstructorDescriptionDataCollectionConfiguration(NXCSession session, long ownerId) Create empty data collection configuration. -
Method Summary
Modifier and TypeMethodDescriptionvoidbulkUpdateDCIs(Collection<Long> idList, Collection<? extends BulkDciUpdateElement> fields) voidclearCollectedData(long itemId) Clear collected data for given DCI.voidclose()Close data collection configuration.voidcommit()Apply user changesvoidcopyObjects(long destNodeId, long[] items) Copy data collection objects.longcreateItem(DataCollectionObject object) Deprecated.longcreateTable(DataCollectionObject object) Deprecated.voiddeleteObject(long itemId) Delete data collection object.findItem(long id) Find data collection object by ID.findItem(long id, Class<? extends DataCollectionObject> classFilter) Find data collection object by ID.getItems()Get list of data collection itemslongGet ID of data collection owner objectprotected final NXCSessionGet owning client session.Get user data previously stored withsetUserData.voidmodifyObject(long dcObjectId) Modify data collection object.longModify data collection object.voidmoveObjects(long destNodeId, long[] items) Move data collection objects.voidopen(RemoteChangeListener changeListener) Open data collection configuration.voidForce refresh DCI listvoidsetLocalChangeListener(LocalChangeListener listener) Set local change listenervoidsetObjectStatus(long[] items, int status) Set status of data collection objects.voidsetRemoteChangeListener(RemoteChangeListener listener) Set remote change listenervoidsetUserData(Object userData) Set user data.
-
Constructor Details
-
DataCollectionConfiguration
Create empty data collection configuration.- Parameters:
session- The NXCSessionownerId- ID of the owning object
-
-
Method Details
-
open
Open data collection configuration.- Parameters:
changeListener- change listener- Throws:
IOException- if socket I/O error occursNXCException- if NetXMS server returns an error or operation was timed out
-
refreshDataCollectionList
Force refresh DCI list- Throws:
IOException- if socket I/O error occursNXCException- if NetXMS server returns an error or operation was timed out
-
close
public void close()Close data collection configuration. -
commit
Apply user changes- Throws:
IOException- if socket I/O error occursNXCException- if NetXMS server returns an error or operation was timed out
-
getItems
Get list of data collection items- Returns:
- List of data collection items
-
findItem
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
Find data collection object by ID.- Parameters:
id- data collection object IDclassFilter- class filter for found object- Returns:
- Data collection item or null if item with given ID does not exist
-
createItem
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 occursNXCException- if NetXMS server returns an error or operation was timed out
-
createTable
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 occursNXCException- if NetXMS server returns an error or operation was timed out
-
modifyObject
Modify data collection object.- Parameters:
dcObjectId- Data collection object identifier- Throws:
IOException- if socket I/O error occursNXCException- if NetXMS server returns an error or operation was timed out
-
modifyObject
Modify data collection object.- Parameters:
dco- Data collection object- Returns:
- Identifier assigned to created item
- Throws:
IOException- if socket I/O error occursNXCException- if NetXMS server returns an error or operation was timed out
-
copyObjects
Copy data collection objects.- Parameters:
destNodeId- Destination node IDitems- List of data collection items to copy- Throws:
IOException- if socket I/O error occursNXCException- if NetXMS server returns an error or operation was timed out
-
moveObjects
Move data collection objects.- Parameters:
destNodeId- Destination node IDitems- List of data collection items to move- Throws:
IOException- if socket I/O error occursNXCException- if NetXMS server returns an error or operation was timed out
-
clearCollectedData
Clear collected data for given DCI.- Parameters:
itemId- Data collection item ID- Throws:
IOException- if socket I/O error occursNXCException- if NetXMS server returns an error or operation was timed out
-
setObjectStatus
Set status of data collection objects.- Parameters:
items- Data collection items' identifiersstatus- New status- Throws:
IOException- if socket I/O error occursNXCException- if NetXMS server returns an error or operation was timed out
-
deleteObject
Delete data collection object.- Parameters:
itemId- Data collection item identifier- Throws:
IOException- if socket I/O error occursNXCException- if NetXMS server returns an error or operation was timed out
-
bulkUpdateDCIs
public void bulkUpdateDCIs(Collection<Long> idList, Collection<? extends BulkDciUpdateElement> fields) throws IOException, NXCException - Parameters:
idList- List of data collection object identifiersfields- collection of fields to be updated- Throws:
IOException- if socket I/O error occursNXCException- if NetXMS server returns an error or operation was timed out
-
getOwnerId
public long getOwnerId()Get ID of data collection owner object- Returns:
- ID of data collection owner object
-
getUserData
Get user data previously stored withsetUserData.- Returns:
- user data
-
setUserData
Set user data.- Parameters:
userData- new user data
-
getSession
Get owning client session.- Returns:
- owning client session
-
setLocalChangeListener
Set local change listener- Parameters:
listener- local change listener to add
-
setRemoteChangeListener
Set remote change listener- Parameters:
listener- remote change listener to add
-