OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 144 Rev 156
Line 20... Line 20...
20
public class LightUIFileUpload extends LightUserControl {
20
public class LightUIFileUpload extends LightUserControl {
21
    private static final String SEND_FILE_URL_JSON_KEY = "send-file-url";
21
    private static final String SEND_FILE_URL_JSON_KEY = "send-file-url";
22
 
22
 
23
    private String sendFileUrl;
23
    private String sendFileUrl;
24
 
24
 
25
    public LightUIFileUpload(final JSONObject json) {
25
    public LightUIFileUpload() {
26
        super(json);
-
 
27
    }
26
    }
28
 
27
 
29
    public LightUIFileUpload(final LightUIFileUpload file) {
28
    public LightUIFileUpload(final LightUIFileUpload file) {
30
        super(file);
29
        super(file);
31
    }
30
    }
Line 36... Line 35...
36
 
35
 
37
        this.sendFileUrl = sendFileUrl;
36
        this.sendFileUrl = sendFileUrl;
38
    }
37
    }
39
 
38
 
40
    @Override
39
    @Override
41
    public JSONToLightUIConvertor getConvertor() {
-
 
42
        return new JSONToLightUIConvertor() {
-
 
43
            @Override
-
 
44
            public LightUIElement convert(final JSONObject json) {
-
 
45
                return new LightUIFileUpload(json);
-
 
46
            }
-
 
47
        };
-
 
48
    }
-
 
49
 
-
 
50
    @Override
-
 
51
    protected void copy(LightUIElement element) {
40
    protected void copy(LightUIElement element) {
52
        super.copy(element);
41
        super.copy(element);
53
        if (!(element instanceof LightUIFileUpload)) {
42
        if (!(element instanceof LightUIFileUpload)) {
54
            throw new InvalidClassException(this.getClassName(), element.getClassName(), element.getId());
43
            throw new InvalidClassException(this.getClassName(), element.getClassName(), element.getId());
55
        }
44
        }