Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support kRequired and kManagerDriven access modes #98

Closed
Tracked by #1209
feltech opened this issue Jan 31, 2024 · 0 comments · Fixed by #99
Closed
Tracked by #1209

Support kRequired and kManagerDriven access modes #98

feltech opened this issue Jan 31, 2024 · 0 comments · Fixed by #99
Assignees

Comments

@feltech
Copy link
Member

feltech commented Jan 31, 2024

What

Support OpenAssetIO/OpenAssetIO#1209

@feltech feltech self-assigned this Jan 31, 2024
feltech added a commit to feltech/OpenAssetIO-Manager-BAL that referenced this issue Jan 31, 2024
Closes OpenAssetIO#98.

OpenAssetIO/OpenAssetIO#1209 added the `kRequired` and
`kManagerDriven` access mode options for `managementPolicy` queries,
i.e. the subset of required traits for publishing to succeed, and the
subset of traits that the manager wants to dictate during publishing,
respectively.

For consistency, the `kWrite` access mode of `resolve` was renamed to
`kManagerDriven`.

So add support for these access modes in an extensible way, by making
use of the `kAccessNames` string mapping to allow the JSON database to
specialise on any access mode to `managementPolicy` in a consistent way.

Also add support for `resolve` to take any access mode, with a new JSON
field `supported_access_modes`, which is an iterable of supported modes
(i.e. `kRead` and/or `kManagerDriven`), and which defaults to only
`kRead`.

This means we can have a JSON database entry for a "write only" entity,
i.e. a "working reference" returned from a `preflight` API call,
which should only be `resolve`d with `kManagerDriven` access mode. This
then supports writing the example workflow in
OpenAssetIO/OpenAssetIO-MediaCreation#75.

Currently, `preflight` simply returns the input reference as the
"working reference". Ultimately, we will want the ability to customise
that.

Interestingly, `register` _can_ return a different reference, in that it
has the version identifier suffix appended (e.g. `?v=2`). This means for
the purposes of exemplification in
OpenAssetIO/OpenAssetIO-MediaCreation#75, we have everything we need.

Signed-off-by: David Feltell <[email protected]>
@feltech feltech moved this to In Progress in OpenAssetIO Development Feb 1, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in OpenAssetIO Development Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant