All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.defendev.common.domain.iam.DefendevUserDetailsDto Maven / Gradle / Ivy

Go to download

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;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy