001 /**
002 *
003 * Copyright 2003-2004 The Apache Software Foundation
004 *
005 * Licensed under the Apache License, Version 2.0 (the "License");
006 * you may not use this file except in compliance with the License.
007 * You may obtain a copy of the License at
008 *
009 * http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 **/
017 package org.apache.geronimo.tomcat.util;
018
019 import java.io.Serializable;
020 import java.security.PermissionCollection;
021 import org.apache.geronimo.security.deploy.DefaultPrincipal;
022
023 public class SecurityHolder implements Serializable
024 {
025
026 private static final long serialVersionUID = 3761404231197734961L;
027
028 private String policyContextID;
029 private DefaultPrincipal defaultPrincipal;
030 private PermissionCollection checked;
031 private PermissionCollection excluded;
032 private String securityRealm;
033 private boolean security;
034
035 public SecurityHolder()
036 {
037 policyContextID = null;
038 defaultPrincipal = null;
039 checked = null;
040 excluded = null;
041 securityRealm = null;
042 security = false;
043 }
044
045 public String getSecurityRealm() {
046 return securityRealm;
047 }
048
049 public void setSecurityRealm(String securityRealm) {
050 this.securityRealm = securityRealm;
051 }
052
053 public PermissionCollection getChecked()
054 {
055 return checked;
056 }
057
058 public void setChecked(PermissionCollection checked)
059 {
060 this.checked = checked;
061 }
062
063 public DefaultPrincipal getDefaultPrincipal()
064 {
065 return defaultPrincipal;
066 }
067
068 public void setDefaultPrincipal(DefaultPrincipal defaultPrincipal)
069 {
070 this.defaultPrincipal = defaultPrincipal;
071 }
072
073 public PermissionCollection getExcluded()
074 {
075 return excluded;
076 }
077
078 public void setExcluded(PermissionCollection excluded)
079 {
080 this.excluded = excluded;
081 }
082
083 public String getPolicyContextID()
084 {
085 return policyContextID;
086 }
087
088 public void setPolicyContextID(String policyContextID)
089 {
090 this.policyContextID = policyContextID;
091 }
092
093 public boolean isSecurity() {
094 return security;
095 }
096
097 public void setSecurity(boolean security) {
098 this.security = security;
099 }
100
101 }