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.openejb.assembler.classic;
17:
18: import javax.security.jacc.PolicyConfiguration;
19: import javax.security.jacc.PolicyContextException;
20: import java.io.Serializable;
21: import java.security.PermissionCollection;
22: import java.security.Permissions;
23: import java.security.Permission;
24: import java.util.Map;
25: import java.util.HashMap;
26:
27: /**
28: * @version $Rev: 602704 $ $Date: 2007-12-09 09:58:22 -0800 $
29: */
30: public class PolicyContext {
31:
32: private final PermissionCollection excludedPermissions = new Permissions();
33: private final PermissionCollection uncheckedPermissions = new Permissions();
34: private final Map rolePermissions = new HashMap();
35: private final String contextId;
36:
37: public PolicyContext(String contextId) {
38: this .contextId = contextId;
39: }
40:
41: public PermissionCollection getExcludedPermissions() {
42: return excludedPermissions;
43: }
44:
45: public PermissionCollection getUncheckedPermissions() {
46: return uncheckedPermissions;
47: }
48:
49: public Map<String, PermissionCollection> getRolePermissions() {
50: return rolePermissions;
51: }
52:
53: public String getContextID() {
54: return contextId;
55: }
56:
57: }
|