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