/** * Marshall an attribute name and value to a DOM Element. This is particularly useful for attributes whose names * appear in namespace-qualified form. * * @param attributeName the attribute name in QName form * @param attributeValues the attribute values * @param domElement the target element to which to marshall * @param isIDAttribute flag indicating whether the attribute being marshalled should be handled as an ID-typed * attribute */ public static void marshallAttribute(QName attributeName, List<String> attributeValues, Element domElement, boolean isIDAttribute) { marshallAttribute(attributeName, StringSupport.listToStringValue(attributeValues, " "), domElement, isIDAttribute); }
/** * Marshall an attribute name and value to a DOM Element. This is particularly useful for attributes whose names * appear in namespace-qualified form. * * @param attributeName the attribute name in QName form * @param attributeValues the attribute values * @param domElement the target element to which to marshall * @param isIDAttribute flag indicating whether the attribute being marshalled should be handled as an ID-typed * attribute */ public static void marshallAttribute(QName attributeName, List<String> attributeValues, Element domElement, boolean isIDAttribute) { marshallAttribute(attributeName, StringSupport.listToStringValue(attributeValues, " "), domElement, isIDAttribute); }
return StringSupport.listToStringValue(args, "&");
/** * Adds a <code>soap11:encodingStyle</code> attribute to the given SOAP object. * * @param soapObject the SOAP object to add the attribute to * @param encodingStyles the list of encoding styles to add */ public static void addSOAP11EncodingStyles(@Nonnull final XMLObject soapObject, @Nonnull final List<String> encodingStyles) { Constraint.isNotEmpty(encodingStyles, "Encoding styles list cannot be empty"); if (soapObject instanceof EncodingStyleBearing) { ((EncodingStyleBearing) soapObject).setSOAP11EncodingStyles(encodingStyles); } else if (soapObject instanceof AttributeExtensibleXMLObject) { ((AttributeExtensibleXMLObject) soapObject).getUnknownAttributes().put( EncodingStyleBearing.SOAP11_ENCODING_STYLE_ATTR_NAME, StringSupport.listToStringValue(encodingStyles, " ")); } else { throw new IllegalArgumentException( "Specified object was neither EncodingStyleBearing nor AttributeExtensible"); } }
/** * Adds a <code>wsse:Usage</code> attribute to the given SOAP object. * * @param soapObject the SOAP object to add the attribute to * @param usages the list of usages to add */ public static void addWSSEUsages(XMLObject soapObject, List<String> usages) { if (soapObject instanceof UsageBearing) { ((UsageBearing)soapObject).setWSSEUsages(usages); } else if (soapObject instanceof AttributeExtensibleXMLObject) { ((AttributeExtensibleXMLObject)soapObject).getUnknownAttributes() .put(UsageBearing.WSSE_USAGE_ATTR_NAME, StringSupport.listToStringValue(usages, " ")); } else { throw new IllegalArgumentException("Specified object was neither UsageBearing nor AttributeExtensible"); } }
/** {@inheritDoc} */ @Override protected void initMetadataResolver() throws ComponentInitializationException { super.initMetadataResolver(); if (getSupportedContentTypes() == null) { setSupportedContentTypes(Arrays.asList(DEFAULT_CONTENT_TYPES)); } if (! getSupportedContentTypes().isEmpty()) { supportedContentTypesValue = StringSupport.listToStringValue(getSupportedContentTypes(), ", "); supportedMediaTypes = new LazySet<>(); for (String contentType : getSupportedContentTypes()) { supportedMediaTypes.add(MediaType.parse(contentType)); } } else { supportedMediaTypes = Collections.emptySet(); } log.debug("{} Supported content types are: {}", getLogPrefix(), getSupportedContentTypes()); }
pushinfo.add(paramEscaper.escape(entry.getKey()) + "=" + paramEscaper.escape(entry.getValue())); rb.addParameter(DuoAuthAPI.DUO_PUSHINFO, StringSupport.listToStringValue(pushinfo, "&"));