info.magnolia.module.forum.frontend.action
Class ThreadNew<RD extends info.magnolia.rendering.template.RenderableDefinition>

java.lang.Object
  extended by info.magnolia.rendering.model.RenderingModelImpl<RD>
      extended by info.magnolia.module.forum.frontend.action.AbstractThreadAction<RD>
          extended by info.magnolia.module.forum.frontend.action.ThreadNew<RD>
Type Parameters:
RD - - an instance of RenderableDefinition
All Implemented Interfaces:
info.magnolia.rendering.model.RenderingModel<RD>

public class ThreadNew<RD extends info.magnolia.rendering.template.RenderableDefinition>
extends AbstractThreadAction<RD>

Action to create a new thread.

Version:
$Revision: $ ($Author: $)
Author:
gjoseph

Field Summary
 
Fields inherited from class info.magnolia.module.forum.frontend.action.AbstractThreadAction
forum, forumConfig, forumId, forumManager, PROPERTYNAME_FORUMID, PROPERTYNAME_THREADID, thread, threadId
 
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
ThreadNew(javax.jcr.Node content, RD renderable, info.magnolia.rendering.model.RenderingModel<?> parent, info.magnolia.i18nsystem.SimpleTranslator i18n)
           
 
Method Summary
 String execute()
          Initializes forum and thread properties with given ids.
 String getMissingDataExceptionMessage()
           
 boolean isAllowedToPost()
          For thread creation we need to check if current user may post on the parent forum.
 
Methods inherited from class info.magnolia.module.forum.frontend.action.AbstractThreadAction
getForum, getForumId, getThread, getThreadId, isAnonymous, isShowingUnvalidatedMessages, setForumId, setThreadId, setupForumIdFromContent, setupThreadIdFromContent
 
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
 

Constructor Detail

ThreadNew

public ThreadNew(javax.jcr.Node content,
                 RD renderable,
                 info.magnolia.rendering.model.RenderingModel<?> parent,
                 info.magnolia.i18nsystem.SimpleTranslator i18n)
Method Detail

execute

public String execute()
Description copied from class: AbstractThreadAction
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 AbstractThreadAction<RD extends info.magnolia.rendering.template.RenderableDefinition>

isAllowedToPost

public boolean isAllowedToPost()
For thread creation we need to check if current user may post on the parent forum.

Overrides:
isAllowedToPost in class AbstractThreadAction<RD extends info.magnolia.rendering.template.RenderableDefinition>

getMissingDataExceptionMessage

public String getMissingDataExceptionMessage()


Copyright © 2014 Magnolia International Ltd.. All Rights Reserved.