OpenAssetIO
An abstract API for generalising interactions between a host application and an asset management system
openassetio::v1::access Namespace Reference

Access modes available for API operations. More...

Enumerations

enum  PolicyAccess : std::underlying_type_t< internal::access::Access > {
  kRead = internal::access::Access::kRead, kWrite = internal::access::Access::kWrite, kCreateRelated = internal::access::Access::kCreateRelated, kRequired = internal::access::Access::kRequired,
  kManagerDriven = internal::access::Access::kManagerDriven
}
 Access pattern for a manager policy query. More...
 
enum  ResolveAccess : std::underlying_type_t< internal::access::Access > { kRead = internal::access::Access::kRead, kManagerDriven = internal::access::Access::kManagerDriven }
 Access pattern for entity resolution. More...
 
enum  EntityTraitsAccess : std::underlying_type_t< internal::access::Access > { kRead = internal::access::Access::kRead, kWrite = internal::access::Access::kWrite }
 Access pattern for entity trait set queries. More...
 
enum  PublishingAccess : std::underlying_type_t< internal::access::Access > { kWrite = internal::access::Access::kWrite, kCreateRelated = internal::access::Access::kCreateRelated }
 Access pattern for publishing. More...
 
enum  RelationsAccess : std::underlying_type_t< internal::access::Access > { kRead = internal::access::Access::kRead, kWrite = internal::access::Access::kWrite, kCreateRelated = internal::access::Access::kCreateRelated }
 Access pattern for a relationship query. More...
 
enum  DefaultEntityAccess : std::underlying_type_t< internal::access::Access > { kRead = internal::access::Access::kRead, kWrite = internal::access::Access::kWrite, kCreateRelated = internal::access::Access::kCreateRelated }
 Access pattern when querying a sensible default starting entity for further queries. More...
 

Variables

constexpr std::array kAccessNames
 Mapping of access enum value to human-readable name. More...
 

Detailed Description

Access modes available for API operations.

Enumeration Type Documentation

enum DefaultEntityAccess : std::underlying_type_t< internal::access::Access >
strong

Access pattern when querying a sensible default starting entity for further queries.

See also
Manager.defaultEntityReference / ManagerInterface.defaultEntityReference,
Enumerator
kRead 

Indicate that the manager should provide an entity reference that can be queried for existing data.

See also
ResolveAccess::kRead, RelationsAccess::kRead
kWrite 

Indicate that the manager should provide a reference suitable for publishing to.

See also
PublishingAccess::kWrite, RelationsAccess::kWrite
kCreateRelated 

Indicate that the manager should provide an entity reference that will be used to publish one or more new entities to.

See also
PublishingAccess::kCreateRelated, RelationsAccess::kCreateRelated
enum EntityTraitsAccess : std::underlying_type_t< internal::access::Access >
strong

Access pattern for entity trait set queries.

Enumerator
kRead 

Used to query the full trait set of an existing entity.

For example, when an entity is known to exist, but is of unknown classification.

kWrite 

Used to query the minimal trait set that must be specified when publishing to a particular entity reference.

For example, when validating that a user-supplied entity reference is appropriate for a publishing operation.

enum PolicyAccess : std::underlying_type_t< internal::access::Access >
strong

Access pattern for a manager policy query.

Since Manager.managementPolicy / ManagerInterface.managementPolicy is used to determine which functionality is supported by a manager, these constants largely mirror those for the relevant API methods.

Enumerator
kRead 

Host intends to read data.

See also
ResolveAccess::kRead / RelationsAccess::kRead
kWrite 

Host intends to write data.

See also
PublishingAccess::kWrite / RelationsAccess::kWrite
kCreateRelated 

Hosts intends to write data for a new entity in relation to another.

See also
PublishingAccess::kCreateRelated / RelationsAccess::kCreateRelated
kRequired 

Host wishes to know which subset of traits must have their required properties filled for successful publishing of an entity.

Traits are used for both classification of an entity, and communication of properties of that entity. That is, many traits have properties associated with them. When publishing an entity, the entire trait set of that entity must be provided, in order for the manager classify the entity being published. However, it may well be that not all of the properties of those traits need to be set, in order for publishing to succeed.

On an individual trait level, some properties will be required and some optional. Determining this currently requires manual inspection of the documentation for that trait.

The kRequired policy of a manager, with respect to a given entity trait set, refers to the subset of traits that must have their required properties set by the host, in order for publishing to succeed.

kManagerDriven 

Host wishes to know the subset of traits that have properties the manager can provide for creating new content when publishing an entity.

Note that if a manager provides a property for the host to use during publishing, the host should not assume that the manager "remembers" that it provided that property. I.e. the manager-driven property should be published with the rest of the data, especially if the associated trait is is part of the kRequired policy for the entity's trait set.

See also
ResolveAccess::kManagerDriven
enum PublishingAccess : std::underlying_type_t< internal::access::Access >
strong

Access pattern for publishing.

Enumerator
kWrite 

Used whenever the entity reference explicitly targets the specific entity whose data is being written.

For example creating or updating a simple, unstructured asset such as an image or other file-based data.

Hosts should also choose this access mode if unsure which access mode is appropriate.

kCreateRelated 

Used whenever the entity reference points to an existing entity, and the intention is to create a new, related entity instead of updating the target.

For example, when programmatically creating new entities under an existing parent collection, or the publishing of the components of a structured asset based on a single root entity reference.

enum RelationsAccess : std::underlying_type_t< internal::access::Access >
strong

Access pattern for a relationship query.

See also
Manager.getWithRelationship / ManagerInterface.getWithRelationship (and similar).
Enumerator
kRead 

Used to retrieve references to pre-existing related entities.

kWrite 

Used to retrieve references to related entities, with the intention of writing data to them.

For example, during a publish this could be used to retrieve references to the individual components of an entity, allowing the host to ask the manager for details on how and where to update them.

This access mode should be used when the related entity already exists, or where the host is unsure whether it exists or not. Otherwise see RelationsAccess::kCreateRelated

kCreateRelated 

Used to allow the manager to dictate a list of entities that the host should create.

For example, during a publish this could be used to decompose a single entity reference into a list of entity references, one for each component that the manager expects to be published, each with a different target location on disk.

For querying pre-existing related entities, with the intention of writing new data, see RelationsAccess::kWrite.

enum ResolveAccess : std::underlying_type_t< internal::access::Access >
strong

Access pattern for entity resolution.

Enumerator
kRead 

Used to query an existing entity for information.

For example, trait property values may be used to control the loading of data from a resource, and its subsequent interpretation.

kManagerDriven 

Used by hosts to ask the manager how or where to write new data for an entity.

For example, trait property values may be used to control the writing of data to a resource, and specifics of its format or content.

Variable Documentation

constexpr std::array kAccessNames
Initial value:
{"read", "write", "createRelated", "required",
"managerDriven"}

Mapping of access enum value to human-readable name.