public interface DeviceManager
| Modifier and Type | Method and Description |
|---|---|
void |
addNodeListener(java.lang.String nodePath,
NodeListener listener)
Adds listener, which will be notified about changes occurred in the specified node and in its direct members (if this node
is a device group).
|
java.lang.String |
createControlUnit(java.lang.String nodePath,
java.lang.String controlUnitType,
java.lang.String constructorId,
java.lang.Object arguments)
Explicitly creates control unit instance of a specified type using
a supplied constructor and returns the id of the newly created control unit.
|
DynamicDeviceGroup |
createDynamicDeviceGroup(java.lang.String name)
Deprecated.
|
DynamicDeviceGroup |
createDynamicDeviceGroup(java.lang.String name,
java.lang.String baseNode)
Creates a dynamic group with the specified name and base node
|
void |
destroyControlUnit(ControlUnitID cuId)
Unregisters / removes a control unit instance.
|
java.lang.String[] |
getComponentTypes()
Returns all component control unit types provided in mprm.
|
java.lang.String[] |
getComponentTypes(java.lang.String deviceType)
Returns all component control unit types provided in the scope of given deviceType.
|
java.lang.String[] |
getComponentTypes(java.lang.String deviceType,
boolean declaredTypesOnly)
Returns all component control unit types provided in scope of the deviceType.
|
java.lang.String[] |
getComponentTypes(java.lang.String deviceType,
java.lang.String deviceId)
Returns all component control unit types provided in the scope of particular device specified by the argument pair
deviceType, deviceId |
java.lang.String |
getComponentVersion(java.lang.String type,
java.lang.String deviceType,
java.lang.String deviceId)
Returns the version of a component control unit type provided on a specified device.
|
DeviceControlUnit |
getControlUnit(ControlUnitID controlUnitId)
Returns a specified control unit.
|
MetaTypeProvider |
getControlUnitMetadata(java.lang.String cuType,
java.lang.String cuVersion)
Returns control unit metadata for the given control unit type and version.
|
MetaTypeProvider |
getControlUnitMetadata(java.lang.String cuType,
java.lang.String cuVersion,
boolean aggregateSuperTypes)
Returns control unit metadata for the given control unit type and version.
|
MetaTypeProvider |
getControlUnitMetadata(java.lang.String cuType,
java.lang.String cuVersion,
java.lang.String extension)
Returns control unit metadata extension for the given control unit type, version and extension key.
|
RemoteCUAdmin |
getCUAdminToComponentsOf(java.lang.String deviceType,
java.lang.String deviceId)
Returns interface for managing the component control units in the scope of a given device.
|
ControlUnitProxy |
getCUProxyToComponentsOf(java.lang.String deviceType,
java.lang.String deviceId,
RemoteControlUnitAdminApplication remoteApplication)
Returns interface for managing the component units in the scope of a given device.
|
java.lang.String[] |
getDeviceTypes()
Returns device types in mprm tree.
|
java.lang.String[] |
getDeviceTypes(java.lang.String componentType)
Returns device types of a given component cu type.
|
java.lang.String[] |
getDeviceTypes(java.lang.String componentType,
boolean declaredTypesOnly)
Returns device types if a given component cu type.
|
DynamicDeviceGroup |
getDynamicDeviceGroup(java.lang.String name)
Deprecated.
|
DynamicDeviceGroup |
getDynamicDeviceGroup(java.lang.String name,
java.lang.String baseNode)
Gets a dynamic device group with the specified name and base node
|
java.lang.String[] |
getExtendingTypes(java.lang.String controlUnitType,
boolean directExtensionsOnly)
Returns the extending types if given control unit type.
|
Node |
getNode(java.lang.String path)
Returns a
Node object identified by the given path. |
MetaTypeProvider[] |
getNodePropertiesMetaData(java.lang.String deviceType)
Returns the metadata for the build-in mPRM properties which can be assigned to
a device tree node (group or device).
|
java.lang.String[] |
getParentTypes(java.lang.String componentType)
Returns types of the provided control units that may be parents of
the control units with a given type.
|
DeviceGroup |
getRoot()
Returns the root device group of the devices tree.
|
java.lang.String[] |
getSubTypes(java.lang.String componentType)
Returns types of the provided control units that may be children of
control units with a given type.
|
java.lang.String[] |
getSuperTypes(java.lang.String controlUnitType,
boolean directAncestorOnly)
Returns the super types if given control unit type.
|
java.lang.String[] |
getVersions(java.lang.String type)
Returns all versions of given control unit type provided in mPRM.
|
java.lang.Object |
invokeAction(ControlUnitID cuId,
java.lang.String actionId,
java.lang.Object arguments)
Executes a given action over a given control unit.
|
boolean |
isAbstract(java.lang.String controlUnitType)
Specifies if given control unit type is abstract.
|
DynamicDeviceGroup[] |
listDynamicDeviceGroups()
Lists all dynamic device groups
|
void |
moveDevice(ControlUnitID cuID,
java.lang.String newParentPath)
Moves the device, denoted by the
cuID in a new mPRM Device Tree location, denoted by the newParentPath |
void |
registerControlUnitListener(java.lang.String nodePath,
MPRMControlUnitListener l,
java.util.Dictionary cuListenerProps)
Registers a control unit listener.
|
void |
registerHierarchyListener(java.lang.String nodePath,
MPRMHierarchyListener l,
java.util.Dictionary regProps)
Registers a hierarchy listener.
|
void |
registerStateVariableListener(java.lang.String nodePath,
MPRMStateVariableListener l,
java.util.Dictionary svListenerProps)
Registers a state variable listener.
|
void |
removeDynamicDeviceGroup(java.lang.String name)
Deprecated.
|
void |
removeDynamicDeviceGroup(java.lang.String name,
java.lang.String baseNode)
Removes the dynamic group with the specified name and base node from the repository.
|
void |
removeNodeListener(java.lang.String nodePath,
NodeListener listener)
Removes a node listener.
|
DeviceControlUnit |
synchronizeState(ControlUnitID cuId)
Synchronizes a control unit state with the target underlying resource.
|
void |
unregisterControlUnitListener(MPRMControlUnitListener l)
Unregisters a control unit listener.
|
void |
unregisterHierarchyListener(MPRMHierarchyListener l)
Unregisters a hierarchy listener.
|
void |
unregisterStateVariableListener(MPRMStateVariableListener l)
Unregisters a state variable listener.
|
DeviceGroup getRoot() throws ManagementException
ManagementException - if a system error occurs.Node getNode(java.lang.String path) throws ManagementException
Node object identified by the given path.
If there is not device or group with a given path then null is returned.path - path of the node in devices tree.ManagementException - if a system error occurs.MetaTypeProvider[] getNodePropertiesMetaData(java.lang.String deviceType) throws ManagementException
MetaTypeProvider instances.ManagementException - if a system error occurs.DynamicDeviceGroup getDynamicDeviceGroup(java.lang.String name) throws ManagementException
getDynamicDeviceGroup(String, String)name - name of the dynamic groupDynamicDeviceGroup object representing the specified dynamic group,
null if no group with this name exists.ManagementException - if an error occursDynamicDeviceGroup getDynamicDeviceGroup(java.lang.String name, java.lang.String baseNode) throws ManagementException
name - the dynamic group namebaseNode - the dynamic group base nodeDynamicDeviceGroup object representing the specified dynamic group,
null if no group with this name and base node exists.ManagementException - if an error occursDynamicDeviceGroup createDynamicDeviceGroup(java.lang.String name) throws ManagementException
createDynamicDeviceGroup(String, String)name - name of the dynamic groupManagementException - if an error occursDynamicDeviceGroup createDynamicDeviceGroup(java.lang.String name, java.lang.String baseNode) throws ManagementException
name - name of the dynamic device groupbaseNode - the dynamic group base nodeManagementException - if a groups with the specified name and base node already exists or an error occursDynamicDeviceGroup[] listDynamicDeviceGroups() throws ManagementException
DynamicDeviceGroup objects is returned.ManagementException - if an error occursvoid removeDynamicDeviceGroup(java.lang.String name)
throws ManagementException
removeDynamicDeviceGroup(String, String)name - name which specifies the device groupManagementException - if an error occursvoid removeDynamicDeviceGroup(java.lang.String name,
java.lang.String baseNode)
throws ManagementException
name - the dynamic group namebaseNode - the dynamic group base nodeManagementException - if an error occursjava.lang.String[] getDeviceTypes()
throws ManagementException
ManagementException - if a system error occurs.java.lang.String[] getDeviceTypes(java.lang.String componentType)
throws ManagementException
getDeviceTypes(String, boolean) with value false.componentType - component control unit typeManagementException - if a system error occurs.java.lang.String[] getDeviceTypes(java.lang.String componentType,
boolean declaredTypesOnly)
throws ManagementException
componentType - componentType component control unit typedeclaredTypesOnly - if true, the method shall return only the device types
declared in the component type metadata. Otherwise, the method shall aggregate all
extending types of the declared device types.ManagementException - if a system error occurs.java.lang.String[] getComponentTypes()
throws ManagementException
ManagementException - if a system error occurs.java.lang.String[] getComponentTypes(java.lang.String deviceType)
throws ManagementException
getComponentTypes(String, boolean) with value false.deviceType - device control unit typeManagementException - if a system error occurs.java.lang.String[] getComponentTypes(java.lang.String deviceType,
java.lang.String deviceId)
throws ManagementException
deviceType, deviceIddeviceType - device type.deviceId - device id.ManagementException - if a system error occurs.java.lang.String[] getComponentTypes(java.lang.String deviceType,
boolean declaredTypesOnly)
throws ManagementException
deviceType - device control unit typedeclaredTypesOnly - if true, the method shall return only the component types
that declare the given device type in their metadata. Otherwise, the method shall aggregate all
declared components of the deviceType super types.ManagementException - if a system error occurs.java.lang.String[] getVersions(java.lang.String type)
throws ManagementException
type - control unit typeManagementException - if a system error occurs.java.lang.String getComponentVersion(java.lang.String type,
java.lang.String deviceType,
java.lang.String deviceId)
throws ManagementException
deviceType & deviceId define the target device,
and the type argument defines the component type provided on this device.
This method throws IllegalArgumentException if the component type
is not provided on this device.type - component control unit type.deviceType - device type.deviceId - device id.ManagementException - if system error occurs.java.lang.IllegalArgumentException - if the specified component type is not provided on the specified device.java.lang.String[] getParentTypes(java.lang.String componentType)
throws ManagementException
componentType - sub control unit typeManagementException - if a system error occurs.java.lang.String[] getSubTypes(java.lang.String componentType)
throws ManagementException
componentType - parent control unit typeManagementException - if a system error occurs.boolean isAbstract(java.lang.String controlUnitType)
throws ManagementException
controlUnitType - control unit typetrue if the control unit type is abstract, false otherwise.ManagementException - if a system error occurs.java.lang.String[] getSuperTypes(java.lang.String controlUnitType,
boolean directAncestorOnly)
throws ManagementException
controlUnitType - control unit type.directAncestorOnly - boolean flag specifying whether direct ancestors to be returned (value of true)
or all ancestors (value of false).ManagementException - if system error occurs.java.lang.String[] getExtendingTypes(java.lang.String controlUnitType,
boolean directExtensionsOnly)
throws ManagementException
controlUnitType - control unit type.directExtensionsOnly - boolean flag specifying whether direct extensions to be returned (value of true)
or all extensions (value of false).ManagementException - if system error occurs.MetaTypeProvider getControlUnitMetadata(java.lang.String cuType, java.lang.String cuVersion) throws ManagementException
getControlUnitMetadata(String, String, boolean) with parameter
aggregateSuperTypes set to true.cuType - control unit typecuVersion - version of the control unit typeMetaTypeProvider object representing the metadata.ManagementException - if a system error occurs.MetaTypeProvider getControlUnitMetadata(java.lang.String cuType, java.lang.String cuVersion, boolean aggregateSuperTypes) throws ManagementException
cuType - control unit typecuVersion - version of the control unit typeaggregateSuperTypes - if true the retrieved metadata will be merged with the metdatas of all
super control unit types, otherwise, pure metatype for the control unit type will be returned.MetaTypeProvider object representing the metadata.ManagementException - if a system error occurs.MetaTypeProvider getControlUnitMetadata(java.lang.String cuType, java.lang.String cuVersion, java.lang.String extension) throws ManagementException
cuType - control unit typecuVersion - version of the control unit typeextension - metatype extension keyMetaTypeProvider object representing the metadata.ManagementException - if a system error occurs.DeviceControlUnit getControlUnit(ControlUnitID controlUnitId) throws ManagementException
controlUnitId - ControlUnitID defining the target control unit to be retrieved.DeviceControlUnit object if controlUnitId denotes a component control unit,
DeviceNode object if controlUnitId denotes a device root control unit
and null if there is no such control unit.ManagementException - if a system error occurs.RemoteCUAdmin getCUAdminToComponentsOf(java.lang.String deviceType, java.lang.String deviceId) throws ManagementException
deviceType - device type.deviceId - device id.RemoteCUAdmin interface for administering the component control units in the scope of a given device.ManagementException - if a system error occurs.ControlUnitProxy getCUProxyToComponentsOf(java.lang.String deviceType, java.lang.String deviceId, RemoteControlUnitAdminApplication remoteApplication) throws ManagementException
deviceType - device type.deviceId - device id.remoteApplication - user-implemented call back objectControlUnitProxy interface for administering the component control units in the scope of a given device.ManagementException - if a system error occurs.java.lang.String createControlUnit(java.lang.String nodePath,
java.lang.String controlUnitType,
java.lang.String constructorId,
java.lang.Object arguments)
throws java.lang.Exception
nodePath - denotes parent path in the mPRM management tree if a new device is supposed
to be registered with mPRM and respective device root control unit to be created, or denotes node path
of the device node if a component control unit belonging to particular device should be created.controlUnitType - the type of the Control Unit.constructorId - the id of the constructors. Must start with "$create.".arguments - the 'constructors' argument(s). If the argument is only
one this is the argument itself. If the arguments are more then one, the
value must be a Object[] and arguments are retrieved from that array.null if it is not convenient for the device provider to return id of newly registered device.java.lang.Exception - if an error occurs while creating Control Unit.void destroyControlUnit(ControlUnitID cuId) throws java.lang.Exception
cuId - ControlUnitID defining the target control unit to be destroyed.java.lang.Exception - if an error occurs while destroying the Control Unit.DeviceControlUnit synchronizeState(ControlUnitID cuId) throws java.lang.Exception
cuId - id of control unit to be synchronized.java.lang.Exception - if an error occurs while synchronizing the Control Unit.java.lang.Object invokeAction(ControlUnitID cuId, java.lang.String actionId, java.lang.Object arguments) throws java.lang.Exception
cuId - ControlUnitID defining the target control unit the action to be invoked on.actionId - id of the actionarguments - the input argument(s). If the argument is only one this is
the argument itself. If the arguments are more then one, the
value must be a Object[] and arguments are retrieved
from that array.null if the action does not
return value.java.lang.Exception - if an error occurs while executing action.void registerControlUnitListener(java.lang.String nodePath,
MPRMControlUnitListener l,
java.util.Dictionary cuListenerProps)
throws ManagementException
nodePath - scope in the mprm management tree.
Only events for control units in the given scope will be delivered.l - application defined MPRMControlUnitListener object.cuListenerProps - defines event listener properties.
A listener property may be used as a filter to limit the number of
received events and to specify certain control unit to listen for.
The key of the property is ControlConstants.EVENT_FILTER
with value of type String representing LDAP filtering expression.
The properties which may be used in the LDAP filer are:
ControlConstants.EVENT_TYPE- to limit the types of
events received by the listener. Valid values are
ControlUnitEvent.CONTROL_UNIT_ADDED,
ControlUnitEvent.CONTROL_UNIT_REMOVED,
ControlUnitEvent.CONTROL_UNIT_TYPE_APPEARED and
ControlUnitEvent.CONTROL_UNIT_TYPE_DISAPPEARED,
ControlConstants.TYPE and
ControlConstants.ID.
The filter states what types of
events, and events for which units to be received. The listener
will be notified only for events regarding Control Units whose
id and type satisfies this filter, if the events match the event filtering criterion.
If property ControlConstants.EVENT_FILTER does not present,
the listener will receive events for all control units.
ManagementException - if a system error occurs.void unregisterControlUnitListener(MPRMControlUnitListener l)
l - application defined MPRMControlUnitListener objectvoid registerStateVariableListener(java.lang.String nodePath,
MPRMStateVariableListener l,
java.util.Dictionary svListenerProps)
throws ManagementException
nodePath - scope in the mprm management tree.
Only events for control units in the given scope will be delivered.l - application defined MPRMStateVariableListener object.svListenerProps - defines event listener properties.
A listener property may be used as a filter to limit the number
of received events and to specify certain control
unit and/or state variables to listen for. The key of this property is
ControlConstants.EVENT_FILTER with value of type
String representing LDAP filtering expression. The properties which
may be used in the LDAP filer are:
ControlConstants.TYPE
ControlConstants.ID and
ControlConstants.STATE_VARIABLE_ID
The listener will be notified only for changes in the value of the state variables
whose id and type of the corresponding control unit satisfies this filter. If property
ControlConstants.EVENT_FILTER is not present,
the listener will receive events for changing of all state variables.
ManagementException - if a system error occurs.void unregisterStateVariableListener(MPRMStateVariableListener l)
l - application defined MPRMStateVariableListener objectvoid registerHierarchyListener(java.lang.String nodePath,
MPRMHierarchyListener l,
java.util.Dictionary regProps)
throws ManagementException
nodePath - scope in the mprm management tree.
Only events for control units in the given scope will be delivered.l - application defined MPRMHierarchyListener object.regProps - defines event listener properties.
A listener property may be used as a filter to limit the number
of received events and to specify certain control
unit and/or event types to listen for. The key of this property is
ControlConstants.EVENT_FILTER with value of type
String representing LDAP filtering expression. The properties which
may be used in the LDAP filer are :
ControlConstants.EVENT_TYPE - to limit the types of
events received by the listener. Valid values are
HierarchyEvent.ATTACHED and
HierarchyEvent.DETACHED.
ControlConstants.TYPE and
ControlConstants.ID are used to limit events based on
the child control units to which the events are relevant.
ManagementException - if a system error occurs.void unregisterHierarchyListener(MPRMHierarchyListener l)
l - application defined MPRMHierarchyListener object.void addNodeListener(java.lang.String nodePath,
NodeListener listener)
throws ManagementException
nodePath - node path specifying the node on which a listener to be added.listener - user-defined listener.ManagementException - if system error occurs.void removeNodeListener(java.lang.String nodePath,
NodeListener listener)
nodePath - node path specifying the node on which a listener to be removed.listener - user-defined listener.void moveDevice(ControlUnitID cuID, java.lang.String newParentPath) throws ManagementException
cuID in a new mPRM Device Tree location, denoted by the newParentPathcuID - control unit identifiernewParentPath - new the path in the Device TreeManagementException - if a system error occursCopyright © 2019 Bosch Software Innovations GmbH. All Rights Reserved.