integration-impl/src/main/java/se/idsec/signservice/integration/dss/DssUtils.java
public static Attribute toOpenSAMLAttribute(@Nonnull final SignerIdentityAttributeValue attributeValue)
      throws SignServiceProtocolException {
    try {
      AttributeBuilder builder = new AttributeBuilder(attributeValue.getName());
      if (StringUtils.isBlank(attributeValue.getNameFormat())) {
        builder.nameFormat(AttributeBuilder.DEFAULT_NAME_FORMAT);
      }
      String type = attributeValue.getAttributeValueType();
      if (StringUtils.isBlank(type)) {
        type = SignerIdentityAttributeValue.DEFAULT_ATTRIBUTE_VALUE_TYPE;
      }
      builder.value(getValueObject(type, attributeValue.getValue()));

      return builder.build();
    }
    catch (Exception e) {
      throw new SignServiceProtocolException("Failed to process attribute - " + e.getMessage(), e);
    }
  }
/**
   * Given a {@link SignerIdentityAttributeValue} object an OpenSAML attribute is created.
   * 
   * @param attributeValue
   *          the attribute value received in the input
   * @return an OpenSAML attribute
   * @throws SignServiceProtocolException
   *           for encoding errors
   */
Given a  SignerIdentityAttributeValue object an OpenSAML attribute is created.

@param attributeValue
the attribute value received in the input
@return an OpenSAML attribute
@throws SignServiceProtocolException
for encoding errors
Given a SignerIdentityAttributeValue object an OpenSAML attribute is created . @param attributeValue the attribute value received in the input @return an OpenSAML attribute @throws SignServiceProtocolException for encoding errors
public static Attribute toOpenSAMLAttribute(@Nonnull final SignerIdentityAttributeValue attributeValue)
      throws SignServiceProtocolException {
    try {
      AttributeBuilder builder = new AttributeBuilder(attributeValue.getName());
      if (StringUtils.isBlank(attributeValue.getNameFormat())) {
        builder.nameFormat(AttributeBuilder.DEFAULT_NAME_FORMAT);
      }
      String type = attributeValue.getAttributeValueType();
      if (StringUtils.isBlank(type)) {
        type = SignerIdentityAttributeValue.DEFAULT_ATTRIBUTE_VALUE_TYPE;
      }
      builder.value(getValueObject(type, attributeValue.getValue()));
      return builder.build();
    }
    catch (Exception e) {
      throw new SignServiceProtocolException("Failed to process attribute - " + e.getMessage(), e);
    }
  }
public static Attribute toOpenSAMLAttribute ( @ Nonnull final SignerIdentityAttributeValue attributeValue ) throws SignServiceProtocolException { try { AttributeBuilder builder = new AttributeBuilder ( attributeValue . getName ( ) ) ; if ( StringUtils . isBlank ( attributeValue . getNameFormat ( ) ) ) { builder . nameFormat ( AttributeBuilder . DEFAULT_NAME_FORMAT ) ; } String type = attributeValue . getAttributeValueType ( ) ; if ( StringUtils . isBlank ( type ) ) { type = SignerIdentityAttributeValue . DEFAULT_ATTRIBUTE_VALUE_TYPE ; } builder . value ( getValueObject ( type , attributeValue . getValue ( ) ) ) ; return builder . build ( ) ; } catch ( Exception e ) { throw new SignServiceProtocolException ( "Failed to process attribute - " + e . getMessage ( ) , e ) ; } }
Given a {@link SignerIdentityAttributeValue} object an OpenSAML attribute is created.
Given a { @link SignerIdentityAttributeValue } object an OpenSAML attribute is created .