01: /*
02: * Copyright (C) 2006 Methodhead Software LLC. All rights reserved.
03: *
04: * This file is part of TransferCM.
05: *
06: * TransferCM is free software; you can redistribute it and/or modify it under the
07: * terms of the GNU General Public License as published by the Free Software
08: * Foundation; either version 2 of the License, or (at your option) any later
09: * version.
10: *
11: * TransferCM is distributed in the hope that it will be useful, but WITHOUT ANY
12: * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13: * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14: * details.
15: *
16: * You should have received a copy of the GNU General Public License along with
17: * TransferCM; if not, write to the Free Software Foundation, Inc., 51 Franklin St,
18: * Fifth Floor, Boston, MA 02110-1301 USA
19: */
20:
21: package com.methodhead.reg;
22:
23: import java.util.List;
24: import com.methodhead.util.OperationContext;
25:
26: public interface RegPolicy {
27:
28: // constants ////////////////////////////////////////////////////////////////
29:
30: // constructors /////////////////////////////////////////////////////////////
31:
32: // methods //////////////////////////////////////////////////////////////////
33:
34: /**
35: * Returns a new {@link User User};
36: */
37: public User newRegUser();
38:
39: /**
40: * Returns a list of <tt>LabelValueBeans</tt> representing the roles
41: * available in the system. The label of each bean may be the name of a
42: * message resource, in which case the label will be updated with that
43: * message.
44: */
45: public List getRoleOptions(OperationContext op);
46:
47: /**
48: * Sends the user their password.
49: */
50: public void sendPassword(User user, String password,
51: OperationContext op);
52:
53: public String isListUsersAuthorized(OperationContext op);
54:
55: public String isDeleteUserAuthorized(OperationContext op);
56:
57: public String isSaveUserAuthorized(OperationContext op);
58:
59: public String isSaveNewUserAuthorized(OperationContext op);
60:
61: public String isEditUserAuthorized(OperationContext op);
62:
63: public String isNewUserAuthorized(OperationContext op);
64:
65: public String isRolesFormAuthorized(OperationContext op);
66:
67: public String isRolesAuthorized(OperationContext op);
68: }
|