FileDocCategorySizeDatePackage
DefaultJamesUser.javaAPI DocApache James 2.3.14473Fri Jan 12 12:56:32 GMT 2007org.apache.james.userrepository

DefaultJamesUser

public class DefaultJamesUser extends DefaultUser implements org.apache.avalon.framework.activity.Initializable, org.apache.james.services.JamesUser
Implementation of User Interface.
version
$Revision: 494012 $

Fields Summary
private static final long
serialVersionUID
private boolean
forwarding
Whether forwarding is enabled for this user.
private org.apache.mailet.MailAddress
forwardingDestination
The mail address to which this user's email is forwarded.
private boolean
aliasing
Is this user an alias for another username on the system.
private String
alias
The user name that this user name is aliasing.
Constructors Summary
public DefaultJamesUser(String name, String alg)


         
        super(name, alg);
    
public DefaultJamesUser(String name, String passwordHash, String hashAlg)

        super(name, passwordHash, hashAlg);
    
Methods Summary
public java.lang.StringgetAlias()
Get the user id for which this id is an alias.

return
the user id for which this id is an alias

        return alias;
    
public booleangetAliasing()
Get whether this user id is an alias.

return
whether this id is an alias

        return aliasing;
    
public booleangetForwarding()
Get whether mail to this user is to be forwarded to another email address.

return
forward whether mail is forwarded

        return forwarding;
    
public org.apache.mailet.MailAddressgetForwardingDestination()
Get the destination address to which mail to this user will be forwarded.

return
the forward-to address

        return forwardingDestination;
    
public voidinitialize()

see
org.apache.avalon.framework.activity.Initializable#initialize()

        forwarding = false;
        forwardingDestination = null;
        aliasing = false;
        alias = "";
    
public booleansetAlias(java.lang.String address)
Set the user id for which this id is an alias.

param
address the user id for which this id is an alias

        /* TODO: Some verification would be good */
        alias = address;
        return true;
    
public voidsetAliasing(boolean alias)
Set whether this user id is an alias.

param
alias whether this id is an alias

        aliasing = alias;
    
public voidsetForwarding(boolean forward)
Set whether mail to this user is to be forwarded to another email address

param
forward whether mail is forwarded

        forwarding = forward;
    
public booleansetForwardingDestination(org.apache.mailet.MailAddress address)
Set the destination address to which mail to this user will be forwarded.

param
address the forward-to address

        /* TODO: Some verification would be good */
        forwardingDestination = address;
        return true;