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: */
17: package org.apache.jetspeed.security.impl;
18:
19: import org.apache.jetspeed.security.AuthenticationProviderProxy;
20: import org.apache.jetspeed.security.SecurityProvider;
21: import org.apache.jetspeed.security.spi.GroupSecurityHandler;
22: import org.apache.jetspeed.security.spi.RoleSecurityHandler;
23: import org.apache.jetspeed.security.spi.SecurityMappingHandler;
24:
25: /**
26: * @author <a href="">David Le Strat </a>
27: *
28: */
29: public class SecurityProviderImpl implements SecurityProvider {
30:
31: /** The {@link AuthenticationProviderProxy}. */
32: private AuthenticationProviderProxy atnProviderProxy;
33:
34: /** The {@link RoleSecurityHandler}. */
35: private RoleSecurityHandler roleSecurityHandler;
36:
37: /** The {@link GroupSecurityHandler}. */
38: private GroupSecurityHandler groupSecurityHandler;
39:
40: /** The {@link SecurityMappingHandler}. */
41: private SecurityMappingHandler securityMappingHandler;
42:
43: /**
44: * <p>
45: * Constructor configuring the security services with the correct security
46: * handlers.
47: * </p>
48: *
49: * @param atnProviderProxy The authentication provider.
50: * @param roleSecurityHandler The role security handler.
51: * @param groupSecurityHandler The group security handler.
52: * @param securityMappingHandler The security mapping handler.
53: */
54: public SecurityProviderImpl(
55: AuthenticationProviderProxy atnProviderProxy,
56: RoleSecurityHandler roleSecurityHandler,
57: GroupSecurityHandler groupSecurityHandler,
58: SecurityMappingHandler securityMappingHandler) {
59: // The authentication provider proxy.
60: this .atnProviderProxy = atnProviderProxy;
61: // The role security handler.
62: this .roleSecurityHandler = roleSecurityHandler;
63: // The group security handler.
64: this .groupSecurityHandler = groupSecurityHandler;
65: // The security mapping handler.
66: this .securityMappingHandler = securityMappingHandler;
67: }
68:
69: /**
70: * @see org.apache.jetspeed.security.SecurityProvider#getAuthenticationProviderProxy()
71: */
72: public AuthenticationProviderProxy getAuthenticationProviderProxy() {
73: return this .atnProviderProxy;
74: }
75:
76: /**
77: * @see org.apache.jetspeed.security.SecurityProvider#getRoleSecurityHandler()
78: */
79: public RoleSecurityHandler getRoleSecurityHandler() {
80: return this .roleSecurityHandler;
81: }
82:
83: /**
84: * @see org.apache.jetspeed.security.SecurityProvider#getGroupSecurityHandler()
85: */
86: public GroupSecurityHandler getGroupSecurityHandler() {
87: return this .groupSecurityHandler;
88: }
89:
90: /**
91: * @see org.apache.jetspeed.security.SecurityProvider#getSecurityMappingHandler()
92: */
93: public SecurityMappingHandler getSecurityMappingHandler() {
94: return this.securityMappingHandler;
95: }
96: }
|