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

net.nemerosa.ontrack.model.security.AccountGroupSelection Maven / Gradle / Ivy

There is a newer version: 4.4.5
Show newest version
package net.nemerosa.ontrack.model.security;

import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import net.nemerosa.ontrack.model.support.Selectable;

import java.util.Objects;

/**
 * Defines the selection of an {@link net.nemerosa.ontrack.model.security.AccountGroup}.
 */
@Data
@AllArgsConstructor(access = AccessLevel.PROTECTED)
public class AccountGroupSelection implements Selectable {

    @Getter(AccessLevel.NONE)
    private final int id;
    private final String name;
    private final boolean selected;

    public static AccountGroupSelection of(AccountGroup group, boolean selected) {
        return new AccountGroupSelection(group.id(), group.getName(), selected);
    }

    @Override
    public String getId() {
        return Objects.toString(id);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy