public void write(SAML11AuthorizationDecisionStatementType xacmlStat) throws ProcessingException { StaxUtil.writeStartElement(writer, ASSERTION_PREFIX, SAML11Constants.AUTHORIZATION_DECISION_STATEMENT, ns); String resource = xacmlStat.getResource().toString(); StaxUtil.writeAttribute(writer, SAML11Constants.RESOURCE, resource); StaxUtil.writeAttribute(writer, SAML11Constants.DECISION, xacmlStat.getDecision().name()); SAML11SubjectType subject = xacmlStat.getSubject(); if (subject != null) write(subject); List<SAML11ActionType> actions = xacmlStat.getActions(); for (SAML11ActionType action : actions) { write(action); } StaxUtil.writeEndElement(writer); StaxUtil.flush(writer); }
String resValue = StaxParserUtil.getAttributeValue(resource); authzDecision = new SAML11AuthorizationDecisionStatementType(URI.create(resValue), SAML11DecisionType.valueOf(decisionValue)); authzDecision.addAction(samlAction); authzDecision.setSubject((SAML11SubjectType) parser.parse(xmlEventReader));
String resValue = StaxParserUtil.getAttributeValue(resource); authzDecision = new SAML11AuthorizationDecisionStatementType(URI.create(resValue), SAML11DecisionType.valueOf(decisionValue)); authzDecision.addAction(samlAction); authzDecision.setSubject((SAML11SubjectType) parser.parse(xmlEventReader));
public void write(SAML11AuthorizationDecisionStatementType xacmlStat) throws ProcessingException { StaxUtil.writeStartElement(writer, ASSERTION_PREFIX, SAML11Constants.AUTHORIZATION_DECISION_STATEMENT, ns); String resource = xacmlStat.getResource().toString(); StaxUtil.writeAttribute(writer, SAML11Constants.RESOURCE, resource); StaxUtil.writeAttribute(writer, SAML11Constants.DECISION, xacmlStat.getDecision().name()); SAML11SubjectType subject = xacmlStat.getSubject(); if (subject != null) write(subject); List<SAML11ActionType> actions = xacmlStat.getActions(); for (SAML11ActionType action : actions) { write(action); } StaxUtil.writeEndElement(writer); StaxUtil.flush(writer); }
String resValue = StaxParserUtil.getAttributeValue(resource); authzDecision = new SAML11AuthorizationDecisionStatementType(URI.create(resValue), SAML11DecisionType.valueOf(decisionValue)); authzDecision.addAction(samlAction); } else if (JBossSAMLConstants.SUBJECT.get().equals(tag)) { SAML11SubjectParser parser = new SAML11SubjectParser(); authzDecision.setSubject((SAML11SubjectType) parser.parse(xmlEventReader)); } else throw logger.parserUnknownTag(tag, startElement.getLocation());
public void write(SAML11AuthorizationDecisionStatementType xacmlStat) throws ProcessingException { StaxUtil.writeStartElement(writer, ASSERTION_PREFIX, SAML11Constants.AUTHORIZATION_DECISION_STATEMENT, ns); String resource = xacmlStat.getResource().toString(); StaxUtil.writeAttribute(writer, SAML11Constants.RESOURCE, resource); StaxUtil.writeAttribute(writer, SAML11Constants.DECISION, xacmlStat.getDecision().name()); SAML11SubjectType subject = xacmlStat.getSubject(); if (subject != null) write(subject); List<SAML11ActionType> actions = xacmlStat.getActions(); for (SAML11ActionType action : actions) { write(action); } StaxUtil.writeEndElement(writer); StaxUtil.flush(writer); }
String resValue = StaxParserUtil.getAttributeValue(resource); authzDecision = new SAML11AuthorizationDecisionStatementType(URI.create(resValue), SAML11DecisionType.valueOf(decisionValue)); authzDecision.addAction(samlAction); } else if (JBossSAMLConstants.SUBJECT.get().equals(tag)) { SAML11SubjectParser parser = new SAML11SubjectParser(); authzDecision.setSubject((SAML11SubjectType) parser.parse(xmlEventReader)); } else throw logger.parserUnknownTag(tag, startElement.getLocation());
public void write(SAML11AuthorizationDecisionStatementType xacmlStat) throws ProcessingException { StaxUtil.writeStartElement(writer, ASSERTION_PREFIX, SAML11Constants.AUTHORIZATION_DECISION_STATEMENT, ns); String resource = xacmlStat.getResource().toString(); StaxUtil.writeAttribute(writer, SAML11Constants.RESOURCE, resource); StaxUtil.writeAttribute(writer, SAML11Constants.DECISION, xacmlStat.getDecision().name()); SAML11SubjectType subject = xacmlStat.getSubject(); if (subject != null) write(subject); List<SAML11ActionType> actions = xacmlStat.getActions(); for (SAML11ActionType action : actions) { write(action); } StaxUtil.writeEndElement(writer); StaxUtil.flush(writer); }
String resValue = StaxParserUtil.getAttributeValue(resource); authzDecision = new SAML11AuthorizationDecisionStatementType(URI.create(resValue), SAML11DecisionType.valueOf(decisionValue)); authzDecision.addAction(samlAction); } else if (JBossSAMLConstants.SUBJECT.get().equals(tag)) { SAML11SubjectParser parser = new SAML11SubjectParser(); authzDecision.setSubject((SAML11SubjectType) parser.parse(xmlEventReader)); } else throw logger.parserUnknownTag(tag, startElement.getLocation());
public void write(SAML11AuthorizationDecisionStatementType xacmlStat) throws ProcessingException { StaxUtil.writeStartElement(writer, ASSERTION_PREFIX, SAML11Constants.AUTHORIZATION_DECISION_STATEMENT, ns); String resource = xacmlStat.getResource().toString(); StaxUtil.writeAttribute(writer, SAML11Constants.RESOURCE, resource); StaxUtil.writeAttribute(writer, SAML11Constants.DECISION, xacmlStat.getDecision().name()); SAML11SubjectType subject = xacmlStat.getSubject(); if (subject != null) write(subject); List<SAML11ActionType> actions = xacmlStat.getActions(); for (SAML11ActionType action : actions) { write(action); } StaxUtil.writeEndElement(writer); StaxUtil.flush(writer); }