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