KickJava   Java API By Example, From Geeks To Geeks.

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


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 /**
10  * Represents a <security-identity> element of the ejb-jar.xml deployment descriptor for the
11  * 1.4 schema
12  *
13  * @version <tt>$Revision: 1.5.2.1 $</tt>
14  * @author <a HREF="mailto:bdecoste@jboss.com">William DeCoste</a>
15  */

16 public class SecurityIdentity
17 {
18    private String JavaDoc id;
19
20    private boolean useCallerIdentity = false;
21
22    private String JavaDoc runAs;
23    
24    private String JavaDoc runAsPrincipal;
25
26    public String JavaDoc getId()
27    {
28       return id;
29    }
30
31    public void setId(String JavaDoc id)
32    {
33       this.id = id;
34    }
35
36    public boolean isUseCallerIdentity()
37    {
38       return useCallerIdentity;
39    }
40
41    public void setUseCallerIdentity(boolean useCallerIdentity)
42    {
43       this.useCallerIdentity = useCallerIdentity;
44    }
45
46    public String JavaDoc getRunAs()
47    {
48       return runAs;
49    }
50
51    public void setRunAs(String JavaDoc runAs)
52    {
53       this.runAs = runAs;
54    }
55    
56    public String JavaDoc getRunAsPrincipal()
57    {
58       return runAsPrincipal;
59    }
60
61    public void setRunAsPrincipal(String JavaDoc runAsPrincipal)
62    {
63       this.runAsPrincipal = runAsPrincipal;
64    }
65   
66    public String JavaDoc toString()
67    {
68       StringBuffer JavaDoc sb = new StringBuffer JavaDoc(100);
69       sb.append("[");
70       sb.append("ejbName=").append(id);
71       sb.append("]");
72       return sb.toString();
73    }
74
75 }
76
Popular Tags