private void createJaccProviderProperty(JaccProvider jp) throws PropertyVetoException { while (!(parser.getEventType() == END_ELEMENT && parser.getLocalName().equals("jacc-provider"))) { String attr = null; String val = null; try { if (parser.next() == START_ELEMENT) { if (parser.getLocalName().equals("property") && jp != null) { Property p = jp.createChild(Property.class); jp.getProperty().add(p); for (int i = 0; i < parser.getAttributeCount(); i++) { attr = parser.getAttributeLocalName(i); val = parser.getAttributeValue(i); if (attr.equals("name")) { p.setName(val); } if (attr.equals("value")) { p.setValue(val); } } } } } catch (TransactionFailure ex) { Logger.getLogger(DefaultConfigUpgrade.class.getName()).log( Level.SEVERE, "Create JaccProvider Property failed. Attr = " + attr + " Val = " + val, ex); } catch (XMLStreamException ex) { Logger.getLogger(DefaultConfigUpgrade.class.getName()).log( Level.SEVERE, "Problem parsing jacc-provider property", ex); } } }
private void createJaccProviderProperty(JaccProvider jp) throws PropertyVetoException { while (!(parser.getEventType() == END_ELEMENT && parser.getLocalName().equals("jacc-provider"))) { String attr = null; String val = null; try { if (parser.next() == START_ELEMENT) { if (parser.getLocalName().equals("property") && jp != null) { Property p = jp.createChild(Property.class); jp.getProperty().add(p); for (int i = 0; i < parser.getAttributeCount(); i++) { attr = parser.getAttributeLocalName(i); val = parser.getAttributeValue(i); if (attr.equals("name")) { p.setName(val); } if (attr.equals("value")) { p.setValue(val); } } } } } catch (TransactionFailure ex) { logger.log( Level.SEVERE, failureCreatingJaccProviderAttr , new Object[]{attr, val, ex}); } catch (XMLStreamException ex) { logger.log( Level.SEVERE, problemParsingJaacProviderAttr, ex); } } }
List<Property> props = jacc.getProperty(); for (Property p: props) { String name = POLICY_PROP_PREFIX + p.getName();
List<Property> props = jacc.getProperty(); for (Property p: props) { String name = POLICY_PROP_PREFIX + p.getName();