1 package com.srv4pos.server.api.infrastructure;
2
3 import org.springframework.roo.addon.javabean.RooJavaBean;
4 import org.springframework.roo.addon.json.RooJson;
5 import org.springframework.roo.addon.tostring.RooToString;
6
7 import javax.validation.constraints.NotNull;
8 import javax.validation.constraints.Pattern;
9 import javax.validation.constraints.Size;
10
11
12
13
14
15 @RooJavaBean
16 @RooToString
17 @RooJson(deepSerialize = true)
18 public class IdentifierInfo implements Info {
19 public static final String ALLOWED_LETTERS = "0123456789ABCDEFGHJKLMNPRSTUWXYZ";
20
21
22
23
24
25
26 @NotNull
27 @Size(max = 50, min = 1)
28 @Pattern(regexp = Constraints.WINDOWS_FILENAME_REGEX)
29 private String identifier;
30
31 public static IdentifierInfo of(String identifier) {
32 final IdentifierInfo identifierInfo = new IdentifierInfo();
33 identifierInfo.setIdentifier(identifier);
34 return identifierInfo;
35 }
36 }