mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-14 01:15:44 +01:00
added more information too PluginDto
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user