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

com.cleverpine.viravaspringhelper.dto.PermissionInitializer Maven / Gradle / Ivy

There is a newer version: 3.1.7
Show newest version
package com.cleverpine.viravaspringhelper.dto;

import com.cleverpine.viravaspringhelper.core.BaseResource;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import org.springframework.lang.NonNull;

public class PermissionInitializer {

    private final BaseResource resource;

    private final Set scopeTypes;

    public PermissionInitializer(@NonNull BaseResource resource) {
        this.resource = resource;
        this.scopeTypes = new HashSet<>();
    }

    public BaseResource getResource() {
        return this.resource;
    }

    public Set getScopeTypes() {
        return this.scopeTypes;
    }

    public void addScope(@NonNull Collection scopeTypes) {
        this.scopeTypes.addAll(scopeTypes);
    }

    public void addScope(@NonNull ScopeType scopeType) {
        this.scopeTypes.add(scopeType);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy