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
This
RightContextConvertor
delegates rights to workspace module root-
Field Summary
Modifier and TypeFieldDescriptionprotected ContentTypesHelper
ContentTypes Helperprotected ProjectManager
Project Managerprotected ProjectRightHelper
Project right helper -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected WorkspaceModule
_getWorkspaceModule
(Content content) Get the workspace module associated to a contentprotected Set<ResourceCollection>
_toModuleRoots
(Object object) Get the module roots associated to current objectConverts the object.protected ContentTypesHelper
Get the content types helper instanceprotected ProjectManager
Get the project manager instanceprotected ProjectRightHelper
Get the project right helper instancevoid
service
(ServiceManager manager)
-
Field Details
-
_cTypeHelper
ContentTypes Helper -
_projectManager
Project Manager -
_projectRightHelper
Project right helper
-
-
Constructor Details
-
ContentToModuleRightContextConvertor
public ContentToModuleRightContextConvertor()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getProjectRightHelper
Get the project right helper instance- Returns:
- the project right helper instance
-
getProjectManager
Get the project manager instance- Returns:
- the project manager instance
-
getContentTypesHelper
Get the content types helper instance- Returns:
- the content types helper instance
-
convert
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
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
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
-