Skip to content
This repository was archived by the owner on Mar 28, 2026. It is now read-only.

Commit 9d8ccbf

Browse files
Renamed Decision.Link.type to Decision.Link.description.
1 parent 0db7f1a commit 9d8ccbf

4 files changed

Lines changed: 27 additions & 13 deletions

File tree

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ subprojects { proj ->
1414

1515
description = 'Structurizr'
1616
group = 'com.structurizr'
17-
version = '1.12.0'
17+
version = '1.12.1'
1818

1919
repositories {
2020
mavenCentral()

docs/changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 1.12.1 (2nd March 2022)
4+
5+
- Renamed `Decision.Link.type` to `Decision.Link.description`.
6+
37
## 1.12.0 (1st March 2022)
48

59
- Breaking API changes to how documentation and decisions are managed.

docs/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The Structurizr for Java binaries are hosted on [Maven Central](https://repo1.ma
1212

1313
Name | Description
1414
---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------
15-
com.structurizr:structurizr-client:1.12.0 | The Structurizr API client library.
15+
com.structurizr:structurizr-client:1.12.1 | The Structurizr API client library.
1616

1717
## 2. Create a Java program
1818

structurizr-core/src/com/structurizr/documentation/Decision.java

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -128,18 +128,19 @@ public int hashCode() {
128128
*/
129129
public static final class Link {
130130

131-
private String type;
132131
private String id;
132+
private String description = "";
133133

134134
Link() {
135135
}
136136

137-
Link(String id, String type) {
137+
Link(String id, String description) {
138138
if (StringUtils.isNullOrEmpty(id)) {
139-
throw new IllegalArgumentException("Link ID must be specfied");
139+
throw new IllegalArgumentException("Link ID must be specified");
140140
}
141-
this.id = id;
142-
this.type = type;
141+
142+
setId(id);
143+
setDescription(description);
143144
}
144145

145146
public String getId() {
@@ -150,12 +151,21 @@ void setId(String id) {
150151
this.id = id;
151152
}
152153

153-
public String getType() {
154-
return type;
154+
/**
155+
* Gets the description of this link.
156+
*
157+
* @return a String description
158+
*/
159+
public String getDescription() {
160+
return description;
155161
}
156162

157-
void setType(String type) {
158-
this.type = type;
163+
void setDescription(String description) {
164+
if (!StringUtils.isNullOrEmpty(description)) {
165+
this.description = description;
166+
} else {
167+
this.description = "";
168+
}
159169
}
160170

161171
@Override
@@ -165,13 +175,13 @@ public boolean equals(Object o) {
165175

166176
Link link = (Link) o;
167177

168-
if (!type.equals(link.type)) return false;
178+
if (!description.equals(link.description)) return false;
169179
return id.equals(link.id);
170180
}
171181

172182
@Override
173183
public int hashCode() {
174-
int result = type.hashCode();
184+
int result = description.hashCode();
175185
result = 31 * result + id.hashCode();
176186
return result;
177187
}

0 commit comments

Comments
 (0)