mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 16:35:45 +01:00
Merge
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package sonia.scm.api.v2.resources;
|
||||
|
||||
import de.otto.edison.hal.HalRepresentation;
|
||||
import org.mapstruct.Mapping;
|
||||
import sonia.scm.ModelObject;
|
||||
import sonia.scm.util.AssertUtil;
|
||||
|
||||
@@ -9,6 +10,8 @@ import java.util.Optional;
|
||||
|
||||
abstract class BaseMapper<T extends ModelObject, D extends HalRepresentation> {
|
||||
|
||||
|
||||
@Mapping(target = "attributes", ignore = true) // We do not map HAL attributes
|
||||
public abstract D map(T user);
|
||||
|
||||
Instant mapTime(Long epochMilli) {
|
||||
|
||||
@@ -4,13 +4,15 @@ import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import de.otto.edison.hal.HalRepresentation;
|
||||
import de.otto.edison.hal.Links;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
@Data @NoArgsConstructor
|
||||
@Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true)
|
||||
public class GroupDto extends HalRepresentation {
|
||||
|
||||
private Instant creationDate;
|
||||
@@ -19,6 +21,8 @@ public class GroupDto extends HalRepresentation {
|
||||
private Optional<Instant> lastModified;
|
||||
private String name;
|
||||
private String type;
|
||||
private Map<String, String> properties;
|
||||
private List<String> members;
|
||||
|
||||
@Override
|
||||
protected HalRepresentation add(Links links) {
|
||||
|
||||
@@ -9,6 +9,7 @@ import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
@AllArgsConstructor @NoArgsConstructor
|
||||
@@ -24,6 +25,7 @@ public class UserDto extends HalRepresentation {
|
||||
private String name;
|
||||
private String password;
|
||||
private String type;
|
||||
private Map<String, String> properties;
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("squid:S1185") // We want to have this method available in this package
|
||||
|
||||
Reference in New Issue
Block a user