Add explicit PreviousSession support
[java-idp.git] / src / edu / internet2 / middleware / shibboleth / idp / config / profile / ProfileHandlerNamespaceHandler.java
1 /*
2  * Copyright [2007] [University Corporation for Advanced Internet Development, Inc.]
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 package edu.internet2.middleware.shibboleth.idp.config.profile;
18
19 import javax.xml.namespace.QName;
20
21 import edu.internet2.middleware.shibboleth.common.config.BaseSpringNamespaceHandler;
22 import edu.internet2.middleware.shibboleth.common.config.profile.JSPErrorHandlerBeanDefinitionParser;
23 import edu.internet2.middleware.shibboleth.common.config.profile.VelocityErrorHandlerBeanDefinitionParser;
24 import edu.internet2.middleware.shibboleth.idp.config.profile.authn.PreviousSessionLoginHandlerBeanDefinitionParser;
25 import edu.internet2.middleware.shibboleth.idp.config.profile.authn.RemoteUserLoginHandlerBeanDefinitionParser;
26 import edu.internet2.middleware.shibboleth.idp.config.profile.authn.UsernamePasswordLoginHandlerBeanDefinitionParser;
27 import edu.internet2.middleware.shibboleth.idp.config.profile.saml1.SAML1ArtifactResolutionProfileHanderBeanDefinitionParser;
28 import edu.internet2.middleware.shibboleth.idp.config.profile.saml1.SAML1AttributeQueryProfileHandlerBeanDefinitionParser;
29 import edu.internet2.middleware.shibboleth.idp.config.profile.saml1.ShibbolethSSOProfileHandlerBeanDefinitionParser;
30 import edu.internet2.middleware.shibboleth.idp.config.profile.saml2.SAML2ArtifactResolutionProfileHandlerBeanDefinitionParser;
31 import edu.internet2.middleware.shibboleth.idp.config.profile.saml2.SAML2AttributeQueryProfileHandlerBeanDefinitionParser;
32 import edu.internet2.middleware.shibboleth.idp.config.profile.saml2.SAML2SSOProfileHandlerBeanDefinitionParser;
33
34 /**
35  * Spring namespace handler for profile handler configurations.
36  */
37 public class ProfileHandlerNamespaceHandler extends BaseSpringNamespaceHandler {
38
39     /** Namespace URI. */
40     public static final String NAMESPACE = "urn:mace:shibboleth:2.0:idp:profile-handler";
41
42     /** {@inheritDoc} */
43     public void init() {
44         registerBeanDefinitionParser(IdPProfileHandlerManagerBeanDefinitionParser.SCHEMA_TYPE,
45                 new IdPProfileHandlerManagerBeanDefinitionParser());
46
47         registerBeanDefinitionParser(ProfileHandlerGroupBeanDefinitionParser.SCHEMA_TYPE,
48                 new ProfileHandlerGroupBeanDefinitionParser());
49
50         registerBeanDefinitionParser(StatusHandlerBeanDefinitionParser.SCHEMA_TYPE,
51                 new StatusHandlerBeanDefinitionParser());
52
53         registerBeanDefinitionParser(new QName(NAMESPACE, JSPErrorHandlerBeanDefinitionParser.ELEMENT_NAME),
54                 new JSPErrorHandlerBeanDefinitionParser());
55
56         registerBeanDefinitionParser(new QName(NAMESPACE, VelocityErrorHandlerBeanDefinitionParser.ELEMENT_NAME),
57                 new VelocityErrorHandlerBeanDefinitionParser());
58
59         registerBeanDefinitionParser(ShibbolethSSOProfileHandlerBeanDefinitionParser.SCHEMA_TYPE,
60                 new ShibbolethSSOProfileHandlerBeanDefinitionParser());
61
62         registerBeanDefinitionParser(SAML1AttributeQueryProfileHandlerBeanDefinitionParser.SCHEMA_TYPE,
63                 new SAML1AttributeQueryProfileHandlerBeanDefinitionParser());
64
65         registerBeanDefinitionParser(SAML1ArtifactResolutionProfileHanderBeanDefinitionParser.SCHEMA_TYPE,
66                 new SAML1ArtifactResolutionProfileHanderBeanDefinitionParser());
67
68         registerBeanDefinitionParser(SAML2SSOProfileHandlerBeanDefinitionParser.SCHEMA_TYPE,
69                 new SAML2SSOProfileHandlerBeanDefinitionParser());
70
71         registerBeanDefinitionParser(SAML2AttributeQueryProfileHandlerBeanDefinitionParser.SCHEMA_TYPE,
72                 new SAML2AttributeQueryProfileHandlerBeanDefinitionParser());
73
74         registerBeanDefinitionParser(SAML2ArtifactResolutionProfileHandlerBeanDefinitionParser.SCHEMA_TYPE,
75                 new SAML2ArtifactResolutionProfileHandlerBeanDefinitionParser());
76
77         registerBeanDefinitionParser(PreviousSessionLoginHandlerBeanDefinitionParser.SCHEMA_TYPE,
78                 new PreviousSessionLoginHandlerBeanDefinitionParser());
79
80         registerBeanDefinitionParser(RemoteUserLoginHandlerBeanDefinitionParser.SCHEMA_TYPE,
81                 new RemoteUserLoginHandlerBeanDefinitionParser());
82
83         registerBeanDefinitionParser(UsernamePasswordLoginHandlerBeanDefinitionParser.SCHEMA_TYPE,
84                 new UsernamePasswordLoginHandlerBeanDefinitionParser());
85     }
86 }