|
11 | 11 | # the this class. See the notes under the "Initialization" section of: |
12 | 12 | # https://openassetio.github.io/OpenAssetIO/classopenassetio_1_1v1_1_1manager_api_1_1_manager_interface.html#details (pylint: disable=line-too-long) |
13 | 13 | # As such, any expensive module imports should be deferred. |
14 | | -from openassetio import constants, BatchElementError, TraitsData |
| 14 | +from openassetio import constants, TraitsData, BatchElementError |
| 15 | + |
| 16 | +# TraitsData and BatchElementError got moved with a deprecation. If you |
| 17 | +# don't need to support versions prior to beta 1.0, you should use the |
| 18 | +# below two imports instead. |
| 19 | +# from openassetio.traits import TraitsData |
| 20 | +# from openassetio.errors import BatchElementError |
15 | 21 | from openassetio.access import PolicyAccess, ResolveAccess |
16 | 22 | from openassetio.managerApi import ManagerInterface |
17 | 23 | from openassetio_mediacreation.traits.content import LocatableContentTrait |
@@ -53,6 +59,19 @@ def initialize(self, managerSettings, hostSession): |
53 | 59 | def displayName(self): |
54 | 60 | return "My Asset Manager" |
55 | 61 |
|
| 62 | + def hasCapability(self, capability): |
| 63 | + # Declare what sort of capabilities your manger fulfils. |
| 64 | + # EntityReferenceIdentification and ManagementPolicyQueries |
| 65 | + # are mandatory. |
| 66 | + if capability in ( |
| 67 | + ManagerInterface.Capability.kEntityReferenceIdentification, |
| 68 | + ManagerInterface.Capability.kManagementPolicyQueries, |
| 69 | + ManagerInterface.Capability.kResolution, |
| 70 | + ): |
| 71 | + return True |
| 72 | + |
| 73 | + return False |
| 74 | + |
56 | 75 | def info(self): |
57 | 76 | # This hint allows the API middleware to short-circuit calls to |
58 | 77 | # `isEntityReferenceString` using string prefix comparisons. If |
|
0 commit comments