-
Notifications
You must be signed in to change notification settings - Fork 1
/
jhipster-jdl.jdl
252 lines (220 loc) · 5.57 KB
/
jhipster-jdl.jdl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
entity Product {
name String required,
identifier String required,
version String required,
createdDate LocalDate,
lastUpdatedDate LocalDate,
targetUrl String maxlength(2048),
uploadState UploadState,
disclaimer TextBlob,
delivered Boolean,
deliveredDate Instant,
contact String maxlength(2048),
comment String maxlength(4096),
previousProductId Integer,
uploadFilter String maxlength(2048)
}
enum UploadState {
SUCCESSFUL("Successful"),
PROCESSING(Processing),
FAILURE(Failure)
}
entity LibraryPerProduct {
addedDate LocalDate,
addedManually Boolean,
hideForPublishing Boolean
}
entity Library {
groupId String,
artifactId String required,
version String required,
type LibraryType,
originalLicense String maxlength(2048),
licenseUrl String maxlength(2048),
licenseText TextBlob,
sourceCodeUrl String maxlength(2048),
pUrl String maxlength(2048),
copyright String maxlength(16384),
compliance String,
complianceComment String maxlength(4096),
comment String maxlength(4096),
reviewed Boolean,
reviewedDeepScan Boolean,
lastReviewedDate LocalDate,
lastReviewedDeepScanDate LocalDate,
createdDate LocalDate,
hideForPublishing Boolean,
md5 String maxlength(32),
sha1 String maxlength(40)
}
enum LibraryType {
MAVEN(maven),
NPM(npm),
NUGET(nuget),
PYPI(pypi),
GOLANG(golang),
ALPINE(alpine),
APACHE(apache),
BITBUCKET(bitbucket),
CARGO(cargo),
COMPOSER(composer),
DEB(deb),
DOCKER(docker),
GEM(gem),
GENERIC(generic),
GITHUB(github),
GRADLE(gradle),
HEX(hex),
JAR(jar),
JAVA(java),
JS(js),
POM(pom),
RPM(rpm),
XSD(xsd),
ZIP(zip),
UNKNOWN(unknown)
}
entity LicensePerLibrary {
linkType LinkType,
orderId Integer
}
enum LinkType {
AND(and),
OR(or)
}
entity License {
fullName String required,
shortIdentifier String required,
spdxIdentifier String,
url String maxlength(2048),
genericLicenseText TextBlob,
other String maxlength(2048),
reviewed Boolean,
lastReviewedDate LocalDate
}
entity LicenseConflict {
compatibility CompatibilityState,
comment String maxlength(4096)
}
entity LicenseNamingMapping {
regex String maxlength(512) required,
uniformShortIdentifier String
}
entity GenericLicenseUrl {
url String maxlength(2048) required
}
entity LicenseRisk {
name String required,
level Integer required,
description String maxlength(1024),
color String
}
entity Requirement {
shortText String required,
description String maxlength(2048)
}
entity Upload {
file Blob required maxbytes(30000000),
entityToUpload EntityUploadChoice,
record Integer,
overwriteData Boolean,
uploadedDate LocalDate
}
entity Fossology {
status FossologyStatus required,
uploadId String maxlength(64),
jobId String maxlength(64),
lastScan Instant
}
entity LibraryErrorLog {
message String maxlength(1024) required,
severity LogSeverity required,
status LogStatus required,
timestamp Instant required
}
enum LogSeverity {
LOW,
MEDIUM,
HIGH
}
enum LogStatus {
CLOSED,
FIXED,
OPEN
}
enum EntityUploadChoice {
PRODUCT(Product),
LIBRARY(Library),
LICENSE(License)
}
enum FossologyStatus {
NOT_STARTED("Not started"),
UPLOAD_STARTED("Started upload"),
UPLOAD_FINISHED("Finished upload"),
SCAN_STARTED("Started scan"),
SCAN_FINISHED("Finished scan"),
FAILURE("Failure")
}
enum CompatibilityState {
Compatible("Compatible"),
Incompatible("Incompatible"),
Unknown("Unknown")
}
relationship OneToOne {
Library{fossology} to Fossology
}
relationship ManyToMany {
Library{licenseToPublish(shortIdentifier)} to License{libraryPublish},
Library{licenseOfFiles(shortIdentifier)} to License{libraryFiles},
License{requirement(shortText)} to Requirement{license(shortIdentifier)}
}
// Simulate a ManyToMany relationship between Product and Library with additional attributes
relationship OneToMany {
Product{library} to LibraryPerProduct{product},
}
relationship ManyToOne {
LibraryPerProduct{library} to Library
}
// Simulate a ManyToMany relationship between Library and License with additional attributes
relationship OneToMany {
Library{license} to LicensePerLibrary{library},
}
relationship ManyToOne {
LicensePerLibrary{license} to License
}
// Simulate a ManyToMany relationship between License and License with additional attributes
relationship OneToMany {
License{licenseConflict} to LicenseConflict{license},
}
relationship ManyToOne {
LicenseConflict{license} to License
}
relationship ManyToOne {
Library{lastReviewedBy(login)} to User,
Library{lastReviewedDeepScanBy(login)} to User,
License{lastReviewedBy(login)} to User,
License{licenseRisk(name)} to LicenseRisk,
}
relationship OneToMany {
Library{errorLog} to LibraryErrorLog{library}
}
// Set pagination options
paginate Requirement, LicenseRisk with infinite-scroll
paginate Library, License, Product, LibraryPerProduct, Upload, LicensePerLibrary, LibraryErrorLog, LicenseNamingMapping with pagination
// Use Data Transfer Objects (DTO)
//dto Product with mapstruct
// Set service options
service Product with serviceClass
service LibraryPerProduct with serviceClass
service Library with serviceClass
service LibraryErrorLog with serviceClass
service LicensePerLibrary with serviceClass
service License with serviceClass
service Upload with serviceClass
// Enable Filters
filter Product
filter LibraryPerProduct
filter Library
filter LibraryErrorLog
filter LicensePerLibrary
filter License