Java Code Examples for org.opensaml.xml.util.XMLHelper#marshallAttributeMap()

The following examples show how to use org.opensaml.xml.util.XMLHelper#marshallAttributeMap() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BinarySecretMarshaller.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
    BinarySecret bs = (BinarySecret) xmlObject;
    if (bs.getType() != null) {
        domElement.setAttributeNS(null, BinarySecret.TYPE_ATTRIB_NAME, bs.getType());
    }
    
    XMLHelper.marshallAttributeMap(bs.getUnknownAttributes(), domElement);
}
 
Example 2
Source File: AttributedURIMarshaller.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
    AttributedURI attributedURI = (AttributedURI) xmlObject;
    
    if (!DatatypeHelper.isEmpty(attributedURI.getWSUId())) {
        XMLHelper.marshallAttribute(AttributedURI.WSU_ID_ATTR_NAME, attributedURI.getWSUId(), domElement, true);
    }
    
    XMLHelper.marshallAttributeMap(attributedURI.getUnknownAttributes(), domElement);
    
}
 
Example 3
Source File: EmbeddedMarshaller.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
    Embedded embedded = (Embedded) xmlObject;
    if (!DatatypeHelper.isEmpty(embedded.getValueType())) {
        domElement.setAttributeNS(null, Embedded.VALUE_TYPE_ATTRIB_NAME, embedded.getValueType());
    }
    
    XMLHelper.marshallAttributeMap(embedded.getUnknownAttributes(), domElement);
    
}
 
Example 4
Source File: TimestampMarshaller.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
    Timestamp timestamp = (Timestamp) xmlObject;
    
    if (!DatatypeHelper.isEmpty(timestamp.getWSUId())) {
        XMLHelper.marshallAttribute(Timestamp.WSU_ID_ATTR_NAME, timestamp.getWSUId(), domElement, true);
    }
    
    XMLHelper.marshallAttributeMap(timestamp.getUnknownAttributes(), domElement);
}
 
Example 5
Source File: BinaryExchangeMarshaller.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
    BinaryExchange binaryExchange = (BinaryExchange) xmlObject;
    
    String valueType = DatatypeHelper.safeTrimOrNullString(binaryExchange.getValueType());
    if (valueType != null) {
        domElement.setAttributeNS(null, BinaryExchange.VALUE_TYPE_ATTRIB_NAME, valueType);
    }
    String encodingType = DatatypeHelper.safeTrimOrNullString(binaryExchange.getEncodingType());
    if (encodingType != null) {
        domElement.setAttributeNS(null, BinaryExchange.ENCODING_TYPE_ATTRIB_NAME, encodingType);
    }
    
    XMLHelper.marshallAttributeMap(binaryExchange.getUnknownAttributes(), domElement);
}
 
Example 6
Source File: AttributedDateTimeMarshaller.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
    AttributedDateTime dateTime = (AttributedDateTime) xmlObject;
    
    if (!DatatypeHelper.isEmpty(dateTime.getWSUId())) {
        XMLHelper.marshallAttribute(AttributedDateTime.WSU_ID_ATTR_NAME, dateTime.getWSUId(), domElement, true);
    }
    
    XMLHelper.marshallAttributeMap(dateTime.getUnknownAttributes(), domElement);
    
}
 
Example 7
Source File: UsernameTokenMarshaller.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
    UsernameToken usernameToken = (UsernameToken) xmlObject;
    
    if (!DatatypeHelper.isEmpty(usernameToken.getWSUId())) {
        XMLHelper.marshallAttribute(UsernameToken.WSU_ID_ATTR_NAME, usernameToken.getWSUId(), domElement, true);
    }
    
    XMLHelper.marshallAttributeMap(usernameToken.getUnknownAttributes(), domElement);
    
}
 
Example 8
Source File: SecurityTokenReferenceMarshaller.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
    SecurityTokenReference str = (SecurityTokenReference) xmlObject;
    
    if (!DatatypeHelper.isEmpty(str.getWSUId())) {
        XMLHelper.marshallAttribute(SecurityTokenReference.WSU_ID_ATTR_NAME, str.getWSUId(), domElement, true);
    }
    
    List<String> usages = str.getWSSEUsages();
    if (usages != null && ! usages.isEmpty()) {
        XMLHelper.marshallAttribute(SecurityTokenReference.WSSE_USAGE_ATTR_NAME, usages, domElement, false);
    }
    
    XMLHelper.marshallAttributeMap(str.getUnknownAttributes(), domElement);
}
 
Example 9
Source File: RequestSecurityTokenResponseCollectionMarshaller.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
    RequestSecurityTokenResponseCollection rstrc = (RequestSecurityTokenResponseCollection) xmlObject;
    XMLHelper.marshallAttributeMap(rstrc.getUnknownAttributes(), domElement);
}
 
Example 10
Source File: AttributedURIMarshaller.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
    AttributedURI attributedURI = (AttributedURI) xmlObject;
    XMLHelper.marshallAttributeMap(attributedURI.getUnknownAttributes(), domElement);
}
 
Example 11
Source File: SignChallengeTypeMarshaller.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
    SignChallengeType signChallengeType = (SignChallengeType) xmlObject;
    XMLHelper.marshallAttributeMap(signChallengeType.getUnknownAttributes(), domElement);
}
 
Example 12
Source File: ProblemActionMarshaller.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
    ProblemAction pa = (ProblemAction) xmlObject;
    XMLHelper.marshallAttributeMap(pa.getUnknownAttributes(), domElement);
}
 
Example 13
Source File: AttributedQNameMarshaller.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
    AttributedQName attributedQName = (AttributedQName) xmlObject;
    XMLHelper.marshallAttributeMap(attributedQName.getUnknownAttributes(), domElement);
}
 
Example 14
Source File: ReferenceParametersMarshaller.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
    ReferenceParameters rp = (ReferenceParameters) xmlObject;
    XMLHelper.marshallAttributeMap(rp.getUnknownAttributes(), domElement);
}
 
Example 15
Source File: TransformationParametersMarshaller.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
    TransformationParameters tp = (TransformationParameters) xmlObject;
    XMLHelper.marshallAttributeMap(tp.getUnknownAttributes(), domElement);
}
 
Example 16
Source File: SecurityMarshaller.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
    Security security = (Security) xmlObject;
    XMLHelper.marshallAttributeMap(security.getUnknownAttributes(), domElement);
}
 
Example 17
Source File: EndpointReferenceTypeMarshaller.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
    EndpointReferenceType eprType = (EndpointReferenceType) xmlObject;
    XMLHelper.marshallAttributeMap(eprType.getUnknownAttributes(), domElement);
}
 
Example 18
Source File: AttributedUnsignedLongMarshaller.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
    AttributedUnsignedLong aul = (AttributedUnsignedLong) xmlObject;
    XMLHelper.marshallAttributeMap(aul.getUnknownAttributes(), domElement);
}
 
Example 19
Source File: PolicyAttachmentMarshaller.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
    PolicyAttachment pa = (PolicyAttachment) xmlObject;
    XMLHelper.marshallAttributeMap(pa.getUnknownAttributes(), domElement);
}
 
Example 20
Source File: AppliesToMarshaller.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
    AppliesTo at = (AppliesTo) xmlObject;
    XMLHelper.marshallAttributeMap(at.getUnknownAttributes(), domElement);
}