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

io.rocketbase.commons.model.AppUserReference Maven / Gradle / Ivy

There is a newer version: 4.4.1
Show newest version
package io.rocketbase.commons.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;

import java.io.Serializable;

@JsonDeserialize(as = SimpleAppUserReference.class)
public interface AppUserReference extends HasFirstAndLastName, Serializable {

    String getId();

    String getUsername();

    String getEmail();

    String getAvatar();

    /**
     * fullname fallback if null use username
     */
    @JsonIgnore
    default String getDisplayName() {
        String fullName = getFullName();
        if (fullName == null) {
            return getUsername();
        }
        return fullName;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy