1 17 18 package org.apache.james.userrepository; 19 20 import org.apache.avalon.framework.activity.Initializable; 21 import org.apache.james.services.JamesUser; 22 import org.apache.mailet.MailAddress; 23 24 30 31 public class DefaultJamesUser 32 extends DefaultUser 33 implements JamesUser, Initializable { 34 35 38 private boolean forwarding; 39 40 43 private MailAddress forwardingDestination; 44 45 48 private boolean aliasing; 49 50 51 54 private String alias; 55 56 public DefaultJamesUser(String name, String alg) { 57 super(name, alg); 58 } 59 60 public DefaultJamesUser(String name, String passwordHash, String hashAlg) { 61 super(name, passwordHash, hashAlg); 62 } 63 64 65 68 public void initialize() { 69 forwarding = false; 70 forwardingDestination = null; 71 aliasing = false; 72 alias = ""; 73 } 74 75 81 public void setForwarding(boolean forward) { 82 forwarding = forward; 83 } 84 85 91 public boolean getForwarding() { 92 return forwarding; 93 } 94 95 96 102 public boolean setForwardingDestination(MailAddress address) { 103 104 forwardingDestination = address; 105 return true; 106 } 107 108 114 public MailAddress getForwardingDestination() { 115 return forwardingDestination; 116 } 117 118 123 public void setAliasing(boolean alias) { 124 aliasing = alias; 125 } 126 127 132 public boolean getAliasing() { 133 return aliasing; 134 } 135 136 141 public boolean setAlias(String address) { 142 143 alias = address; 144 return true; 145 } 146 147 152 public String getAlias() { 153 return alias; 154 } 155 } 156 | Popular Tags |