Home » geronimo-2.2-source-release » org.apache.geronimo.tomcat.util » [javadoc | source]

    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;
   20   
   21   import javax.security.auth.Subject;
   22   
   23   import org.apache.geronimo.security.jacc.RunAsSource;
   24   import org.apache.geronimo.security.jaas.ConfigurationFactory;
   25   
   26   public class SecurityHolder implements Serializable
   27   {
   28   
   29       private static final long serialVersionUID = 3761404231197734961L;
   30   
   31       private String policyContextID;
   32       private boolean security;
   33       private transient ConfigurationFactory configurationFactory;
   34       private transient RunAsSource runAsSource;
   35   
   36       public Subject getDefaultSubject()
   37       {
   38           return runAsSource.getDefaultSubject();
   39       }
   40   
   41       public String getPolicyContextID()
   42       {
   43           return policyContextID;
   44       }
   45   
   46       public void setPolicyContextID(String policyContextID)
   47       {
   48           this.policyContextID = policyContextID;
   49       }
   50   
   51       public boolean isSecurity() {
   52           return security;
   53       }
   54   
   55       public void setSecurity(boolean security) {
   56           this.security = security;
   57       }
   58   
   59       public RunAsSource getRunAsSource() {
   60           return runAsSource;
   61       }
   62   
   63       public void setRunAsSource(RunAsSource runAsSource) {
   64           this.runAsSource = runAsSource;
   65       }
   66   
   67       public ConfigurationFactory getConfigurationFactory() {
   68           return configurationFactory;
   69       }
   70   
   71       public void setConfigurationFactory(ConfigurationFactory configurationFactory) {
   72           this.configurationFactory = configurationFactory;
   73       }
   74   }

Home » geronimo-2.2-source-release » org.apache.geronimo.tomcat.util » [javadoc | source]