magpie.adapter.magpieservice
¶
Store adapters to read data from magpie.
Module Contents¶
Classes¶
Registry for OWS services. |
Attributes¶
-
class
magpie.adapter.magpieservice.
MagpieServiceStore
(: pyramid.request.Request, request)[source]¶ Bases:
twitcher.store.ServiceStoreInterface
Registry for OWS services.
Uses magpie to fetch service url and attributes.
-
abstract
save_service
(self, service, overwrite=True, request=None)[source]¶ Magpie store is read-only, use magpie api to add services.
-
abstract
delete_service
(self, name, request=None)[source]¶ Magpie store is read-only, use magpie api to delete services.
-
_fetch_by_name_cached
(self: magpie.typedefs.Str, service_name) → twitcher.datatype.Service[source]¶ Cache this method with
beaker
based on the provided caching key parameters.If the cache is not hit (expired timeout or new key entry), calls
fetch_by_name()
to retrieve the actualtwitcher.datatype.Service
definition. Otherwise, returns the cached item to avoid SQL queries.Note
Function arguments are required to generate caching keys by which cached elements will be retrieved.
Note
Method
fetch_by_name()
gets triggered bytwitcher.owsproxy.owsproxy_view()
after successful validation of granted access for Logged User to the service / resources following call tomagpie.adapter.magpieowssecurity.MagpieOWSSecurity.check_request()
in order to send and retrieve the actual response of that proxied service and forward it back to the requesting user. Caching helps greatly reduce recurrent SQL queries to convert Twitcher to Magpie service.
-
fetch_by_name
(self: magpie.typedefs.Str, name) → twitcher.datatype.Service[source]¶ Gets
twitcher.datatype.Service
corresponding tomagpie.models.Service
byname
.
-
abstract