-
Type: New Feature
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Vocabularies
-
Labels:None
-
Environment:
Proposed
-
Proposal:
-
Resolution:
Today, actions and functions are bound to a type. This implies that, anywhere that type is present, the action or function can be invoked.
There are many scenarios in which whether an action or function could be invoked is dependent upon where the instance of the type lives.
For such scenarios, it would be nice to be able to specify exactly what usages of a type supported a particular operation.
One option would be to introduce a BindingConstraint annotation; something like:
<Action Name="forward" IsBound="true" > <AnnotationTerm="Org.OData.Core.V1.Capabilities.BindingConstraint"> <Collection> <Record> <PropertyValue Property="Target" ModelElementPath="/me/email"/> </Record> </Collection> </Annotation> <ParameterName="bindingParameter" Type="self.email"/> <ParameterName="recipient" Type="Collection(self.recipent)"/> <ReturnTypeType="self.email" /> </Action>
If we don't think we need to add additional properties/annotations to the path, it would be simpler to make a collection of model element paths:
<Action Name="forward" IsBound="true" > <AnnotationTerm="Org.OData.Core.V1.Capabilities.BindingConstraint"> <Collection> <ModelElementPath>/me/email<ModelElementPath/> </Collection> </Annotation> <ParameterName="bindingParameter" Type="self.email"/> <ParameterName="recipient" Type="Collection(self.recipent)"/> <ReturnTypeType="self.email" /> </Action>