public class SecurityService extends DefaultComponent
Modifier and Type | Field and Description |
---|---|
static ComponentName |
NAME |
static String |
PERMISSIONS_EXTENSION_POINT |
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.
|
<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) |
applicationStarted, getApplicationStartedOrder, getLastModified, registerExtension, setLastModified, unregisterExtension
public static final ComponentName NAME
public static final String PERMISSIONS_EXTENSION_POINT
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) throws SecurityException
SecurityException
public String[] getPermissionsToCheck(String permission)
It is exposed remotely through CoreSession.getPermissionsToCheck(java.lang.String)
.
permission
- 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 © 2015 Nuxeo SA. All rights reserved.