added more information too PluginDto

This commit is contained in:
Florian Scholdei
2019-07-03 16:38:07 +02:00
parent 088afc6b02
commit a03a666afe
2 changed files with 12 additions and 10 deletions

View File

@@ -6,16 +6,15 @@ import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@Getter @Setter @NoArgsConstructor
@Getter @Setter
public class UIPluginDto extends HalRepresentation {
private String name;
private Iterable<String> bundles;
public UIPluginDto(String name, Iterable<String> bundles) {
this.name = name;
this.bundles = bundles;
}
private String type;
private String version;
private String author;
private String description;
@Override
protected HalRepresentation add(Links links) {

View File

@@ -26,10 +26,13 @@ public class UIPluginDtoMapper {
}
public UIPluginDto map(PluginWrapper plugin) {
UIPluginDto dto = new UIPluginDto(
plugin.getPlugin().getInformation().getName(),
getScriptResources(plugin)
);
UIPluginDto dto = new UIPluginDto();
dto.setName(plugin.getPlugin().getInformation().getName());
dto.setBundles(getScriptResources(plugin));
dto.setType("42");
dto.setVersion(plugin.getPlugin().getInformation().getVersion());
dto.setAuthor(plugin.getPlugin().getInformation().getAuthor());
dto.setDescription(plugin.getPlugin().getInformation().getDescription());
Links.Builder linksBuilder = linkingTo()
.self(resourceLinks.uiPlugin()