View Javadoc

1   /*
2    * Copyright 2007-2009 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.rice.kim.bo.entity.dto;
17  
18  import org.kuali.rice.kim.bo.entity.KimEntityEmail;
19  
20  /**
21   * @author Kuali Rice Team (rice.collab@kuali.org)
22   */
23  public class KimEntityEmailInfo extends KimDefaultableInfo implements KimEntityEmail {
24  
25  	private static final long serialVersionUID = 1L;
26  
27  	protected String entityEmailId;
28  	protected String entityTypeCode;
29  	protected String emailTypeCode;
30  	protected String emailAddress;
31  	protected String emailAddressUnmasked;
32  	
33  	protected boolean suppressEmail = false;
34  	
35  	/**
36  	 * construct an empty {@link KimEntityEmailInfo}
37  	 */
38  	public KimEntityEmailInfo() {
39  		super();
40  		active = true;
41  	}
42  	
43  	/**
44  	 * construct a {@link KimEntityEmailInfo} derived from the give {@link KimEntityEmail}
45  	 */
46  	public KimEntityEmailInfo( KimEntityEmail email ) {
47  		this();
48  		if ( email != null ) {
49  			this.entityEmailId = email.getEntityEmailId();
50  			this.entityTypeCode = email.getEntityTypeCode();
51  			this.emailTypeCode = email.getEmailTypeCode();
52  			this.emailAddress = email.getEmailAddress();
53  			this.emailAddressUnmasked = email.getEmailAddressUnmasked();
54  			this.dflt = email.isDefault();
55  			this.active = email.isActive();
56  			this.suppressEmail = email.isSuppressEmail();
57  		}
58  	}
59  
60  	/**
61  	 * {@inheritDoc} 
62  	 * @see org.kuali.rice.kim.bo.entity.KimEntityEmail#getEntityEmailId()
63  	 */
64  	public String getEntityEmailId() {
65  		return entityEmailId;
66  	}
67  
68  	/**
69  	 * @param entityEmailId the entityEmailId to set
70  	 */
71  	public void setEntityEmailId(String entityEmailId) {
72  		this.entityEmailId = entityEmailId;
73  	}
74  
75  	/**
76  	 * {@inheritDoc} 
77  	 * @see org.kuali.rice.kim.bo.entity.KimEntityEmail#getEntityTypeCode()
78  	 */
79  	public String getEntityTypeCode() {
80  		return entityTypeCode;
81  	}
82  
83  	/**
84  	 * @param entityTypeCode the entityTypeCode to set
85  	 */
86  	public void setEntityTypeCode(String entityTypeCode) {
87  		this.entityTypeCode = entityTypeCode;
88  	}
89  
90  	/**
91  	 * {@inheritDoc} 
92  	 * @see org.kuali.rice.kim.bo.entity.KimEntityEmail#getEmailTypeCode()
93  	 */
94  	public String getEmailTypeCode() {
95  		return emailTypeCode;
96  	}
97  
98  	/**
99  	 * @param emailTypeCode the emailTypeCode to set
100 	 */
101 	public void setEmailTypeCode(String emailTypeCode) {
102 		this.emailTypeCode = emailTypeCode;
103 	}
104 
105 	/**
106 	 * {@inheritDoc} 
107 	 * @see org.kuali.rice.kim.bo.entity.KimEntityEmail#getEmailAddress()
108 	 */
109 	public String getEmailAddress() {
110 		return emailAddress;
111 	}
112 
113 	/**
114 	 * @param emailAddress the emailAddress to set
115 	 */
116 	public void setEmailAddress(String emailAddress) {
117 		this.emailAddress = emailAddress;
118 	}
119 
120 	/**
121 	 * {@inheritDoc} 
122 	 * @see org.kuali.rice.kim.bo.entity.KimEntityEmail#getEmailAddressUnmasked()
123 	 */
124 	public String getEmailAddressUnmasked() {
125 		return emailAddressUnmasked;
126 	}
127 
128 	/**
129 	 * @param emailAddressUnmasked the emailAddressUnmasked to set
130 	 */
131 	public void setEmailAddressUnmasked(String emailAddressUnmasked) {
132 		this.emailAddressUnmasked = emailAddressUnmasked;
133 	}
134 
135 	/**
136 	 * {@inheritDoc} 
137 	 * @see org.kuali.rice.kim.bo.entity.KimEntityEmail#isSuppressEmail()
138 	 */
139 	public boolean isSuppressEmail() {
140 		return this.suppressEmail;
141 	}
142 
143 	/**
144 	 * @param suppressEmail the suppressEmail to set
145 	 */
146 	public void setSuppressEmail(boolean suppressEmail) {
147 		this.suppressEmail = suppressEmail;
148 	}
149 	
150 }