01: /**
02: * JOnAS: Java(TM) Open Application Server
03: * Copyright (C) 1999-2004 Bull S.A.
04: * Contact: jonas-team@objectweb.org
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * version 2.1 of the License, or any later version.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: *
16: * You should have received a copy of the GNU Lesser General Public
17: * License along with this library; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19: * USA
20: *
21: * --------------------------------------------------------------------------
22: * $Id: MethodPermissionDesc.java 5450 2004-09-17 09:44:19Z joaninh $
23: * --------------------------------------------------------------------------
24: */package org.objectweb.jonas_ejb.deployment.api;
25:
26: import java.util.List;
27: import org.objectweb.jonas_ejb.deployment.xml.MethodPermission;
28:
29: /**
30: * Defines a MethodPermissionDesc class for the management of
31: * EJBMethodPermissions in JACC
32: * @author Florent Benoit : Initial developer
33: */
34: public class MethodPermissionDesc extends CommonMethodDesc {
35:
36: /**
37: * List of roles if not unchecked
38: */
39: private List roleNameList = null;
40:
41: /**
42: * Unchecked method-permission or not ?
43: */
44: private boolean unchecked = false;
45:
46: /**
47: * Constructor for MethodPermissionDesc
48: * @param methodPermission method-permission which contains xml content
49: */
50: public MethodPermissionDesc(MethodPermission methodPermission) {
51: super (methodPermission.getMethodList());
52: this .unchecked = methodPermission.isUnchecked();
53: this .roleNameList = methodPermission.getRoleNameList();
54: }
55:
56: /**
57: * Gets the role-name
58: * @return the role-name
59: */
60: public List getRoleNameList() {
61: return roleNameList;
62: }
63:
64: /**
65: * Unchecked method permission ?
66: * @return true if the method-permission is unchecked, false otherwise
67: */
68: public boolean isUnchecked() {
69: return unchecked;
70: }
71:
72: }
|