Package org.apache.wink.common.internal

Examples of org.apache.wink.common.internal.WinkConfiguration


                                                         // class
            event = reader.next();
            if (event == XMLStreamReader.DTD) {

                RuntimeContext runtimeContext = RuntimeContextTLS.getRuntimeContext();
                WinkConfiguration winkConfig = runtimeContext.getAttribute(WinkConfiguration.class);
                if (winkConfig != null) {
                    Properties props = winkConfig.getProperties();
                    if (props != null) {
                        // use valueOf method to require the word "true"
                        supportDTD =
                            Boolean.valueOf(props.getProperty("wink.supportDTDEntityExpansion")); //$NON-NLS-1$
                    }
View Full Code Here


                                  InputStream entityStream) throws IOException,
            WebApplicationException {
            try {
                DocumentBuilder dbuilder = documentBuilderFactory.newDocumentBuilder();
                RuntimeContext runtimeContext = RuntimeContextTLS.getRuntimeContext();
                WinkConfiguration winkConfig = runtimeContext.getAttribute(WinkConfiguration.class);
                if (winkConfig != null) {
                    Properties props = winkConfig.getProperties();
                    if (props != null) {
                        // use valueOf method to require the word "true"
                        if (!Boolean.valueOf(props.getProperty("wink.supportDTDEntityExpansion"))) {
                            setupDocumentBuilderToFilterDTD(dbuilder);
                        }
View Full Code Here

        while (event != XMLStreamReader.START_ELEMENT) {  // all StAX parsers require a START_ELEMENT.  See AbstractJAXBProviderTest class
            event = reader.next();
            if (event == XMLStreamReader.DTD) {

                RuntimeContext runtimeContext = RuntimeContextTLS.getRuntimeContext();
                WinkConfiguration winkConfig = runtimeContext.getAttribute(WinkConfiguration.class);
                if (winkConfig != null) {
                    Properties props = winkConfig.getProperties();
                    if (props != null) {
                        // use valueOf method to require the word "true"
                        supportDTD = Boolean.valueOf(props.getProperty("wink.supportDTDEntityExpansion"));
                    }
                }
View Full Code Here

                                                         // class
            event = reader.next();
            if (event == XMLStreamReader.DTD) {

                RuntimeContext runtimeContext = RuntimeContextTLS.getRuntimeContext();
                WinkConfiguration winkConfig = runtimeContext.getAttribute(WinkConfiguration.class);
                if (winkConfig != null) {
                    Properties props = winkConfig.getProperties();
                    if (props != null) {
                        // use valueOf method to require the word "true"
                        supportDTD =
                            Boolean.valueOf(props.getProperty("wink.supportDTDEntityExpansion")); //$NON-NLS-1$
                    }
View Full Code Here

            return (DOMSource.class == type && super.isReadable(mediaType));
        }
       
        private DocumentBuilder getDocumentBuilder() throws ParserConfigurationException {
            RuntimeContext runtimeContext = RuntimeContextTLS.getRuntimeContext();
            WinkConfiguration winkConfig = runtimeContext.getAttribute(WinkConfiguration.class);
            if (winkConfig != null) {
                Properties props = winkConfig.getProperties();
                if (props != null) {
                    // use valueOf method to require the word "true"
                    if (Boolean.valueOf(props.getProperty("wink.supportDTDEntityExpansion"))) { //$NON-NLS-1$
                        return documentBuilderFactory.newDocumentBuilder();
                    }
View Full Code Here

   
    @Before
    public void setUp() {
        providers = mock(Providers.class);
        final RuntimeContext runtimeContext = mock(RuntimeContext.class);
        final WinkConfiguration winkConfiguration = mock(WinkConfiguration.class);
        checking(new Expectations() {{
            allowing(providers).getContextResolver(JAXBContext.class, MediaType.TEXT_XML_TYPE); will(returnValue(new MyJAXBContextResolver()));
            allowing(providers).getContextResolver(XmlFormattingOptions.class, MediaType.TEXT_XML_TYPE); will(returnValue(null));
            allowing(providers).getContextResolver(JAXBUnmarshalOptions.class, MediaType.TEXT_XML_TYPE); will(returnValue(null));
            allowing(runtimeContext).getAttribute(MediaTypeCharsetAdjuster.class); will(returnValue(null));
View Full Code Here

TOP

Related Classes of org.apache.wink.common.internal.WinkConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.