KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > ejb3 > dd > MethodPermission


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.ejb3.dd;
8
9 import java.util.ArrayList JavaDoc;
10 import java.util.List JavaDoc;
11
12 import org.jboss.logging.Logger;
13
14 /**
15  * Represents an <method-permission> element of the ejb-jar.xml deployment descriptor
16  * for the 1.4 schema
17  *
18  * @version <tt>$Revision: 1.7.2.1 $</tt>
19  * @author <a HREF="mailto:bdecoste@jboss.com">William DeCoste</a>
20  */

21 public class MethodPermission
22 {
23    private static final Logger log = Logger.getLogger(MethodPermission.class);
24    
25    private List JavaDoc roleNames = new ArrayList JavaDoc();
26    private boolean isUnchecked = false;
27    private List JavaDoc<Method> methods = new ArrayList JavaDoc();
28    
29    public boolean isUnchecked()
30    {
31       return isUnchecked;
32    }
33    
34    public void setUnchecked(boolean isUnchecked)
35    {
36       this.isUnchecked = isUnchecked;
37    }
38
39    public List JavaDoc getRoleNames()
40    {
41       return roleNames;
42    }
43
44    public void addRoleName(String JavaDoc roleName)
45    {
46       roleNames.add(roleName);
47    }
48
49    public List JavaDoc<Method> getMethods()
50    {
51       return methods;
52    }
53
54    public void addMethod(Method method)
55    {
56       methods.add(method);
57    }
58
59    public String JavaDoc toString()
60    {
61       StringBuffer JavaDoc sb = new StringBuffer JavaDoc(100);
62       sb.append("[");
63       sb.append("roleNames=").append(roleNames);
64       sb.append("]");
65       return sb.toString();
66    }
67 }
68
Popular Tags