Warehouse class

Constructors

Warehouse()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

protocols KeyList<String, AsyncReply<IStore> Function(String, Map<String, dynamic>?)>
getter/setter pair
resourceCounter int
getter/setter pair
typesFactory KeyList<Type, FactoryEntry>
no setter

Static Methods

close() AsyncReply<bool>
Close the warehouse. This function issues terminate trigger to all resources and stores.
createArray<T>(Type type) List<T>
createInstance<T>(Type type) → T
defineType<T>(Function instanceCreator, RepresentationType representationType) → void
get<T extends IResource>(String path, [Map<String, dynamic>? attributes = null, IResource? parent = null, IPermissionsManager? manager = null]) AsyncReply<T?>
Get a resource by its path. Resource path is sperated by '/' character, e.g. "system/http".
getById(int id) AsyncReply<IResource?>
Get a resource by instance Id.
getStore(String name) IStore?
Get a store by its name.
getTemplateByClassId(Guid classId, [TemplateType? templateType = null]) TypeTemplate?
Get a template by class Id from the templates warehouse. If not in the warehouse, a new TypeTemplate is created and added to the warehouse.
getTemplateByClassName(String className, [TemplateType? templateType = null]) TypeTemplate?
Get a template by class name from the templates warehouse. If not in the warehouse, a new TypeTemplate is created and added to the warehouse.
getTemplateByType(Type type) TypeTemplate?
Get a template by type from the templates warehouse. If not in the warehouse, a new TypeTemplate is created and added to the warehouse.
newResource<T extends IResource>(String name, [IStore? store = null, IResource? parent = null, IPermissionsManager? manager = null, Map<String, dynamic>? attributes = null, Map<String, dynamic>? properties = null]) AsyncReply<T>
open() AsyncReply<bool>
Open the warehouse. This function issues the initialize trigger to all stores and resources.
put<T extends IResource>(String name, T resource, [IStore? store = null, IResource? parent = null, TypeTemplate? customTemplate = null, int age = 0, IPermissionsManager? manager = null, Map<String, dynamic>? attributes = null]) AsyncReply<T?>
Put a resource in the warehouse.
putTemplate(TypeTemplate template) → void
Put a resource template in the templates warehouse.
query(String? path) AsyncReply<List<IResource>?>
qureyIn(List<String> path, int index, AutoList<IResource, Instance> resources) List<IResource>
remove(IResource resource) bool