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

<xwork>
	
	<package name="admin.default" extends="default" namespace="/">
	
		<!-- /++++++++++ Forum +++++++++ -->
		<action name="admin-editForum"
				class="com.ntsky.bbs.web.webwork.action.forum.ForumManageAction" method="edit">
			<interceptor-ref name="commonStack"/>
			<interceptor-ref name="userSession"/>
			<interceptor-ref name="basicStack"/>
			<result name="edit">/admin-editForum.ftl</result>
		</action>		
		<action name="admin-updateForum"
				class="com.ntsky.bbs.web.webwork.action.forum.AdminEditForumAction">
			<interceptor-ref name="commonStack"/>
			<interceptor-ref name="userSession"/>
			<interceptor-ref name="defaultStack"/>			
			<result name="success">/admin-editForum.ftl</result>
		</action>			
		<!-- ++++++++++ Forum +++++++++/ -->
    
		<!-- /++++++++++ Category +++++++++ -->
		<action name="admin-categories"
				class="com.ntsky.bbs.web.webwork.action.category.AdminCategoriesAction">
			<interceptor-ref name="commonStack"/>
			<interceptor-ref name="userSession"/>
			<interceptor-ref name="basicStack"/>
			<result name="success">/admin-categories.ftl</result>
		</action>
		<action name="admin-createCategory-page"
				class="com.ntsky.bbs.web.webwork.action.category.AdminCategoriesAction" method="default">
			<interceptor-ref name="commonStack"/>
			<interceptor-ref name="userSession"/>
			<interceptor-ref name="basicStack"/>
			<result name="success">/admin-createCategory.ftl</result>
		</action>	
		<action name="admin-createCategory"
				class="com.ntsky.bbs.web.webwork.action.category.AdminCreateCategoryAction">
			<interceptor-ref name="commonStack"/>
			<interceptor-ref name="userSession"/>
			<interceptor-ref name="defaultStack"/>
			<result name="success" type="redirect">/admin-categories.action?forumId=${forumId}</result>
		</action>	
		<action name="admin-deleteCategory"
				class="com.ntsky.bbs.web.webwork.action.category.AdminDeleteCategoryAction">
			<interceptor-ref name="commonStack"/>
			<interceptor-ref name="userSession"/>
			<interceptor-ref name="basicStack"/>
			<result name="success" type="redirect">/admin-categories.action?forumId=${forumId}</result>
		</action>	
		<action name="admin-editCategory"
				class="com.ntsky.bbs.web.webwork.action.category.AdminEditCategoryAction" method="edit">
			<interceptor-ref name="commonStack"/>
			<interceptor-ref name="userSession"/>
			<interceptor-ref name="basicStack"/>
			<result name="success">/admin-editCategory.ftl</result>
		</action>		
		<action name="admin-updateCategory"
				class="com.ntsky.bbs.web.webwork.action.category.AdminEditCategoryAction">
			<interceptor-ref name="commonStack"/>
			<interceptor-ref name="userSession"/>
			<interceptor-ref name="basicStack"/>
			<result name="success" type="redirect">/admin-categories.action?forumId=${forumId}</result>
		</action>						
		<!-- ++++++++++ Category +++++++++/ -->
			
		<!-- /++++++++++ Announcement +++++++++ -->
		<action name="admin-createAnnounce-page"
				class="com.ntsky.bbs.web.webwork.action.annoucement.AdminCreateAnnouceAction" method="default">
			<interceptor-ref name="commonStack"/>
			<interceptor-ref name="userSession"/>
			<interceptor-ref name="basicStack"/>
			<result name="success">/admin_createAnnounce.ftl</result>
		</action>	
		<action name="admin-createAnnounce"
				class="com.ntsky.bbs.web.webwork.action.annoucement.AdminCreateAnnouceAction">
			<interceptor-ref name="commonStack"/>
			<interceptor-ref name="userSession"/>
			<interceptor-ref name="basicStack"/>
			<result name="success">/admin_createAnnounce.ftl</result>
		</action>			
		<action name="admin-announces"
				class="com.ntsky.bbs.web.webwork.action.annoucement.AdminAnnoucesAction">
			<interceptor-ref name="commonStack"/>
			<interceptor-ref name="userSession"/>
			<interceptor-ref name="basicStack"/>
			<result name="success">/admin_announces.ftl</result>
		</action>	
		<action name="admin-deleteAnnounce"
				class="com.ntsky.bbs.web.webwork.action.annoucement.AdminDeleteAnnouceAction">
			<interceptor-ref name="commonStack"/>
			<interceptor-ref name="userSession"/>
			<interceptor-ref name="basicStack"/>
			<result name="success">/admin_announces.ftl</result>
		</action>		
		<action name="admin-editAnnounce"
				class="com.ntsky.bbs.web.webwork.action.annoucement.AdminEditAnnouceAction" method="edit">
			<interceptor-ref name="commonStack"/>
			<interceptor-ref name="userSession"/>
			<interceptor-ref name="basicStack"/>
			<result name="success">/admin_editAnnounce.ftl</result>
		</action>		
		<action name="admin-updateAnnounce"
				class="com.ntsky.bbs.web.webwork.action.annoucement.AdminEditAnnouceAction">
			<interceptor-ref name="commonStack"/>
			<interceptor-ref name="userSession"/>
			<interceptor-ref name="basicStack"/>
			<result name="success">/admin_editAnnounce.ftl</result>
		</action>								
		<!-- ++++++++++ Announcement +++++++++/ -->
		
		<!-- /++++++++++ Topic +++++++++ -->				
		<action name="admin-trashTopic"
				class="com.ntsky.bbs.web.webwork.action.topic.DeleteTopicAction" method="trash">
			<interceptor-ref name="commonStack"/>
			<interceptor-ref name="userSession"/>
			<interceptor-ref name="basicStack"/>
			<result name="success" type="redirect">/forum.action?forumId=${forumId}</result>
		</action>							
		<action name="admin-manageTopic"
				class="com.ntsky.bbs.web.webwork.action.topic.AdminManageTopicAction">
			<interceptor-ref name="commonStack"/>
			<interceptor-ref name="userSession"/>
			<interceptor-ref name="basicStack"/>
			<result name="success">/response.ftl</result>
		</action>				
				
		<action name="admin-trashTopics"
				class="com.ntsky.bbs.web.webwork.action.topic.DeleteTopicAction" method="trashMore">
			<interceptor-ref name="commonStack"/>
			<interceptor-ref name="userSession"/>
			<interceptor-ref name="basicStack"/>
			<result name="success" type="redirect">/admin-topics.action?forumId=${forumId}</result>
		</action>	
		
		<action name="admin-manageTopics"
				class="com.ntsky.bbs.web.webwork.action.topic.AdminManageTopicAction">
			<interceptor-ref name="commonStack"/>
			<interceptor-ref name="userSession"/>
			<interceptor-ref name="basicStack"/>
			<result name="success" type="redirect">/admin-topics.action?forumId=${forumId}</result>
		</action>
		
		<action name="admin-topics"
				class="com.ntsky.bbs.web.webwork.action.topic.AdminTopicsAction">
			<interceptor-ref name="commonStack"/>
			<interceptor-ref name="userSession"/>
			<interceptor-ref name="basicStack"/>
			<result name="success">/admin_topics.ftl</result>
		</action>
		<!-- ++++++++++ Topic +++++++++/ -->		
		
	</package>
	
	
    <package name="admin.admin" extends="admin" namespace="/admin">
			
		<!-- /++++++++++ admin +++++++++ -->
		<action name="login" class="com.ntsky.bbs.web.webwork.action.admin.LoginAction">
			<result name="success" type="redirect">/admin/index.jsp</result>
			<result name="input" type="dispatcher">/admin/login.jsp</result>
		</action>
		<action name="logout"
				class="com.ntsky.bbs.web.webwork.action.admin.LogoutAction">
			<interceptor-ref name="adminBasicStack"/>
			<result name="success" type="redirect">/index.action</result>
		</action>		
		<action name="admins" class="com.ntsky.bbs.web.webwork.action.admin.AdminsAction">
			<interceptor-ref name="adminBasicStack"/>
			<result name="success">/admin/admins.ftl</result>
		</action>	
		<action name="createAdmin" class="com.ntsky.bbs.web.webwork.action.admin.CreateAdminAction">
			<interceptor-ref name="adminBasicStack"/>
			<result name="success">/admin/admins.ftl</result>
		</action>		
		<action name="editAdmin" class="com.ntsky.bbs.web.webwork.action.admin.EditAdminAction" method="default">
			<interceptor-ref name="adminBasicStack"/>
			<result name="success">/admin/editAdmin.ftl</result>
		</action>
		<action name="updateAdmin" class="com.ntsky.bbs.web.webwork.action.admin.EditAdminAction">
			<interceptor-ref name="adminBasicStack"/>
			<result name="success">/admin/admins.ftl</result>
		</action>		
		<action name="deleteAdmin" class="com.ntsky.bbs.web.webwork.action.admin.DeleteAdminAction">
			<interceptor-ref name="adminBasicStack"/>
			<result name="success">/admin/admins.ftl</result>
		</action>	
		<action name="editPassword" class="com.ntsky.bbs.web.webwork.action.admin.EditAdminPasswordAction" method="default">
			<interceptor-ref name="adminBasicStack"/>
			<result name="success">/admin/editPassword.ftl</result>
		</action>	
		<action name="updatePassword" class="com.ntsky.bbs.web.webwork.action.admin.EditAdminPasswordAction">
			<interceptor-ref name="adminBasicStack"/>
			<result name="input">/admin/editPassword.ftl</result>
			<result name="success">/admin/editPassword.ftl</result>
		</action>						
		<!-- ++++++++++ admin +++++++++/ -->		
		
		<!-- +++++++++++ Role ++++++++++ -->
		<action name="roles" class="com.ntsky.bbs.web.webwork.action.role.RolesAction">
			<interceptor-ref name="adminBasicStack"/>
			<result name="success">/admin/roles.ftl</result>														
		</action>	
		<action name="createRole" class="com.ntsky.bbs.web.webwork.action.role.CreateRoleAction">
			<interceptor-ref name="adminDefaultStack"/>
			<result name="success">/admin/roles.ftl</result>														
		</action>		
		<action name="deleteRole" class="com.ntsky.bbs.web.webwork.action.role.DeleteRoleAction">
			<interceptor-ref name="adminBasicStack"/>
			<result name="success">/admin/roles.ftl</result>														
		</action>	
		<action name="editRole" class="com.ntsky.bbs.web.webwork.action.role.EditRoleAction" method="edit">
			<interceptor-ref name="adminBasicStack"/>
			<result name="success">/admin/editRole.ftl</result>														
		</action>
		<action name="updateRole" class="com.ntsky.bbs.web.webwork.action.role.EditRoleAction" method="update">
			<interceptor-ref name="adminDefaultStack"/>
			<result name="success">/admin/roles.ftl</result>														
		</action>					
		<!-- +++++++++++ Role ++++++++++/ -->		
			
	</package>
	
</xwork>
