001    /**
002     *  Licensed to the Apache Software Foundation (ASF) under one or more
003     * contributor license agreements.  See the NOTICE file distributed with
004     * this work for additional information regarding copyright ownership.
005     * The ASF licenses this file to You under the Apache License, Version 2.0
006     * (the "License"); you may not use this file except in compliance with
007     * the License.  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    
021    import javax.security.auth.Subject;
022    
023    import org.apache.geronimo.security.jacc.RunAsSource;
024    
025    public class SecurityHolder implements Serializable
026    {
027    
028        private static final long serialVersionUID = 3761404231197734961L;
029    
030        private String policyContextID;
031        private Subject defaultSubject;
032        private String securityRealm;
033        private boolean security;
034        private RunAsSource runAsSource;
035    
036        public String getSecurityRealm() {
037            return securityRealm;
038        }
039    
040        public void setSecurityRealm(String securityRealm) {
041            this.securityRealm = securityRealm;
042        }
043    
044        public Subject getDefaultSubject()
045        {
046            return defaultSubject;
047        }
048    
049        public void setDefaultSubject(Subject defaultSubject)
050        {
051            this.defaultSubject = defaultSubject;
052        }
053    
054        public String getPolicyContextID()
055        {
056            return policyContextID;
057        }
058    
059        public void setPolicyContextID(String policyContextID)
060        {
061            this.policyContextID = policyContextID;
062        }
063    
064        public boolean isSecurity() {
065            return security;
066        }
067    
068        public void setSecurity(boolean security) {
069            this.security = security;
070        }
071    
072        public RunAsSource getRunAsSource() {
073            return runAsSource;
074        }
075    
076        public void setRunAsSource(RunAsSource runAsSource) {
077            this.runAsSource = runAsSource;
078        }
079    
080    }