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

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

<struts-config>

    <form-beans>
        <form-bean name="connexionForm" type="fr.gouv.finances.dgfip.xemelios.web.connexion.ConnexionForm"/>
        <form-bean name="uploadForm" type="fr.gouv.finances.dgfip.xemelios.web.imports.UploadForm"/>
    </form-beans>

    <global-exceptions/>

    <action-mappings>

        <action path="/connexion" parameter="dispatchMethod" input="/WEB-INF/jsp/connexion.jsp" validate="false" scope="request" type="fr.gouv.finances.dgfip.xemelios.web.connexion.ConnexionAction" name="connexionForm">
            <forward name="success" path="/accueil.do" redirect="true"/>
        </action>
        <action path="/deconnexion" parameter="dispatchMethod" validate="false" scope="request" type="fr.gouv.finances.dgfip.xemelios.web.connexion.DeconnexionAction">
            <forward name="success" path="/index.jsp" redirect="true"/>
        </action>
        <!--   <action path="/deconnexion" parameter="dispatchMethod" validate="false" scope="request" type="fr.gouv.finances.dgfip.xemelios.web.connexion.DeconnexionAction">
            <forward name="success" path="/login.jsp?logout=1" redirect="true"/>
        </action> -->

        <action path="/accueil" roles="CONNECT" parameter="dispatchMethod" input="/WEB-INF/jsp/accueil/accueil.jsp" type="fr.gouv.finances.dgfip.xemelios.web.accueil.AfficheAccueilAction">
            <forward name="appContainer" path="/WEB-INF/jsp/accueil/appContainer.jsp"/>
            <forward name="accueil" path="/WEB-INF/jsp/accueil/accueil.jsp"/>
            <forward name="menu" path="/WEB-INF/jsp/accueil/menu.jsp"/>
        </action>

        <action path="/search" roles="SEARCH" parameter="dispatchMethod" input="/WEB-INF/jsp/search/search.jsp" validate="false" scope="request" type="fr.gouv.finances.dgfip.xemelios.web.search.searchAction"/>

        <action path="/displayDocument" roles="BROWSE" parameter="dispatchMethod" validate="false" scope="request" type="fr.gouv.finances.dgfip.xemelios.web.navigate.DisplayDocumentAction"/>

        <action path="/navigation" roles="BROWSE" parameter="dispatchMethod" validate="false" scope="request" type="fr.gouv.finances.dgfip.xemelios.web.navigate.NavigateAction">
            <forward name="simple.error" path="/WEB-INF/jsp/simple-error.jsp"/>
        </action>

        <action path="/print" roles="BROWSE" parameter="dispatchMethod" validate="false" scope="request" type="fr.gouv.finances.dgfip.xemelios.web.navigate.PrintAction">
            <forward name="simple.error" path="/WEB-INF/jsp/simple-error.jsp"/>
        </action>
        
        <action path="/pjatlas" roles="BROWSE" parameter="dispatchMethod" validate="false" scope="request" type="fr.gouv.finances.dgfip.xemelios.web.navigate.PjAtlasAction">
            <forward name="simple.error" path="/WEB-INF/jsp/simple-error.jsp"/>
        </action>
        
        <action path="/attachment" roles="BROWSE" parameter="dispatchMethod" validate="false" scope="request" type="fr.gouv.finances.dgfip.xemelios.web.navigate.ViewAttachmentAction">
            <forward name="simple.error" path="/WEB-INF/jsp/simple-error.jsp"/>
        </action>

        <action path="/getExportResult" roles="EXPORT" parameter="dispatchMethod" validate="false" scope="request" type="fr.gouv.finances.dgfip.xemelios.web.navigate.GetExportResult">
            <forward name="simple.error" path="/WEB-INF/jsp/simple-error.jsp"/>
        </action>

        <action path="/resource" roles="SEARCH" parameter="dispatchMethod" validate="false" scope="request" type="fr.gouv.finances.dgfip.xemelios.web.navigate.ResourceProvider">
            <forward name="simple.error" path="/WEB-INF/jsp/simple-error.jsp"/>
        </action>
        <action path="/customLink" roles="BROWSE" parameter="dispatchMethod" validate="false" scope="request" type="fr.gouv.finances.dgfip.xemelios.web.navigate.CustomLinkAction">
            <forward name="simple.error" path="/WEB-INF/jsp/simple-error.jsp"/>
        </action>
        <action path="/simpleExport" roles="SEARCH" parameter="dispatchMethod" validate="false" scope="request" type="fr.gouv.finances.dgfip.xemelios.web.search.SimpleExportAction">
            <forward name="simple.error" path="/WEB-INF/jsp/simple-error.jsp"/>
        </action>

        <action path="/displayImport" roles="IMPORT" parameter="dispatchMethod" validate="false" scope="request" type="fr.gouv.finances.dgfip.xemelios.web.imports.DisplayImportAction">
            <forward name="ok" path="/WEB-INF/jsp/imports/imports.jsp"/>
        </action>
        <action path="/newImport" parameter="dispatchMethod" input="/WEB-INF/jsp/imports/imports.jsp" validate="false" scope="request" type="fr.gouv.finances.dgfip.xemelios.web.imports.NewImportAction" name="uploadForm">
            <forward name="simple.error" path="/WEB-INF/jsp/simple-error.jsp"/>
            <forward name="success" path="/displayImport.do" redirect="true"/>
        </action>
        <action path="/importDetail" roles="IMPORT" parameter="dispatchMethod" validate="false" scope="request" type="fr.gouv.finances.dgfip.xemelios.web.imports.ImportDetailAction">
            <forward name="ok" path="/WEB-INF/jsp/imports/imports-details.jsp"/>
            <forward name="error" path="/displayImport.do"/>
        </action>
        <action path="/getBudgets" roles="IMPORT" parameter="dispatchMethod" validate="false" scope="request" type="fr.gouv.finances.dgfip.xemelios.web.imports.GetBudgetsAction"/>
        <action path="/getCollectivites" roles="IMPORT" parameter="dispatchMethod" validate="false" scope="request" type="fr.gouv.finances.dgfip.xemelios.web.imports.GetCollectivitesAction"/>
        <action path="/saveImportDetails" roles="IMPORT" parameter="dispatchMethod" validate="false" scope="request" type="fr.gouv.finances.dgfip.xemelios.web.imports.SaveImportDetailsAction">
            <forward name="success" path="/displayImport.do" redirect="true"/>
        </action>
        <action path="/displayExportJobs" roles="EXPORT" parameter="dispatchMethod" validate="false" scope="request" type="fr.gouv.finances.dgfip.xemelios.web.exports.GetExportJobs">
            <forward name="ok" path="/WEB-INF/jsp/exports/exports.jsp"/>
        </action>
        <action path="/getComplexExportResult" roles="EXPORT" parameter="dispatchMethod" validate="false" scope="request" type="fr.gouv.finances.dgfip.xemelios.web.exports.GetExportResult">
            <forward name="error" path="/WEB-INF/jsp/simple-error.jsp"/>
        </action>
        <action path="/showRepository" roles="SEARCH" parameter="dispatchMethod" validate="false" scope="request" type="fr.gouv.finances.dgfip.xemelios.web.navigate.ShowReferentiel">
            <forward name="noRef" path="/WEB-INF/jsp/search/noReferentiel.jsp"/>
        </action>
        <action path="/aggregate" roles="SEARCH" parameter="dispatchMethod" validate="false" scope="request" type="fr.gouv.finances.dgfip.xemelios.web.search.AggregateAction"></action>

    </action-mappings>

    <controller processorClass="fr.gouv.finances.dgfip.xemelios.web.CustomRequestProcessor" nocache="true"/>

    <message-resources null="false" parameter="messages"/>

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

</struts-config>
