Subversion Repositories general

Rev

Rev 905 | Rev 913 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE struts-config PUBLIC
        "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
        "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">

<struts-config>
        <form-beans>
                <form-bean
                                name="ak.hostcaptain.core.form.LoginForm"
                                type="org.apache.struts.validator.DynaValidatorForm">
                        <form-property name="login"       type="java.lang.String"   />
                        <form-property name="password"    type="java.lang.String"   />
                </form-bean>

                <form-bean
                                name="ak.hostcaptain.core.form.ChangePasswordForm"
                                type="ak.hostcaptain.core.form.UserPasswordForm">
                        <form-property name="oldpassword" type="java.lang.String"   />
                        <form-property name="password"    type="java.lang.String"   />
                        <form-property name="password2"   type="java.lang.String"   />
                </form-bean>

                <form-bean
                                name="ak.hostcaptain.core.form.UserForm"
                                type="org.apache.struts.validator.DynaValidatorForm">
                        <form-property name="id"          type="java.lang.String"   />
                </form-bean>

                <form-bean
                                name="ak.hostcaptain.core.form.UserEditForm"
                                type="ak.hostcaptain.core.form.UserPasswordForm">
                        <form-property name="id"          type="java.lang.String"   />
                        <form-property name="login"       type="java.lang.String"   />
                        <form-property name="password"    type="java.lang.String"   />
                        <form-property name="password2"   type="java.lang.String"   />
                        <form-property name="boss"        type="java.lang.String"   />
                        <form-property name="superuser"   type="java.lang.Boolean"  />
                </form-bean>

                <form-bean
                                name="ak.hostcaptain.core.form.SystemUserForm"
                                type="org.apache.struts.validator.DynaValidatorForm">
                        <form-property name="id"          type="java.lang.String"   />
                </form-bean>

                <form-bean
                                name="ak.hostcaptain.core.form.SystemUserEditForm"
                                type="org.apache.struts.validator.DynaValidatorForm">
                        <form-property name="id"          type="java.lang.String"   />
                        <form-property name="uid"         type="java.lang.String"   />
                        <form-property name="name"        type="java.lang.String"   />
                        <form-property name="owner"       type="java.lang.String"   />
                </form-bean>

                <form-bean
                                name="ak.hostcaptain.core.form.InetDomainForm"
                                type="org.apache.struts.validator.DynaValidatorForm">
                        <form-property name="id"          type="java.lang.String"   />
                </form-bean>

                <form-bean
                                name="ak.hostcaptain.core.form.InetDomainEditForm"
                                type="org.apache.struts.validator.DynaValidatorForm">
                        <form-property name="id"          type="java.lang.String"   />
                        <form-property name="name"        type="java.lang.String"   />
                        <form-property name="owner"       type="java.lang.String"   />
                </form-bean>

                <form-bean
                                name="ak.hostcaptain.core.form.MailboxForm"
                                type="org.apache.struts.validator.DynaValidatorForm">
                        <form-property name="id"          type="java.lang.String"   />
                </form-bean>

                <form-bean
                                name="ak.hostcaptain.core.form.MailboxEditForm"
                                type="ak.hostcaptain.core.form.UserPasswordForm">
                        <form-property name="id"          type="java.lang.String"   />
                        <form-property name="login"       type="java.lang.String"   />
                        <form-property name="password"    type="java.lang.String"   />
                        <form-property name="password2"   type="java.lang.String"   />
                        <form-property name="domain"      type="java.lang.String"   />
                        <form-property name="owner"       type="java.lang.String"   />
                        <form-property name="viruscheck"  type="java.lang.Boolean"  />
                        <form-property name="spamcheck"   type="java.lang.Boolean"  />
                        <form-property name="systemuser"  type="java.lang.String"   />
                </form-bean>

                <form-bean
                                name="ak.hostcaptain.core.form.MailAliasForm"
                                type="org.apache.struts.validator.DynaValidatorForm">
                        <form-property name="id"          type="java.lang.String"   />
                </form-bean>

                <form-bean
                                name="ak.hostcaptain.core.form.MailAliasEditForm"
                                type="ak.strutsx.ResizeableDynaValidatorForm">
                        <form-property name="id"          type="java.lang.String"   />
                        <form-property name="address"     type="java.lang.String"   />
                        <form-property name="domain"      type="java.lang.String"   />
                        <form-property name="owner"       type="java.lang.String"   />
                        <form-property name="dests"       type="ak.hostcaptain.core.form.MailAliasDestBean[]"
                                size="1" />
                </form-bean>
        </form-beans>

        <global-exceptions>
                <!-- FIXME: it doesn't work :( -->
                <exception
                        key="GeneralException"
                        type="java.lang.Exception"
                        path="/generalError.jsp"
                />

                <exception
                        key="UserException"
                        type="ak.hostcaptain.util.UserException"
                        handler="ak.hostcaptain.core.action.UserExceptionHandler"
                />
        </global-exceptions>

        <global-forwards>
                <forward
                        name="error"
                        path="/error.jsp"
                />
        </global-forwards>

        <action-mappings>
                <action
                        path="/index"
                        type="ak.hostcaptain.core.action.IndexAction"
                >
                        <forward name="success" path="/index.jsp" />
                </action>

                <!-- == system ============================================================================ -->

                <action
                        path="/system/login"
                        forward="/system/login.jsp" />

                <action
                        path="/system/login/submit"
                        type="ak.hostcaptain.core.action.LoginAction"
                        name="ak.hostcaptain.core.form.LoginForm"
                        validate="true"
                        scope="request"
                        input="/system/login.jsp"
                >
                        <forward name="default" path="/index.do" redirect="true" />
                </action>

                <action
                        path="/system/logout"
                        type="ak.hostcaptain.core.action.LogoutAction"
                >
                        <forward name="default" path="/system/logout.jsp" />
                </action>

                <!-- == user ============================================================================== -->

                <action
                        path="/user/password/show"
                        type="ak.hostcaptain.core.action.ChangePasswordAction"
                        parameter="first"
                >
                        <forward name="default" path="/user/password/change.jsp" />
                </action>

                <action
                        path="/user/password/submit"
                        type="ak.hostcaptain.core.action.ChangePasswordAction"
                        parameter="submit"
                        name="ak.hostcaptain.core.form.ChangePasswordForm"
                        validate="true"
                        scope="request"
                        input="/user/password/change.jsp"
                >
                </action>

                <action
                        path="/user/list"
                        type="ak.hostcaptain.core.action.UserAction"
                        parameter="list"
                >
                        <forward name="default" path="/user/list.jsp" />
                </action>

                <action
                        path="/user/delete"
                        type="ak.hostcaptain.core.action.UserAction"
                        parameter="delete"
                        name="ak.hostcaptain.core.form.UserForm"
                        validate="true"
                        scope="request"
                >
                </action>

                <action
                        path="/user/edit"
                        type="ak.hostcaptain.core.action.UserAction"
                        parameter="edit"
                        name="ak.hostcaptain.core.form.UserForm"
                        validate="true"
                        scope="request"
                >
                        <forward name="default" path="/user/edit.jsp" />
                </action>

                <action
                        path="/user/submit"
                        type="ak.hostcaptain.core.action.UserAction"
                        parameter="submit"
                        name="ak.hostcaptain.core.form.UserEditForm"
                        validate="true"
                        scope="request"
                        input="/user/edit.jsp"
                >
                </action>

                <!-- == system user ======================================================================= -->

                <action
                        path="/user/system/list"
                        type="ak.hostcaptain.core.action.SystemUserAction"
                        parameter="list"
                >
                        <forward name="default" path="/user/system/list.jsp" />
                </action>

                <action
                        path="/user/system/delete"
                        type="ak.hostcaptain.core.action.SystemUserAction"
                        parameter="delete"
                        name="ak.hostcaptain.core.form.SystemUserForm"
                        validate="true"
                        scope="request"
                >
                </action>

                <action
                        path="/user/system/edit"
                        type="ak.hostcaptain.core.action.SystemUserAction"
                        parameter="edit"
                        name="ak.hostcaptain.core.form.SystemUserForm"
                        validate="true"
                        scope="request"
                >
                        <forward name="default" path="/user/system/edit.jsp" />
                </action>

                <action
                        path="/user/system/submit"
                        type="ak.hostcaptain.core.action.SystemUserAction"
                        parameter="submit"
                        name="ak.hostcaptain.core.form.SystemUserEditForm"
                        validate="true"
                        scope="request"
                        input="/user/system/edit.jsp"
                >
                </action>

                <!-- == system user ======================================================================= -->

                <action
                        path="/domain/list"
                        type="ak.hostcaptain.core.action.InetDomainAction"
                        parameter="list"
                >
                        <forward name="default" path="/domain/list.jsp" />
                </action>

                <action
                        path="/domain/delete"
                        type="ak.hostcaptain.core.action.InetDomainAction"
                        parameter="delete"
                        name="ak.hostcaptain.core.form.InetDomainForm"
                        validate="true"
                        scope="request"
                >
                </action>

                <action
                        path="/domain/edit"
                        type="ak.hostcaptain.core.action.InetDomainAction"
                        parameter="edit"
                        name="ak.hostcaptain.core.form.InetDomainForm"
                        validate="true"
                        scope="request"
                >
                        <forward name="default" path="/domain/edit.jsp" />
                </action>

                <action
                        path="/domain/submit"
                        type="ak.hostcaptain.core.action.InetDomainAction"
                        parameter="submit"
                        name="ak.hostcaptain.core.form.InetDomainEditForm"
                        validate="true"
                        scope="request"
                        input="/domain/edit.jsp"
                >
                </action>

                <!-- == mail boxes ======================================================================== -->

                <action
                        path="/mail/box/list"
                        type="ak.hostcaptain.core.action.MailboxAction"
                        parameter="list"
                >
                        <forward name="default" path="/mail/box/list.jsp" />
                </action>

                <action
                        path="/mail/box/delete"
                        type="ak.hostcaptain.core.action.MailboxAction"
                        parameter="delete"
                        name="ak.hostcaptain.core.form.MailboxForm"
                        validate="true"
                        scope="request"
                >
                </action>

                <action
                        path="/mail/box/edit"
                        type="ak.hostcaptain.core.action.MailboxAction"
                        parameter="edit"
                        name="ak.hostcaptain.core.form.MailboxForm"
                        validate="true"
                        scope="request"
                >
                        <forward name="default" path="/mail/box/edit.jsp" />
                </action>

                <action
                        path="/mail/box/submit"
                        type="ak.hostcaptain.core.action.MailboxAction"
                        parameter="submit"
                        name="ak.hostcaptain.core.form.MailboxEditForm"
                        validate="true"
                        scope="request"
                        input="/mail/box/edit.jsp"
                >
                </action>

                <!-- == mail aliases ====================================================================== -->

                <action
                        path="/mail/alias/list"
                        type="ak.hostcaptain.core.action.MailAliasAction"
                        parameter="list"
                >
                        <forward name="default" path="/mail/alias/list.jsp" />
                </action>

                <action
                        path="/mail/alias/delete"
                        type="ak.hostcaptain.core.action.MailAliasAction"
                        parameter="delete"
                        name="ak.hostcaptain.core.form.MailAliasForm"
                        validate="true"
                        scope="request"
                >
                </action>

                <action
                        path="/mail/alias/edit"
                        type="ak.hostcaptain.core.action.MailAliasAction"
                        parameter="edit"
                        name="ak.hostcaptain.core.form.MailAliasForm"
                        validate="true"
                        scope="request"
                >
                        <forward name="default" path="/mail/alias/edit.jsp" />
                </action>

                <action
                        path="/mail/alias/submit"
                        type="ak.hostcaptain.core.action.MailAliasAction"
                        parameter="submit"
                        name="ak.hostcaptain.core.form.MailAliasEditForm"
                        validate="true"
                        scope="request"
                        input="/mail/alias/edit.do"
                >
                        <forward name="back"    path="/mail/alias/edit.jsp" />
                </action>

        </action-mappings>

        <controller processorClass="ak.strutsx.RequestProcessorX" />

        <message-resources parameter="ak.hostcaptain.core.CoreResources" />

        <!-- ========== Plug-Ins Configuration ================================== -->

        <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
                <set-property property="pathnames"
                        value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml" />
        </plug-in>

</struts-config>