/** * Get the System Property * @param key key of the system property * @param defaultValue default value to be returned if the system property is not set * @return */ public static String getSystemProperty(final String key, final String defaultValue){ return SecurityActions.getSystemProperty(key,defaultValue); } }
/** * Get the System Property * @param key key of the system property * @param defaultValue default value to be returned if the system property is not set * @return */ public static String getSystemProperty(final String key, final String defaultValue){ return SecurityActions.getSystemProperty(key,defaultValue); } }
subString = subString.substring(0, index); sysPropertyValue = SecurityActions.getSystemProperty(subString, defaultValue); if (sysPropertyValue.isEmpty()) { throw logger.systemPropertyMissingError(matcher.group(1));
subString = subString.substring(0, index); sysPropertyValue = SecurityActions.getSystemProperty(subString, defaultValue); if (sysPropertyValue.isEmpty()) { throw logger.systemPropertyMissingError(matcher.group(1));
subString = subString.substring(0, index); sysPropertyValue = SecurityActions.getSystemProperty(subString, defaultValue); if (sysPropertyValue.isEmpty()) { throw logger.systemPropertyMissingError(matcher.group(1));
boolean useJDKTransformer = Boolean.parseBoolean(SecurityActions.getSystemProperty(JDK_TRANSFORMER_PROPERTY, "false"));
boolean useJDKTransformer = Boolean.parseBoolean(SecurityActions.getSystemProperty(JDK_TRANSFORMER_PROPERTY, "false"));
/** * Given that the {@code XMLEventReader} is in {@code XMLStreamConstants.START_ELEMENT} mode, we parse into a DOM Element * * @param xmlEventReader * @return * @throws ParsingException */ public static Element getDOMElement(XMLEventReader xmlEventReader) throws ParsingException { Transformer transformer = null; final String JDK_TRANSFORMER_PROPERTY = "picketlink.jdk.transformer"; boolean useJDKTransformer = Boolean.parseBoolean(SecurityActions.getSystemProperty(JDK_TRANSFORMER_PROPERTY, "false")); try { if (useJDKTransformer) { transformer = TransformerUtil.getTransformer(); } else { transformer = TransformerUtil.getStaxSourceToDomResultTransformer(); } Document resultDocument = DocumentUtil.createDocument(); DOMResult domResult = new DOMResult(resultDocument); StAXSource source = new StAXSource(xmlEventReader); TransformerUtil.transform(transformer, source, domResult); Document doc = (Document) domResult.getNode(); return doc.getDocumentElement(); } catch (ConfigurationException e) { throw logger.parserException(e); } catch (XMLStreamException e) { throw logger.parserException(e); } }