Kenmegne
7 days ago 494d349fb67be74da49caae2794fda702f595fb4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 */
package com.megatim.fdxgenerator.model;
 
import com.megatimfx.common.validationgroups.ViewFormValidationGroup;
import com.megatim.fdxgenerator.annotations.ConfigConstraint;
import com.megatim.fdxgenerator.annotations.FileNameConstraint;
import com.megatim.fdxgenerator.annotations.KeyToDecryptConstraint;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import lombok.Getter;
import lombok.Setter;
 
/**
 *
 * @author STEPHANIE
 */
@Getter
@Setter
@ConfigConstraint(groups = {ViewFormValidationGroup.class})
@KeyToDecryptConstraint(groups = {ViewFormValidationGroup.class})
@FileNameConstraint(groups = {ViewFormValidationGroup.class})
public class FichierValidation {
 
    @NotNull(message = "Le type de fichier est obligatoire", groups = {ViewFormValidationGroup.class})
    private TypeFichier typeFichier;
 
    private String keyToEncrypt;
 
    private String keyConfirmation;
 
    private boolean protege;
 
    private boolean validateFileName;
 
    @Pattern(regexp = "y{4}((M{2}){0,1})((d{2}){0,1})((H{2}){0,1})((m{2}){0,1})((s{2}){0,1})|"
            + "y{4}((d{2}){0,1})((M{2}){0,1})((H{2}){0,1})((m{2}){0,1})((s{2}){0,1})|"
            + "M{2}((y{4}){0,1})((d{2}){0,1})((H{2}){0,1})((m{2}){0,1})((s{2}){0,1})|"
            + "M{2}((d{2}){0,1})((y{4}){0,1})((H{2}){0,1})((m{2}){0,1})((s{2}){0,1})",
            groups = {ViewFormValidationGroup.class},
            message = "Format Date yyyy : AnnĂ©e, MM : Mois, dd : Jour , HH : Heure, mm: Minute, ss : Seconde")
    private String formatDate;
 
    private String extension = "txt";
    
    private int maxValueTierce;
}