SimpleNodeProvider class
- Inheritance
-
- Object
- NodeProvider
- NodeProviderImpl
- SimpleNodeProvider
- Implemented types
- Implementers
Constructors
-
SimpleNodeProvider([Map? m, Map<
String, NodeFactory> ? profiles]) -
Creates a SimpleNodeProvider.
If
mand optionallyprofilesis specified, the provider is initialized with these values.
Properties
- defs ↔ SimpleHiddenNode?
-
defs node
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
-
nodes
→ Map<
String, LocalNode> -
All the nodes in this node provider.
final
- permissions ↔ IPermissionManager
-
Permissions
getter/setter pairoverride-getter
-
profileMap
→ Map<
String, NodeFactory> -
no setter
- root ↔ SimpleNode
-
Root node
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sys ↔ SimpleHiddenNode?
-
sys node
getter/setter pair
Methods
-
addNode(
String path, Map m) → LocalNode? -
Adds a node at the given
paththat is initialized with the given data inm.override -
addProfile(
String name, NodeFactory factory) → void -
override
-
createNode(
String path, [bool init = true]) → SimpleNode -
Creates a node at
path. If a node already exists at this path, an exception is thrown. Ifinitis false, onCreated() is not called. -
createResponder(
String? dsId, String sessionId) → Responder -
Creates a responder with the given
dsId.override -
getNode(
String path) → LocalNode? -
Gets an existing node.
override
-
getOrCreateNode(
String path, [bool addToTree = true, bool init = true]) → LocalNode -
Gets a node at the given
pathif it exists. If it does not exist, create a new node and return it.override -
hasNode(
String path) → bool -
Checks if this provider has the node at
path. -
init(
[Map? m, Map< String, NodeFactory> ? profiles]) → void -
Initialize the node provider.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
persist(
[bool now = false]) → void -
Persist the nodes in this provider.
If you are not using a LinkProvider, then call setPersistFunction to set
the function that is called to persist.
override
-
registerResolver(
SimpleNodeFactory factory) → void -
removeNode(
String path, {bool recurse = true}) → void -
Removes the node specified at
path.override -
save(
) → Map -
Save the node provider to a map.
override
-
setIconResolver(
IconResolver resolver) → void -
setNode(
String path, SimpleNode node, {bool registerChildren = false}) → void -
Sets the given
nodeto the givenpath. -
setPersistFunction(
ExecutableFunction doPersist) → void - Sets the function that persists the nodes.
-
toString(
{bool showInstances = false}) → String -
A string representation of this object.
override
-
unregisterResolver(
SimpleNodeFactory factory) → void -
updateValue(
String path, Object? value) → void -
Updates the value of the node at
pathto the givenvalue.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
String path) → LocalNode? -
Gets an existing node, or creates a dummy node for a requester to listen on.
inherited
-
operator ~(
) → LocalNode -
Get the root node.
inherited
Static Properties
- instance ↔ SimpleNodeProvider?
-
Global instance.
This is by default always the first instance of SimpleNodeProvider.
getter/setter pair