org.defendev.common.domain.iam.DefendevUserDetailsDto Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of common-jdk Show documentation
Show all versions of common-jdk Show documentation
Common utils purely based on JDK and no other dependencies. Only exception being for org.jetbrains:annotations for building stratgic Kotlin language compatibility.Another only-exception is Apache Commons Lang3.
The newest version!
package org.defendev.common.domain.iam;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
import java.util.Set;
public class DefendevUserDetailsDto implements IDefendevUserDetails {
private String username;
private Set roles;
private Map> privilegeToOwnershipUnit;
@JsonCreator(mode = JsonCreator.Mode.PROPERTIES)
public DefendevUserDetailsDto(
@JsonProperty("username") String username,
@JsonProperty("roles") Set roles,
@JsonProperty("privilegeToOwnershipUnit") Map> privilegeToOwnershipUnit
) {
this.username = username;
this.roles = roles;
this.privilegeToOwnershipUnit = privilegeToOwnershipUnit;
}
@Override
public String getUsername() {
return username;
}
@Override
public Set getRoles() {
return roles;
}
@Override
public Map> getPrivilegeToOwnershipUnit() {
return privilegeToOwnershipUnit;
}
}