/** {@inheritDoc} */ protected void marshallAttributes(XMLObject samlElement, Element domElement) throws MarshallingException { Conditions conditions = (Conditions) samlElement; if (conditions.getNotBefore() != null) { String date = Configuration.getSAMLDateFormatter().print(conditions.getNotBefore()); domElement.setAttributeNS(null, Conditions.NOTBEFORE_ATTRIB_NAME, date); } if (conditions.getNotOnOrAfter() != null) { String date = Configuration.getSAMLDateFormatter().print(conditions.getNotOnOrAfter()); domElement.setAttributeNS(null, Conditions.NOTONORAFTER_ATTRIB_NAME, date); } } }
/** {@inheritDoc} */ protected void marshallAttributes(XMLObject samlObject, Element domElement) throws MarshallingException { Conditions conditions = (Conditions) samlObject; if (conditions.getNotBefore() != null) { String notBeforeStr = Configuration.getSAMLDateFormatter().print(conditions.getNotBefore()); domElement.setAttributeNS(null, Conditions.NOT_BEFORE_ATTRIB_NAME, notBeforeStr); } if (conditions.getNotOnOrAfter() != null) { String notOnOrAfterStr = Configuration.getSAMLDateFormatter().print(conditions.getNotOnOrAfter()); domElement.setAttributeNS(null, Conditions.NOT_ON_OR_AFTER_ATTRIB_NAME, notOnOrAfterStr); } } }
/** {@inheritDoc} */ protected void marshallAttributes(XMLObject samlObject, Element domElement) throws MarshallingException { AuthnStatement authnStatement = (AuthnStatement) samlObject; if (authnStatement.getAuthnInstant() != null) { String authnInstantStr = Configuration.getSAMLDateFormatter().print(authnStatement.getAuthnInstant()); domElement.setAttributeNS(null, AuthnStatement.AUTHN_INSTANT_ATTRIB_NAME, authnInstantStr); } if (authnStatement.getSessionIndex() != null) { domElement.setAttributeNS(null, AuthnStatement.SESSION_INDEX_ATTRIB_NAME, authnStatement.getSessionIndex()); } if (authnStatement.getSessionNotOnOrAfter() != null) { String sessionNotOnOrAfterStr = Configuration.getSAMLDateFormatter().print( authnStatement.getSessionNotOnOrAfter()); domElement.setAttributeNS(null, AuthnStatement.SESSION_NOT_ON_OR_AFTER_ATTRIB_NAME, sessionNotOnOrAfterStr); } } }
/** {@inheritDoc} */ protected void marshallAttributes(XMLObject samlElement, Element domElement) throws MarshallingException { AuthenticationStatement authenticationStatement = (AuthenticationStatement) samlElement; if (authenticationStatement.getAuthenticationMethod() != null) { domElement.setAttributeNS(null, AuthenticationStatement.AUTHENTICATIONMETHOD_ATTRIB_NAME, authenticationStatement.getAuthenticationMethod()); } if (authenticationStatement.getAuthenticationInstant() != null) { String value = Configuration.getSAMLDateFormatter().print( authenticationStatement.getAuthenticationInstant()); domElement.setAttributeNS(null, AuthenticationStatement.AUTHENTICATIONINSTANT_ATTRIB_NAME, value); } } }
/** {@inheritDoc} */ protected void marshallAttributes(XMLObject samlObject, Element domElement) throws MarshallingException { LogoutRequest req = (LogoutRequest) samlObject; if (req.getReason() != null) { domElement.setAttributeNS(null, LogoutRequest.REASON_ATTRIB_NAME, req.getReason()); } if (req.getNotOnOrAfter() != null) { String noaStr = Configuration.getSAMLDateFormatter().print(req.getNotOnOrAfter()); domElement.setAttributeNS(null, LogoutRequest.NOT_ON_OR_AFTER_ATTRIB_NAME, noaStr); } super.marshallAttributes(samlObject, domElement); }
/** {@inheritDoc} */ protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException { Delegate delegate = (Delegate) xmlObject; if (delegate.getDelegationInstant() != null) { String delInstant = Configuration.getSAMLDateFormatter().print(delegate.getDelegationInstant()); domElement.setAttributeNS(null, Delegate.DELEGATION_INSTANT_ATTRIB_NAME, delInstant); } if (!DatatypeHelper.isEmpty(delegate.getConfirmationMethod())) { domElement.setAttributeNS(null, Delegate.CONFIRMATION_METHOD_ATTRIB_NAME, delegate.getConfirmationMethod()); } super.marshallAttributes(xmlObject, domElement); }
/** {@inheritDoc} */ protected void marshallAttributes(XMLObject samlElement, Element domElement) throws MarshallingException { RequestAbstractType request = (RequestAbstractType) samlElement; if (request.getID() != null) { domElement.setAttributeNS(null, RequestAbstractType.ID_ATTRIB_NAME, request.getID()); if (request.getMinorVersion() != 0) { domElement.setIdAttributeNS(null, RequestAbstractType.ID_ATTRIB_NAME, true); } } if (request.getIssueInstant() != null) { String date = Configuration.getSAMLDateFormatter().print(request.getIssueInstant()); domElement.setAttributeNS(null, RequestAbstractType.ISSUEINSTANT_ATTRIB_NAME, date); } if (request.getMinorVersion() != 0) { domElement.setAttributeNS(null, RequestAbstractType.MAJORVERSION_ATTRIB_NAME, "1"); domElement.setAttributeNS(null, RequestAbstractType.MINORVERSION_ATTRIB_NAME, Integer.toString(request .getMinorVersion())); } }
/** {@inheritDoc} */ protected void marshallAttributes(XMLObject samlObject, Element domElement) throws MarshallingException { Assertion assertion = (Assertion) samlObject; if (assertion.getVersion() != null) { domElement.setAttributeNS(null, Assertion.VERSION_ATTRIB_NAME, assertion.getVersion().toString()); } if (assertion.getIssueInstant() != null) { String issueInstantStr = Configuration.getSAMLDateFormatter().print(assertion.getIssueInstant()); domElement.setAttributeNS(null, Assertion.ISSUE_INSTANT_ATTRIB_NAME, issueInstantStr); } if (assertion.getID() != null) { domElement.setAttributeNS(null, Assertion.ID_ATTRIB_NAME, assertion.getID()); domElement.setIdAttributeNS(null, Assertion.ID_ATTRIB_NAME, true); } } }
String validUntilStr = Configuration.getSAMLDateFormatter().print(entitiesDescriptor.getValidUntil()); domElement.setAttributeNS(null, TimeBoundSAMLObject.VALID_UNTIL_ATTRIB_NAME, validUntilStr);
String notBeforeStr = Configuration.getSAMLDateFormatter().print(subjectCD.getNotBefore()); domElement.setAttributeNS(null, SubjectConfirmationData.NOT_BEFORE_ATTRIB_NAME, notBeforeStr); String notOnOrAfterStr = Configuration.getSAMLDateFormatter().print(subjectCD.getNotOnOrAfter()); domElement.setAttributeNS(null, SubjectConfirmationData.NOT_ON_OR_AFTER_ATTRIB_NAME, notOnOrAfterStr);
String validUntilStr = Configuration.getSAMLDateFormatter().print(roleDescriptor.getValidUntil()); domElement.setAttributeNS(null, TimeBoundSAMLObject.VALID_UNTIL_ATTRIB_NAME, validUntilStr);
/** {@inheritDoc} */ protected void marshallAttributes(XMLObject samlElement, Element domElement) throws MarshallingException { ResponseAbstractType response = (ResponseAbstractType) samlElement; if (response.getID() != null) { domElement.setAttributeNS(null, ResponseAbstractType.ID_ATTRIB_NAME, response.getID()); if (response.getMinorVersion() != 0) { domElement.setIdAttributeNS(null, ResponseAbstractType.ID_ATTRIB_NAME, true); } } if (response.getInResponseTo() != null) { domElement.setAttributeNS(null, ResponseAbstractType.INRESPONSETO_ATTRIB_NAME, response.getInResponseTo()); } if (response.getIssueInstant() != null) { String date = Configuration.getSAMLDateFormatter().print(response.getIssueInstant()); domElement.setAttributeNS(null, ResponseAbstractType.ISSUEINSTANT_ATTRIB_NAME, date); } if (response.getMinorVersion() != 0) { String minorVersion = Integer.toString(response.getMinorVersion()); domElement.setAttributeNS(null, ResponseAbstractType.MINORVERSION_ATTRIB_NAME, minorVersion); domElement.setAttributeNS(null, ResponseAbstractType.MAJORVERSION_ATTRIB_NAME, "1"); } if (response.getRecipient() != null) { domElement.setAttributeNS(null, ResponseAbstractType.RECIPIENT_ATTRIB_NAME, response.getRecipient()); } }
String validUntilStr = Configuration.getSAMLDateFormatter().print(entityDescriptor.getValidUntil()); domElement.setAttributeNS(null, TimeBoundSAMLObject.VALID_UNTIL_ATTRIB_NAME, validUntilStr);
String validUntilStr = Configuration.getSAMLDateFormatter().print(descriptor.getValidUntil()); domElement.setAttributeNS(null, TimeBoundSAMLObject.VALID_UNTIL_ATTRIB_NAME, validUntilStr);
String iiStr = Configuration.getSAMLDateFormatter().print(req.getIssueInstant()); domElement.setAttributeNS(null, RequestAbstractType.ISSUE_INSTANT_ATTRIB_NAME, iiStr);
String iiStr = Configuration.getSAMLDateFormatter().print(sr.getIssueInstant()); domElement.setAttributeNS(null, StatusResponseType.ISSUE_INSTANT_ATTRIB_NAME, iiStr);