From f5548770dd432c0c89b26ec3d52527234e83d8c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Norman=20J=C3=A4ckel?= Date: Fri, 7 Feb 2020 00:19:11 +0100 Subject: [PATCH] Added first draft for restriction and presenter interfaces. --- docs/interfaces/action-service.txt | 6 +++--- docs/interfaces/presenter-service.txt | 19 +++++++++++++++++++ docs/interfaces/restriction-service.txt | 20 ++++++++++++++++++++ 3 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 docs/interfaces/presenter-service.txt create mode 100644 docs/interfaces/restriction-service.txt diff --git a/docs/interfaces/action-service.txt b/docs/interfaces/action-service.txt index 5305559f6..b49c67e9e 100644 --- a/docs/interfaces/action-service.txt +++ b/docs/interfaces/action-service.txt @@ -1,4 +1,4 @@ -# Action Service Interface +# Actions Service Interface Exception ActionException(message: string); @@ -7,7 +7,7 @@ Exception ActionException(message: string); * Executes multiple actions in the conext of the user given by the user_id. * All actions are processed independently. * - * TODO: Check if we need an interface or flag to process actions all together. + * TODO: Maybe we do not want to run them independently. * * * @throws ActionException @@ -16,7 +16,7 @@ handle_request (payload: Action[], user_id: number): ActionResult[] interface Action { action: string; - data: object[]; # An array of action specific data. See JSON schema defintions. + data: object[]; # An array of action specific data. See JSON schema defintions. } interface ActionResult { diff --git a/docs/interfaces/presenter-service.txt b/docs/interfaces/presenter-service.txt new file mode 100644 index 000000000..4c27dfa5a --- /dev/null +++ b/docs/interfaces/presenter-service.txt @@ -0,0 +1,19 @@ +# Presenter Service Interface + +Exception PresenterException(message: string); + + +/** + * Presents some (restricted) data without autoupdate. + * + * @throws PresenterException + */ +handle_request (payload: Presenter[]): PresenterResult[] + +interface Presenter { + user_id: number; + presentation: TODO; +} + +/* TODO */ +interface PresenterResult {} diff --git a/docs/interfaces/restriction-service.txt b/docs/interfaces/restriction-service.txt new file mode 100644 index 000000000..de0cf74ad --- /dev/null +++ b/docs/interfaces/restriction-service.txt @@ -0,0 +1,20 @@ +# Restrictions Service Interface + +Exception RestrictionException(message: string); + + +/** + * Restricts data for given user + * + * @throws RestrictionException + */ +handle_request (payload: Restriction[]): RestrictionResult[] + +interface Restriction { + user_id: number; + fqfields: Fqfield[]; +} + +interface RestrictionResult { + : Value; +}