<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE appian-web-config PUBLIC "-//Appian Corporation//DTD Appian Web MVC Configuration 1.0//EN" "/WEB-INF/appian-web-config_1_0.dtd" >

<appian-web-config>
 <appian-form-beans>
    <appian-form-bean name="ap_configForm"
               type="com.appiancorp.ap2.p.dt.mediator.ConfigForm" />    
    <appian-form-bean name="ap_forumPortletForm"
               type="com.appiancorp.ap2.p.dt.mediator.ForumPortletForm"/>
  </appian-form-beans>

  <global-forwards type="com.appiancorp.web.framework.kernel.main.ActionForward">
    <forward name="/p_dt/globalgo" path="/p_dt/go.do" />
  </global-forwards>

  <appian-action-mappings>
  
    <appian-action path="/p_dt/main" type="com.appiancorp.ap2.p.dt.actions.PortletController"
      name="ap_configForm" scope="request" cancellable="true">
      <forward name="customize" path="/p_dt/configprepare.do"/>
      <forward name="updateForums" path="/p_dt/config.do"/>
      <forward name="forums" path="/p_dt/viewForums.do"/>
      <forward name="topics" path="/p_dt/viewTopics.do"/>
      <forward name="messages" path="/p_dt/viewMessages.do"/>
      <forward name="error" path="/portlet/dt/error.jsp"/>
    </appian-action>

    <appian-action path="/p_dt/configprepare" type="com.appiancorp.ap2.p.dt.actions.ConfigPrepare"
      name="ap_configForm" scope="request" cancellable="true">
      <forward name="success" path="/portlet/dt/config.jsp"/>
    </appian-action>
    
    <appian-action path="/p_dt/config" type="com.appiancorp.ap2.p.dt.actions.Config"
      name="ap_configForm" scope="request" cancellable="true">
      <forward name="prepare" path="/p_dt/configprepare.do"/>
      <forward name="success" path="/p_dt/main.do?action=forums"/>
      <forward name="no_access" path="/portal/blank.jsp"/>
      <forward name="error" path="/p_dt/main.do?action=error"/>
    </appian-action>

    <appian-action path="/p_dt/viewForums" type="com.appiancorp.ap2.p.dt.actions.ViewForums"
      name="ap_configForm" scope="request" cancellable="true">
      <forward name="success" path="/portlet/dt/viewForums.jsp"/>
      <forward name="error" path="/portlet/dt/main.do?action=error"/>
    </appian-action>

    <appian-action path="/p_dt/viewTopics" type="com.appiancorp.ap2.p.dt.actions.ViewTopics" name="ap_configForm" scope="request">
      <forward name="success" path="/portlet/dt/viewTopics.jsp"/>
      <forward name="error" path="/portlet/dt/main.do?action=error"/>
    </appian-action>

    <appian-action path="/p_dt/createTopic" type="com.appiancorp.ap2.p.dt.actions.CreateTopic" name="message" scope="request">
      <forward name="successThread" path="/p_dt/viewTopics.do"/>
      <forward name="successMessage" path="/p_dt/viewMessages.do"/>
      <forward name="prepare" path="/portlet/dt/createMessage.jsp"/>
    </appian-action>

    <appian-action path="/p_dt/delete" type="com.appiancorp.ap2.p.dt.actions.Delete" name="deleteForm" scope="request">
      <forward name="successMessage" path="/p_dt/viewMessages.do" />
      <forward name="successThread" path="/p_dt/viewTopics.do" /> 
      <forward name="prepare" path="/portlet/dt/deleteMsg.jsp" />
    </appian-action>

    <appian-action path="/p_dt/viewMessages" type="com.appiancorp.ap2.p.dt.actions.ViewMessages" name="forumGridResultsForm" scope="request">
      <forward name="success" path="/portlet/dt/viewMessages.jsp"/>
      <forward name="error" path="/portlet/dt/error.jsp"/>
    </appian-action>
  
  </appian-action-mappings>

  <message-resources parameter="resources.application"/>

</appian-web-config>
