View Javadoc
1   package com.dto;
2   
3   /*
4    * #%L
5    * Gateway
6    * %%
7    * Copyright (C) 2015 Powered by Sergey
8    * %%
9    * Licensed under the Apache License, Version 2.0 (the "License");
10   * you may not use this file except in compliance with the License.
11   * You may obtain a copy of the License at
12   * 
13   *      http://www.apache.org/licenses/LICENSE-2.0
14   * 
15   * Unless required by applicable law or agreed to in writing, software
16   * distributed under the License is distributed on an "AS IS" BASIS,
17   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18   * See the License for the specific language governing permissions and
19   * limitations under the License.
20   * #L%
21   */
22  
23  
24  import org.hibernate.validator.constraints.NotEmpty;
25  
26  import javax.persistence.Column;
27  import javax.validation.constraints.NotNull;
28  import javax.validation.constraints.Pattern;
29  import java.util.List;
30  
31  /**
32   * Created by aautushk on 9/19/2015.
33   */
34  public class InvitationRequestDto {
35      @NotNull(message = "{FieldIsMandatory}")
36      @NotEmpty(message = "{FieldCanNotBeEmpty}")
37      @Pattern(regexp=".+@.+\\.[a-z]+", message = "{NotValidEmailValue}")
38      private String recipientEmail;
39  
40      private String projectGuid;
41  
42      @NotNull(message = "{FieldIsMandatory}")
43      @NotEmpty(message = "{FieldCanNotBeEmpty}")
44      @Column(name = "authority")
45      private String authority;
46  
47      @NotNull(message = "{FieldIsMandatory}")
48      @NotEmpty(message = "{FieldCanNotBeEmpty}")
49      private List<GroupRequestDto> groups;
50  
51      public String getRecipientEmail() {
52          return recipientEmail;
53      }
54  
55      public void setRecipientEmail(String recipientEmail) {
56          this.recipientEmail = recipientEmail;
57      }
58  
59      public String getProjectGuid() {
60          return projectGuid;
61      }
62  
63      public void setProjectGuid(String projectGuid) {
64          this.projectGuid = projectGuid;
65      }
66  
67      public String getAuthority() {
68          return authority;
69      }
70  
71      public void setAuthority(String authority) {
72          this.authority = authority;
73      }
74  
75      public List<GroupRequestDto> getGroups() {
76          return groups;
77      }
78  
79      public void setGroups(List<GroupRequestDto> groups) {
80          this.groups = groups;
81      }
82  }