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) throws Exception
Component
This method is called by the runtime when a component is activated.
activate
in interface Component
activate
in class DefaultComponent
context
- the runtime contextException
- if an error occurs during activationpublic void deactivate(ComponentContext context) throws Exception
Component
This method is called by the runtime when a component is deactivated.
deactivate
in interface Component
deactivate
in class DefaultComponent
context
- the runtime contextException
- if an error occurs during activationpublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) throws Exception
registerContribution
in class DefaultComponent
Exception
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) throws Exception
unregisterContribution
in class DefaultComponent
Exception
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 © 2014 Nuxeo SA. All rights reserved.