/** {@inheritDoc} */ protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject) throws UnmarshallingException { AttributeStatement attributeStatement = (AttributeStatement) parentSAMLObject; if (childSAMLObject instanceof Attribute) { attributeStatement.getAttributes().add((Attribute) childSAMLObject); } else { super.processChildElement(parentSAMLObject, childSAMLObject); } } }
/** {@inheritDoc} */ public AttributeStatement buildAttributeStatement(AttributeQuery query, Collection<BaseAttribute> attributes) throws AttributeEncodingException { Collection<Attribute> encodedAttributes = encodeAttributes(query, attributes); if (encodedAttributes != null && !encodedAttributes.isEmpty()) { AttributeStatement statement = statementBuilder.buildObject(); statement.getAttributes().addAll(encodedAttributes); return statement; } else { log.debug("No attributes were encoded, no attribute statement created."); return null; } }
/** {@inheritDoc} */ public void validate(AttributeStatement attributeStatement) throws ValidationException { super.validate(attributeStatement); if (attributeStatement.getAttributes().size() == 0) { throw new ValidationException("No Attribute Element present"); } } }
Iterator<Attribute> attrs = statement.getAttributes().iterator();
attributeStatement.getAttributes().addAll(attributeList);
attribute.getAttributeValues().add(newAttributeValue(e.getValue(), attrStatement)); attrStatement.getAttributes().add(attribute); attribute.setAttributeNamespace(NAMESPACE); attribute.getAttributeValues().add(newAttributeValue(REMEMBER_ME_ATTRIBUTE_VALUE, attrStatement)); attrStatement.getAttributes().add(attribute);
attributeValues ); attributeStatement.getAttributes().add(samlAttribute);
attribute.getAttributeValues().add(stringValue); attributeStmt.getAttributes().add(attribute);
attribute.getAttributeValues().add(stringValue); attributeStmt.getAttributes().add(attribute);
attributeValues ); attributeStatement.getAttributes().add(samlAttribute);