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

com.atlassian.bamboo.specs.api.builders.permission.GroupPermission Maven / Gradle / Ivy

There is a newer version: 10.2.0
Show newest version
package com.atlassian.bamboo.specs.api.builders.permission;

import com.atlassian.bamboo.specs.api.builders.EntityPropertiesBuilder;
import com.atlassian.bamboo.specs.api.model.permission.GroupPermissionProperties;

import java.util.Arrays;
import java.util.LinkedHashSet;
import java.util.Set;

public class GroupPermission extends EntityPropertiesBuilder {

    private String group;
    private final Set permissionTypes = new LinkedHashSet<>();

    public GroupPermission(final String group) {
        this.group = group;
    }

    public GroupPermission permissions(final PermissionType... permissionTypes) {
        Arrays.stream(permissionTypes).forEach(this.permissionTypes::add);
        return this;
    }

    @Override
    protected GroupPermissionProperties build() {
        return new GroupPermissionProperties(group, permissionTypes);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy