View Javadoc
1   package com.srv4pos.server.api.activation;
2   
3   import com.srv4pos.server.api.infrastructure.Constraints;
4   import com.srv4pos.server.api.infrastructure.Info;
5   import org.springframework.roo.addon.javabean.RooJavaBean;
6   import org.springframework.roo.addon.json.RooJson;
7   import org.springframework.roo.addon.tostring.RooToString;
8   
9   import javax.validation.constraints.NotNull;
10  import javax.validation.constraints.Pattern;
11  import javax.validation.constraints.Size;
12  
13  /**
14   * Information about person. Used for {@link ActivationCreationInfo#contactInfo}.
15   * <p>User: Kirill, Date: 05.08.13 17:59</p>
16   */
17  @RooJavaBean
18  @RooToString
19  @RooJson(deepSerialize = true)
20  public class ContactInfo implements Info {
21  
22      /**
23       * Name of person who makes activation.
24       */
25      @NotNull
26      @Size(min = 1, max = 96)
27      private String name;
28  
29      /**
30       * Phone number of person who requests activation.
31       */
32      @NotNull
33      @Size(max = 50)
34      private String phone;
35  
36      /**
37       * Email of person who requests activation.
38       */
39      @NotNull
40      @Pattern(regexp = Constraints.EMAIL_REGEX)
41      @Size(max = 56)
42      private String email;
43  }