Class ContentToModuleRightContextConvertor
- java.lang.Object
-
- org.ametys.plugins.workspaces.project.rights.convertor.ContentToModuleRightContextConvertor
-
- All Implemented Interfaces:
RightContextConvertor
,Serviceable
public class ContentToModuleRightContextConvertor extends Object implements RightContextConvertor, Serviceable
ThisRightContextConvertor
delegates rights to workspace module root
-
-
Field Summary
Fields Modifier and Type Field Description protected ContentTypesHelper
_cTypeHelper
ContentTypes Helperprivate ServiceManager
_manager
protected ProjectManager
_projectManager
Project Managerprotected ProjectRightHelper
_projectRightHelper
Project right helper
-
Constructor Summary
Constructors Constructor Description ContentToModuleRightContextConvertor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected WorkspaceModule
_getWorkspaceModule(Content content)
Get the workspace module associated to a contentprotected Set<ResourceCollection>
_toModuleRoots(Object object)
Get the module roots associated to current objectSet<Object>
convert(Object object)
Converts the object.protected ContentTypesHelper
getContentTypesHelper()
Get the content types helper instanceprotected ProjectManager
getProjectManager()
Get the project manager instanceprotected ProjectRightHelper
getProjectRightHelper()
Get the project right helper instancevoid
service(ServiceManager manager)
-
-
-
Field Detail
-
_cTypeHelper
protected ContentTypesHelper _cTypeHelper
ContentTypes Helper
-
_projectManager
protected ProjectManager _projectManager
Project Manager
-
_projectRightHelper
protected ProjectRightHelper _projectRightHelper
Project right helper
-
_manager
private ServiceManager _manager
-
-
Constructor Detail
-
ContentToModuleRightContextConvertor
public ContentToModuleRightContextConvertor()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getProjectRightHelper
protected ProjectRightHelper getProjectRightHelper()
Get the project right helper instance- Returns:
- the project right helper instance
-
getProjectManager
protected ProjectManager getProjectManager()
Get the project manager instance- Returns:
- the project manager instance
-
getContentTypesHelper
protected ContentTypesHelper getContentTypesHelper()
Get the content types helper instance- Returns:
- the content types helper instance
-
convert
public Set<Object> convert(Object object)
Description copied from interface:RightContextConvertor
Converts the object.- Specified by:
convert
in interfaceRightContextConvertor
- Parameters:
object
- The initial object- Returns:
- The converted objects. A non-null set, that does not contains the initial object. So if you do not support the object to convert, you must return an empty set.
-
_toModuleRoots
protected Set<ResourceCollection> _toModuleRoots(Object object)
Get the module roots associated to current object- Parameters:
object
- The object context- Returns:
- the module roots associated to current object or empty set if the object is not linked to a existing module
-
_getWorkspaceModule
protected WorkspaceModule _getWorkspaceModule(Content content)
Get the workspace module associated to a content- Parameters:
content
- the content- Returns:
- the workspace module or null if the content does not match any module
-
-