KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > geronimo > tomcat > util > SecurityHolder


1 /**
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  **/

17 package org.apache.geronimo.tomcat.util;
18
19 import java.io.Serializable JavaDoc;
20 import java.security.PermissionCollection JavaDoc;
21 import org.apache.geronimo.security.deploy.DefaultPrincipal;
22
23 public class SecurityHolder implements Serializable JavaDoc
24 {
25
26     private static final long serialVersionUID = 3761404231197734961L;
27
28     private String JavaDoc policyContextID;
29     private DefaultPrincipal defaultPrincipal;
30     private PermissionCollection JavaDoc checked;
31     private PermissionCollection JavaDoc excluded;
32     private String JavaDoc securityRealm;
33     private boolean security;
34
35     public SecurityHolder()
36     {
37         policyContextID = null;
38         defaultPrincipal = null;
39         checked = null;
40         excluded = null;
41         securityRealm = null;
42         security = false;
43     }
44
45     public String JavaDoc getSecurityRealm() {
46         return securityRealm;
47     }
48
49     public void setSecurityRealm(String JavaDoc securityRealm) {
50         this.securityRealm = securityRealm;
51     }
52
53     public PermissionCollection JavaDoc getChecked()
54     {
55         return checked;
56     }
57
58     public void setChecked(PermissionCollection JavaDoc checked)
59     {
60         this.checked = checked;
61     }
62
63     public DefaultPrincipal getDefaultPrincipal()
64     {
65         return defaultPrincipal;
66     }
67
68     public void setDefaultPrincipal(DefaultPrincipal defaultPrincipal)
69     {
70         this.defaultPrincipal = defaultPrincipal;
71     }
72
73     public PermissionCollection JavaDoc getExcluded()
74     {
75         return excluded;
76     }
77
78     public void setExcluded(PermissionCollection JavaDoc excluded)
79     {
80         this.excluded = excluded;
81     }
82
83     public String JavaDoc getPolicyContextID()
84     {
85         return policyContextID;
86     }
87
88     public void setPolicyContextID(String JavaDoc policyContextID)
89     {
90         this.policyContextID = policyContextID;
91     }
92
93     public boolean isSecurity() {
94         return security;
95     }
96
97     public void setSecurity(boolean security) {
98         this.security = security;
99     }
100     
101 }
102
Popular Tags