01: /**
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * 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: */package org.apache.geronimo.security.deploy;
17:
18: import java.io.Serializable;
19: import java.util.HashMap;
20: import java.util.Map;
21:
22: /**
23: * @version $Rev: 545781 $ $Date: 2007-06-09 10:44:02 -0700 (Sat, 09 Jun 2007) $
24: */
25: public class Security implements Serializable {
26:
27: private boolean doAsCurrentCaller;
28: private boolean useContextHandler;
29: private String defaultRole;
30: private SubjectInfo defaultSubjectInfo;
31: private Map<String, Role> roleMappings = new HashMap<String, Role>();
32: private Map<String, SubjectInfo> roleSubjectMappings = new HashMap<String, SubjectInfo>();
33:
34: public Security() {
35: }
36:
37: public boolean isDoAsCurrentCaller() {
38: return doAsCurrentCaller;
39: }
40:
41: public void setDoAsCurrentCaller(boolean doAsCurrentCaller) {
42: this .doAsCurrentCaller = doAsCurrentCaller;
43: }
44:
45: public boolean isUseContextHandler() {
46: return useContextHandler;
47: }
48:
49: public void setUseContextHandler(boolean useContextHandler) {
50: this .useContextHandler = useContextHandler;
51: }
52:
53: public String getDefaultRole() {
54: return defaultRole;
55: }
56:
57: public void setDefaultRole(String defaultRole) {
58: this .defaultRole = defaultRole;
59: }
60:
61: public Map<String, Role> getRoleMappings() {
62: return roleMappings;
63: }
64:
65: public SubjectInfo getDefaultSubjectInfo() {
66: return defaultSubjectInfo;
67: }
68:
69: public void setDefaultSubjectInfo(SubjectInfo defaultSubjectInfo) {
70: this .defaultSubjectInfo = defaultSubjectInfo;
71: }
72:
73: public Map<String, SubjectInfo> getRoleSubjectMappings() {
74: return roleSubjectMappings;
75: }
76: }
|