public class SynchronizeContentRightAssignmentContext extends AbstractStaticRightAssignmentContext
RightAssignmentContext
for assign rights to a Content
or a jcr node root holding the contentsClientSideElement.Script, ClientSideElement.ScriptFile
Modifier and Type | Field and Description |
---|---|
protected SynchronizableContentsCollectionDAO |
_collectionsDAO
The synchronize collection DAO
|
protected I18nUtils |
_i18nUtils
The i18n utils
|
protected AmetysObjectResolver |
_resolver
The Ametys object resolver
|
static String |
ROOT_CONTEXT_PREFIX
The prefix for rights on the root of a collection
|
_context, _isPrivate, _reverseWorkspaceMather, _workspaceMatcher
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
Constructor and Description |
---|
SynchronizeContentRightAssignmentContext() |
Modifier and Type | Method and Description |
---|---|
private void |
_parametrizeValue(ClientSideElement.Script script,
String key,
I18nizableText i18nKey) |
Object |
convertJSContext(Object context)
From a JavaScript context object, converts it into a Java object
|
String |
getContextIdentifier(Object context)
Gets the identifier of the object context
|
Set<Object> |
getParentContexts(Object context)
Get the parent contexts of the object context
|
List<Object> |
getRootContexts(Map<String,Object> contextParameters)
Get the list of root contexts if the current workspace matches the allowed workspace
|
List<ClientSideElement.Script> |
getScripts(boolean ignoreRights,
Map<String,Object> contextParameters)
This method return the scripts that will be used on client side.
|
void |
service(ServiceManager smanager) |
configure, contextualize, isPrivate, matchWorkspace
_configureClass, _configureParameters, _configureScript, configureInitialParameters
_configureDependencies, _configureImports, _configureRights, _configureRightsMode, getDependencies, getId, getPluginName, getRights, getScripts, hasRight, setPluginInfo, toString
getLogger, setLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDependencies, getId, getPluginName, getRights, getScripts
public static final String ROOT_CONTEXT_PREFIX
protected AmetysObjectResolver _resolver
protected SynchronizableContentsCollectionDAO _collectionsDAO
protected I18nUtils _i18nUtils
public SynchronizeContentRightAssignmentContext()
public void service(ServiceManager smanager) throws ServiceException
service
in interface Serviceable
service
in class StaticFileImportsClientSideElement
ServiceException
public Object convertJSContext(Object context)
RightAssignmentContext
context
- the JS context objectpublic String getContextIdentifier(Object context)
RightAssignmentContext
context
- The object contextpublic Set<Object> getParentContexts(Object context)
RightAssignmentContext
context
- The object contextnull
otherwisepublic List<Object> getRootContexts(Map<String,Object> contextParameters)
RightAssignmentContext
contextParameters
- The contextual parameterspublic List<ClientSideElement.Script> getScripts(boolean ignoreRights, Map<String,Object> contextParameters)
ClientSideElement
getScripts
in interface ClientSideElement
getScripts
in class AbstractStaticRightAssignmentContext
ignoreRights
- True to ignore the rights verification.contextParameters
- Contextuals parameters transmitted by the environment.private void _parametrizeValue(ClientSideElement.Script script, String key, I18nizableText i18nKey)