-
Notifications
You must be signed in to change notification settings - Fork 96
/
components.thrift
854 lines (721 loc) · 31 KB
/
components.thrift
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
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
/*
* Copyright Siemens AG, 2014-2019. Part of the SW360 Portal Project.
* With contributions by Bosch Software Innovations GmbH, 2016.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*/
include "sw360.thrift"
include "attachments.thrift"
include "users.thrift"
include "vendors.thrift"
include "licenses.thrift"
namespace java org.eclipse.sw360.datahandler.thrift.components
namespace php sw360.thrift.components
typedef sw360.RequestStatus RequestStatus
typedef sw360.RequestSummary RequestSummary
typedef sw360.AddDocumentRequestSummary AddDocumentRequestSummary
typedef sw360.DocumentState DocumentState
typedef sw360.Visibility Visibility
typedef sw360.ReleaseRelationship ReleaseRelationship
typedef sw360.MainlineState MainlineState
typedef sw360.ProjectReleaseRelationship ProjectReleaseRelationship
typedef sw360.SW360Exception SW360Exception
typedef sw360.PaginationData PaginationData
typedef sw360.ImportBomRequestPreparation ImportBomRequestPreparation
typedef attachments.Attachment Attachment
typedef attachments.FilledAttachment FilledAttachment
typedef users.User User
typedef users.RequestedAction RequestedAction
typedef vendors.Vendor Vendor
typedef licenses.License License
enum RepositoryType {
UNKNOWN = 0,
GIT = 14,
CLEARCASE = 7,
SVN = 1,
CVS = 2,
MERCURIAL = 16,
PERFORCE = 4,
VISUAL_SOURCESAFE = 6,
BAZAAR = 11,
ALIENBRAIN = 3,
TEAM_FOUNDATION_SERVER = 5,
RATIONAL_SYNERGY = 8,
PTC_INTEGRITY = 9,
DTR = 10,
DARCS = 12,
FOSSIL = 13,
GNU_ARCH = 15,
MONOTONE = 17,
BIT_KEEPER = 18,
RATIONAL_TEAM_CONCERT = 19
RCS = 20,
}
struct Repository {
1: required string url,
2: optional RepositoryType repositorytype
}
/**
* A list of all known external tools.
**/
enum ExternalTool {
FOSSOLOGY = 0
}
/**
* The different states a ExternalToolProcessStep can be in.
**/
enum ExternalToolProcessStatus {
NEW = 10,
IN_WORK = 20,
DONE = 30,
OUTDATED = 40
}
/**
* This structure is used to track processes to external tools like FOSSology made for a release. Normally one wants to
* send an attachment (like the sources of a release) to an external tool for further analysis and get the results back
* at some point. Often these processes do not consist of a single action so there is a list of process steps that need
* to be fulfilled until the process can be considered done.
**/
struct ExternalToolProcess {
1: optional string id,
2: required ExternalTool externalTool,
3: required ExternalToolProcessStatus processStatus,
4: optional string processIdInTool,
5: optional string attachmentId,
6: optional string attachmentHash,
7: required list<ExternalToolProcessStep> processSteps // ordered
}
/**
* This structure represents single steps when working with external tool processes. Please be aware that not all fields
* need to be filled for every tool.
**/
struct ExternalToolProcessStep {
1: optional string id,
2: optional string stepName,
3: required ExternalToolProcessStatus stepStatus,
4: optional string linkToStep
5: required string startedBy,
6: required string startedByGroup,
7: required string startedOn,
8: optional string processStepIdInTool,
9: optional string userIdInTool,
10: optional string userCredentialsInTool,
11: optional string userGroupInTool,
12: optional string finishedOn,
13: optional string result // value or document
}
enum ClearingState {
NEW_CLEARING = 0,
SENT_TO_CLEARING_TOOL = 1,
UNDER_CLEARING = 2,
REPORT_AVAILABLE = 3,
APPROVED = 4,
SCAN_AVAILABLE = 5,
}
/**
* Just an aggregation container used to count ClearingStates of more than one Release. Mainly used in Projects (could
* be moved to projects.thrift as well)
**/
struct ReleaseClearingStateSummary {
1: required i32 newRelease,
2: required i32 sentToClearingTool,
3: required i32 underClearing,
4: required i32 reportAvailable,
5: required i32 approved,
6: required i32 scanAvailable,
}
enum ECCStatus {
OPEN = 0,
IN_PROGRESS = 1,
APPROVED = 2,
REJECTED = 3,
}
struct COTSDetails{
1: optional string usedLicense,
2: optional string licenseClearingReportURL,
3: optional bool containsOSS,
4: optional bool ossContractSigned,
5: optional string ossInformationURL,
6: optional bool usageRightAvailable,
7: optional string cotsResponsible,
8: optional string clearingDeadline,
9: optional bool sourceCodeAvailable,
}
struct EccInformation{
1: optional ECCStatus eccStatus, // Status of ECC assessment
2: optional string al, // German Ausfuhrliste
3: optional string eccn, // European control classification number
4: optional string assessorContactPerson, // email of ECC person
5: optional string assessorDepartment, // department of ECC person
6: optional string eccComment, // comments for ecc information
7: optional string materialIndexNumber, // six digit material index number, string for convenience
8: optional string assessmentDate, // Date - YYYY-MM-dd, date of the last editing of ECC information
}
struct ClearingInformation {
// supplier / ec info
// 1: optional string AL, // moved to EccInformation
// 2: optional string ECCN, // moved to EccInformation
3: optional string externalSupplierID, // foreign key fur SCM software TODO mcj move to component
// 4: optional string assessorContactPerson, // moved to EccInformation
// 5: optional string assessorDepartment, // moved to EccInformation
// 6: optional string eccComment, // moved to EccInformation
// 7: optional string materialIndexNumber, // moved to EccInformation
// 8: optional string assessmentDate, // moved to EccInformation
// 9: optional ECCStatus eccStatus, // moved to EccInformation
// clearing related metadata part 1: strings,
12: optional string additionalRequestInfo, //
13: optional string evaluated, // Date - YYYY-MM-dd
14: optional string procStart, // Date - YYYY-MM-dd
15: optional string requestID, // foreign key
16: optional string clearingTeam, // who did the clearing in org
17: optional string requestorPerson, // again email who requested the clearing TODO mcj should be set automtically
// clearing related data: release level - just boolean (Yes / no)
31: optional bool binariesOriginalFromCommunity,
32: optional bool binariesSelfMade,
33: optional bool componentLicenseInformation,
34: optional bool sourceCodeDelivery,
35: optional bool sourceCodeOriginalFromCommunity,
36: optional bool sourceCodeToolMade,
37: optional bool sourceCodeSelfMade,
38: optional bool sourceCodeCotsAvailable,
39: optional bool screenshotOfWebSite,
40: optional bool finalizedLicenseScanReport,
41: optional bool licenseScanReportResult,
42: optional bool legalEvaluation,
43: optional bool licenseAgreement,
44: optional string scanned,
45: optional bool componentClearingReport,
46: optional string clearingStandard, // which generation of tool used
47: optional bool readmeOssAvailable,
// more release base data from mainline
50: optional string comment,
52: optional i32 countOfSecurityVn, // count of security vulnerabilities
53: optional string externalUrl, // URL pointing to another system, TODO should be map
}
struct Release {
// Basic information
1: optional string id,
2: optional string revision,
3: optional string type = "release",
4: optional string cpeid, // Unique CPE id for the release object
5: required string name, // Release name (e.g. thrift), often identical to Component name
6: required string version, // version or release name (e.g. 0.9.1)
7: required string componentId, // Id of the parent component
8: optional string releaseDate,
99: optional ComponentType componentType,
// information from external data sources
9: optional map<string, string> externalIds,
300: optional map<string, string> additionalData,
// Additional informations
10: optional set<Attachment> attachments,
11: optional string createdOn, // Creation date YYYY-MM-dd
12: optional Repository repository, // Repository where the release is maintained
16: optional MainlineState mainlineState, // enum: specific, open, mainline, phaseout
17: optional ClearingState clearingState, // TODO we probably need to map by clearing team?
// FOSSology Information
// 20: optional string fossologyId,
// 21: optional map<string, FossologyStatus> clearingTeamToFossologyStatus,
// 22: optional string attachmentInFossology, // id of the attachment currently in fossology
// 25: optional set<ExternalToolRequest> externalToolRequests,
26: optional set<ExternalToolProcess> externalToolProcesses,
// string details
30: optional string createdBy, // person who created the release
131: optional string creatorDepartment, // department of user in `createdBy`. transient
32: optional set<string> contributors, // contributors to the release
34: optional set<string> moderators, // people who can modify the data
36: optional set<string> subscribers, // List of subscribers
37: optional map<string,set<string>> roles, //customized roles with set of mail addresses
40: optional Vendor vendor,
41: optional string vendorId,
50: optional ClearingInformation clearingInformation,
51: optional set<string> languages,
53: optional set<string> operatingSystems,
54: optional COTSDetails cotsDetails,
55: optional EccInformation eccInformation,
56: optional set<string> softwarePlatforms,
65: optional set<string> mainLicenseIds,
66: optional set<string> otherLicenseIds,
// Urls for the project
70: optional string sourceCodeDownloadurl, // URL for download page for this release source code
71: optional string binaryDownloadurl, // URL for download page for this release binaries
80: optional map<string, ReleaseRelationship> releaseIdToRelationship, //id, comment
// Information for ModerationRequests
90: optional DocumentState documentState,
200: optional map<RequestedAction, bool> permissions,
204: optional string modifiedBy, // Last Modified By User Email
205: optional string modifiedOn, // Last Modified Date YYYY-MM-dd
}
enum ComponentType {
INTERNAL = 0, //internal software closed source
OSS = 1, //open source software
COTS = 2, //commercial of the shelf
FREESOFTWARE = 3, //freeware
INNER_SOURCE = 4, //internal software with source open for customers within own company
SERVICE = 5,
CODE_SNIPPET = 6,
}
struct Component {
// General information
1: optional string id,
2: optional string revision,
3: optional string type = "component",
5: required string name, // Component name (e.g. thrift)
6: optional string description, // Short description about the component
// Additional informations
10: optional set<Attachment> attachments,
11: optional string createdOn, // Creation date YYYY-MM-dd
12: optional ComponentType componentType,
// string details
20: optional string createdBy, // person who created the component in sw360
24: optional set<string> subscribers, // List of subscriber information
25: optional set<string> moderators, // people who can modify the data
26: optional string componentOwner,
27: optional string ownerAccountingUnit,
28: optional string ownerGroup,
29: optional string ownerCountry,
30: optional map<string,set<string>> roles, //customized roles with set of mail addresses
80: optional Visibility visbility = sw360.Visibility.EVERYONE,
81: optional string businessUnit,
// information from external data sources
31: optional map<string, string> externalIds,
300: optional map<string, string> additionalData,
// Linked objects
32: optional list<Release> releases,
33: optional set<string> releaseIds,
35: optional set<string> mainLicenseIds, //Aggregate of release main licenses
36: optional Vendor defaultVendor,
37: optional string defaultVendorId,
// List of keywords
40: optional set<string> categories,
41: optional set<string> languages, //Aggregate of release languages
42: optional set<string> softwarePlatforms,
43: optional set<string> operatingSystems, //Aggregate of release operatingSystems
44: optional set<string> vendorNames, //Aggregate of release vendor Fullnames
// Urls for the component, TODO should be map
50: optional string homepage,
51: optional string mailinglist,
52: optional string wiki,
53: optional string blog,
54: optional string wikipedia,
55: optional string openHub,
// Information for ModerationRequests
70: optional DocumentState documentState,
200: optional map<RequestedAction, bool> permissions,
204: optional string modifiedBy, // Last Modified By User Email
205: optional string modifiedOn, // Last Modified Date YYYY-MM-dd
}
struct ReleaseLink{
1: required string id,
2: required string vendor,
5: required string name,
10: required string version,
11: required string longName,
// 15: optional string comment,
16: optional ReleaseRelationship releaseRelationship,
17: optional MainlineState mainlineState,
// 20: optional string parentId,
// 21: optional list<ReleaseLink> subreleases,
22: required bool hasSubreleases,
25: optional string nodeId,
26: optional string parentNodeId,
31: optional ClearingState clearingState,
32: optional list<Attachment> attachments,
33: optional ComponentType componentType,
100: optional set<string> licenseIds,
101: optional set<string> licenseNames,
102: optional string comment,
103: optional set<string> otherLicenseIds,
104: optional bool accessible = true
}
struct ReleaseClearingStatusData {
1: required Release release,
2: optional ComponentType componentType,
3: optional string projectNames, // comma separated list of project names for display; possibly abbreviated
4: optional string mainlineStates, // comma separated list of mainline states for display; possibly abbreviated
5: optional bool accessible = true
}
service ComponentService {
/**
* short summary of all components identified by the given ids
**/
list<Component> getComponentsShort(1: set<string> ids);
/**
* short summary of all components visible to user
**/
list<Component> getComponentSummary(1: User user);
/**
* summary of up to `limit` components reverse ordered by `createdOn`. Negative `limit` will result in
* all components being returned
**/
list<Component> getRecentComponentsSummary(1: i32 limit, 2: User user);
/**
* summary of all components reverse ordered by `createdOn` being returned with pagination
**/
map<PaginationData, list<Component>> getRecentComponentsSummaryWithPagination(1: User user, 2: PaginationData pageData);
/**
* summary of up to `limit` components reverse ordered by `createdOn`. Negative `limit` will result in
* all components being returned.
* They are only the components which are visible to user.
**/
list<Component> getAccessibleRecentComponentsSummary(1: i32 limit, 2: User user);
/**
* total number of components in the DB, irrespective of whether the user may see them or not
**/
i32 getTotalComponentsCount(1: User user);
/**
* total number of accessible components in the DB, irrespective of whether the user may see them or not
**/
i32 getAccessibleTotalComponentsCount(1: User user);
/**
* short summary of all releases visible to user
**/
list<Release> getReleaseSummary(1: User user);
/**
* short summary of all accessible releases.
**/
list<Release> getAccessibleReleaseSummary(1: User user);
/**
* search components in database that match subQueryRestrictions
**/
list<Component> refineSearch(1: string text, 2: map<string, set<string>> subQueryRestrictions);
/**
* search components in database that match subQueryRestrictions
* They are only the components which are visible to user.
**/
list<Component> refineSearchAccessibleComponents(1: string text, 2: map<string, set<string>> subQueryRestrictions, 3: User user);
/**
* search components with the accessibility in database that match subQueryRestrictions
**/
list<Component> refineSearchWithAccessibility(1: string text, 2: map<string, set<string>> subQueryRestrictions, 3: User user);
/**
* global search function to list releases which match the text argument
*/
list<Release> searchReleases(1: string text);
/**
* global search function to list accessible releases which match the text argument
*/
list<Release> searchAccessibleReleases(1: string text, 2: User user);
/**
* get short summary of release by release name prefix
**/
list<Release> searchReleaseByNamePrefix(1: string name);
/**
* information for home portlet
**/
list<Component> getMyComponents(1: User user);
/**
* information for home portlet
**/
list<Component> getSubscribedComponents(1: User user);
/**
* information for home portlet
**/
list<Release> getSubscribedReleases(1: User user);
/**
* information for home portlet
**/
list<Release> getRecentReleases();
/**
* information for home portlet
**/
list<Release> getRecentReleasesWithAccessibility(1: User user);
// Component CRUD support
/**
* add component to database with user as creator,
* return id
**/
AddDocumentRequestSummary addComponent(1: Component component, 2: User user);
/**
* get component from database filled with releases and permissions for user
**/
Component getComponentById(1: string id, 2: User user);
/**
* get component from database filled with releases and permissions for user
* They are only the components which are visible to user.
**/
Component getAccessibleComponentById(1: string id, 2: User user) throws (1: SW360Exception exp);
/**
* get component from database filled with releases and permissions for user
* with moderation request of user applied if such request exists
**/
Component getComponentByIdForEdit(1: string id, 2: User user);
/**
* get component from database filled with releases and permissions for user
* with moderation request of user applied if such request exists
* They are only the components which are visible to user.
**/
Component getAccessibleComponentByIdForEdit(1: string id, 2: User user) throws (1: SW360Exception exp);
/**
* update component in database if user has permissions
* otherwise create moderation request
**/
RequestStatus updateComponent(1: Component component, 2: User user);
/**
* update the bulk of components in database if user is admin
**/
RequestSummary updateComponents(1: set<Component> components, 2: User user);
/**
* delete component from database if user has permissions,
* otherwise create moderation request
**/
RequestStatus deleteComponent(1: string id, 2: User user);
/**
* update component in database if user has permissions, additions and deletions are the parts of the moderation request
* that specify which properties to add to and which to delete from component
**/
RequestStatus updateComponentFromModerationRequest(1: Component additions, 2: Component deletions, 3: User user);
/**
* merge component identified by componentSourceId into component identified by componentTargetId.
* the componentSelection shows which data has to be set on the target. the source will be deleted afterwards.
* if user does not have permissions, RequestStatus.FAILURE is returned
* if any of the components has an active moderation request, it's a noop and RequestStatus.IN_USE is returned
**/
RequestStatus mergeComponents(1: string componentTargetId, 2: string componentSourceId, 3: Component componentSelection, 4: User user);
// Release CRUD support
/**
* add release to database with user as creator,
* return id
**/
AddDocumentRequestSummary addRelease(1: Release release, 2: User user);
/**
* get release from database filled with vendor and permissions for user
**/
Release getReleaseById(1: string id, 2: User user) throws (1: SW360Exception exp);
/**
* get accessible release from database filled with vendor and permissions for user
**/
Release getAccessibleReleaseById(1: string id, 2: User user) throws (1: SW360Exception exp);
/**
* get release from database filled with vendor and permissions for user
* with moderation request of user applied if such request exists
**/
Release getReleaseByIdForEdit(1: string id, 2: User user);
/**
* get accessible release from database filled with vendor and permissions for user
* with moderation request of user applied if such request exists
**/
Release getAccessibleReleaseByIdForEdit(1: string id, 2: User user) throws (1: SW360Exception exp);
/**
* get short summary of all releases specified by ids
**/
list<Release> getReleasesByIdsForExport(1: set<string> ids);
/**
* get short summary with accessibility of all releases specified by ids
**/
list<Release> getReleasesWithAccessibilityByIdsForExport(1: set<string> ids, 2: User user);
/**
* get short summary of all releases specified by ids, user is not used
**/
list<Release> getReleasesById(1: set<string> ids, 2: User user);
/**
* get short summary of all accessible releases specified by ids, user is not used
**/
list<Release> getAccessibleReleasesById(1: set<string> ids, 2: User user);
/**
* get summary of all releases specified by ids, user is not used
**/
list<Release> getFullReleasesById(1: set<string> ids, 2: User user);
/**
* get summary of all releases specified by ids, filled with permissions for user
**/
list<Release> getReleasesWithPermissions(1: set<string> ids, 2: User user);
/**
* get summary of all releases with vendor specified by id, filled with permissions for user
**/
list<Release> getReleasesFromVendorId(1: string id, 2: User user);
/**
* get short summary of all releases with vendor specified by ids
**/
list<Release> getReleasesFromVendorIds(1: set<string> ids);
/**
* get short summary of accessible releases with vendor specified by ids
**/
list<Release> getAccessibleReleasesFromVendorIds(1: set<string> ids, 2: User user);
/**
* get full release documents with the specifed vendor id
*/
set<Release> getReleasesByVendorId(1: string vendorId);
/**
* update release in database if user has permissions
* otherwise create moderation request
**/
RequestStatus updateRelease(1: Release release, 2: User user);
/**
* update release called only by fossology service - is allowed to manipulate external requests.
* update release in database if user has permissions
* otherwise create moderation request
**/
RequestStatus updateReleaseFossology(1: Release release, 2: User user);
/**
* update the bulk of releases in database if user is admin
**/
RequestSummary updateReleases(1: set<Release> releases, 2: User user);
/**
* merge release identified by releaseSourceId into release identified by releaseTargetId.
* the releaseSelection shows which data has to be set on the target. the source will be deleted afterwards.
* if user does not have permissions, RequestStatus.ACCESS_DENIED is returned
* if any of the releases has an active moderation request, it's a noop and RequestStatus.IN_USE is returned
**/
RequestStatus mergeReleases(1: string releaseTargetId, 2: string releaseSourceId, 3: Release releaseSelection, 4: User user);
/**
* Update the set of releases. Do only use for updating simple fields.
*/
RequestSummary updateReleasesDirectly(1: set<Release> releases, 2: User user);
/**
* delete release from database if user has permissions
* otherwise create moderation request
**/
RequestStatus deleteRelease(1: string id, 2: User user);
/**
* update release in database if user has permissions, additions and deletions are the parts of the moderation request
* that specify which properties to add to and which to delete from release
**/
RequestStatus updateReleaseFromModerationRequest(1: Release additions, 2: Release deletions, 3: User user);
/**
* get summaries of releases of component specified by id, filled with permissions for user
**/
list<Release> getReleasesByComponentId(1: string id, 2: User user);
/**
* get components belonging to linked releases of the release specified by releaseId
**/
set <Component> getUsingComponentsForRelease(1: string releaseId );
/**
* get components with accessibility belonging to linked releases of the release specified by releaseId
**/
set <Component> getUsingComponentsWithAccessibilityForRelease(1: string releaseId, 2: User user);
/**
* get components belonging to linked releases of the releases specified by releaseId
**/
set <Component> getUsingComponentsForComponent(1: set <string> releaseId );
/**
* get components with accessibility belonging to linked releases of the releases specified by releaseId
**/
set <Component> getUsingComponentsWithAccessibilityForComponent(1: set <string> releaseId, 2: User user);
/**
* get components using the given vendor id
*/
set <Component> getComponentsByDefaultVendorId(1: string vendorId);
/**
* Recomputes the fields of a component that are aggregated by its releases.
*/
Component recomputeReleaseDependentFields(1: string componentId, 2: User user);
/**
* check if release is used by other releases, components or projects
**/
bool releaseIsUsed(1: string releaseId);
/**
* check if one of the releases of the compnent is used by other releases, components or projects
**/
bool componentIsUsed(1: string componentId);
// These two methods are needed because there is no rights management needed to subscribe
/**
* subscribe user for component (no permission necessary)
**/
RequestStatus subscribeComponent(1: string id, 2: User user);
/**
* subscribe user for release (no permission necessary)
**/
RequestStatus subscribeRelease(1: string id, 2: User user);
/**
* unsubscribe user from component (no permission necessary)
**/
RequestStatus unsubscribeComponent(1: string id, 2: User user);
/**
* unsubscribe user from release (no permission necessary)
**/
RequestStatus unsubscribeRelease(1: string id, 2: User user);
/**
* Make a list of components for Excel export and component importer
**/
list<Component> getComponentSummaryForExport();
/**
* Make a list of components for component importer
**/
list<Component> getComponentDetailedSummaryForExport();
/**
* get export summary for components whose name is matching parameter name
**/
list<Component> searchComponentForExport(1: string name, 2: bool caseSensitive);
/**
* get component with fossologyId equal to uploadId, filled with releases and main licenses,
* releases are filled with vendor
**/
Component getComponentForReportFromFossologyUploadId(1: string uploadId );
/**
* get attachments with document type "source" of release with releaseId
**/
set<Attachment> getSourceAttachments(1:string releaseId);
/**
* make releaseLinks from linked releases of a project in order to display project
**/
list<ReleaseLink> getLinkedReleases(1: map<string, ProjectReleaseRelationship> relations);
/**
* make releaseLinks with accessibility from linked releases of a project in order to display project
**/
list<ReleaseLink> getLinkedReleasesWithAccessibility(1: map<string, ProjectReleaseRelationship> relations, 2: User user);
/**
* make releaseLinks from linked releases of a release in order to display in release detail view
**/
list<ReleaseLink> getLinkedReleaseRelations(1: map<string, ReleaseRelationship> relations);
/**
* make releaseLinks with accessibility from linked releases of a release in order to display in release detail view
**/
list<ReleaseLink> getLinkedReleaseRelationsWithAccessibility(1: map<string, ReleaseRelationship> relations, 2: User user);
/**
* get all attachmentContentIds of attachments of projects, components and releases
* used for attachment cleanup and component import
**/
set<string> getUsedAttachmentContentIds();
/**
* Method to ensure uniqueness of identifiers, used by database sanitation portlet,
* return map of name to ids
**/
map <string, list<string>> getDuplicateComponents();
/**
* Method to ensure uniqueness of identifiers, used by database sanitation portlet,
* return map of name to ids
**/
map <string, list<string>> getDuplicateReleases();
/**
* Method to ensure uniqueness of identifiers, used by database sanitation portlet,
* return map of name to ids
**/
map <string, list<string>> getDuplicateReleaseSources();
/**
* get a set of components based on the external id external ids can have multiple values to one key
*/
set<Component> searchComponentsByExternalIds(1: map<string, set<string>> externalIds);
/**
* get a set of releases based on the external id external ids can have multiple values to one key
*/
set<Release> searchReleasesByExternalIds(1: map<string, set<string>> externalIds);
/**
* Gets releases referencing the given release id
*/
list<Release> getReferencingReleases(1: string releaseId);
/**
* get the cyclic hierarchy of linkedReleases
*/
string getCyclicLinkedReleasePath(1: Release release, 2: User user);
ImportBomRequestPreparation prepareImportBom(1: User user, 2:string attachmentContentId);
/**
* parse a bom file and write the information to SW360
**/
RequestSummary importBomFromAttachmentContent(1: User user, 2:string attachmentContentId);
/**
* split data like releases and attachments from source component to target component.
**/
RequestStatus splitComponent(1: Component srcComponent, 2: Component targetComponent, 3: User user);
/**
* Gets all releases with complete details
*/
list<Release> getAllReleasesForUser(1: User user);
/**
* Send email to the user once spreadsheet export completed
*/
void sendExportSpreadsheetSuccessMail(1: string url, 2: string userEmail);
}