From dc47ba1ce8cb45dec664855dbbdce9ea8df0c8a1 Mon Sep 17 00:00:00 2001 From: tingxuanp Date: Thu, 24 Oct 2024 14:36:57 +0800 Subject: [PATCH 1/3] Add Find Command class diagram --- docs/diagrams/FindCommandClass.puml | 33 ++++++++++++++++++++++++ docs/diagrams/PredicateClassDiagram.puml | 23 +++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 docs/diagrams/FindCommandClass.puml create mode 100644 docs/diagrams/PredicateClassDiagram.puml diff --git a/docs/diagrams/FindCommandClass.puml b/docs/diagrams/FindCommandClass.puml new file mode 100644 index 00000000000..eeaed49b668 --- /dev/null +++ b/docs/diagrams/FindCommandClass.puml @@ -0,0 +1,33 @@ +@startuml +'abstract abstract +'abstract class "abstract class" +'annotation annotation +'circle circle +'() circle_short_form +'class class +'class class_stereo <> +'diamond diamond +'<> diamond_short_form +'entity entity +'enum enum +'exception exception +'interface interface +'metaclass metaclass +'protocol protocol +'stereotype stereotype +'struct struct +hide circle +skinparam classAttributeIconSize 0 + +abstract class FindCommand { ++ CommandResult execute(Model model) +} +class FindNameCommand extends FindCommand +class FindAddressCommand extends FindCommand +class FindPhoneCommand extends FindCommand +class FindTagCommand extends FindCommand +class FindEmailCommand extends FindCommand +class FindWeddingCommand extends FindCommand + + +@enduml \ No newline at end of file diff --git a/docs/diagrams/PredicateClassDiagram.puml b/docs/diagrams/PredicateClassDiagram.puml new file mode 100644 index 00000000000..b5911eb49d4 --- /dev/null +++ b/docs/diagrams/PredicateClassDiagram.puml @@ -0,0 +1,23 @@ +@startuml +'abstract abstract +'abstract class "abstract class" +'annotation annotation +'circle circle +'() circle_short_form +'class class +'class class_stereo <> +'diamond diamond +'<> diamond_short_form +'entity entity +'enum enum +'exception exception +'interface interface +'metaclass metaclass +'protocol protocol +'stereotype stereotype +'struct struct +hide circle +skinparam classAttributeIconSize 0 + + +@enduml \ No newline at end of file From 058f6fc741ed72e4300e6bcc85b6b352ab189e16 Mon Sep 17 00:00:00 2001 From: tingxuanp Date: Thu, 24 Oct 2024 15:37:16 +0800 Subject: [PATCH 2/3] Edit Find Command class diagram --- docs/diagrams/FindCommandClass.puml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/docs/diagrams/FindCommandClass.puml b/docs/diagrams/FindCommandClass.puml index eeaed49b668..a08c936bb51 100644 --- a/docs/diagrams/FindCommandClass.puml +++ b/docs/diagrams/FindCommandClass.puml @@ -20,14 +20,8 @@ hide circle skinparam classAttributeIconSize 0 abstract class FindCommand { -+ CommandResult execute(Model model) +abstract + CommandResult execute(Model model) } -class FindNameCommand extends FindCommand -class FindAddressCommand extends FindCommand -class FindPhoneCommand extends FindCommand -class FindTagCommand extends FindCommand -class FindEmailCommand extends FindCommand -class FindWeddingCommand extends FindCommand - +class FindXYZCommand extends FindCommand @enduml \ No newline at end of file From 922ba73357520dfd6748416e30abbfbda74a3d28 Mon Sep 17 00:00:00 2001 From: tingxuanp Date: Thu, 24 Oct 2024 18:30:13 +0800 Subject: [PATCH 3/3] Add Find Command UML diagram --- docs/diagrams/FindCommandClass.puml | 52 ++++++++++++++---------- docs/diagrams/PredicateClassDiagram.puml | 23 ----------- 2 files changed, 31 insertions(+), 44 deletions(-) delete mode 100644 docs/diagrams/PredicateClassDiagram.puml diff --git a/docs/diagrams/FindCommandClass.puml b/docs/diagrams/FindCommandClass.puml index a08c936bb51..880c821318a 100644 --- a/docs/diagrams/FindCommandClass.puml +++ b/docs/diagrams/FindCommandClass.puml @@ -1,27 +1,37 @@ @startuml -'abstract abstract -'abstract class "abstract class" -'annotation annotation -'circle circle -'() circle_short_form -'class class -'class class_stereo <> -'diamond diamond -'<> diamond_short_form -'entity entity -'enum enum -'exception exception -'interface interface -'metaclass metaclass -'protocol protocol -'stereotype stereotype -'struct struct + hide circle skinparam classAttributeIconSize 0 +skinparam classMethodAttributeIconSize 0 +hide empty methods + + +Class "<>\nModel" as Model +Class "{abstract}\nCommand" as Command +Class "{abstract}\nFindCommand" as FindCommand +Command : CommandResult execute(Model model) {abstract} + -abstract class FindCommand { -abstract + CommandResult execute(Model model) +Model <.left. FindCommand +Class FindXYZCommand extends FindCommand +Class FindCommand extends Command +Class "{abstract}\nPredicate" as Predicate { + + boolean test(T t) {abstract} } -class FindXYZCommand extends FindCommand +Class "{abstract}\nTraitContainsKeywordPredicate" as TraitContainsKeywordPredicate +Class "XYZContainsKeywordsPredicate" as XYZContainsKeywordPredicate +Class TraitContainsKeywordPredicate implements Predicate +Class XYZContainsKeywordPredicate extends TraitContainsKeywordPredicate + +TraitContainsKeywordPredicate.up.>Predicate +FindXYZCommand -right-> XYZContainsKeywordPredicate + +hide FindCommand fields +hide Model fields +hide TraitContainsKeywordPredicate fields +hide FindXYZCommand fields +hide XYZContainsKeywordPredicate fields + + -@enduml \ No newline at end of file +@enduml diff --git a/docs/diagrams/PredicateClassDiagram.puml b/docs/diagrams/PredicateClassDiagram.puml deleted file mode 100644 index b5911eb49d4..00000000000 --- a/docs/diagrams/PredicateClassDiagram.puml +++ /dev/null @@ -1,23 +0,0 @@ -@startuml -'abstract abstract -'abstract class "abstract class" -'annotation annotation -'circle circle -'() circle_short_form -'class class -'class class_stereo <> -'diamond diamond -'<> diamond_short_form -'entity entity -'enum enum -'exception exception -'interface interface -'metaclass metaclass -'protocol protocol -'stereotype stereotype -'struct struct -hide circle -skinparam classAttributeIconSize 0 - - -@enduml \ No newline at end of file