Added first draft for restriction and presenter interfaces.

This commit is contained in:
Norman Jäckel 2020-02-07 00:19:11 +01:00
parent f7a18cef65
commit f5548770dd
3 changed files with 42 additions and 3 deletions

View File

@ -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 {

View File

@ -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 {}

View File

@ -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 {
<fqfield>: Value;
}