From 67e1bfb012ff51b514f59953e6d1585255af391f Mon Sep 17 00:00:00 2001 From: prabathabey Date: Mon, 21 Dec 2015 12:23:59 +0530 Subject: [PATCH] Making attribute names schema compliant and code cleanup --- .../framework/config/AuthenticatorConfig.java | 9 +++++---- ...WebappAuthenticatorFrameworkServiceComponent.java | 3 ++- .../resources/conf/webapp-authenticator-config.xml | 12 ++++++------ 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/config/AuthenticatorConfig.java b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/config/AuthenticatorConfig.java index 0fed4f50e2b..a5aab6319f5 100644 --- a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/config/AuthenticatorConfig.java +++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/config/AuthenticatorConfig.java @@ -46,8 +46,8 @@ public class AuthenticatorConfig { this.className = className; } - @XmlElementWrapper(name="Parameters", nillable=true) - @XmlElement(name="Parameter", nillable=false) + @XmlElementWrapper(name = "Parameters", nillable = true) + @XmlElement(name = "Parameter", nillable = false) public List getParams() { return this.params; } @@ -55,12 +55,13 @@ public class AuthenticatorConfig { public void setParams(List params) { this.params = params; } - @XmlRootElement(name="Parameter") + + @XmlRootElement(name = "Parameter") public static class Parameter { private String name; private String value; - @XmlAttribute(name="Name") + @XmlAttribute(name = "Name") public String getName() { return this.name; } diff --git a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/internal/WebappAuthenticatorFrameworkServiceComponent.java b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/internal/WebappAuthenticatorFrameworkServiceComponent.java index 926a6eed51e..c81ae13f4b2 100644 --- a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/internal/WebappAuthenticatorFrameworkServiceComponent.java +++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/internal/WebappAuthenticatorFrameworkServiceComponent.java @@ -78,7 +78,8 @@ public class WebappAuthenticatorFrameworkServiceComponent { WebappAuthenticatorConfig.init(); WebappAuthenticatorRepository repository = new WebappAuthenticatorRepository(); for (AuthenticatorConfig config : WebappAuthenticatorConfig.getInstance().getAuthenticators()) { - WebappAuthenticator authenticator = (WebappAuthenticator)Class.forName(config.getClassName()).newInstance(); + WebappAuthenticator authenticator = + (WebappAuthenticator) Class.forName(config.getClassName()).newInstance(); if ((config.getParams() != null) && (!config.getParams().isEmpty())) { Properties properties = new Properties(); diff --git a/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/src/main/resources/conf/webapp-authenticator-config.xml b/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/src/main/resources/conf/webapp-authenticator-config.xml index 5507b059e14..a9e0c9d8326 100644 --- a/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/src/main/resources/conf/webapp-authenticator-config.xml +++ b/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/src/main/resources/conf/webapp-authenticator-config.xml @@ -4,12 +4,12 @@ OAuth org.wso2.carbon.webapp.authenticator.framework.authenticator.OAuthAuthenticator - true - https://localhost:9443 - admin - admin - 100 - 100 + true + https://localhost:9443 + admin + admin + 100 + 100