public class DefaultResourceContext extends java.lang.Object implements ResourceContext
| Modifier and Type | Class and Description |
|---|---|
protected class |
DefaultResourceContext.DefaultLinksBuilder |
| Constructor and Description |
|---|
DefaultResourceContext(URIBuilder uriBuilder,
net.nemerosa.ontrack.model.security.SecurityService securityService) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isGlobalFunctionGranted(java.lang.Class<? extends net.nemerosa.ontrack.model.security.GlobalFunction> fn)
Checks if the
fn function is granted for the current user. |
boolean |
isLogged()
Checks if the current user is logged.
|
boolean |
isProjectFunctionGranted(int projectId,
java.lang.Class<? extends net.nemerosa.ontrack.model.security.ProjectFunction> fn)
Checks if the
fn function is granted for the current user
for the projectId project. |
LinksBuilder |
links()
Gets a builder for links
|
java.net.URI |
uri(java.lang.Object methodInvocation) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisProjectFunctionGrantedpublic DefaultResourceContext(URIBuilder uriBuilder, net.nemerosa.ontrack.model.security.SecurityService securityService)
public java.net.URI uri(java.lang.Object methodInvocation)
uri in interface ResourceContextURIBuilder.build(Object)public LinksBuilder links()
ResourceContextlinks in interface ResourceContextpublic boolean isProjectFunctionGranted(int projectId,
java.lang.Class<? extends net.nemerosa.ontrack.model.security.ProjectFunction> fn)
ResourceContextfn function is granted for the current user
for the projectId project.isProjectFunctionGranted in interface ResourceContextpublic boolean isGlobalFunctionGranted(java.lang.Class<? extends net.nemerosa.ontrack.model.security.GlobalFunction> fn)
ResourceContextfn function is granted for the current user.isGlobalFunctionGranted in interface ResourceContextpublic boolean isLogged()
ResourceContextisLogged in interface ResourceContext