Package org.ametys.plugins.blog.rights
Class BlogRightsContextConvertor
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.plugins.blog.rights.BlogRightsContextConvertor
- All Implemented Interfaces:
RightContextConvertor
,Contextualizable
,LogEnabled
,Serviceable
public class BlogRightsContextConvertor
extends AbstractLogEnabled
implements RightContextConvertor, Serviceable, Contextualizable
This implementation converts any context in a blog-type site to "/cms".
Thus, having a right on the application context is considered having it on any context.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
contextualize
(Context context) Converts the object.protected boolean
isBlogContext
(Object context) Test if the context is a blog site's context.void
service
(ServiceManager smanager) Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Constructor Details
-
BlogRightsContextConvertor
public BlogRightsContextConvertor()
-
-
Method Details
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
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.
-
isBlogContext
Test if the context is a blog site's context.- Parameters:
context
- the context to test.- Returns:
- true if the context belongs to a blog site, false otherwise.
-