01: /*
02: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
03: * Distributed under the terms of either:
04: * - the common development and distribution license (CDDL), v1.0; or
05: * - the GNU Lesser General Public License, v2.1 or later
06: * $Id: UnknownRoleErrorException.java 3634 2007-01-08 21:42:24Z gbevin $
07: */
08: package com.uwyn.rife.authentication.credentialsmanagers.exceptions;
09:
10: import com.uwyn.rife.authentication.credentialsmanagers.RoleUserAttributes;
11: import com.uwyn.rife.authentication.exceptions.CredentialsManagerException;
12:
13: public class UnknownRoleErrorException extends
14: CredentialsManagerException {
15: private static final long serialVersionUID = -1534822390523586792L;
16:
17: private String mRole = null;
18: private String mLogin = null;
19: private RoleUserAttributes mAttributes = null;
20:
21: public UnknownRoleErrorException(String role, String login,
22: RoleUserAttributes attributes) {
23: this (role, login, attributes, null);
24: }
25:
26: public UnknownRoleErrorException(String role, String login,
27: RoleUserAttributes attributes, Throwable cause) {
28: super (
29: "The role '"
30: + role
31: + "' couldn't be found while adding the adding user with login '"
32: + login + "' and attributes '" + attributes
33: + "'.", cause);
34: mRole = role;
35: mLogin = login;
36: mAttributes = attributes;
37: }
38:
39: public String getLogin() {
40: return mLogin;
41: }
42:
43: public String getRole() {
44: return mRole;
45: }
46:
47: public RoleUserAttributes getAttributes() {
48: return mAttributes;
49: }
50: }
|