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

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

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

import java.util.Collections;
import java.util.List;
import java.util.Map;

/**
 * Components which contributes some functions to a role.
 */
public interface RoleContributor {

    /**
     * Gets a list of global roles to add.
     *
     * The parent role (if defined) functions are inherited by the new role. If the parent role is null,
     * the role will not have any inherited function.
     */
    default List getGlobalRoles() {
        return Collections.emptyList();
    }

    /**
     * Gets a list of project roles to add.
     *
     * The parent role (if defined) functions are inherited by the new role. If the parent role is null,
     * the role will not have any inherited function.
     */
    default List getProjectRoles() {
        return Collections.emptyList();
    }

    /**
     * Gets the list of functions to contribute per global role.
     *
     * @return List of {@link GlobalFunction} per role - none of them must be annotated with the
     * {@link CoreFunction} annotation.
     */
    default Map>> getGlobalFunctionContributionsForGlobalRoles() {
        return Collections.emptyMap();
    }

    /**
     * Gets the list of project functions to contribute per global role.
     *
     * @return List of {@link ProjectFunction} per role - none of them must be annotated with the
     * {@link CoreFunction} annotation.
     */
    default Map>> getProjectFunctionContributionsForGlobalRoles() {
        return Collections.emptyMap();
    }

    /**
     * Gets the list of functions to contribute per project role.
     *
     * @return List of {@link ProjectFunction} per role - none of them must be annotated with the
     * {@link CoreFunction} annotation.
     */
    default Map>> getProjectFunctionContributionsForProjectRoles() {
        return Collections.emptyMap();
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy