File tree Expand file tree Collapse file tree 3 files changed +28
-2
lines changed
structurizr-core/src/com/structurizr/model Expand file tree Collapse file tree 3 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ subprojects { proj ->
88
99 description = ' Structurizr'
1010 group = ' com.structurizr'
11- version = ' 1.21 .0'
11+ version = ' 1.22 .0'
1212
1313 repositories {
1414 mavenCentral()
Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## 1.22.0 (5th March 2023)
4+
5+ - Adds documentation to components.
6+
37## 1.21.0 (26th February 2023)
48
59- __ Breaking change__ : Removes the concept of "code elements" from ` Component ` .
Original file line number Diff line number Diff line change 11package com .structurizr .model ;
22
33import com .fasterxml .jackson .annotation .JsonIgnore ;
4+ import com .structurizr .documentation .Documentable ;
5+ import com .structurizr .documentation .Documentation ;
46
57import java .util .Arrays ;
68import java .util .LinkedHashSet ;
911/**
1012 * Represents a "component" in the C4 model.
1113 */
12- public final class Component extends StaticStructureElement {
14+ public final class Component extends StaticStructureElement implements Documentable {
1315
1416 private Container parent ;
1517
1618 private String technology ;
1719
20+ private Documentation documentation = new Documentation ();
21+
1822 Component () {
1923 }
2024
@@ -67,4 +71,22 @@ public Set<String> getDefaultTags() {
6771 return new LinkedHashSet <>(Arrays .asList (Tags .ELEMENT , Tags .COMPONENT ));
6872 }
6973
74+ /**
75+ * Gets the documentation associated with this component.
76+ *
77+ * @return a Documentation object
78+ */
79+ public Documentation getDocumentation () {
80+ return documentation ;
81+ }
82+
83+ /**
84+ * Sets the documentation associated with this component.
85+ *
86+ * @param documentation a Documentation object
87+ */
88+ void setDocumentation (Documentation documentation ) {
89+ this .documentation = documentation ;
90+ }
91+
7092}
You can’t perform that action at this time.
0 commit comments