SIF 3 Service Paths QBE Service Paths Query
SIF 3 Service Paths & QBE Service Paths & Query By Example (QBE): Query Mechanism Presented by: Joerg Huber
2 Service Paths ¡ ¡ ¡ What is a Service Path? Base URL Format & Components Other URL Components Limitations How do the Frameworks work with Service Paths? l l Consumer Provider Training Course SIF 3: Service Paths October 20 © Systemic Pty Ltd
3 What is a Service Path ¡ ¡ It is a Query Mechanism! Allows retrieval of ‘Associated’ Objects (i. e. All Students at a School) Standard REST paradigm Optimises data retrieval l ¡ ¡ One query vs. many queries Standard notation, easy to read Query condition is part of the URL. Training Course SIF 3: Service Paths October 20 © Systemic Pty Ltd
4 Base URL Format & Components Example: Get Students at School <base. URL>/School. Infos/<ref. Id>/Student. Personals Association Object Ref. Id of the School Object to be returned Query Condition: ‘where School. Info. Ref. Id = <refid>’ Training Course SIF 3: Service Paths October 20 © Systemic Pty Ltd
5 Other URL Components etc. Service Paths support all standard URL components of any Object Service: ¡ Can be ‘nested’ l l ¡ ¡ ¡ Above will return daily attendances for a given student at a given school. Matrix Parameters (zone. Id, contex. Id) Query Parameters (navigation. Page, navigation. Page. Size) HTTP Headers (request. Id) l ¡ …/School. Infos/<ref. Id>/Student. Personals/<ref. Id>/Daily. Attendances Exception: service. Type = SERVICEPATH No Payload l Not valid for HTTP GET! Training Course SIF 3: Service Paths October 20 © Systemic Pty Ltd
6 Limitations: Query Only ¡ ¡ Can only Query Data (HTTP GET). No create, update or delete No Events are sent to a Service Path Only available right in ACL will be “QUERY” HTTP Header ‘service. Type’ must be set to ‘SERVICEPATH’ l Not to worry about if frameworks are used. Training Course SIF 3: Service Paths October 20 © Systemic Pty Ltd
7 Frameworks & Service Paths ¡ ¡ Currently only available in Java version Consumer: Part of Abstract Consumer l ¡ consumer. retrieve. By. Service. Path(…) Provider: Implement Query. Provider Interface l Direct Environment Template Entry <service name="School. Infos/{}/Student. Personals" type="SERVICEPATH"> <rights> <right type="QUERY">APPROVED</right> </rights> </service> l Implemented by class of “Object to be Returned” Training Course SIF 3: Service Paths October 20 © Systemic Pty Ltd
8 What is Query By Example ¡ ¡ It is a Query Mechanism! Allows retrieval of Objects based on a ‘Sample Object’. Service of “Sample Object” serves the query. Query Condition is given by a standard SIF Object: <Student. Personal> <Person. Info> <Name Type="LGL"> <Family. Name>Jones</Family. Name> </Name> <Person. Info> </Student. Personal> => Give me all students with legal family name of Jones. Training Course SIF 3: Service Paths October 20 © Systemic Pty Ltd
9 URL Components, GET vs. POST. QBE supports all standard URL components of any Object Service: ¡ ¡ Matrix Parameters (zone. Id, contex. Id) Query Parameters (navigation. Page, navigation. Page. Size) HTTP Headers (request. Id, generator. ID etc. ) BUT it has a Payload!! l l Not valid for HTTP GET! It uses a HTTP POST with HTTP Header of method. Override=GET => Abstracted with SIF 3 Frameworks. Training Course SIF 3: Service Paths October 20 © Systemic Pty Ltd
1 0 Frameworks & Service Paths ¡ ¡ Available in Java &. Net version Consumer: Part of Abstract Consumer l ¡ consumer. retrieve. By. QBE(…) Provider: Implement Query. Provider Interface If not supported then throw Unsupported. Query. Exception. ¡ ACL: Direct Environment Template Entry l l l Part of standard Object Service (no changes) “QUERY” right must be “APPROVED”. <rights> <right type="QUERY">APPROVED</right> </rights> Training Course SIF 3: Service Paths October 20 © Systemic Pty Ltd
1 1 Question Time… Questions? Training Course SIF 3: Service Paths October 20 © Systemic Pty Ltd
- Slides: 11