1 /************************************************************************ 2 * Copyright (c) 2000-2006 The Apache Software Foundation. * 3 * All rights reserved. * 4 * ------------------------------------------------------------------- * 5 * Licensed under the Apache License, Version 2.0 (the "License"); you * 6 * may not use this file except in compliance with the License. You * 7 * may obtain a copy of the License at: * 8 * * 9 * http://www.apache.org/licenses/LICENSE-2.0 * 10 * * 11 * Unless required by applicable law or agreed to in writing, software * 12 * distributed under the License is distributed on an "AS IS" BASIS, * 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * 14 * implied. See the License for the specific language governing * 15 * permissions and limitations under the License. * 16 ***********************************************************************/ 17 18 package org.apache.james.services; 19 20 import org.apache.mailet.MailAddress; 21 22 /*** 23 * Interface for objects representing users of an email/ messaging system. 24 * 25 * 26 * @version $Revision: 365582 $ 27 */ 28 29 public interface JamesUser extends User { 30 31 /*** 32 * Change password to pass. Return true if successful. 33 * 34 * @param pass the new password 35 * @return true if successful, false otherwise 36 */ 37 boolean setPassword(String pass); 38 39 /*** 40 * Indicate if mail for this user should be forwarded to some other mail 41 * server. 42 * 43 * @param forward whether email for this user should be forwarded 44 */ 45 void setForwarding(boolean forward); 46 47 /*** 48 * Return true if mail for this user should be forwarded 49 */ 50 boolean getForwarding(); 51 52 /*** 53 * <p>Set destination for forwading mail</p> 54 * <p>TODO: Should we use a MailAddress?</p> 55 * 56 * @param address the forwarding address for this user 57 */ 58 boolean setForwardingDestination(MailAddress address); 59 60 /*** 61 * Return the destination to which email should be forwarded 62 */ 63 MailAddress getForwardingDestination(); 64 65 /*** 66 * Indicate if mail received for this user should be delivered locally to 67 * a different address. 68 */ 69 void setAliasing(boolean alias); 70 71 /*** 72 * Return true if emails should be delivered locally to an alias. 73 */ 74 boolean getAliasing(); 75 76 /*** 77 * Set local address to which email should be delivered. 78 * 79 * @return true if successful 80 */ 81 boolean setAlias(String address); 82 83 /*** 84 * Get local address to which mail should be delivered. 85 */ 86 String getAlias(); 87 88 89 }