blob: 62d068668f480f212a7f013127e1e8a3d34c7a9c [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="info"><a href="../.sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Coverage Report</a> &gt; <a href="index.source.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">/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* &quot;License&quot;); 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
* &quot;AS IS&quot; 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.rampart.policy;
import java.util.Iterator;
import org.apache.ws.secpolicy.model.Header;
import org.apache.ws.secpolicy.model.SupportingToken;
<span class="fc" id="L27">public class SupportingPolicyData extends RampartPolicyData {</span>
public void build(SupportingToken token) {
<span class="pc bpc" id="L31" title="3 of 4 branches missed."> if (token.getSignedParts() != null &amp;&amp; !token.getSignedParts().isOptional()) {</span>
<span class="nc" id="L32"> Iterator&lt;Header&gt; it = token.getSignedParts().getHeaders().iterator();</span>
<span class="nc" id="L33"> this.setSignBody(token.getSignedParts().isBody());</span>
<span class="nc bnc" id="L34" title="All 2 branches missed."> while (it.hasNext()) {</span>
<span class="nc" id="L35"> Header header = it.next();</span>
<span class="nc" id="L36"> this.addSignedPart(header.getNamespace(), header.getName());</span>
<span class="nc" id="L37"> }</span>
}
<span class="pc bpc" id="L40" title="3 of 4 branches missed."> if (token.getEncryptedParts() != null &amp;&amp; !token.getEncryptedParts().isOptional()) {</span>
<span class="nc" id="L41"> Iterator&lt;Header&gt; it = token.getEncryptedParts().getHeaders().iterator();</span>
<span class="nc" id="L42"> this.setEncryptBody(token.getEncryptedParts().isBody());</span>
<span class="nc bnc" id="L43" title="All 2 branches missed."> while (it.hasNext()) {</span>
<span class="nc" id="L44"> Header header = it.next();</span>
<span class="nc" id="L45"> this.setEncryptedParts(header.getNamespace(), header.getName(),</span>
&quot;Header&quot;);
<span class="nc" id="L47"> }</span>
}
<span class="pc bpc" id="L50" title="1 of 4 branches missed."> if (token.getSignedElements() != null &amp;&amp; !token.getSignedElements().isOptional()) {</span>
<span class="fc" id="L51"> Iterator&lt;String&gt; it = token.getSignedElements().getXPathExpressions()</span>
.iterator();
<span class="fc bfc" id="L53" title="All 2 branches covered."> while (it.hasNext()) {</span>
<span class="fc" id="L54"> this.setSignedElements(it.next());</span>
}
<span class="fc" id="L56"> this.addDeclaredNamespaces(token.getSignedElements()</span>
.getDeclaredNamespaces());
}
<span class="pc bpc" id="L60" title="1 of 4 branches missed."> if (token.getEncryptedElements() != null &amp;&amp; !token.getEncryptedElements().isOptional()) {</span>
<span class="fc" id="L61"> Iterator&lt;String&gt; it = token.getEncryptedElements().getXPathExpressions()</span>
.iterator();
<span class="fc bfc" id="L63" title="All 2 branches covered."> while (it.hasNext()) {</span>
<span class="fc" id="L64"> this.setEncryptedElements(it.next());</span>
}
<span class="pc bpc" id="L66" title="1 of 2 branches missed."> if (token.getSignedElements() == null) {</span>
<span class="nc" id="L67"> this.addDeclaredNamespaces(token.getEncryptedElements()</span>
.getDeclaredNamespaces());
}
}
<span class="fc" id="L71"> }</span>
}
</pre><div class="footer"><span class="right">Created with <a href="http://www.eclemma.org/jacoco">JaCoCo</a> 0.7.5.201505241946</span></div></body></html>