OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

odata message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] Updated: (ODATA-103) 5.4.1 Representing Actions Bound to Multiple Entities: specify treatment of action overloads


     [ http://tools.oasis-open.org/issues/browse/ODATA-103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Pizzo updated ODATA-103:
--------------------------------

       Proposal: 
1) Action Overloads are permitted.
2) Overload is selected based on the segment type
3) The same rules are applied for functions that are overloaded based on binding parameter
4) In the case of type hierarchies, Self/Edit/Navigation(to 1) links should indicate the correct type.
    Environment: [Proposed]
       Assignee: Michael Pizzo

This is a good issue. I propose that overloads within a type hierarchy be allowed, and that function resolution take place according to the type of the URL segment; casting can be used to cast to the action definition on a more specific type.

So, if I have two entity types, Person and Customer : Person, and the "SendEmail" action has overloads with bindings to both in Person and Customer, then for a given instance Person(1) who is a Customer:

The following invokes the "SendEmail" action bound to the Person type:
    ~/Person(1)/SendEmail

The following invokes the "SendEMail" action bound to the Customer type:
    ~/Person(1)/Sales.Customer/SendEmail

These rules are consistent with property access (i.e., if the property is defined on a derive type you must cast the type segment, using the namespace qualified type name, before accessing the property).

The same semantics should apply to functions that are overloaded based on a binding parameter.

Further, for composability of both functions and actions on the edit/self link, I propose we provide guidance that, in the case of type hierarchies, the edit/self link returned by a service indicate the type of the particular instance. So, for example, the editlink for Person(1) (who is a customer) may be:

    /Person(1)/Sales.Customer


> 5.4.1 Representing Actions Bound to Multiple Entities: specify treatment of action overloads
> --------------------------------------------------------------------------------------------
>
>                 Key: ODATA-103
>                 URL: http://tools.oasis-open.org/issues/browse/ODATA-103
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: Bug
>          Components: OData Protocol v1.0
>    Affects Versions: WD01
>         Environment: [Proposed]
>            Reporter: Mark Biamonte 
>            Assignee: Michael Pizzo
>             Fix For: WD01
>
>
> Actions can have overloads based on the binding parameter type and entity types allow inheritance, so multiple overloads can in principle apply to a given set of entities.
> If restrictions exist for action overloads in an inheritance hierarchy, they need to be documented in the OData-Core specification.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]