| <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../.resources/report.css" type="text/css"/><link rel="shortcut icon" href="../.resources/report.gif" type="image/gif"/><title>TokenRequestDispatcherConfig.java</title><link rel="stylesheet" href="../.resources/prettify.css" type="text/css"/><script type="text/javascript" src="../.resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="right"><a href="../.sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Coverage Report</a> > <a href="index.html" class="el_package">org.apache.rahas</a> > <span class="el_source">TokenRequestDispatcherConfig.java</span></div><h1>TokenRequestDispatcherConfig.java</h1><pre class="source lang-java linenums">/* |
| * Copyright 2004,2005 The Apache Software Foundation. |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| package org.apache.rahas; |
| |
| import org.apache.axiom.om.OMElement; |
| import org.apache.axiom.om.impl.builder.StAXOMBuilder; |
| import org.apache.ws.security.util.Loader; |
| |
| import javax.xml.namespace.QName; |
| import java.io.FileInputStream; |
| import java.util.Hashtable; |
| import java.util.Iterator; |
| import java.util.Map; |
| |
| <span class="fc" id="L29">public class TokenRequestDispatcherConfig {</span> |
| |
| public final static String CONFIG_PARAM_KEY = "token-dispatcher-configuration"; |
| public final static String CONFIG_FILE_KEY = "token-dispatcher-configuration-file"; |
| |
| <span class="fc" id="L34"> private final static QName DISPATCHER_CONFIG = new QName("token-dispatcher-configuration");</span> |
| <span class="fc" id="L35"> private final static QName ISSUER = new QName("issuer");</span> |
| <span class="fc" id="L36"> private final static QName CANCELER = new QName("canceler");</span> |
| <span class="fc" id="L37"> private final static QName VALIDATOR = new QName("validator");</span> |
| <span class="fc" id="L38"> private final static QName RENEWER = new QName("renewer");</span> |
| <span class="fc" id="L39"> private final static QName TOKEN_TYPE = new QName("tokenType");</span> |
| <span class="fc" id="L40"> private final static QName CLASS_ATTR = new QName("class");</span> |
| <span class="fc" id="L41"> private final static QName DEFAULT_ATTR = new QName("default");</span> |
| <span class="fc" id="L42"> private final static QName CONFIGURATION_ELEMENT = new QName("configuration");</span> |
| |
| private Map issuers; |
| private Map validators; |
| private Map renewers; |
| <span class="fc" id="L47"> private Map configFiles = new Hashtable();</span> |
| <span class="fc" id="L48"> private Map configElements = new Hashtable();</span> |
| <span class="fc" id="L49"> private Map configParamNames = new Hashtable();</span> |
| |
| private String defaultIssuerClassName; |
| private String defaultCancelerClassName; |
| private String defaultValidatorClassName; |
| private String defaultRenewerClassName; |
| |
| public static TokenRequestDispatcherConfig load(OMElement configElem) throws TrustException { |
| |
| <span class="pc bpc" id="L58" title="1 of 2 branches missed."> if (!DISPATCHER_CONFIG.equals(configElem.getQName())) {</span> |
| <span class="nc" id="L59"> throw new TrustException("incorrectConfiguration");</span> |
| } |
| <span class="fc" id="L61"> TokenRequestDispatcherConfig conf = new TokenRequestDispatcherConfig();</span> |
| |
| // Issuers |
| <span class="fc" id="L64"> handleIssuers(configElem, conf);</span> |
| |
| //Validators |
| <span class="fc" id="L67"> handleValidators(configElem, conf);</span> |
| |
| //Renewers |
| <span class="fc" id="L70"> handleRenewers(configElem, conf);</span> |
| |
| // Cancelers |
| <span class="fc" id="L73"> handleCancelers(configElem, conf);</span> |
| |
| |
| |
| //There must be a defulat issuer |
| <span class="fc bfc" id="L78" title="All 2 branches covered."> if (conf.defaultIssuerClassName == null) {</span> |
| <span class="fc" id="L79"> throw new TrustException("defaultIssuerMissing");</span> |
| } |
| <span class="fc" id="L81"> return conf;</span> |
| } |
| |
| private static void handleCancelers(OMElement configElem, |
| TokenRequestDispatcherConfig conf) throws TrustException { |
| |
| <span class="fc" id="L87"> OMElement cancelerEle = configElem.getFirstChildWithName(CANCELER); // support only one canceler</span> |
| <span class="fc bfc" id="L88" title="All 2 branches covered."> if (cancelerEle != null) {</span> |
| //get the class attr |
| <span class="fc" id="L90"> String cancelerClass = cancelerEle.getAttributeValue(CLASS_ATTR);</span> |
| <span class="pc bpc" id="L91" title="1 of 2 branches missed."> if (cancelerClass == null) {</span> |
| <span class="nc" id="L92"> throw new TrustException("missingClassName");</span> |
| } |
| <span class="fc" id="L94"> conf.defaultCancelerClassName = cancelerClass;</span> |
| <span class="fc" id="L95"> processConfiguration(cancelerEle, conf, cancelerClass);</span> |
| } |
| |
| //TODO: imple |
| <span class="fc" id="L99"> }</span> |
| |
| private static void handleIssuers(OMElement configElem, |
| TokenRequestDispatcherConfig conf) throws TrustException { |
| <span class="fc" id="L103"> for (Iterator issuerElems = configElem.getChildrenWithName(ISSUER);</span> |
| <span class="fc bfc" id="L104" title="All 2 branches covered."> issuerElems.hasNext();) {</span> |
| |
| <span class="fc" id="L106"> OMElement element = (OMElement) issuerElems.next();</span> |
| |
| //get the class attr |
| <span class="fc" id="L109"> String issuerClass = element.getAttributeValue(CLASS_ATTR);</span> |
| <span class="pc bpc" id="L110" title="1 of 2 branches missed."> if (issuerClass == null) {</span> |
| <span class="nc" id="L111"> throw new TrustException("missingClassName");</span> |
| } |
| <span class="fc" id="L113"> String isDefault = element.getAttributeValue(DEFAULT_ATTR);</span> |
| <span class="pc bpc" id="L114" title="1 of 4 branches missed."> if (isDefault != null && "true".equalsIgnoreCase(isDefault)) {</span> |
| //Use the first default issuer as the default isser |
| <span class="pc bpc" id="L116" title="1 of 2 branches missed."> if (conf.defaultIssuerClassName == null) {</span> |
| <span class="fc" id="L117"> conf.defaultIssuerClassName = issuerClass;</span> |
| } else { |
| <span class="nc" id="L119"> throw new TrustException("badDispatcherConfigMultipleDefaultIssuers");</span> |
| } |
| } |
| |
| <span class="fc" id="L123"> processConfiguration(element, conf, issuerClass);</span> |
| |
| //Process token types |
| <span class="fc" id="L126"> for (Iterator tokenTypes = element.getChildrenWithName(TOKEN_TYPE);</span> |
| <span class="fc bfc" id="L127" title="All 2 branches covered."> tokenTypes.hasNext();) {</span> |
| <span class="fc" id="L128"> OMElement type = (OMElement) tokenTypes.next();</span> |
| <span class="fc" id="L129"> String value = type.getText();</span> |
| <span class="pc bpc" id="L130" title="1 of 4 branches missed."> if (value == null || value.trim().length() == 0) {</span> |
| <span class="fc" id="L131"> throw new TrustException("invalidTokenTypeDefinition",</span> |
| new String[]{"Issuer", issuerClass}); |
| } |
| <span class="fc bfc" id="L134" title="All 2 branches covered."> if (conf.issuers == null) {</span> |
| <span class="fc" id="L135"> conf.issuers = new Hashtable();</span> |
| } |
| //If the token type is not already declared then add it to the |
| //table with the issuer classname |
| <span class="pc bpc" id="L139" title="1 of 2 branches missed."> if (!conf.issuers.keySet().contains(value)) {</span> |
| <span class="fc" id="L140"> conf.issuers.put(value, issuerClass);</span> |
| } |
| <span class="fc" id="L142"> }</span> |
| <span class="fc" id="L143"> }</span> |
| <span class="fc" id="L144"> }</span> |
| |
| private static void handleValidators(OMElement configElem, |
| TokenRequestDispatcherConfig conf) throws TrustException { |
| |
| <span class="fc" id="L149"> for (Iterator validatorElems = configElem.getChildrenWithName(VALIDATOR);</span> |
| <span class="fc bfc" id="L150" title="All 2 branches covered."> validatorElems.hasNext();) {</span> |
| |
| <span class="fc" id="L152"> OMElement element = (OMElement) validatorElems.next();</span> |
| |
| //get the class attr |
| <span class="fc" id="L155"> String validatorClass = element.getAttributeValue(CLASS_ATTR);</span> |
| <span class="pc bpc" id="L156" title="1 of 2 branches missed."> if (validatorClass == null) {</span> |
| <span class="nc" id="L157"> throw new TrustException("missingClassName");</span> |
| } |
| <span class="fc" id="L159"> String isDefault = element.getAttributeValue(DEFAULT_ATTR);</span> |
| <span class="pc bpc" id="L160" title="2 of 4 branches missed."> if (isDefault != null && "true".equalsIgnoreCase(isDefault)) {</span> |
| //Use the first default issuer as the default isser |
| <span class="pc bpc" id="L162" title="1 of 2 branches missed."> if (conf.defaultValidatorClassName == null) {</span> |
| <span class="fc" id="L163"> conf.defaultValidatorClassName = validatorClass;</span> |
| } else { |
| <span class="nc" id="L165"> throw new TrustException("badDispatcherConfigMultipleDefaultValidators");</span> |
| } |
| } |
| |
| <span class="fc" id="L169"> processConfiguration(element, conf, validatorClass);</span> |
| |
| //Process token types |
| <span class="fc" id="L172"> for (Iterator tokenTypes = element.getChildrenWithName(TOKEN_TYPE);</span> |
| <span class="fc bfc" id="L173" title="All 2 branches covered."> tokenTypes.hasNext();) {</span> |
| <span class="fc" id="L174"> OMElement type = (OMElement) tokenTypes.next();</span> |
| <span class="fc" id="L175"> String value = type.getText();</span> |
| <span class="pc bpc" id="L176" title="2 of 4 branches missed."> if (value == null || value.trim().length() == 0) {</span> |
| <span class="nc" id="L177"> throw new TrustException("invalidTokenTypeDefinition",</span> |
| new String[]{"Validator", validatorClass}); |
| } |
| <span class="pc bpc" id="L180" title="1 of 2 branches missed."> if (conf.validators == null) {</span> |
| <span class="fc" id="L181"> conf.validators = new Hashtable();</span> |
| } |
| //If the token type is not already declared then add it to the |
| //table with the validator classname |
| <span class="pc bpc" id="L185" title="1 of 2 branches missed."> if (!conf.validators.keySet().contains(value)) {</span> |
| <span class="fc" id="L186"> conf.validators.put(value, validatorClass);</span> |
| } |
| <span class="fc" id="L188"> }</span> |
| <span class="fc" id="L189"> } </span> |
| <span class="fc" id="L190"> }</span> |
| |
| private static void handleRenewers(OMElement configElem, |
| TokenRequestDispatcherConfig conf) throws TrustException { |
| |
| <span class="fc" id="L195"> for (Iterator renewerElems = configElem.getChildrenWithName(RENEWER);</span> |
| <span class="fc bfc" id="L196" title="All 2 branches covered."> renewerElems.hasNext();) {</span> |
| |
| <span class="fc" id="L198"> OMElement element = (OMElement) renewerElems.next();</span> |
| |
| //get the class attr |
| <span class="fc" id="L201"> String renewerClass = element.getAttributeValue(CLASS_ATTR);</span> |
| <span class="pc bpc" id="L202" title="1 of 2 branches missed."> if (renewerClass == null) {</span> |
| <span class="nc" id="L203"> throw new TrustException("missingClassName");</span> |
| } |
| <span class="fc" id="L205"> String isDefault = element.getAttributeValue(DEFAULT_ATTR);</span> |
| <span class="pc bpc" id="L206" title="2 of 4 branches missed."> if (isDefault != null && "true".equalsIgnoreCase(isDefault)) {</span> |
| //Use the first default issuer as the default isser |
| <span class="pc bpc" id="L208" title="1 of 2 branches missed."> if (conf.defaultRenewerClassName == null) {</span> |
| <span class="fc" id="L209"> conf.defaultRenewerClassName = renewerClass;</span> |
| } else { |
| <span class="nc" id="L211"> throw new TrustException("badDispatcherConfigMultipleDefaultRenewers");</span> |
| } |
| } |
| |
| <span class="fc" id="L215"> processConfiguration(element, conf, renewerClass);</span> |
| |
| //Process token types |
| <span class="fc" id="L218"> for (Iterator tokenTypes = element.getChildrenWithName(TOKEN_TYPE);</span> |
| <span class="fc bfc" id="L219" title="All 2 branches covered."> tokenTypes.hasNext();) {</span> |
| <span class="fc" id="L220"> OMElement type = (OMElement) tokenTypes.next();</span> |
| <span class="fc" id="L221"> String value = type.getText();</span> |
| <span class="pc bpc" id="L222" title="2 of 4 branches missed."> if (value == null || value.trim().length() == 0) {</span> |
| <span class="nc" id="L223"> throw new TrustException("invalidTokenTypeDefinition",</span> |
| new String[]{"Renewer", renewerClass}); |
| } |
| <span class="pc bpc" id="L226" title="1 of 2 branches missed."> if (conf.renewers == null) {</span> |
| <span class="fc" id="L227"> conf.renewers = new Hashtable();</span> |
| } |
| //If the token type is not already declared then add it to the |
| //table with the renwer classname |
| <span class="pc bpc" id="L231" title="1 of 2 branches missed."> if (!conf.renewers.keySet().contains(value)) {</span> |
| <span class="fc" id="L232"> conf.renewers.put(value, renewerClass);</span> |
| } |
| <span class="fc" id="L234"> }</span> |
| <span class="fc" id="L235"> } </span> |
| <span class="fc" id="L236"> }</span> |
| |
| private static void processConfiguration(OMElement element, |
| TokenRequestDispatcherConfig conf, |
| String implClass) { |
| |
| <span class="fc" id="L242"> for (Iterator configs = element.getChildrenWithName(CONFIGURATION_ELEMENT);</span> |
| <span class="fc bfc" id="L243" title="All 2 branches covered."> configs.hasNext();) {</span> |
| <span class="fc" id="L244"> OMElement configEle = (OMElement) configs.next();</span> |
| <span class="fc" id="L245"> String configType =</span> |
| configEle.getAttribute(new QName("type")).getAttributeValue().trim(); |
| <span class="pc bpc" id="L247" title="1 of 2 branches missed."> if (configType.equalsIgnoreCase("file")) { //Process configuration file information</span> |
| <span class="nc" id="L248"> String issuerConfigFile = configEle.getText();</span> |
| <span class="nc bnc" id="L249" title="All 2 branches missed."> if (issuerConfigFile != null) {</span> |
| <span class="nc" id="L250"> conf.configFiles.put(implClass, issuerConfigFile);</span> |
| } |
| <span class="pc bpc" id="L252" title="1 of 2 branches missed."> } else if (configType.equalsIgnoreCase("element"))</span> |
| { //Process configuration element information |
| <span class="nc" id="L254"> conf.configElements.put(implClass, configEle);</span> |
| <span class="pc bpc" id="L255" title="1 of 2 branches missed."> } else if (configType.equalsIgnoreCase("parameter"))</span> |
| { //Process configuration parameter name information |
| <span class="fc" id="L257"> conf.configParamNames.put(implClass, configEle.getText());</span> |
| } |
| <span class="fc" id="L259"> }</span> |
| <span class="fc" id="L260"> }</span> |
| |
| public static TokenRequestDispatcherConfig load(String configFilePath) throws TrustException { |
| FileInputStream fis; |
| StAXOMBuilder builder; |
| try { |
| <span class="fc" id="L266"> fis = new FileInputStream(configFilePath);</span> |
| <span class="fc" id="L267"> builder = new StAXOMBuilder(fis);</span> |
| <span class="nc" id="L268"> } catch (Exception e) {</span> |
| <span class="nc" id="L269"> throw new TrustException("errorLoadingConfigFile", new String[]{configFilePath});</span> |
| <span class="fc" id="L270"> }</span> |
| <span class="fc" id="L271"> return load(builder.getDocumentElement());</span> |
| } |
| |
| public TokenIssuer getDefaultIssuerInstace() throws TrustException { |
| <span class="nc bnc" id="L275" title="All 2 branches missed."> if (this.defaultIssuerClassName != null) {</span> |
| try { |
| <span class="nc" id="L277"> return createIssuer(this.defaultIssuerClassName);</span> |
| <span class="nc" id="L278"> } catch (Exception e) {</span> |
| <span class="nc" id="L279"> throw new TrustException("cannotLoadClass",</span> |
| new String[]{this.defaultIssuerClassName}, e); |
| } |
| } else { |
| <span class="nc" id="L283"> return null;</span> |
| } |
| } |
| |
| public TokenCanceler getDefaultCancelerInstance() throws TrustException { |
| <span class="pc bpc" id="L288" title="1 of 2 branches missed."> if (this.defaultCancelerClassName != null) {</span> |
| try { |
| <span class="fc" id="L290"> return createCanceler(this.defaultCancelerClassName);</span> |
| <span class="nc" id="L291"> } catch (Exception e) {</span> |
| <span class="nc" id="L292"> throw new TrustException("cannotLoadClass",</span> |
| new String[]{this.defaultCancelerClassName}, e); |
| } |
| } else { |
| <span class="nc" id="L296"> return null;</span> |
| } |
| } |
| |
| public TokenValidator getDefaultValidatorInstance() throws TrustException { |
| <span class="nc bnc" id="L301" title="All 2 branches missed."> if (this.defaultValidatorClassName != null) {</span> |
| try { |
| <span class="nc" id="L303"> return createValidator(this.defaultValidatorClassName);</span> |
| <span class="nc" id="L304"> } catch (Exception e) {</span> |
| <span class="nc" id="L305"> throw new TrustException("cannotLoadClass",</span> |
| new String[]{this.defaultValidatorClassName}, e); |
| } |
| } else { |
| <span class="nc" id="L309"> return null;</span> |
| } |
| } |
| |
| public TokenRenewer getDefaultRenewerInstance() throws TrustException { |
| <span class="nc bnc" id="L314" title="All 2 branches missed."> if (this.defaultRenewerClassName != null) {</span> |
| try { |
| <span class="nc" id="L316"> return createRenewer(this.defaultRenewerClassName);</span> |
| <span class="nc" id="L317"> } catch (Exception e) {</span> |
| <span class="nc" id="L318"> throw new TrustException("cannotLoadClass",</span> |
| new String[]{this.defaultRenewerClassName}, e); |
| } |
| } else { |
| <span class="nc" id="L322"> return null;</span> |
| } |
| } |
| |
| |
| public String getDefaultIssuerName() { |
| <span class="fc" id="L328"> return this.defaultIssuerClassName;</span> |
| } |
| |
| |
| public TokenIssuer getIssuer(String tokenType) throws TrustException { |
| <span class="fc" id="L333"> String issuerClassName = null;</span> |
| //try to find the issuer class name from the tokenType<->issuer map |
| <span class="pc bpc" id="L335" title="1 of 2 branches missed."> if (this.issuers != null) {</span> |
| <span class="fc" id="L336"> issuerClassName = (String) this.issuers.get(tokenType);</span> |
| } |
| //If a specific issuer is not found use the default issuer |
| <span class="pc bpc" id="L339" title="1 of 2 branches missed."> if (issuerClassName == null) {</span> |
| <span class="nc" id="L340"> issuerClassName = this.defaultIssuerClassName;</span> |
| } |
| try { |
| <span class="fc" id="L343"> return createIssuer(issuerClassName);</span> |
| <span class="nc" id="L344"> } catch (Exception e) {</span> |
| <span class="nc" id="L345"> throw new TrustException("cannotLoadClass",</span> |
| new String[]{issuerClassName}, e); |
| } |
| } |
| |
| public TokenValidator getValidator(String tokenType) throws TrustException { |
| <span class="nc" id="L351"> String validatorClassName = null;</span> |
| //try to find the validator class name from the tokenType<->validator map |
| <span class="nc bnc" id="L353" title="All 2 branches missed."> if (this.validators != null) {</span> |
| <span class="nc" id="L354"> validatorClassName = (String) this.validators.get(tokenType);</span> |
| } |
| //If a specific validator is not found use the default validator |
| <span class="nc bnc" id="L357" title="All 2 branches missed."> if (validatorClassName == null) {</span> |
| <span class="nc" id="L358"> validatorClassName = this.defaultValidatorClassName;</span> |
| } |
| try { |
| <span class="nc" id="L361"> return createValidator(validatorClassName);</span> |
| <span class="nc" id="L362"> } catch (Exception e) {</span> |
| <span class="nc" id="L363"> throw new TrustException("cannotLoadClass",</span> |
| new String[]{validatorClassName}, e); |
| } |
| } |
| |
| public TokenRenewer getRenewer(String tokenType) throws TrustException { |
| <span class="nc" id="L369"> String renewerClassName = null;</span> |
| //try to find the renewer class name from the tokenType<->Renewer map |
| <span class="nc bnc" id="L371" title="All 2 branches missed."> if (this.renewers != null) {</span> |
| <span class="nc" id="L372"> renewerClassName = (String) this.renewers.get(tokenType);</span> |
| } |
| //If a specific renewer is not found use the default renewer |
| <span class="nc bnc" id="L375" title="All 2 branches missed."> if (renewerClassName == null) {</span> |
| <span class="nc" id="L376"> renewerClassName = this.defaultRenewerClassName;</span> |
| } |
| try { |
| <span class="nc" id="L379"> return createRenewer(renewerClassName);</span> |
| <span class="nc" id="L380"> } catch (Exception e) {</span> |
| <span class="nc" id="L381"> throw new TrustException("cannotLoadClass",</span> |
| new String[]{renewerClassName}, e); |
| } |
| } |
| |
| /** |
| * @param issuerClassName |
| * @return TokenIssuer |
| */ |
| private TokenIssuer createIssuer(String issuerClassName) throws Exception { |
| <span class="fc" id="L391"> TokenIssuer issuer = (TokenIssuer) Loader.loadClass(this.getClass().getClassLoader(), </span> |
| issuerClassName).newInstance(); |
| <span class="fc" id="L393"> issuer.setConfigurationElement((OMElement) this.configElements.get(issuerClassName));</span> |
| <span class="fc" id="L394"> issuer.setConfigurationFile((String) this.configFiles.get(issuerClassName));</span> |
| <span class="fc" id="L395"> issuer.setConfigurationParamName((String) this.configParamNames.get(issuerClassName));</span> |
| <span class="fc" id="L396"> return issuer;</span> |
| } |
| |
| private TokenCanceler createCanceler(String cancelerClassName) throws Exception { |
| <span class="fc" id="L400"> TokenCanceler canceler = (TokenCanceler) Loader.loadClass(this.getClass().getClassLoader(),</span> |
| cancelerClassName).newInstance(); |
| <span class="fc" id="L402"> canceler.setConfigurationElement((OMElement) this.configElements.get(cancelerClassName));</span> |
| <span class="fc" id="L403"> canceler.setConfigurationFile((String) this.configFiles.get(cancelerClassName));</span> |
| <span class="fc" id="L404"> canceler.setConfigurationParamName((String) this.configParamNames.get(cancelerClassName));</span> |
| <span class="fc" id="L405"> return canceler;</span> |
| } |
| |
| private TokenValidator createValidator(String validatorClassName) throws Exception { |
| <span class="nc" id="L409"> TokenValidator validator = (TokenValidator) Loader.loadClass(this.getClass().getClassLoader(),</span> |
| validatorClassName).newInstance(); |
| <span class="nc" id="L411"> validator.setConfigurationElement((OMElement) this.configElements.get(validatorClassName));</span> |
| <span class="nc" id="L412"> validator.setConfigurationFile((String) this.configFiles.get(validatorClassName));</span> |
| <span class="nc" id="L413"> validator.setConfigurationParamName((String) this.configParamNames.get(validatorClassName));</span> |
| <span class="nc" id="L414"> return validator;</span> |
| } |
| |
| private TokenRenewer createRenewer (String renewerClassName) throws Exception { |
| <span class="nc" id="L418"> TokenRenewer renewer = (TokenRenewer) Loader.loadClass(this.getClass().getClassLoader(),</span> |
| renewerClassName).newInstance(); |
| <span class="nc" id="L420"> renewer.setConfigurationElement((OMElement) this.configElements.get(renewerClassName));</span> |
| <span class="nc" id="L421"> renewer.setConfigurationFile((String) this.configFiles.get(renewerClassName));</span> |
| <span class="nc" id="L422"> renewer.setConfigurationParamName((String) this.configParamNames.get(renewerClassName));</span> |
| <span class="nc" id="L423"> return renewer;</span> |
| } |
| } |
| </pre><div class="footer"><span class="right">Created with <a href="http://www.eclemma.org/jacoco">JaCoCo</a> 0.6.1.201212231917</span></div></body></html> |