<!DOCTYPE xwork PUBLIC "-//OpenSymphony Group//XWork 1.1.1//EN" "http://www.opensymphony.com/xwork/xwork-1.1.1.dtd">

<xwork>
 	
 	<!-- the config is user manage -->
 	
    <package name="forum.default" extends="default" namespace="/">
    
		<!-- /++++++++++ Forum +++++++++ -->
		<action name="forum"
				class="com.ntsky.bbs.web.webwork.action.forum.ViewForumAction">
			<interceptor-ref name="commonStack"/>
			<interceptor-ref name="basicStack"/>
			<result name="success">/forum.ftl</result>
		</action>
		<!-- ++++++++++ Forum +++++++++/ -->
			
		<!-- /++++++++++ Announcement +++++++++ -->
		<action name="popup-announcement"
				class="com.ntsky.bbs.web.webwork.action.annoucement.ViewAnnoucementAction">
			<interceptor-ref name="commonStack"/>
			<interceptor-ref name="basicStack"/>
			<result name="success">/announcement.ftl</result>
		</action>
		<!-- ++++++++++ Announcement +++++++++/ -->
		
		<!-- /++++++++++ Topic +++++++++ -->
		<action name="createTopic-page"
				class="com.ntsky.bbs.web.webwork.action.topic.CreateTopicAction" method="default">
			<interceptor-ref name="commonStack"/>
			<interceptor-ref name="basicStack"/>
			<result name="success">/createTopic.ftl</result>
		</action>	
		<action name="createTopic"
				class="com.ntsky.bbs.web.webwork.action.topic.CreateTopicAction">
			<interceptor-ref name="commonStack"/>
			<interceptor-ref name="defaultStack"/>
			<result name="success">/response.ftl</result>
		</action>			
		<action name="editTopic"
				class="com.ntsky.bbs.web.webwork.action.topic.EditTopicAction" method="edit">
			<interceptor-ref name="commonStack"/>
			<interceptor-ref name="userSession"/>
			<interceptor-ref name="basicStack"/>
			<result name="success">/editTopic.ftl</result>
		</action>	
		<action name="updateTopic"
				class="com.ntsky.bbs.web.webwork.action.topic.EditTopicAction">
			<interceptor-ref name="commonStack"/>
			<interceptor-ref name="userSession"/>
			<interceptor-ref name="defaultStack"/>
			<result name="success">/response.ftl</result>
		</action>			
		<action name="topic"
				class="com.ntsky.bbs.web.webwork.action.topic.ViewTopicAction">
			<interceptor-ref name="commonStack"/>
			<interceptor-ref name="basicStack"/>
			<result name="success">/topic.ftl</result>
		</action>
		<action name="replyTopic-page"
				class="com.ntsky.bbs.web.webwork.action.post.CreatePostAction" method="default">
			<interceptor-ref name="commonStack"/>
			<interceptor-ref name="basicStack"/>
			<result name="success">/replyTopic.ftl</result>
		</action>
		<action name="topics"
				class="com.ntsky.bbs.web.webwork.action.topic.TopicListAction">
			<interceptor-ref name="commonStack"/>
			<interceptor-ref name="basicStack"/>
			<result name="success">/topics.ftl</result>
		</action>
		<!-- ++++++++++ Topic +++++++++/ -->
		
		<!-- ++++++++++ Post +++++++++ -->
		<action name="createPost"
				class="com.ntsky.bbs.web.webwork.action.post.CreatePostAction">
			<interceptor-ref name="commonStack"/>
			<interceptor-ref name="defaultStack"/>
			<result name="success">/response.ftl</result>
		</action>	
		<action name="editPost"
				class="com.ntsky.bbs.web.webwork.action.post.EditPostAction" method="edit">
			<interceptor-ref name="commonStack"/>
			<interceptor-ref name="userSession"/>
			<interceptor-ref name="basicStack"/>
			<result name="success">/editPost.ftl</result>
		</action>		
		<action name="updatePost"
				class="com.ntsky.bbs.web.webwork.action.post.EditPostAction" method="update">
			<interceptor-ref name="commonStack"/>
			<interceptor-ref name="userSession"/>
			<interceptor-ref name="defaultStack"/>
			<result name="success">/response.ftl</result>
		</action>				
		<action name="deletePost"
				class="com.ntsky.bbs.web.webwork.action.post.DeletePostAction" method="delete">
			<interceptor-ref name="commonStack"/>
			<interceptor-ref name="userSession"/>
			<interceptor-ref name="basicStack"/>
			<result name="success">/response.ftl</result>
		</action>							
		<!-- ++++++++++ Post +++++++++/ -->
		
	</package>
	
	<package name="forum.admin" extends="admin" namespace="/admin">
		
		<!-- /++++++++++ Forum +++++++++ -->				
		<action name="forums" class="com.ntsky.bbs.web.webwork.action.forum.ForumsAction">
			<interceptor-ref name="adminBasicStack"/>
			<result name="success">/admin/forums.ftl</result>														
		</action>
		<action name="createForum" class="com.ntsky.bbs.web.webwork.action.forum.CreateForumAction">
			<interceptor-ref name="adminDefaultStack"/>
			<result name="success" type="redirect">/admin/forums.action</result>														
		</action>
		<action name="forumManage" class="com.ntsky.bbs.web.webwork.action.forum.SystemForumManageAction">
			<interceptor-ref name="adminBasicStack"/>
			<result name="create">/admin/createForum.ftl</result>
			<result name="success">/admin/forums.ftl</result>
			<result name="edit">/admin/editForum.ftl</result>											
		</action>
		<action name="deleteForum" class="com.ntsky.bbs.web.webwork.action.forum.DeleteForumAction">
			<interceptor-ref name="adminBasicStack"/>
			<result name="success">/admin/forums.ftl</result>														
		</action>
		<action name="updateForum" class="com.ntsky.bbs.web.webwork.action.forum.EditForumAction">
			<interceptor-ref name="adminDefaultStack"/>
			<result name="success" type="redirect">/admin/forums.action</result>														
		</action>
		<action name="orderTopForum_page" class="com.ntsky.bbs.web.webwork.action.forum.OrderTopForumAction" method="init">
			<interceptor-ref name="adminBasicStack"/>
			<result name="success">/admin/orderTopForum.ftl</result>														
		</action>	
		<action name="orderTopForum" class="com.ntsky.bbs.web.webwork.action.forum.OrderTopForumAction">
			<interceptor-ref name="adminDefaultStack"/>	
			<result name="success">/admin/orderTopForum.ftl</result>														
		</action>
		<action name="uniteForum_page" class="com.ntsky.bbs.web.webwork.action.forum.UniteForumAction" method="init">
			<interceptor-ref name="adminBasicStack"/>
			<result name="success">/admin/uniteForum.ftl</result>														
		</action>
		<action name="uniteForum" class="com.ntsky.bbs.web.webwork.action.forum.UniteForumAction">
			<interceptor-ref name="adminBasicStack"/>	
			<result name="success">/admin/uniteForum.ftl</result>														
		</action>	
		<!-- ++++++++++ Forum +++++++++/ -->
		
		<!-- +++++++++++ Category ++++++++++ -->
		<action name="categoryManage" class="com.ntsky.bbs.web.webwork.action.category.CategoryManageAction">
			<interceptor-ref name="adminBasicStack"/>
			<result name="menu">/admin/categoryMenu.ftl</result>	
			<result name="edit">/admin/categories.ftl</result>
			<result name="delete" type="redirect">/admin/categories.action?forumId=${forumId}</result>													
		</action>
		<action name="categories" class="com.ntsky.bbs.web.webwork.action.category.CategoriesAction">
			<interceptor-ref name="adminBasicStack"/>
			<result name="success">/admin/categories.ftl</result>														
		</action>			
		<action name="createCategory" class="com.ntsky.bbs.web.webwork.action.category.CreateCategoryAction">
			<interceptor-ref name="adminDefaultStack"/>	
			<result name="success" type="redirect">/admin/categories.action?forumId=${forumId}</result>										
		</action>		
		<action name="updateCategory" class="com.ntsky.bbs.web.webwork.action.category.EditCategoryAction">
			<interceptor-ref name="adminDefaultStack"/>	
			<result name="success" type="redirect">/admin/categories.action?forumId=${forumId}</result>														
		</action>						
		<!-- +++++++++++ Category ++++++++++/ -->		
		
		<!-- /++++++++++ Message +++++++++ -->		
		<action name="createMessage-page" class="com.ntsky.bbs.web.webwork.action.message.SystemCreateMessageAction" method="default">
			<interceptor-ref name="adminBasicStack"/>
			<result name="success">/admin/createMessage.ftl</result>
		</action>
		<action name="createMessage" class="com.ntsky.bbs.web.webwork.action.message.SystemCreateMessageAction">
			<interceptor-ref name="adminDefaultStack"/>
			<result name="success">/admin/createMessage.ftl</result>
		</action>						
		<!-- ++++++++++ Message +++++++++/ -->
		
		<!-- /++++++++++ topic +++++++++ -->	
		<action name="topics" class="com.ntsky.bbs.web.webwork.action.topic.SystemTopicsAction">
			<interceptor-ref name="adminDefaultStack"/>	
			<result name="success">/admin/topics.ftl</result>														
		</action>				
				
		<action name="trashTopics"
				class="com.ntsky.bbs.web.webwork.action.topic.SystemDeleteTopicAction" method="trashMore">
			<interceptor-ref name="adminDefaultStack"/>
			<result name="success" type="redirect">/admin/topics.action</result>
		</action>	
		
		<action name="manageTopics"
				class="com.ntsky.bbs.web.webwork.action.topic.SystemManageTopicAction">
			<interceptor-ref name="adminDefaultStack"/>
			<result name="success" type="redirect">/admin/topics.action</result>
		</action>
		<!-- ++++++++++ topic +++++++++/ -->
		
	</package>
	
</xwork>
