View Javadoc
1   /*
2    * Copyright (c) 2002-2016, Mairie de Paris
3   * All rights reserved.
4   *
5   * Redistribution and use in source and binary forms, with or without
6    * modification, are permitted provided that the following conditions
7    * are met:
8    *
9    *  1. Redistributions of source code must retain the above copyright notice
10   *     and the following disclaimer.
11   *
12   *  2. Redistributions in binary form must reproduce the above copyright notice
13   *     and the following disclaimer in the documentation and/or other materials
14   *     provided with the distribution.
15   *
16   *  3. Neither the name of 'Mairie de Paris' nor 'Lutece' nor the names of its
17   *     contributors may be used to endorse or promote products derived from
18   *     this software without specific prior written permission.
19   *
20   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23   * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
24   * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25   * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26   * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27   * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28   * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29   * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30   * POSSIBILITY OF SUCH DAMAGE.
31   *
32   * License 1.0
33   */ 
34  package fr.paris.lutece.plugins.mydashboard.modules.identity.business;
35  
36  import java.util.Date;
37  
38  /**
39   * This is the business class for the object DashboardAttribute
40   */ 
41  public class DashboardAttribute
42  {
43      // Variables declarations 
44      private String _strKey;
45      private String _strValue;
46      private String _strCertifierCode;
47      private String _strCertifierName;
48      private int _nCertifierLevel;
49      private Date _tCertificateExpirationDate;
50      private Date _dCertificateDate;
51      private boolean _bMandatory;
52      
53      public DashboardAttribute( )
54      {
55          
56      }
57  
58      public DashboardAttribute( String key, String value, String certifierCode, String certifierName, int nCertifierLevel, Date tCertificateExpirtationDate, Date dCertificateDate )
59      {
60          _strKey = key;
61          _strValue = value;
62          _strCertifierCode = certifierCode;
63          _strCertifierName = certifierName;
64          _nCertifierLevel = nCertifierLevel;
65          _tCertificateExpirationDate = tCertificateExpirtationDate;
66          _dCertificateDate = dCertificateDate;
67      }
68      
69      public DashboardAttribute( String key, String value )
70      {
71          _strKey = key;
72          _strValue = value;
73          _strCertifierName = null;
74          _strCertifierCode = null;
75          _tCertificateExpirationDate = null;
76      }
77      
78         /**
79          * Returns the Key
80          * @return The Key
81          */ 
82      public String getKey()
83      {
84          return _strKey;
85      }
86      
87         /**
88          * Sets the Key
89          * @param strKey The Key
90          */ 
91      public void setKey( String strKey )
92      {
93          _strKey = strKey;
94      }
95      
96         /**
97          * Returns the Value
98          * @return The Value
99          */ 
100     public String getValue()
101     {
102         return _strValue;
103     }
104     
105        /**
106         * Sets the Value
107         * @param strValue The Value
108         */ 
109     public void setValue( String strValue )
110     {
111         _strValue = strValue;
112     }
113     
114        /**
115         * Returns the CertifierCode
116         * @return The CertifierCode
117         */ 
118     public String getCertifierCode()
119     {
120         return _strCertifierCode;
121     }
122     
123        /**
124         * Sets the CertifierCode
125         * @param strCertifierCode The CertifierCode
126         */ 
127     public void setCertifierCode( String strCertifierCode )
128     {
129         _strCertifierCode = strCertifierCode;
130     }
131     
132        /**
133         * Returns the CertifierName
134         * @return The CertifierName
135         */ 
136     public String getCertifierName()
137     {
138         return _strCertifierName;
139     }
140     
141        /**
142         * Sets the CertifierName
143         * @param strCertifierName The CertifierName
144         */ 
145     public void setCertifierName( String strCertifierName )
146     {
147         _strCertifierName = strCertifierName;
148     }
149     
150     /**
151      * Returns the Certifier level
152      * @return The CertifierLevel
153      */ 
154     public int getCertifierLevel()
155     {
156         return _nCertifierLevel;
157     }
158     
159     /**
160      * Sets the CertifierLevel
161      * @param nCertifierLevel The CertifierLevel
162      */ 
163     public void setCertifierName( int nCertifierLevel )
164     {
165         _nCertifierLevel = nCertifierLevel;
166     }
167     
168        /**
169         * Returns the ExpirationDate of the certificate
170         * @return The ExpirationDate of the certificate
171         */ 
172     public Date getExpirationDate()
173     {
174         return _tCertificateExpirationDate;
175     }
176     
177        /**
178         * Sets the ExpirationDate of the certificate
179         * @param tCertificateExpirationDate The ExpirationDate of the certificate
180         */ 
181     public void setExpirationDate( Date tCertificateExpirationDate )
182     {
183         _tCertificateExpirationDate = tCertificateExpirationDate;
184     }
185 
186     /**
187      * 
188      * @return true if the attribute is Mandatory
189      */
190 	public boolean isMandatory() {
191 		return _bMandatory;
192 	}
193 
194 	/**
195 	 * 
196 	 * @param _bMandatory true if the attribute is mandatory
197 	 */
198 	public void setMandatory(boolean _bMandatory) {
199 		this._bMandatory = _bMandatory;
200 	}
201 
202     /**
203      * @return the _dCertificateDate
204      */
205     public Date getCertificateDate( )
206     {
207         return _dCertificateDate;
208     }
209 
210     /**
211      * @param dCertificateDate the _dCertificateDate to set
212      */
213     public void setCertificateDate( Date dCertificateDate )
214     {
215         this._dCertificateDate = dCertificateDate;
216     }
217 
218  }