blob: e7a6692dd90dfd116b745789832aeb8a00dfbcd9 [file] [log] [blame]
<?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>SupportingPolicyData.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> &gt; <a href="index.html" class="el_package">org.apache.rampart.policy</a> &gt; <span class="el_source">SupportingPolicyData.java</span></div><h1>SupportingPolicyData.java</h1><pre class="source lang-java linenums">package org.apache.rampart.policy;
import java.util.Iterator;
import org.apache.ws.secpolicy.model.Header;
import org.apache.ws.secpolicy.model.SupportingToken;
<span class="fc" id="L8">public class SupportingPolicyData extends RampartPolicyData {</span>
public void build(SupportingToken token) {
<span class="pc bpc" id="L12" title="3 of 4 branches missed."> if (token.getSignedParts() != null &amp;&amp; !token.getSignedParts().isOptional()) {</span>
<span class="nc" id="L13"> Iterator it = token.getSignedParts().getHeaders().iterator();</span>
<span class="nc" id="L14"> this.setSignBody(token.getSignedParts().isBody());</span>
<span class="nc bnc" id="L15" title="All 2 branches missed."> while (it.hasNext()) {</span>
<span class="nc" id="L16"> Header header = (Header) it.next();</span>
<span class="nc" id="L17"> this.addSignedPart(header.getNamespace(), header.getName());</span>
<span class="nc" id="L18"> }</span>
}
<span class="pc bpc" id="L21" title="3 of 4 branches missed."> if (token.getEncryptedParts() != null &amp;&amp; !token.getEncryptedParts().isOptional()) {</span>
<span class="nc" id="L22"> Iterator it = token.getEncryptedParts().getHeaders().iterator();</span>
<span class="nc" id="L23"> this.setEncryptBody(token.getEncryptedParts().isBody());</span>
<span class="nc bnc" id="L24" title="All 2 branches missed."> while (it.hasNext()) {</span>
<span class="nc" id="L25"> Header header = (Header) it.next();</span>
<span class="nc" id="L26"> this.setEncryptedParts(header.getNamespace(), header.getName(),</span>
&quot;Header&quot;);
<span class="nc" id="L28"> }</span>
}
<span class="pc bpc" id="L31" title="1 of 4 branches missed."> if (token.getSignedElements() != null &amp;&amp; !token.getSignedElements().isOptional()) {</span>
<span class="fc" id="L32"> Iterator it = token.getSignedElements().getXPathExpressions()</span>
.iterator();
<span class="fc bfc" id="L34" title="All 2 branches covered."> while (it.hasNext()) {</span>
<span class="fc" id="L35"> this.setSignedElements((String) it.next());</span>
}
<span class="fc" id="L37"> this.addDeclaredNamespaces(token.getSignedElements()</span>
.getDeclaredNamespaces());
}
<span class="pc bpc" id="L41" title="1 of 4 branches missed."> if (token.getEncryptedElements() != null &amp;&amp; !token.getEncryptedElements().isOptional()) {</span>
<span class="fc" id="L42"> Iterator it = token.getEncryptedElements().getXPathExpressions()</span>
.iterator();
<span class="fc bfc" id="L44" title="All 2 branches covered."> while (it.hasNext()) {</span>
<span class="fc" id="L45"> this.setEncryptedElements((String) it.next());</span>
}
<span class="pc bpc" id="L47" title="1 of 2 branches missed."> if (token.getSignedElements() == null) {</span>
<span class="nc" id="L48"> this.addDeclaredNamespaces(token.getEncryptedElements()</span>
.getDeclaredNamespaces());
}
}
<span class="fc" id="L52"> }</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>