diff --git a/docs/implement-import.md b/docs/implement-import.md new file mode 100644 index 000000000..cca83357d --- /dev/null +++ b/docs/implement-import.md @@ -0,0 +1,4 @@ +## Implement import + +* Create a new class `lib/service/BoardImportService.php` where `` is the name of the source system. +* Use the `lib/service/BoardImportTrelloService.php` class as inspiration \ No newline at end of file diff --git a/docs/import-class-diagram.md b/docs/import-class-diagram.md new file mode 100644 index 000000000..cbd5b67ca --- /dev/null +++ b/docs/import-class-diagram.md @@ -0,0 +1,7 @@ +## Import class diagram + +Importing boards to the Deck implements the class diagram below. + +> **NOTE**: When making any changes to the structure of the classes or implementing import from other sources, edit the `BoardImport.yuml` file + +![Screenshot](resources/BoardImport.svg) \ No newline at end of file diff --git a/docs/resources/BoardImport.svg b/docs/resources/BoardImport.svg new file mode 100644 index 000000000..700538bdb --- /dev/null +++ b/docs/resources/BoardImport.svg @@ -0,0 +1,178 @@ + + + + + + +G + + + +A0 + + + +Classes used on +board import. +Methods just to +illustrate. + + + +A1 + +ApiController + + + +A2 + +BoardImportApiController + ++import() ++getAllowedSystems() ++getConfigSchema() + + + +A1->A2 + + + + + +A3 + +BoardImportService + ++import() ++bootstrap() ++validateSystem() +#validateConfig() +#validateData() + + + +A2->A3 + + +uses + + + +A7 + +BoardImportTrelloService + + + +A3->A7 + + +uses + + + +A8 + + + +validateSystem is +public because is +used on Api. + + + +A3->A8 + + + + +A4 + +Command + + + +A5 + +BoardImport + ++boardImportCommandService + +#configure() +#execute(input,output) + + + +A4->A5 + + + + + +A6 + +BoardImportCommandService + ++bootstrap() ++import() ++validateSystem() +#validateConfig() +#validateData() + + + +A5->A6 + + +uses + + + +A6->A3 + + + + + +A7->A3 + + +uses + + + +A9 + + + +To create an import +to another system, +create another class +similar to this. + + + +A7->A9 + + + + +A10 + +<<abstract>> +ABoardImportService + + + +A7->A10 + + +implements + + + diff --git a/docs/resources/BoardImport.yuml b/docs/resources/BoardImport.yuml new file mode 100644 index 000000000..69aa222da --- /dev/null +++ b/docs/resources/BoardImport.yuml @@ -0,0 +1,17 @@ +// Created using [yUML](https://github.com/jaime-olivares/vscode-yuml) + +// {type:class} +// {direction:topDown} +// {generate:true} + +[note: Classes used on board import. Methods just to illustrate. {bg:cornsilk}] +[ApiController]<-[BoardImportApiController|+import();+getAllowedSystems();+getConfigSchema()] +[BoardImportApiController]uses-.->[BoardImportService|+import();+bootstrap();+validateSystem();#validateConfig();#validateData();] +[Command]<-[BoardImport|+boardImportCommandService|#configure();#execute(input,output)] +[BoardImport]uses-.->[BoardImportCommandService|+bootstrap();+import();+validateSystem();#validateConfig();#validateData()] +[BoardImportCommandService]->[BoardImportService] +[BoardImportService]uses-.->[BoardImportTrelloService] +[BoardImportTrelloService]uses-.->[BoardImportService] +[BoardImportService]-[note: validateSystem is public because is used on Api. {bg:cornsilk}] +[BoardImportTrelloService]-[note: To create an import to another system, create another class similar to this. {bg:cornsilk}] +[BoardImportTrelloService]implements-.-^[<> ABoardImportService] \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index c80c417be..3e8defc2e 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -11,4 +11,6 @@ pages: - Nextcloud API: API-Nextcloud.md - Developer documentation: - Data structure: structure.md - + - Import documentation: + - Implement import: implement-import.md + - Class diagram: import-class-diagram.md