net.nemerosa.ontrack.ui.resource.ResourceContext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ontrack-ui-support Show documentation
Show all versions of ontrack-ui-support Show documentation
Ontrack module: ontrack-ui-support
package net.nemerosa.ontrack.ui.resource;
import net.nemerosa.ontrack.model.security.GlobalFunction;
import net.nemerosa.ontrack.model.security.ProjectFunction;
import net.nemerosa.ontrack.model.structure.ProjectEntity;
import java.net.URI;
public interface ResourceContext {
/**
* @see net.nemerosa.ontrack.ui.controller.URIBuilder#build(Object)
*/
URI uri(Object methodInvocation);
/**
* Gets a builder for links
*/
LinksBuilder links();
/**
* Checks if the fn
function is granted for the current user
* for the projectId
project.
*/
boolean isProjectFunctionGranted(int projectId, Class extends ProjectFunction> fn);
/**
* Checks if the fn
function is granted for the current user
* for the projectEntity
's project.
*/
default boolean isProjectFunctionGranted(ProjectEntity projectEntity, Class extends ProjectFunction> fn) {
return isProjectFunctionGranted(projectEntity.projectId(), fn);
}
/**
* Checks if the fn
function is granted for the current user.
*/
boolean isGlobalFunctionGranted(Class extends GlobalFunction> fn);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy