OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 144 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 144 Rev 149
Line 13... Line 13...
13
 
13
 
14
 package org.openconcerto.erp.preferences;
14
 package org.openconcerto.erp.preferences;
15
 
15
 
16
import org.openconcerto.erp.generationDoc.DocumentLocalStorageManager;
16
import org.openconcerto.erp.generationDoc.DocumentLocalStorageManager;
17
import org.openconcerto.sql.Configuration;
17
import org.openconcerto.sql.Configuration;
-
 
18
import org.openconcerto.sql.element.SQLElement;
18
import org.openconcerto.ui.DefaultGridBagConstraints;
19
import org.openconcerto.ui.DefaultGridBagConstraints;
19
import org.openconcerto.ui.preferences.DefaultPreferencePanel;
20
import org.openconcerto.ui.preferences.DefaultPreferencePanel;
20
import org.openconcerto.utils.FileUtils;
21
import org.openconcerto.utils.FileUtils;
21
import org.openconcerto.utils.StringUtils;
22
import org.openconcerto.utils.StringUtils;
22
import org.openconcerto.utils.Tuple2;
23
import org.openconcerto.utils.Tuple2;
Line 60... Line 61...
60
    private static final String formatPDF = "Format PDF : ";
61
    private static final String formatPDF = "Format PDF : ";
61
    private static final String parcourir = "...";
62
    private static final String parcourir = "...";
62
    private static final String defaut = "Définir l'emplacement suivant pour tous";
63
    private static final String defaut = "Définir l'emplacement suivant pour tous";
63
 
64
 
64
    public static String getLabelFromTable(String tableName) {
65
    public static String getLabelFromTable(String tableName) {
65
        String pluralName = Configuration.getInstance().getDirectory().getElement(tableName).getPluralName();
66
        final SQLElement element = Configuration.getInstance().getDirectory().getElement(tableName);
-
 
67
        if (element == null) {
-
 
68
            throw new IllegalArgumentException("no element found for table " + tableName);
-
 
69
        }
-
 
70
        String pluralName = element.getPluralName();
66
        pluralName = StringUtils.firstUp(pluralName);
71
        pluralName = StringUtils.firstUp(pluralName);
67
        return pluralName;
72
        return pluralName;
68
    }
73
    }
69
 
74
 
70
    public AbstractGenerationDocumentPreferencePanel() {
75
    public AbstractGenerationDocumentPreferencePanel() {