Subversion Repositories WebE

Rev

Rev 35 | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed

1
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>
  <constant name="struts.devMode" value="true" /> <!-- activates debugging output -->

  <!-- User environment -->
  <package name="user" namespace="/user" extends="hibernate-default">
    <!-- Terms management -->
    <action name="listTerms" method="list"
     class="ch.ffhs.webE.action.TermAction">
      <result name="success">/user/terms.jsp</result>
    </action>
    <action name="saveTerm" method="save"
     class="ch.ffhs.webE.action.TermAction">
      <result type="redirect">/user/listTerms</result>
    </action>
    <action name="editTerm" method="edit"
     class="ch.ffhs.webE.action.TermAction">
      <result>/user/terms.jsp</result>
    </action>
    <action name="deleteTerm" method="delete"
     class="ch.ffhs.webE.action.TermAction">
      <result>/user/terms.jsp</result>
    </action>

    <!-- Relationships management -->
    <action name="listRelationships" method="list"
     class="ch.ffhs.webE.action.RelationshipAction">
      <result name="success">/user/relationships.jsp</result>
    </action>
    <action name="saveRelationship" method="save"
     class="ch.ffhs.webE.action.RelationshipAction">
      <result>/user/relationships.jsp</result>
    </action>
    <action name="editRelationship" method="edit"
     class="ch.ffhs.webE.action.RelationshipAction">
      <result>/user/relationships.jsp</result>
    </action>
    <action name="deleteRelationship" method="delete"
     class="ch.ffhs.webE.action.RelationshipAction">
      <result>/user/relationships.jsp</result>
    </action>
  </package>

  <!-- Admin environment -->
  <package name="admin" namespace="/admin" extends="hibernate-default">

    <!-- User management -->
    <action name="userAddForm">
      <result>/admin/userAddForm.jsp</result>
    </action>

    <action name="listUsers" method="list"
     class="ch.ffhs.webE.action.UserAction">
      <result name="success">/admin/users.jsp</result>
    </action>

    <action name="saveUser" method="save"
     class="ch.ffhs.webE.action.UserAction">
      <result type="redirect">/admin/listUsers</result>
    </action>

    <action name="deleteUser" method="delete"
     class="ch.ffhs.webE.action.UserAction">
      <result name="success" type="redirect">/admin/listUsers</result>
    </action>

    <action name="editUser" method="edit"
     class="ch.ffhs.webE.action.UserAction">
      <result name="success">/admin/users.jsp</result>
    </action>

    <!-- Relationship Type management -->
    <action name="listRelTypes" method="list"
     class="ch.ffhs.webE.action.RelationshipTypeAction">
      <result name="success">/admin/relTypes.jsp</result>
    </action>

    <action name="doRelTypeAdd" method="addOrUpdate"
     class="ch.ffhs.webE.action.RelationshipTypeAction">
      <result name="success" type="redirect">/admin/listRelTypes</result>
    </action>

    <action name="deleteRelType" method="delete"
     class="ch.ffhs.webE.action.RelationshipTypeAction">
      <result name="success" type="redirect">/admin/listRelTypes</result>
    </action>

    <action name="editRelType" method="edit"
     class="ch.ffhs.webE.action.RelationshipTypeAction">
      <result name="success">/admin/relTypes.jsp</result>
      <result name="error">/admin/adminError.jsp</result>
    </action>

  </package>

  <!-- Remaining environment of the session -->
  <package name="default" namespace="" extends="hibernate-default">

    <!-- Login -->
    <action name="Login" method="doLogin" class="ch.ffhs.webE.action.LoginAction">
      <result name="admin" type="redirect">/admin/main.jsp</result>
      <result name="user" type="redirect">/user/main.jsp</result>
      <result name="error" type="redirect">/index.jsp</result>
    </action>

    <action name="Logout" method="doLogout"
     class="ch.ffhs.webE.action.LoginAction">
      <result name="success" type="redirect">/index.jsp</result>
    </action>
  </package>
</struts>