Fork me on GitHub

Résultats CPD

Le document suivant contient les résultats de l'inspection CPD CPD 5.3.5.

Duplicatas

Fichier Ligne
fr/paris/lutece/plugins/hipolite/service/ChangeStatusService.java 64
fr/paris/lutece/plugins/hipolite/service/DisplayStatusService.java 64
    private static final String PROPERTY_SYNC_STATUS = "hipolite.sync_statut";

    // Properties : display status
    private static final String PROPERTY_MODE_DISPLAY_STATUS = "hipolite.display.status";

    // Markers
    private static final String MARK_MODE_DISPLAY_STATUS = "mode_display_status";
    private static final String MARK_STATUS = "status";

    /**
     * Display the site validation status
     * @param user The current user
     * @param request HttpServletRequest
     * @return The dashboard data
     */
    public String getDashboardData( AdminUser user, HttpServletRequest request )
    {
        // Flag path
        String strModeDisplayStatus = AppPropertiesService.getProperty( PROPERTY_MODE_DISPLAY_STATUS,
                DEFAULT_MODE_DISPLAY_STATUS );

        // Flag file : validation
        String strSyncStatut = DatastoreService.getDataValue( PROPERTY_SYNC_STATUS,
                ReplicationStatutEnum.NO_REPLICATION.getStatut( ) );

        HashMap<Object, Object> model = new HashMap<Object, Object>( );

        model.put( MARK_MODE_DISPLAY_STATUS, strModeDisplayStatus );

        // Controls if the validation has already be done
        model.put( MARK_STATUS, strSyncStatut );

        HtmlTemplate template = AppTemplateService.getTemplate( TEMPLATE_DISPLAY_STATUS, request.getLocale( ), model );

        return template.getHtml( );
    }

}