As per the vocabulary, the Registry is designed as a storage place for apps outside of ui-dashboard to register resources. These will then become available to dashboard for the purposes of dynamic interactions between different frontend apps.
...
Here the index.js file in ui-licenses consumes the event 'ui-stripes-registry-loadLOAD_STRIPES_REGISTRY', and then triggers a function which sets up the license resource within the registry:
...
A RegistryResource is a class containing information about a particular resource of the registry. It has fields that are technically publically available, but they should only be accessed through the requisite getters and setters.
Once https://github.com/tc39/proposal-private-methods#private-methods-and-fields or equivalent become available and supported, these fields should be made private. This class contains the following methods with which to interact with it:
Warning |
---|
getLink/setLink are implemented, but their shape is not yet finalised in generality. It is HIGHLY recommended that these are not utilised, and any early implementors confine their use to get/set for ViewResource and ViewResources. |
...
Note |
---|
Currently it is presumed that a string link implies a direct URL which can be followed, and a function link is to be passed one parameter, namely the resource in question. See the agreements implementation for an example. |
setViewResources(
...
link)
A function for the special case of setLink which should reflect a basic URL path for a "view all" page for the resource. In the case of agreements it would be "/erm/agreements/"
setViewResource(
...
link)
A function for the special case of setLink which should reflect a basic URL path for a "view" page for a resource. In the case of agreements it would be "/erm/agreements/{id}".
getViewResources(
...
)
A function which fetches 'viewResources' from above.
getViewResource(
...
)
A function which fetches 'viewResource' from above.
...