net.nemerosa.ontrack.model.security.RoleContributor 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 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