net.nemerosa.ontrack.model.security.AccountGroupSelection Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ontrack-model Show documentation
Show all versions of ontrack-model Show documentation
Ontrack module: ontrack-model
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