nl.gx.webmanager.authorization.impl
Class UserImpl

java.lang.Object
  extended by nl.gx.webmanager.authorization.impl.HtmlObjectWrapperImpl
      extended by nl.gx.webmanager.authorization.impl.UserImpl
All Implemented Interfaces:
HtmlObjectWrapper, User

public class UserImpl
extends HtmlObjectWrapperImpl
implements User

Implementation of the User interface. This implementation wraps the UserObject siteworks objecttype.

Author:
Arjan Seijkens/Ivo Ladage

Field Summary
 
Fields inherited from class nl.gx.webmanager.authorization.impl.HtmlObjectWrapperImpl
id
 
Constructor Summary
UserImpl()
          Default constructor for a User implementation instance.
UserImpl(int id)
          Constructor for a User implementation taking the id of the siteworks object it wraps as a parameter.
UserImpl(java.lang.String id)
          Constructor for a User implementation taking the id of the siteworks object it wraps as a parameter.
 
Method Summary
static nl.gx.siteworks.core.UserObject getCurrentUser()
          Returns the current user login.
 java.lang.String getEditLanguage()
          Returns the current edit language of this user,
 java.lang.String getEmail()
          Returns the E-mail address of the user.
 java.lang.String getFirstName()
          Returns the first name of the user.
 java.lang.String getId()
          Returns the unique id of the wrapped Siteworks object.
 java.lang.String getLastName()
          Returns the lastname of the user.
 java.util.Locale getLocale()
          Returns the user's locale.
 java.lang.String getLogin()
          Returns the login name of the user.
 java.lang.String getName()
          Returns the name of the user which is a concatenation of first and last name
 java.lang.String getPassword()
          Returns the encrypted password of the user.
 Role[] getRoles()
          Returns the roles that are assigned to the user.
 java.util.TimeZone getTimeZone()
          Returns the user's time zone.
 boolean isDeveloper()
          Returns if this use is a 'developer'.
 void setEmail(java.lang.String email)
          Sets the E-mail address of the user.
 void setFirstName(java.lang.String firstName)
          Sets the first name of the user.
 void setLastName(java.lang.String lastName)
          Sest the lastname of the user.
 void setLogin(java.lang.String login)
          Sets the login name of the user.
 void setPassword(java.lang.String password)
          Sets the password of the user, which will be encrypted.
 void setRoles(Role[] roles)
          Sets the roles that are assigned to the user.
 
Methods inherited from class nl.gx.webmanager.authorization.impl.HtmlObjectWrapperImpl
assignRelatedObject, delete, equals, getAssignment, getAssignmentObjects, getAssignments, getUuid, removeRelatedObjects, setAssignment, setAssignments, setComponent, setId, setNode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface nl.gx.webmanager.authorization.User
delete
 
Methods inherited from interface nl.gx.webmanager.authorization.HtmlObjectWrapper
getUuid
 

Constructor Detail

UserImpl

public UserImpl()
Default constructor for a User implementation instance.


UserImpl

public UserImpl(java.lang.String id)
Constructor for a User implementation taking the id of the siteworks object it wraps as a parameter.

Parameters:
id - Id of a UserObject siteworks object

UserImpl

public UserImpl(int id)
Constructor for a User implementation taking the id of the siteworks object it wraps as a parameter.

Parameters:
id - Id of a UserObject siteworks object
Method Detail

getEmail

public java.lang.String getEmail()
Returns the E-mail address of the user.

Specified by:
getEmail in interface User
Returns:
the E-mail address of the user

getFirstName

public java.lang.String getFirstName()
Returns the first name of the user.

Specified by:
getFirstName in interface User
Returns:
the first name of the user

getLastName

public java.lang.String getLastName()
Returns the lastname of the user.

Specified by:
getLastName in interface User
Returns:
the lastname of the user

getName

public java.lang.String getName()
Returns the name of the user which is a concatenation of first and last name

Specified by:
getName in interface User
Returns:
Name of the user

getLogin

public java.lang.String getLogin()
Returns the login name of the user.

Specified by:
getLogin in interface User
Returns:
the login name of the user

getEditLanguage

public java.lang.String getEditLanguage()
Returns the current edit language of this user,

Specified by:
getEditLanguage in interface User
Returns:
The current edit language

getPassword

public java.lang.String getPassword()
Returns the encrypted password of the user.

Specified by:
getPassword in interface User
Returns:
the encrypted password of the user

isDeveloper

public boolean isDeveloper()
Returns if this use is a 'developer'. This is true if the user has one or more permission groups assigned with 'development = true'.

Specified by:
isDeveloper in interface User
Returns:
true if this user is a developer, false otherwise

getRoles

public Role[] getRoles()
Returns the roles that are assigned to the user.

Specified by:
getRoles in interface User
Returns:
the roles that are assigned to the user

setEmail

public void setEmail(java.lang.String email)
Sets the E-mail address of the user.

Specified by:
setEmail in interface User
Parameters:
email - E-mail address of the user

setFirstName

public void setFirstName(java.lang.String firstName)
Sets the first name of the user.

Specified by:
setFirstName in interface User
Parameters:
firstName - First name of the user

setLastName

public void setLastName(java.lang.String lastName)
Sest the lastname of the user.

Specified by:
setLastName in interface User
Parameters:
lastName - Lastname of the user

setLogin

public void setLogin(java.lang.String login)
Sets the login name of the user.

Specified by:
setLogin in interface User
Parameters:
login - Login name of the user

setPassword

public void setPassword(java.lang.String password)
Sets the password of the user, which will be encrypted.

Specified by:
setPassword in interface User
Parameters:
password - Password of the user

setRoles

public void setRoles(Role[] roles)
Sets the roles that are assigned to the user.

Specified by:
setRoles in interface User
Parameters:
roles - Roles that are assigned to the user

getId

public java.lang.String getId()
Returns the unique id of the wrapped Siteworks object.

Specified by:
getId in interface HtmlObjectWrapper
Overrides:
getId in class HtmlObjectWrapperImpl
Returns:
the unique id of the wrapped Siteworks object

getTimeZone

public java.util.TimeZone getTimeZone()
Returns the user's time zone.

Specified by:
getTimeZone in interface User
Returns:
the user's time zone, or null if the user has no specific time zone configured.

getLocale

public java.util.Locale getLocale()
Returns the user's locale.

Specified by:
getLocale in interface User
Returns:
the user's locale, or null if the user has no specific locale configured.

getCurrentUser

public static nl.gx.siteworks.core.UserObject getCurrentUser()
Returns the current user login.

Returns:
the current user login


Copyright © 2007-2011 GX Software BV. All Rights Reserved.