info.magnolia.module.forum.frontend.action
Class AbstractThreadAction<RD extends info.magnolia.rendering.template.RenderableDefinition>
java.lang.Object
info.magnolia.rendering.model.RenderingModelImpl<RD>
info.magnolia.module.forum.frontend.action.AbstractThreadAction<RD>
- Type Parameters:
RD
- - an instance of RenderableDefinition
- All Implemented Interfaces:
- info.magnolia.rendering.model.RenderingModel<RD>
- Direct Known Subclasses:
- ThreadList, ThreadNew, ThreadReply, ThreadView
public abstract class AbstractThreadAction<RD extends info.magnolia.rendering.template.RenderableDefinition>
- extends info.magnolia.rendering.model.RenderingModelImpl<RD>
Abstract superclass for all forum thread actions providing functionality to access and modify threads, forum and posts.
- Version:
- $Id$
- Author:
- vsteller
Fields inherited from class info.magnolia.rendering.model.RenderingModelImpl |
content, contentMap, definition, parentModel |
Fields inherited from interface info.magnolia.rendering.model.RenderingModel |
SKIP_RENDERING |
Constructor Summary |
AbstractThreadAction(javax.jcr.Node content,
RD renderable,
info.magnolia.rendering.model.RenderingModel<?> parent)
|
Methods inherited from class info.magnolia.rendering.model.RenderingModelImpl |
getContent, getDef, getDefinition, getNode, getParent, getRoot |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROPERTYNAME_FORUMID
protected static final String PROPERTYNAME_FORUMID
- See Also:
- Constant Field Values
PROPERTYNAME_THREADID
protected static final String PROPERTYNAME_THREADID
- See Also:
- Constant Field Values
forumManager
protected final ForumManager forumManager
forumConfig
protected final ForumConfiguration forumConfig
forumId
protected String forumId
threadId
protected String threadId
forum
protected info.magnolia.cms.core.Content forum
thread
protected info.magnolia.cms.core.Content thread
AbstractThreadAction
public AbstractThreadAction(javax.jcr.Node content,
RD renderable,
info.magnolia.rendering.model.RenderingModel<?> parent)
execute
public String execute()
- Initializes forum and thread properties with given ids.
- Specified by:
execute
in interface info.magnolia.rendering.model.RenderingModel<RD extends info.magnolia.rendering.template.RenderableDefinition>
- Overrides:
execute
in class info.magnolia.rendering.model.RenderingModelImpl<RD extends info.magnolia.rendering.template.RenderableDefinition>
setupThreadIdFromContent
protected void setupThreadIdFromContent()
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
setupForumIdFromContent
protected void setupForumIdFromContent()
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
isShowingUnvalidatedMessages
public boolean isShowingUnvalidatedMessages()
isAnonymous
public boolean isAnonymous()
isAllowedToPost
public boolean isAllowedToPost()
- Checks if current user is allowed to post on the current thread.
setForumId
public void setForumId(String forumId)
getForumId
public String getForumId()
setThreadId
public void setThreadId(String threadId)
getThreadId
public String getThreadId()
getForum
public info.magnolia.cms.core.Content getForum()
getThread
public info.magnolia.cms.core.Content getThread()
Copyright © 2014 Magnolia International Ltd.. All Rights Reserved.