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

View File

@@ -26,10 +26,13 @@ public class UIPluginDtoMapper {
} }
public UIPluginDto map(PluginWrapper plugin) { public UIPluginDto map(PluginWrapper plugin) {
UIPluginDto dto = new UIPluginDto( UIPluginDto dto = new UIPluginDto();
plugin.getPlugin().getInformation().getName(), dto.setName(plugin.getPlugin().getInformation().getName());
getScriptResources(plugin) 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() Links.Builder linksBuilder = linkingTo()
.self(resourceLinks.uiPlugin() .self(resourceLinks.uiPlugin()