01: /****************************************************************
02: * Licensed to the Apache Software Foundation (ASF) under one *
03: * or more contributor license agreements. See the NOTICE file *
04: * distributed with this work for additional information *
05: * regarding copyright ownership. The ASF licenses this file *
06: * to you under the Apache License, Version 2.0 (the *
07: * "License"); you may not use this file except in compliance *
08: * with the License. You may obtain a copy of the License at *
09: * *
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: ****************************************************************/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: 494012 $
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: }
|