Constructor
new (require("bajaux/registry/Registry"))(objopt)
- Source:
- Since:
- Niagara 4.10
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
obj |
Object |
<optional> |
a JSON object to use to initially build this registry |
Methods
getLocal() → {module:bajaux/registry/Registry}
- Source:
Returns:
queryAll(value, params) → {Promise.<Array.<module:bajaux/registry/RegistryEntry>>}
- Description:
By default, just queries from the entries registered locally. Most likely,
subclasses will override this with something more useful.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
value |
* | |
params |
module:bajaux/registry/Registry~QueryParams |
Returns:
promise to be resolved with an array of all matching RegistryEntrys
- Type
- Promise.<Array.<module:bajaux/registry/RegistryEntry>>
queryFirst(value, params) → {Promise.<module:bajaux/registry/RegistryEntry>}
- Description:
By default, just queries from the entries registered locally. Most likely,
subclasses will override this with something more useful.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
value |
* | |
params |
module:bajaux/registry/Registry~QueryParams |
Returns:
promise to be resolved with the first matchingRegistryEntry
- Type
- Promise.<module:bajaux/registry/RegistryEntry>
register(key, paramsopt) → {Promise}
- Description:
Register a RequireJS module ID locally for the given key.
- Source:
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
key |
String | ||
params |
module:bajaux/registry/Registry~QueryParams |
<optional> |
query parameters/metadata for this RequireJS module |
Returns:
promise to be resolved after registration is complete
- Type
- Promise
resolveAll(value, params) → {Promise.<Array.<*>>}
- Description:
Perform a query on the registry and resolve all RequireJS modules
represented. This will resolve an array of Widget constructors, menu
agent functions, etc.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
value |
* | |
params |
module:bajaux/registry/Registry~QueryParams |
Returns:
promise to be resolved with an array of the
exported results of all RequireJS modules represented, or empty if none
found; rejected if the station could not be successfully queried for
registry info, or if any of the RequireJS modules failed to resolve
- Type
- Promise.<Array.<*>>
resolveFirst(value, params) → {Promise.<*>}
- Description:
Perform a query on the registry and attempt to resolve the first
matching entry's RequireJS module. Note that this differs fromresolveAll
in that if the first entry fails to resolve (for instance, an invalid
RequireJS module ID), it will move on to the next entry and keep trying
to resolve all the way down until it can resolve something.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
value |
* | |
params |
module:bajaux/registry/Registry~QueryParams |
Returns:
promise to be resolved with the exported
results of the first matching entry that successfully resolves its
RequireJS module ID, or undefined if none found
- Type
- Promise.<*>
toJSON() → {Object}
- Description:
Return an object suitable for serialization using
JSON.stringifyor
similar. The returned object can be passed right back to a
Registryconstructor to reconstitute later.
- Source:
Returns:
- Type
- Object
Type Definitions
QueryParams
- Description:
Query parameters to narrow the results resolved for a given registry key.
- Source:
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
rjs |
String |
<optional> |
If given, only resolve entries that have this |
deps |
Array.<Array.<String>> |
<optional> |
If given, only resolve entries that have |
hasAny |
Array.<String> |
<optional> |
If given, only resolve entries that |
hasAll |
Array.<String> |
<optional> |
If given, only resolve entries that |
Query parameters to narrow the results resolved for a given registry key.
Type:
- Object