pt.digitalis.utils.ldap
Class LDAPUser

java.lang.Object
  extended by pt.digitalis.utils.ldap.LDAPEntity
      extended by pt.digitalis.utils.ldap.LDAPUser

public class LDAPUser
extends LDAPEntity

Wrapper type for an LDAP user.
TODO: Viegas: Must try to create a common interface that this implementation and the IIdentityManager from DIF use. This would prevent the need for the DIF IdentityManagerImpl to convert a list of LDAPUser objects to a list of IDIFUser objects.

Author:
Rodrigo Gonçalves rgoncalves@digitalis.pt
, Luis Pinto lpinto@digitalis.pt

Field Summary
static String DISPLAY_NAME
          The 'display name' attribute.
static String GIVEN_NAME
          The 'given name' attribute.
 
Fields inherited from class pt.digitalis.utils.ldap.LDAPEntity
COMMON_NAME, DESCRIPTION, DISTINGUISHED_NAME, NAME
 
Constructor Summary
LDAPUser()
           
 
Method Summary
 String getDisplayName()
          Inspector for the display name.
 String getEmail()
          Inspector for the e-mail.
 boolean getEnabled()
          Inspector for the 'enabled' property.
 String getGivenName()
          Inspector for the given name.
 String getLoginName()
          Inspector for the login name.
 String getParameter(String attributeName)
          Returns a given parameter value, identified by the name of the attribute on which the value is stored.
 Map<String,String> getParameters()
          Returns the parameters map.
 List<String> getParametersToRemove()
          Inspector for the 'bulkParametersToRemove' attribute.
 String getPassword()
          Inspector for the password.
 String getUserName()
          Inspector for the user name.
 void removeParameter(String attributeName)
          Removes a parameter from the parameters map.
 void setDisplayName(String displayName)
          Modifier for the display name.
 void setEmail(String eMail)
          Modifier for the e-mail.
 void setEnabled(boolean enabled)
          Modifier for the 'enabled' property.
 void setGivenName(String givenName)
          Modifier for the given name.
 void setLoginName(String loginName)
          Modifier for the login name.
 void setParameter(String attributeName, String value)
          Sets a parameter on the parameters map.
 void setPassword(String password)
          Modifier for the password.
 void setUserName(String userName)
          Modifier for the user name.
 String toString()
           
 
Methods inherited from class pt.digitalis.utils.ldap.LDAPEntity
getCommonName, getDescription, getDistinguishedName, getName, getParentGroupDN, setCommonName, setDescription, setDistinguishedName, setName, setParentGroupDN
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DISPLAY_NAME

public static final String DISPLAY_NAME
The 'display name' attribute.

See Also:
Constant Field Values

GIVEN_NAME

public static final String GIVEN_NAME
The 'given name' attribute.

See Also:
Constant Field Values
Constructor Detail

LDAPUser

public LDAPUser()
Method Detail

getDisplayName

public String getDisplayName()
Inspector for the display name.

Returns:
the displayName

getEmail

public String getEmail()
Inspector for the e-mail.

Returns:
the user's e-mail.

getEnabled

public boolean getEnabled()
Inspector for the 'enabled' property.

Returns:
T if the user is enabled, F otherwise

getGivenName

public String getGivenName()
Inspector for the given name.

Returns:
the givenName

getLoginName

public String getLoginName()
Inspector for the login name.

Returns:
the name

getParameter

public String getParameter(String attributeName)
Returns a given parameter value, identified by the name of the attribute on which the value is stored.

Parameters:
attributeName - the name of the attribute on which the parameter value is stored
Returns:
the parameter value or null if the map doesn't contain the supplied key

getParameters

public Map<String,String> getParameters()
Returns the parameters map.

Returns:
the parameters map

getParametersToRemove

public List<String> getParametersToRemove()
Inspector for the 'bulkParametersToRemove' attribute.

Returns:
the bulkParametersToRemove value

getPassword

public String getPassword()
Inspector for the password.

Returns:
the password

getUserName

public String getUserName()
Inspector for the user name.

Returns:
the user name

removeParameter

public void removeParameter(String attributeName)
Removes a parameter from the parameters map.

Parameters:
attributeName - the name of the attribute on which the parameter value is stored

setDisplayName

public void setDisplayName(String displayName)
Modifier for the display name.

Parameters:
displayName - the displayName to set

setEmail

public void setEmail(String eMail)
Modifier for the e-mail.

Parameters:
eMail - the new e-mail to set

setEnabled

public void setEnabled(boolean enabled)
Modifier for the 'enabled' property.

Parameters:
enabled - the new 'enabled' value

setGivenName

public void setGivenName(String givenName)
Modifier for the given name.

Parameters:
givenName - the givenName to set

setLoginName

public void setLoginName(String loginName)
Modifier for the login name.

Parameters:
loginName - the name to set

setParameter

public void setParameter(String attributeName,
                         String value)
Sets a parameter on the parameters map.

Parameters:
attributeName - the name of the LDAP attribute that will store the parameter
value - the parameter value

setPassword

public void setPassword(String password)
Modifier for the password.

Parameters:
password - the password to set

setUserName

public void setUserName(String userName)
Modifier for the user name.

Parameters:
userName - the user name to set

toString

public String toString()
Overrides:
toString in class LDAPEntity
See Also:
Object.toString()


Copyright © 2012 Digitalis Informática Lda. All Rights Reserved.