blob: f70910360569ac4144fad29319c80562c6a30454 [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>SAMLAttributeCallback.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.rahas.impl.util</a> &gt; <span class="el_source">SAMLAttributeCallback.java</span></div><h1>SAMLAttributeCallback.java</h1><pre class="source lang-java linenums">package org.apache.rahas.impl.util;
import java.util.ArrayList;
import java.util.List;
import org.apache.rahas.RahasData;
import org.opensaml.common.SAMLObject;
@SuppressWarnings({&quot;UnusedDeclaration&quot;})
public class SAMLAttributeCallback implements SAMLCallback{
<span class="fc" id="L13"> private List&lt;SAMLObject&gt; attributes = null;</span>
<span class="fc" id="L14"> private RahasData data = null;</span>
<span class="fc" id="L16"> public SAMLAttributeCallback(RahasData data){</span>
<span class="fc" id="L17"> attributes = new ArrayList&lt;SAMLObject&gt;();</span>
<span class="fc" id="L18"> this.data = data;</span>
<span class="fc" id="L19"> }</span>
public int getCallbackType(){
<span class="fc" id="L22"> return SAMLCallback.ATTR_CALLBACK;</span>
}
/**
* Add SAML1 attribute.
* @param attribute SAML1 attribute
*/
public void addAttributes(org.opensaml.saml1.core.Attribute attribute){
<span class="fc" id="L30"> attributes.add(attribute);</span>
<span class="fc" id="L31"> }</span>
/**
* Overloaded method to support SAML2
* @param attribute SAML2 attribute.
*/
public void addAttributes(org.opensaml.saml2.core.Attribute attribute){
<span class="nc" id="L38"> attributes.add(attribute);</span>
<span class="nc" id="L39"> }</span>
/**
* Get the array of SAML2 attributes.
* @return SAML2 attribute list.
*/
public org.opensaml.saml2.core.Attribute[] getSAML2Attributes(){
<span class="nc" id="L46"> return (org.opensaml.saml2.core.Attribute[])attributes.toArray</span>
(new org.opensaml.saml2.core.Attribute[attributes.size()]);
}
/**
* Get SAML2 attribute
* @return SAML2 attributes.
*/
public org.opensaml.saml1.core.Attribute[] getAttributes(){
<span class="fc" id="L55"> return (org.opensaml.saml1.core.Attribute[])attributes.toArray</span>
(new org.opensaml.saml1.core.Attribute[attributes.size()]);
}
public RahasData getData() {
<span class="nc" id="L61"> return data;</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>