org.apache.james.impl.user
Class DefaultJamesUser

java.lang.Object
  extended by org.apache.james.impl.user.DefaultUser
      extended by org.apache.james.impl.user.DefaultJamesUser
All Implemented Interfaces:
java.io.Serializable, JamesUser, User

public class DefaultJamesUser
extends DefaultUser
implements JamesUser

Implementation of User Interface.

Version:
$Revision: 521427 $
See Also:
Serialized Form

Constructor Summary
DefaultJamesUser(java.lang.String name, java.lang.String alg)
           
DefaultJamesUser(java.lang.String name, java.lang.String passwordHash, java.lang.String hashAlg)
           
 
Method Summary
 java.lang.String getAlias()
          Get local address to which mail should be delivered.
 boolean getAliasing()
          Return true if emails should be delivered locally to an alias.
 boolean getForwarding()
          Return true if mail for this user should be forwarded
 org.apache.mailet.MailAddress getForwardingDestination()
          Return the destination to which email should be forwarded
 void initialize()
          Initializes default values for local fields.
 boolean setAlias(java.lang.String address)
          Set local address to which email should be delivered.
 void setAliasing(boolean alias)
          Indicate if mail received for this user should be delivered locally to a different address.
 void setForwarding(boolean forward)
          Indicate if mail for this user should be forwarded to some other mail server.
 boolean setForwardingDestination(org.apache.mailet.MailAddress address)
          Set destination for forwading mail
 
Methods inherited from class org.apache.james.impl.user.DefaultUser
getHashAlgorithm, getHashedPassword, getUserName, setPassword, verifyPassword
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.james.api.user.JamesUser
setPassword
 
Methods inherited from interface org.apache.james.api.user.User
getUserName, verifyPassword
 

Constructor Detail

DefaultJamesUser

public DefaultJamesUser(java.lang.String name,
                        java.lang.String alg)

DefaultJamesUser

public DefaultJamesUser(java.lang.String name,
                        java.lang.String passwordHash,
                        java.lang.String hashAlg)
Method Detail

initialize

public void initialize()
Initializes default values for local fields.


setForwarding

public void setForwarding(boolean forward)
Description copied from interface: JamesUser
Indicate if mail for this user should be forwarded to some other mail server.

Specified by:
setForwarding in interface JamesUser
Parameters:
forward - whether email for this user should be forwarded
See Also:
JamesUser.setForwarding(boolean)

getForwarding

public boolean getForwarding()
Description copied from interface: JamesUser
Return true if mail for this user should be forwarded

Specified by:
getForwarding in interface JamesUser
See Also:
JamesUser.getForwarding()

setForwardingDestination

public boolean setForwardingDestination(org.apache.mailet.MailAddress address)
Description copied from interface: JamesUser

Set destination for forwading mail

TODO: Should we use a MailAddress?

Specified by:
setForwardingDestination in interface JamesUser
Parameters:
address - the forwarding address for this user
See Also:
JamesUser.setForwardingDestination(org.apache.mailet.MailAddress)

getForwardingDestination

public org.apache.mailet.MailAddress getForwardingDestination()
Description copied from interface: JamesUser
Return the destination to which email should be forwarded

Specified by:
getForwardingDestination in interface JamesUser
See Also:
JamesUser.getForwardingDestination()

setAliasing

public void setAliasing(boolean alias)
Description copied from interface: JamesUser
Indicate if mail received for this user should be delivered locally to a different address.

Specified by:
setAliasing in interface JamesUser
See Also:
JamesUser.setAliasing(boolean)

getAliasing

public boolean getAliasing()
Description copied from interface: JamesUser
Return true if emails should be delivered locally to an alias.

Specified by:
getAliasing in interface JamesUser
See Also:
JamesUser.getAliasing()

setAlias

public boolean setAlias(java.lang.String address)
Description copied from interface: JamesUser
Set local address to which email should be delivered.

Specified by:
setAlias in interface JamesUser
Returns:
true if successful
See Also:
JamesUser.setAlias(java.lang.String)

getAlias

public java.lang.String getAlias()
Description copied from interface: JamesUser
Get local address to which mail should be delivered.

Specified by:
getAlias in interface JamesUser
See Also:
JamesUser.getAlias()


Copyright ? 2002-2009 The Apache Software Foundation. All Rights Reserved.