org.apache.lenya.ac
Interface User

All Superinterfaces:
Accreditable, Groupable, Identifiable, Item, org.apache.avalon.framework.logger.LogEnabled

public interface User
extends Identifiable, Item, Groupable

A user.

Version:
$Id: User.java 580116 2007-09-27 18:02:21Z rfrovarp $

Method Summary
 boolean authenticate(java.lang.String password)
          Authenticate a user.
 boolean canChangePassword()
          Checks support for changing password
 void delete()
          Delete a user
 AccreditableManager getAccreditableManager()
           
 java.lang.String getDefaultDocumentLocale()
          Returns the user's default locale of documents to be created or edited.
 java.lang.String getDefaultMenuLocale()
          Returns the user's preferred locale for the Lenya CMS menus and CMS screens.
 java.lang.String getEmail()
          Get the email address
 void save()
          Save the user
 void setDefaultDocumentLocale(java.lang.String documentLocale)
          Sets the user's default locale of documents to be created or edited.
 void setDefaultMenuLocale(java.lang.String menuLocale)
          Sets the user's preferred locale for the Lenya menu and CMS screens.
 void setEmail(java.lang.String email)
          Set the email address
 void setPassword(java.lang.String plainTextPassword)
          Sets the password.
 
Methods inherited from interface org.apache.lenya.ac.Accreditable
getAccreditables
 
Methods inherited from interface org.apache.lenya.ac.Item
configure, getDescription, getId, getItemManager, getName, setDescription, setName
 
Methods inherited from interface org.apache.avalon.framework.logger.LogEnabled
enableLogging
 
Methods inherited from interface org.apache.lenya.ac.Groupable
addedToGroup, getGroups, removedFromGroup, removeFromAllGroups
 

Method Detail

getEmail

java.lang.String getEmail()
Get the email address

Returns:
a String

setEmail

void setEmail(java.lang.String email)
Set the email address

Parameters:
email - the new email address

setPassword

void setPassword(java.lang.String plainTextPassword)
Sets the password.

Parameters:
plainTextPassword - The plain text password.

canChangePassword

boolean canChangePassword()
Checks support for changing password

Returns:
true if password change is supported

getDefaultMenuLocale

java.lang.String getDefaultMenuLocale()
Returns the user's preferred locale for the Lenya CMS menus and CMS screens. The locale can either be a 2 letter country code (de, en) or a locale code according to RFC 1766 / ISO 639 / ISO 3166 (de_DE, de_CH, de_AT, en_US, ...)

Returns:
The locale.

setDefaultMenuLocale

void setDefaultMenuLocale(java.lang.String menuLocale)
Sets the user's preferred locale for the Lenya menu and CMS screens. The locale can either be a 2 letter country code (de, en) or a locale code according to RFC 1766 / ISO 639 / ISO 3166 (de_DE, de_CH, de_AT, en_US, ...)

Parameters:
menuLocale - The locale.

getDefaultDocumentLocale

java.lang.String getDefaultDocumentLocale()
Returns the user's default locale of documents to be created or edited. The locale can either be a 2 letter country code (de, en) or a locale code according to RFC 1766 / ISO 639 / ISO 3166 (de_DE, de_CH, de_AT, en_US, ...)

Returns:
The locale.

setDefaultDocumentLocale

void setDefaultDocumentLocale(java.lang.String documentLocale)
Sets the user's default locale of documents to be created or edited. The locale can either be a 2 letter country code (de, en) or a locale code according to RFC 1766 / ISO 639 / ISO 3166 (de_DE, de_CH, de_AT, en_US, ...)

Parameters:
documentLocale - The locale.

save

void save()
          throws AccessControlException
Save the user

Throws:
AccessControlException - if the save failed

delete

void delete()
            throws AccessControlException
Delete a user

Throws:
AccessControlException - if the delete failed

authenticate

boolean authenticate(java.lang.String password)
Authenticate a user. This is done by encrypting the given password and comparing this to the encryptedPassword.

Parameters:
password - to authenticate with
Returns:
true if the given password matches the password for this user

getAccreditableManager

AccreditableManager getAccreditableManager()
Returns:
The accreditable manager this accreditable belongs to.


Copyright 1999-2006 Apache Software Foundation. All Rights Reserved.