public interface TreeDatabase
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DATABASE_NAME
Name of database where tree database related data is stored.
|
static java.lang.String |
MAP_PROPS_TABLE
Deprecated.
The table doesn't exists in the new DB version. Name of table in a certain SQL server containing
mapping between properties of a node and a node.
|
static java.lang.String |
NODE_COLUMNS
List of columns of a table containing information of a certain in an SQL server.
|
static java.lang.String |
NODES_TABLE
Name of table in a certain SQL server containing information about nodes in tree database.
|
static java.lang.String |
PATH_SEPARATOR
Delimiter used in tree database.
|
static java.lang.String |
PROPS_TABLE
Name of table in a certain SQL server containing information about properties of nodes.
|
static java.lang.String |
ROOT
Name of base node of gateways tree.
|
static java.lang.String |
TREE_DB_CONFIG
Name of property hoiding pid of configuration.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addNode(com.prosyst.mprm.data.tree.NodeInfo node,
long timestamp)
Adds a node(gateway group) into gateways tree as an immediate descendant of the node identified by the
parentPath field of a node. |
java.lang.String |
canonizePath(java.lang.String path)
Returns a canonized path of the node path.
|
void |
checkNameCorrectness(java.lang.String name,
java.lang.String value)
Check for correctness of name of a database record(display name or identifier).
|
Enumerator |
enumerateDeletedGroups(java.lang.String path)
Enumerates all the gateway groups which are immediate descendants of the node identified by
path
parameter and are removed from tree. |
Enumerator<java.lang.String,DatabaseException> |
enumerateExplicitlyConfiguredNodes(java.lang.String path,
java.lang.String property)
Returns the nodes from the subtree starting with
path that has explicitly set values for the property. |
Enumerator |
enumerateGroups(java.lang.String path,
long timestamp)
Enumerates all the gateway groups which are immediate descendants of the node identified by
path
parameter. |
Enumerator |
enumerateManagedObjects(java.lang.String path,
long timestamp)
Enumerates all the gateways which are immediate descendants of the node identified by the
path
parameter. |
com.prosyst.mprm.data.tree.NodeInfo |
getNode(java.lang.String path,
long timestamp)
Returns the node identified by the
path parameter. |
java.lang.String |
getNodeName(java.lang.String path)
Returns the name of the node corespondent to the specified path.
|
ExternalizableDictionary |
getNodeProperties(java.lang.String path,
long timestamp)
Returns properties for a node identified by the
path parameter. |
com.prosyst.mprm.data.tree.NodeInfo |
getParent(java.lang.String path)
Returns the parent node of the node identified by
path parameter. |
java.lang.String |
getParentPath(java.lang.String path)
Returns the parent path of the node identified by
path parameter. |
TransactionalTreeDatabase |
getTransactionalDatabase()
Returns interface used for transactional execution of sequential tree related database operations.
|
boolean |
hasDescendants(java.lang.String path,
long timestamp)
Checks whether a given node has descendants.
|
void |
invalidateAndSetNodeProperties(java.lang.String path,
java.util.Dictionary properties)
Deprecated.
Not supported by the System module, moved to the GDM module. Invalidates the old properties specified
for a node identified by the
path parameter and set new properties. |
boolean |
isChild(java.lang.String descendantPath,
java.lang.String parentPath)
Checks whether a node is a descendant of another node in the gateways tree.
|
boolean |
isInstanceOf(java.lang.String path,
java.lang.String nType)
Checks whether a node is of a specified type.
|
boolean |
isRoot(java.lang.String path)
Checks whether a node with specified
path is the root. |
java.lang.String |
makePath(java.lang.String parentPath,
java.lang.String relativeName)
Returns a database specific path of a node, based on the path of its parent and a specified relative name of the
node.
|
boolean |
nodeExists(java.lang.String path,
long timestamp)
Checks whether a node with the specified path is stored in the database.
|
boolean |
removeNode(java.lang.String path)
Removes a node identified by the
path parameter. |
void |
setNodeProperties(java.lang.String path,
java.util.Dictionary properties)
Sets properties for a node identified by the
path parameter. |
void |
updateDisplayName(java.lang.String path,
java.lang.String displayName)
Updates the current display name of a node with a new one.
|
static final java.lang.String DATABASE_NAME
static final java.lang.String TREE_DB_CONFIG
static final java.lang.String ROOT
static final java.lang.String PATH_SEPARATOR
static final java.lang.String NODES_TABLE
static final java.lang.String PROPS_TABLE
@Deprecated static final java.lang.String MAP_PROPS_TABLE
static final java.lang.String NODE_COLUMNS
void addNode(com.prosyst.mprm.data.tree.NodeInfo node,
long timestamp)
throws DatabaseException
parentPath field of a node.node - the gateway group to be added.
node.parentPath equals null or empty string we consider
node.parentPath refers the root of the gateways tree.
timestamp - long number specifying the time the node was valid in milliseconds.DatabaseException - is thrown if an error occurs while adding the node into the database.java.lang.NullPointerException - when the node is null.com.prosyst.mprm.data.tree.NodeInfo getNode(java.lang.String path,
long timestamp)
throws DatabaseException
path parameter.path - the unique path of the node. Note: If path equals null or empty string we
consider path refers the root of the gateways tree.timestamp - time indicating when the entry was valid in milliseconds.
NodeInfo or GatewayInfo object identified by the path parameter or
null if the path is not presented in the gateways tree.DatabaseException - is thrown if an error occurs while retrieving data.boolean removeNode(java.lang.String path)
throws DatabaseException
path parameter.path - the unique path of the node.true if the gateway group is successfully removed; false otherwise.DatabaseException - is thrown if an error occurs while modifying the database, or if the node has subentries.void updateDisplayName(java.lang.String path,
java.lang.String displayName)
throws DatabaseException
path - path of the node which display name will be updated.displayName - the new display name of a node.
DatabaseException - is thrown if error while modifying database occurs.void setNodeProperties(java.lang.String path,
java.util.Dictionary properties)
throws DatabaseException
path parameter.path - the unique path of the node.properties - dictionary containing the properties of the specified node.DatabaseException - is thrown if error while saving properties in database occurs.@Deprecated
void invalidateAndSetNodeProperties(java.lang.String path,
java.util.Dictionary properties)
throws DatabaseException
path parameter and set new properties.path - path of nodeproperties - dictionary containing properties for the specified node.DatabaseException - is thrown if error while modifying properties records in database occurs.ExternalizableDictionary getNodeProperties(java.lang.String path, long timestamp) throws DatabaseException
path parameter.path - the unique path of the node.timestamp - the time when entry was valid in milliseconds.
ExternalizableDictionary object containing properties stored for specified node,
null if no properties are stored.DatabaseException - is thrown if error while retrieving data occurs.boolean nodeExists(java.lang.String path,
long timestamp)
throws DatabaseException
path - the unique path of the node.timestamp - the time the entry was valid in milliseconds.
true if the specified node is presented, false otherwise.DatabaseException - is thrown if an error occurs while retrieving data from the database.boolean hasDescendants(java.lang.String path,
long timestamp)
throws DatabaseException
path - the unique path of the node. Note: If path equals null or empty string we
consider path refers the root of the gateways tree.timestamp - the time the entry was valid in milliseconds.
true if the node has descendants.DatabaseException - is thrown if an error occurs while retrieving data from the database.boolean isInstanceOf(java.lang.String path,
java.lang.String nType)
throws DatabaseException
path - the unique path of the node.nType - type of node, which the node should be checked for.DatabaseException - is thrown if error while retrieving data from database occurs.java.lang.IllegalArgumentException - is thrown if nodePath does not refer tree node.com.prosyst.mprm.data.tree.NodeInfo getParent(java.lang.String path)
throws DatabaseException
path parameter.path - the unique path of the node.null if path refers the root of gateways tree or if node with
parent path does not exist in database.DatabaseException - is thrown if an error occurs while retrieving data from the database.java.lang.IllegalArgumentException - is thrown if the path is not a valid node path.java.lang.String getParentPath(java.lang.String path)
throws DatabaseException
path parameter.path - the unique path of the node.null if path refers the root of gateways treeDatabaseException - is thrown if an error occurs while retrieving data from the database.java.lang.IllegalArgumentException - is thrown if the path is not a valid tree node path.boolean isChild(java.lang.String descendantPath,
java.lang.String parentPath)
throws DatabaseException
descendantPath - the path of the node checked for being descendant.parentPath - the path of the node checked for being parent.true if the node identified by descendantPath is a descendant of the node
identified by parentPath, false otherwise.DatabaseException - is thrown if an error occures while retrieving data from the database.Enumerator enumerateGroups(java.lang.String path, long timestamp) throws DatabaseException
path
parameter.path - the unique path of the node.
path equals null or empty string we consider path
refers the root of the gateways tree.
timestamp - the time the returned entries were valid in milliseconds.
GroupInfo objects that are immediate descendants of the node identified by
path and represent gateway groups. If path refers leaf node an emtpy enumeration
is returned.DatabaseException - is thrown if an error occurs while retrieving data from the database.Enumerator enumerateDeletedGroups(java.lang.String path) throws DatabaseException
path
parameter and are removed from tree.path - the unique path of the node.
path equals null or empty string we consider path
refers the root of the gateways tree.
GroupInfo objects that are immediate descendants of the node identified by
the path and represent gateway groups.DatabaseException - is thrown if an error occurs while retrieving data from the database.Enumerator enumerateManagedObjects(java.lang.String path, long timestamp) throws DatabaseException
path
parameter.path - the path of the parent node.
path equals null or empty string we consider path
refers the root of the gateways tree.
timestamp - the time the returned entries were valid in milliseconds.
ManagedObjectInfo objects representing gateway nodes which have been subentries
of given nodeDatabaseException - is thrown if an error occurs while retrieving data from the database.Enumerator<java.lang.String,DatabaseException> enumerateExplicitlyConfiguredNodes(java.lang.String path, java.lang.String property) throws DatabaseException
path that has explicitly set values for the property.path - subtree pathproperty - changed propertyDatabaseExceptionjava.lang.String makePath(java.lang.String parentPath,
java.lang.String relativeName)
throws DatabaseException
parentPath - unique path of a node.relativeName - relative name of the node.DatabaseExceptionvoid checkNameCorrectness(java.lang.String name,
java.lang.String value)
throws DatabaseException
name - name of the property which value will be checked.value - value, which will be checked.DatabaseException - if the value is null, empty string or begins or ends with intervals.java.lang.String getNodeName(java.lang.String path)
path - path of the node.boolean isRoot(java.lang.String path)
throws DatabaseException
path is the root.path - the path of node.true if and only if the path reffers the gateways tree root nodeDatabaseException - is thrown if an error occurs while retrieving data from the databasejava.lang.String canonizePath(java.lang.String path)
path - path of a node.TransactionalTreeDatabase getTransactionalDatabase() throws DatabaseException
DatabaseException - is thrown if error while instantiating occurs.Copyright © 2019 Bosch Software Innovations GmbH. All Rights Reserved.