View Javadoc
1   /*
2    * Copyright (c) 2002-2014, 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.mylutece.modules.wssodatabase.authentication.business;
35  
36  import fr.paris.lutece.portal.service.role.RoleRemovalListenerService;
37  
38  import java.util.Date;
39  
40  
41  /**
42   * This class represents the business object WssoUser
43   */
44  public class WssoUser
45  {
46      // Variables declarations
47      private static WssoUserRoleRemovalListener _listenerRole;
48      private int _nMyluteceWssoUserId;
49      private String _strGuid;
50      private String _strLastName;
51      private String _strFirstName;
52      private String _strEmail;
53      private Date _dateLastLogin;
54  
55      /**
56       * Initialize the LdapDatabaseUser
57       */
58      public static void init(  )
59      {
60          // Create removal listeners and register them
61          if ( _listenerRole == null )
62          {
63              _listenerRole = new WssoUserRoleRemovalListener(  );
64              RoleRemovalListenerService.getService(  ).registerListener( _listenerRole );
65          }
66      }
67  
68      /**
69       * Returns the MyluteceWssoUserId
70       *
71       * @return The MyluteceWssoUserId
72       */
73      public int getMyluteceWssoUserId(  )
74      {
75          return _nMyluteceWssoUserId;
76      }
77  
78      /**
79       * Sets the MyluteceWssoUserId
80       *
81       * @param nMyluteceWssoUserId The MyluteceWssoUserId
82       */
83      public void setMyluteceWssoUserId( int nMyluteceWssoUserId )
84      {
85          _nMyluteceWssoUserId = nMyluteceWssoUserId;
86      }
87  
88      /**
89       * Returns the Guid
90       *
91       * @return The Guid
92       */
93      public String getGuid(  )
94      {
95          return _strGuid;
96      }
97  
98      /**
99       * Sets the Guid
100      *
101      * @param strGuid The Guid
102      */
103     public void setGuid( String strGuid )
104     {
105         _strGuid = strGuid;
106     }
107 
108     /**
109      * Returns the LastName
110      *
111      * @return The LastName
112      */
113     public String getLastName(  )
114     {
115         return _strLastName;
116     }
117 
118     /**
119      * Sets the LastName
120      *
121      * @param strLastName The LastName
122      */
123     public void setLastName( String strLastName )
124     {
125         _strLastName = strLastName;
126     }
127 
128     /**
129      * Returns the FirstName
130      *
131      * @return The FirstName
132      */
133     public String getFirstName(  )
134     {
135         return _strFirstName;
136     }
137 
138     /**
139      * Sets the FirstName
140      *
141      * @param strFirstName The FirstName
142      */
143     public void setFirstName( String strFirstName )
144     {
145         _strFirstName = strFirstName;
146     }
147 
148     /**
149      * Returns the Email
150      *
151      * @return The Email
152      */
153     public String getEmail(  )
154     {
155         return _strEmail;
156     }
157 
158     /**
159      * Sets the Email
160      *
161      * @param strEmail The Email
162      */
163     public void setEmail( String strEmail )
164     {
165         _strEmail = strEmail;
166     }
167 
168     /**
169      * Get the date of last login of the user
170      * @return The date of last login
171      */
172     public Date getDateLastLogin(  )
173     {
174         return _dateLastLogin;
175     }
176 
177     /**
178      * Set the date of last login of the user
179      * @param dateLastLogin The new date of last login
180      */
181     public void setDateLastLogin( Date dateLastLogin )
182     {
183         _dateLastLogin = dateLastLogin;
184     }
185 }