public class SecurityService extends DefaultComponent
Modifier and Type | Field and Description |
---|---|
static ComponentName |
NAME |
static String |
PERMISSIONS_EXTENSION_POINT |
lastModified
Constructor and Description |
---|
SecurityService() |
Modifier and Type | Method and Description |
---|---|
void |
activate(ComponentContext context)
Activates the component.
|
boolean |
arePoliciesExpressibleInQuery(String repositoryName) |
boolean |
arePoliciesRestrictingPermission(String permission) |
boolean |
checkPermission(Document doc,
Principal principal,
String permission) |
void |
deactivate(ComponentContext context)
Deactivates the component.
|
Collection<String> |
filterGrantedPermissions(Document doc,
Principal principal,
Collection<String> permissions)
Filters the supplied permissions based on whether they are granted to a given principal for a given document.
|
<T> T |
getAdapter(Class<T> adapter)
Returns an object which is an instance of the given class associated with this object.
|
PermissionProvider |
getPermissionProvider() |
String[] |
getPermissionsToCheck(String permission)
Provides the full list of all permissions or groups of permissions that contain the given one (inclusive).
|
Collection<SQLQuery.Transformer> |
getPoliciesQueryTransformers(String repositoryName) |
static String[] |
getPrincipalsToCheck(Principal principal) |
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
getLastModified, registerExtension, setLastModified, setModifiedNow, start, stop, unregisterExtension
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applicationStarted, getApplicationStartedOrder
public static final ComponentName NAME
public static final String PERMISSIONS_EXTENSION_POINT
public SecurityService()
public void activate(ComponentContext context)
Component
This method is called by the runtime when a component is activated.
activate
in interface Component
activate
in class DefaultComponent
context
- the runtime contextpublic void deactivate(ComponentContext context)
Component
This method is called by the runtime when a component is deactivated.
deactivate
in interface Component
deactivate
in class DefaultComponent
context
- the runtime contextpublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution
in class DefaultComponent
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution
in class DefaultComponent
public PermissionProvider getPermissionProvider()
public boolean arePoliciesRestrictingPermission(String permission)
public boolean arePoliciesExpressibleInQuery(String repositoryName)
public Collection<SQLQuery.Transformer> getPoliciesQueryTransformers(String repositoryName)
public boolean checkPermission(Document doc, Principal principal, String permission)
public Collection<String> filterGrantedPermissions(Document doc, Principal principal, Collection<String> permissions)
public String[] getPermissionsToCheck(String permission)
It is exposed remotely through CoreSession.getPermissionsToCheck(java.lang.String)
.
permission
- public static String[] getPrincipalsToCheck(Principal principal)
public <T> T getAdapter(Class<T> adapter)
Adaptable
null
if no such object can be found.getAdapter
in interface Adaptable
getAdapter
in class DefaultComponent
adapter
- the adapter class to look upnull
if this object does not have an adapter for
the given classCopyright © 2017 Nuxeo. All rights reserved.