Package org.ametys.odf.rights
Class ODFRightsContextConvertor
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.odf.rights.ODFRightsContextConvertor
-
- All Implemented Interfaces:
RightContextConvertor
,LogEnabled
,Serviceable
public class ODFRightsContextConvertor extends AbstractLogEnabled implements RightContextConvertor, Serviceable
This implementation convert the ODF contents to a Set ofOrgUnit
they belong to.
-
-
Constructor Summary
Constructors Constructor Description ODFRightsContextConvertor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<Object>
convert(Object object)
Converts the object.protected Set<String>
getOrgUnits(ProgramItem content)
Get the orgunits for the contentvoid
service(ServiceManager smanager)
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Constructor Detail
-
ODFRightsContextConvertor
public ODFRightsContextConvertor()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
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.
-
getOrgUnits
protected Set<String> getOrgUnits(ProgramItem content)
Get the orgunits for the content- Parameters:
content
- the content- Returns:
- the orgunits in a List
-
-