/** * <p> * Creates a {@code NameIDType} instance with the specified values. * </p> * * @param format a {@code String} representing the name format. * @param qualifier a {@code String} representing the name qualifier. * @param value a {@code String} representing the name value. * @return the constructed {@code NameIDType} instance. */ public static NameIDType createNameID(String format, String qualifier, String value) { NameIDType nameID = new NameIDType(); if (format != null) nameID.setFormat(URI.create(format)); nameID.setNameQualifier(qualifier); nameID.setValue(value); return nameID; }
/** * <p> * Creates a {@code NameIDType} instance with the specified values. * </p> * * @param format a {@code String} representing the name format. * @param qualifier a {@code String} representing the name qualifier. * @param value a {@code String} representing the name value. * @return the constructed {@code NameIDType} instance. */ public static NameIDType createNameID(String format, String qualifier, String value) { NameIDType nameID = new NameIDType(); if (format != null) nameID.setFormat(URI.create(format)); nameID.setNameQualifier(qualifier); nameID.setValue(value); return nameID; }
/** * <p> * Creates a {@code NameIDType} instance with the specified values. * </p> * * @param format a {@code String} representing the name format. * @param qualifier a {@code String} representing the name qualifier. * @param value a {@code String} representing the name value. * @return the constructed {@code NameIDType} instance. */ public static NameIDType createNameID(String format, String qualifier, String value) { NameIDType nameID = new NameIDType(); if (format != null) nameID.setFormat(URI.create(format)); nameID.setNameQualifier(qualifier); nameID.setValue(value); return nameID; }
/** * <p> * Creates a {@code NameIDType} instance with the specified values. * </p> * * @param format a {@code String} representing the name format. * @param qualifier a {@code String} representing the name qualifier. * @param value a {@code String} representing the name value. * * @return the constructed {@code NameIDType} instance. */ public static NameIDType createNameID(String format, String qualifier, String value) { NameIDType nameID = new NameIDType(); if (format != null) nameID.setFormat(URI.create(format)); nameID.setNameQualifier(qualifier); nameID.setValue(value); return nameID; }
/** * <p> * Creates a {@code NameIDType} instance with the specified values. * </p> * * @param format a {@code String} representing the name format. * @param qualifier a {@code String} representing the name qualifier. * @param value a {@code String} representing the name value. * * @return the constructed {@code NameIDType} instance. */ public static NameIDType createNameID(String format, String qualifier, String value) { NameIDType nameID = new NameIDType(); if (format != null) nameID.setFormat(URI.create(format)); nameID.setNameQualifier(qualifier); nameID.setValue(value); return nameID; }
/** * Parse a {@code NameIDType} * * @param xmlEventReader * @return * @throws ParsingException */ public static NameIDType parseNameIDType(XMLEventReader xmlEventReader) throws ParsingException { StartElement nameIDElement = StaxParserUtil.getNextStartElement(xmlEventReader); NameIDType nameID = new NameIDType(); Attribute nameQualifier = nameIDElement.getAttributeByName(new QName(JBossSAMLConstants.NAME_QUALIFIER.get())); if (nameQualifier != null) { nameID.setNameQualifier(StaxParserUtil.getAttributeValue(nameQualifier)); } Attribute format = nameIDElement.getAttributeByName(new QName(JBossSAMLConstants.FORMAT.get())); if (format != null) { nameID.setFormat(URI.create(StaxParserUtil.getAttributeValue(format))); } Attribute spProvidedID = nameIDElement.getAttributeByName(new QName(JBossSAMLConstants.SP_PROVIDED_ID.get())); if (spProvidedID != null) { nameID.setSPProvidedID(StaxParserUtil.getAttributeValue(spProvidedID)); } Attribute spNameQualifier = nameIDElement.getAttributeByName(new QName(JBossSAMLConstants.SP_NAME_QUALIFIER.get())); if (spNameQualifier != null) { nameID.setSPNameQualifier(StaxParserUtil.getAttributeValue(spNameQualifier)); } String nameIDValue = StaxParserUtil.getElementText(xmlEventReader); nameID.setValue(nameIDValue); return nameID; }
nameID.setNameQualifier(StaxParserUtil.getAttributeValue(nameQualifier));
nameID.setNameQualifier(StaxParserUtil.getAttributeValue(nameQualifier));
if (nameQualifier != null) nameID.setNameQualifier(StaxParserUtil.getAttributeValue(nameQualifier));
if (nameQualifier != null) nameID.setNameQualifier(StaxParserUtil.getAttributeValue(nameQualifier));