<?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  type="com.appiancorp.web.framework.kernel.main.ActionFormBean">
    <appian-form-bean name="startPagesForm"         type="com.appiancorp.ap2.HomePageForm" />
    <appian-form-bean name="defaultForm"         type="com.appiancorp.common.appianwebmvc.BaseActionForm" />
    <appian-form-bean name="createpage" type="com.appiancorp.ap2.CreatePageForm" />
    <appian-form-bean name="pageref" type="com.appiancorp.ap2.PageForm" />
    <appian-form-bean name="getpage"             type="com.appiancorp.ap2.PortalPageForm" />
    <appian-form-bean name="bookmark" type="com.appiancorp.ap2.BookmarksForm" />
    <appian-form-bean name="pgperm" type="com.appiancorp.ap2.PagePermissionsForm" />
    <appian-form-bean name="ptperm" type="com.appiancorp.ap2.PortletPermissionsForm" />
    <appian-form-bean name="notification" type="com.appiancorp.ap2.ns.NotificationConfigForm" />
    <appian-form-bean name="createCategoryForm" type="com.appiancorp.ap2.CreateCategoryForm" />
    <appian-form-bean name="portlet" type="com.appiancorp.ap2.PortletForm" />
    <appian-form-bean name="dataContextTypeForm" type="com.appiancorp.ap2.DataContextTypeForm" />
    
  <!--should these be in appian-config-g.xml?-->
    <appian-form-bean name="userDataForm" type="com.appiancorp.ag.user.form.UserDataForm" />
    <appian-form-bean name="userRegisterForm" type="com.appiancorp.ag.user.form.RegisterForm" />
    <appian-form-bean name="groupFindForm" type="com.appiancorp.ag.group.form.GroupFindForm" />
    <appian-form-bean name="userFindForm" type="com.appiancorp.ag.user.form.UserFindForm" />
    <appian-form-bean name="emailGroupForm" type="com.appiancorp.ap2.EmailGroupForm" />
    <appian-form-bean name="advUserSortForm" type="com.appiancorp.ag.user.form.AdvancedUserSortForm"/>
    <appian-form-bean name="notificationsSendLinkForm" type="com.appiancorp.ap2.ns.NotificationsSendLinkForm" />
    <appian-form-bean name="notificationSystemForm" type="com.appiancorp.ap2.ns.NotificationSystemForm" />
    <appian-form-bean name="notificationsDeleteNotificationForm" type="com.appiancorp.ap2.ns.NotificationsDeleteNotificationForm" />
    <appian-form-bean name="nsff" type="com.appiancorp.ap2.ns.NotificationsSendFeedbackForm" />
  <!-- do we need these anymore? -->
    <appian-form-bean name="emptyForm" type="com.appiancorp.ac.forms.EmptyForm" />
    <appian-form-bean name="globalSearchPortalForm" type="com.appiancorp.ap2.GlobalSearchPortalForm"/>
 </appian-form-beans>

 <global-forwards type="com.appiancorp.web.framework.kernel.main.ActionForward">
  <forward name="error" path="/portal/error.jsp"/>
  <forward name="login" path="/portal/loginPage" />
  <forward name="wizard_validation" path="/components/wizard/serverValidateForward.jsp"/>
 </global-forwards>

 <appian-action-mappings>
  <appian-action path="/portal/timeout" include="/portal/timeout_msg.jsp"/>

  <appian-action path="/portal"
          type="com.appiancorp.ap2.PortalAction" 
          name="getpage" scope="request" cancellable="true">
    <forward name="invalidpage" path="/portal/error_invalidpage.jsp"/>
    <forward name="cantdisplaypage" path="/portal/error_nopermissions.jsp"/>
  </appian-action>
  
  <appian-action path="/portal/newportlet"
          type="com.appiancorp.ap2.AddPortletAction" 
          name="portlet" scope="request">
    <forward name="success" path="/portal.do"/>
  </appian-action>

  <appian-action path="/portal/portlet"
          type="com.appiancorp.ap2.PortletAction" 
          name="portlet" scope="request" cancellable="true">
  </appian-action>

  <!-- to test preview -->
  <appian-action path="/portletpreview"
          type="com.appiancorp.ap2.PortletPreview" scope="request">
    <forward name="success" path="/portal.do?$p=portal.portlet.preview"/>
  </appian-action>
  <appian-action path="/portal/bookmark"
          type="com.appiancorp.ap2.AddBookmark" 
          name="pageref" scope="request">
    <forward name="success" path="/portal.do"/>
  </appian-action>

  <appian-action path="/getPageExternal"
          type="com.appiancorp.ap2.GetPageExternal">
     <forward name="success" path="/portal/getPage.jsp"/>
   </appian-action>
  <appian-action path="/getForumExternal"
          type="com.appiancorp.ap2.GetForumExternal">
     <forward name="success" path="/portal/getForum.jsp"/>
   </appian-action>
  <appian-action path="/getThreadExternal"
          type="com.appiancorp.ap2.GetThreadExternal">
     <forward name="success" path="/portal/getThread.jsp"/>
   </appian-action>

  <appian-action path="/viewsharing"
          name="getpage"
          type="com.appiancorp.ap2.PageSecurityController">
    <forward name="success" path="/portal/page_sharing.jsp"/>
  </appian-action>
  <appian-action path="/viewsecurity"
          name="getpage"
          type="com.appiancorp.ap2.PageSecurityController">
    <forward name="success" path="/portal/page_security.jsp"/>
  </appian-action>

  <appian-action path="/portal/approvedraft"
          type="com.appiancorp.ap2.ApproveDraft" 
          name="pageref" scope="request">
    <forward name="success" path="/portal.do"/>
  </appian-action>
  <appian-action path="/portal/submitdraft"
          type="com.appiancorp.ap2.SubmitDraft" 
          name="pageref" scope="request">
    <forward name="success" path="/portal.do"/>
  </appian-action>

  <appian-action path="/portal/newnotifications" scope="request"
     type="com.appiancorp.ap2.NotificationsController" >
    <forward name="success" path="/portal/new_notifications.jsp"/>
  </appian-action>

  <appian-action path="/portal/sendlink" scope="request"
    type="com.appiancorp.ap2.ns.NotificationsSendLinkAction" 
    name="notificationsSendLinkForm">
    <forward name="success" path="/portal/send_link_confirm.jsp"/>
  </appian-action>

  <appian-action path="/portal/system" scope="request"
    type="com.appiancorp.ap2.ns.NotificationSystemAction" 
    name="notificationSystemForm" >
    <forward name="success" path="/portal/systemnotif_confirm.jsp"/>
    <forward name="norecipients" path="/portal/prepSendMessageUsersGroups.do?type=1"/>
  </appian-action>

  <appian-action path="/portal/sendfeedback"
          type="com.appiancorp.ap2.ns.NotificationsSendFeedbackAction"
          name="nsff" scope="request">
    <forward name="success" path="/portal/send_feedback_confirm.jsp"/>
  </appian-action>
  <appian-action path="/portal/sendfeedbackprepare"
          type="com.appiancorp.ap2.ns.NotificationsSendFeedbackPrepareAction"
          name="nsff" scope="request">
    <forward name="success" path="/portal/send_feedback.jsp"/>
  </appian-action>

  <appian-action path="/portal/deletenotification" scope="request"
    type="com.appiancorp.ap2.ns.NotificationsDeleteNotificationAction" 
    name="notificationsDeleteNotificationForm">
    <forward name="success" path="/portal/newnotifications.do"/>
  </appian-action>

  <appian-action path="/portal/viewnotification" scope="request"
    type="com.appiancorp.ap2.NotificationViewController">
  </appian-action>

  <appian-action path="/portal/deletepage" name="pageref" scope="request"
          type="com.appiancorp.ap2.DeletePageAction" >
    <forward name="success" path="/portal/mypages.do"/>
  </appian-action>

 <appian-action path="/portal/deletebookmark"
          type="com.appiancorp.ap2.DeleteBookmarkAction" 
          name="bookmark" scope="request" >
    <forward name="success" path="/portal/getmybooks.do"/>
  </appian-action>

  <appian-action path="/portal/removeportlet"
          type="com.appiancorp.ap2.RemovePortletAction" 
          name="portlet" scope="request" cancellable="true">
    <forward name="success" path="/portal.do"/>
  </appian-action>

  <appian-action path="/portal/createpagecontroller"
          type="com.appiancorp.ap2.CreatePageController">
    <forward name="success" path="/portal/create_page_main.jsp"/>
  </appian-action>

  <appian-action path="/portal/getpersonalcreatepage" include="/portal/create_page_personal.jsp"/>
  <appian-action path="/portal/getteamcreatepage" include="/portal/create_page_team.jsp"/>
  <appian-action path="/portal/getcommunitycreatepage" include="/portal/create_page_community.jsp"/>
  <appian-action path="/portal/getsimplecreatepage" include="/portal/create_page_simple.jsp"/>

  <appian-action path="/portal/createpage"
          type="com.appiancorp.ap2.CreatePageAction" 
          name="createpage" scope="request">
    <forward name="success" path="/portal.do"/>
  </appian-action>
  
  <appian-action path="/portal/sharepage"
          type="com.appiancorp.ap2.SetPagePermissions" 
          name="pgperm" scope="request">
    <forward name="success" path="/portal.do"/>
  </appian-action>
  <appian-action path="/portal/securepage"
          type="com.appiancorp.ap2.SetPagePermissions" 
          name="pgperm" scope="request">
    <forward name="success" path="/portal.do"/>
  </appian-action>

  <appian-action path="/portal/portletperm"
          type="com.appiancorp.ap2.PortletPermissionAction" 
          name="ptperm" scope="request">   
    <forward name="success" path="/portal/close_window.jsp"/>
  </appian-action>

  <appian-action path="/portal/portletpermprepare"
          type="com.appiancorp.ap2.PortletPermissionPrepareAction" 
          name="ptperm" scope="request">   
    <forward name="permissions" path="/portal/view_portlet_permissions.jsp" />
    <forward name="targeting" path="/portal/target_portlet.jsp" />
  </appian-action>

  <appian-action path="/portal/customizepage" type="com.appiancorp.ap2.CustomizeAction">
    <forward name="success" path="/portal/customize_page.jsp"/>
  </appian-action>

  <appian-action path="/portal/loadEnvironmentHome"
          type="com.appiancorp.ap2.environment.EnvironmentSwitchAction"
          scope="request">
    <forward name="apps" path="/portal/loadApplicationsPortalEnvironment.do"/>
    <forward name="designer" path="/portal/getMyStartPage.do"/>
    <forward name="tempo" path="/portal/welcome.jsp"/>
    <forward name="no_access" path="/portal/error_not_authorized.jsp"/>
  </appian-action>

  <appian-action path="/portal/maindecorator"
          type="com.appiancorp.ap2.environment.EnvironmentSwitchAction"
          scope="request">
    <forward name="apps" path="/environments/apps/jsp/main_decorator.jsp"/>
    <forward name="designer" path="/environments/designer/jsp/main_decorator.jsp"/>
    <forward name="tempo" path="/portal/welcome.jsp"/>
    <forward name="no_access" path="/portal/error_not_authorized.jsp"/>
  </appian-action>

  <appian-action path="/portal/loadApplicationsPortalEnvironment"
          type="com.appiancorp.ap2.appportal.ApplicationsPortalEntryPoint"
          scope="request">
    <forward name="success" path="/environments/apps/jsp/main.jsp"/>
  </appian-action>

  <appian-action path="/applications/loadTopNavigation"
          type="com.appiancorp.ap2.appportal.LoadTopNavigation"
          scope="request">
    <forward name="success" path="/environments/apps/jsp/defaultAppDropdown.jsp"/>
  </appian-action>

  <appian-action path="/portal/defaulthomepage" forward="/analytics/report/view/base.do?$navContentId=tasksNav&amp;alias=tasks_for_user"/>

  <appian-action path="/portlet" type="com.appiancorp.ap2.PortletController"/>

  <appian-action path="/portletarea" type="com.appiancorp.ap2.portal.PortletAreaController"/>

  <appian-action path="/switchmodule" type="com.appiancorp.web.framework.extras.main.SwitchAction"></appian-action>

  <appian-action path="/portal/mypages"
          type="com.appiancorp.ap2.MyPagesController" >
    <forward name="success" path="/portal/directory_yourpages.jsp"/>
  </appian-action>

  <appian-action path="/portal/grouppages"
    name="agGroupDataForm"
    scope="request"
    validate="false"
    include="/portal/directory_group_pages.jsp"/>

  <appian-action path="/portal/navcontrol" type="com.appiancorp.ap2.NavigationController" />
  
  <appian-action path="/portal/category"
    type="com.appiancorp.ap2.CategoryController" >
    <forward name="success" path="/portal/directory_category.jsp"/>
    <forward name="result" path="/portal/directory_category_pages.jsp"/>
  </appian-action>

  <appian-action path="/portletsearch" type="com.appiancorp.ap2.PortletSearchAction">
    <forward name="success" path="/portal/get_channel_list.jsp"/>
  </appian-action>

  <appian-action path="/portal/notifications"
          type="com.appiancorp.ap2.ns.NotificationsAction" 
          name="notification" scope="request">
    <forward name="success" path="/portal/notifications.jsp"/>
  </appian-action>

  <appian-action path="/portal/savenotificationrule"
      type="com.appiancorp.ap2.ns.SaveNotificationRule" >
    <forward name="success" path="/portal/notifications.do"/>
  </appian-action>

  <appian-action path="/portal/createcategory" scope="request"
    type="com.appiancorp.ap2.CreateCategoryAction" 
    name="createCategoryForm" >
    <forward name="success" path="/portal/category.do"/>
  </appian-action>

  <appian-action path="/portal/deletecategory"
    type="com.appiancorp.ap2.DeleteCategoryAction" >
    <forward name="confirm" path="/portal/category.do"/>
    <forward name="success" path="/portal/category.do"/>
  </appian-action>

  <appian-action path="/portal/renamepage"
    type="com.appiancorp.ap2.RenamePageAction" >
    <forward name="success" path="/portal.do"/>
  </appian-action>
  
  <appian-action path="/portal/setcategory"
    type="com.appiancorp.ap2.SetPageCategoryAction" >
    <forward name="success" path="/portal.do"/>
  </appian-action>
  
  <appian-action path="/portal/setDataContextType"
    type="com.appiancorp.ap2.SetDataContextTypeAction"
    name="dataContextTypeForm">
    <forward name="success" path="/portal.do"/>
    <forward name="prepare" path="/portal/getpagetemplate.do"/>
    <forward name="error" path="/portal.do?$p=portal.error.portal"/>
  </appian-action>

  <appian-action path="/portal/grouphome" type="com.appiancorp.ap2.GroupHomeAction">
    <forward name="success" path="/portal.do"/>
  </appian-action>
    
   <appian-action path="/portal/renameportlet"
            type="com.appiancorp.ap2.RenamePortlet" 
            name="portlet">
     <forward name="success" path="/portal/rename_success.jsp"/>
   </appian-action>

   <appian-action path="/portal/changepttemplate"
            type="com.appiancorp.ap2.ChangePortletTemplate"
            name="portlet">
     <forward name="success" path="/portal/rename_success.jsp"/>
   </appian-action>
   <appian-action path="/portal/changepttemplateprepare"
            type="com.appiancorp.ap2.ChangePortletTemplatePrepare"
            name="portlet">
     <forward name="success" path="/portal/portlet_template.jsp"/>
   </appian-action>

   <appian-action path="/portal/changepgtemplate"
           type="com.appiancorp.ap2.ChangePageTemplate">
     <forward name="success" path="/portal.do?$c=1"/>
     <forward name="locked"  path="/portal.do"/>
     <forward name="error" path="/portal.do?$p=portal.error.portal"/>
   </appian-action>

   <appian-action  path="/portal/changepgdescription"
            type="com.appiancorp.ap2.ChangePageDescription" >
     <forward name="success" path="/portal.do"/>
     <forward name="error" path="/portal.do?$p=portal.error.portal"/>
   </appian-action>

   <appian-action path="/portal/getpagetemplate"
            type="com.appiancorp.ap2.GetPageTemplate">
     <forward name="success" path="/portal/page_options.jsp"/>
     <forward name="locked"  path="/portal.do"/>
   </appian-action>

    <appian-action path="/portal/getmybooks"
          type="com.appiancorp.ag.user.action.GetMyGroups" 
          name="agGroupDataForm" scope="request" validate="false" >
      <forward name="success" path="/portal/mybooks_portal.jsp"/>
    </appian-action>

    <appian-action path="/portal/getMyStartPage"
          type="com.appiancorp.ap2.GetMyStartPage">
      <forward name="success" path="/portal/defaulthomepage.do"/>
    </appian-action>
    
    <appian-action path="/portal/getGlobalHomePage"
          type="com.appiancorp.ap2.GetGlobalHomePage">
      <forward name="success" path="/portal/defaulthomepage.do"/>
    </appian-action>

    <appian-action path="/portal/searchportalpages"
            name="globalSearchPortalForm" 
            scope="request" 
            validate="true" 
            include="/portal/searchportalpagesforpicker.jsp"/>

    <appian-action path="/portal/navigation/setcurrentitem"
            type="com.appiancorp.ap2.ChangeNavigationStateAction">
      <forward name="success" path="/portal/blank.jsp"/>
    </appian-action>
    
    <appian-action path="/portal/prepSendMessageUsersGroups"
            type="com.appiancorp.ap2.PrepSendMessageUsersGroups" 
            name="emptyForm" scope="request" validate="false">
      <forward name="success" path="/portal/sendmessage.jsp"/>
    </appian-action>

  <appian-action path="/portal/nogrouppage"
          type="com.appiancorp.ap2.NoGroupPage" 
          scope="request" validate="false">
      <forward name="success" path="/portal/no_group_page.jsp"/>
  </appian-action>
  
  <appian-action path="/portal/updateUserPreferences"
            type="com.appiancorp.ap2.UserPreferencesAction"
            scope="request">
    <forward name="prepare" path="/personalization/preferences.jsp"/>
    <forward name="success" path="/portal/loadEnvironmentHome.do"/>
  </appian-action>
  
  <appian-action path="/portal/setStartPages"
            type="com.appiancorp.ap2.SetSystemHomePage"
            name="startPagesForm"
            scope="request">
    <forward name="prepare" path="/portal/set_start_pages.jsp"/>
    <forward name="success" path="/portal/set_start_pages.jsp"/>
  </appian-action>
  <appian-action path="/portal/setMyHomePage"
            type="com.appiancorp.ap2.SetMyHomePage"
            name="startPagesForm"
            scope="request"/>

  <appian-action path="/portal/removeChannel" include="/portal/template/remove_channel.jsp"></appian-action>
 </appian-action-mappings>
                  
  <message-resources parameter="text.java.com.appiancorp.ap2.application-i18n" key="ap-app-i18n"/>
  <message-resources parameter="text.java.com.appiancorp.ap2.p.errors-i18n" key="p-errors-i18n"/>
 
  <message-resources parameter="appian.ac.ac-text" key="ac-text"/>
  <message-resources parameter="appian.ac.ac-custom" key="ac-custom"/>
  <message-resources parameter="appian.ac.ac-image" key="ac-image"/>
  <message-resources parameter="resources.appian.ap.application" key="ap-app"/>
  <message-resources parameter="resources.application"/>

 <plug-in className="com.appiancorp.common.appianwebmvc.TilesPlugin" >
 <!--
 We will automatically pull in any file that begins with portal-tiles-*.xml
 -->
  <set-property property="definitionConfigFiles" value="" />
  <set-property property="moduleAware" value="true" />
  <set-property property="parserValidate" value="true" />
 </plug-in>
</appian-web-config>
