-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(rest): listing license clearing info of a project. #2029
Conversation
})).collect(Collectors.toList()); | ||
|
||
List<EntityModel<Release>> releaseList = releases.stream().map(sw360Release -> wrapTException(() -> { | ||
final Release embeddedRelease = restControllerHelper.convertToEmbeddedLinkedRelease(sw360Release); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this snippet to RestControllerHelper (same as addEmbeddedRelease)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
return embeddedRelease; | ||
} | ||
|
||
public void addEmbeddedReleasess(HalResource halResource, List<EntityModel<Release>> releases) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo addEmbeddedReleasess -> addEmbeddedReleases
|
||
final User sw360User = restControllerHelper.getSw360UserFromAuthentication(); | ||
Project sw360Project = projectService.getProjectForUserById(id, sw360User); | ||
String transitive = "true"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion, transitive should be a parameter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added as a parameter.
@rudra-superrr |
a115c7f
to
e357891
Compare
Hi @hoangnt2 , made the changes as requested. |
@@ -1122,6 +1147,24 @@ public RepositoryLinksResource process(RepositoryLinksResource resource) { | |||
return resource; | |||
} | |||
|
|||
private HalResource<Project> createHalLicenseClearing(Project sw360Project, User sw360User, List<EntityModel<Release>> releases) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused sw360User, TException is never thrown
} | ||
|
||
public void addEmbeddedProjectReleases(HalResource halResource, List<EntityModel<Release>> releases) { | ||
halResource.addEmbeddedResource("sw360:release", releases); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep sw360:release
if you can
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's already sw360:release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rudra-superrr Oh, sorry I mean sw360:releases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I keep sw360:releases, then nested list will come in response structure.
@rudra-superrr, I got it, thanks
e357891
to
cc26aaf
Compare
Review comments resolved. |
Signed-off-by: rudra-superrr <rudra.chopra@siemens.com>
cc26aaf
to
fd13d19
Compare
Code look good |
closes #2030 |
Issue: #2030
Description: GET request will get all releases of license clearing.