Package org.geoserver.config.util

Examples of org.geoserver.config.util.XStreamPersister.load()


                    throws IOException {
                XStreamPersister p = xpf.createXMLPersister();
                p.setCatalog( catalog );
               
                configurePersister(p,this);
                return p.load( in, clazz );
            }
        };
    }
   
    @Override
View Full Code Here


                    throws IOException {
                XStreamPersister p = xpf.createJSONPersister();
                p.setCatalog(catalog);
               
                configurePersister(p,this);
                return p.load( input, clazz );
            }
        };
    }
   
    /**
 
View Full Code Here

                File f= loader.find( "logging.xml" );
                if ( f != null ) {
                    XStreamPersister xp = new XStreamPersisterFactory().createXMLPersister();
                    BufferedInputStream in = new BufferedInputStream( new FileInputStream( f ) );
                    try {
                        LoggingInfo loginfo = xp.load(in,LoggingInfo.class);
                        LoggingUtils.initLogging(loader, loginfo.getLevel(), !loginfo.isStdOutLogging(),
                            loginfo.getLocation());
                    }
                    finally {
                        in.close();
View Full Code Here

                File f= loader.find( "logging.xml" );
                if ( f != null ) {
                    XStreamPersister xp = new XStreamPersisterFactory().createXMLPersister();
                    BufferedInputStream in = new BufferedInputStream( new FileInputStream( f ) );
                    try {
                        LoggingInfo loginfo = xp.load(in,LoggingInfo.class);
                        final String location = getLogFileLocation(loginfo.getLocation());
                        LoggingUtils.initLogging(loader, loginfo.getLevel(), !loginfo.isStdOutLogging(),
                            location);
                    }
                    finally {
View Full Code Here

        File f= loader.find( "logging.xml" );
        if ( f != null ) {
            XStreamPersister xp = new XStreamPersisterFactory().createXMLPersister();
            BufferedInputStream in = new BufferedInputStream( new FileInputStream( f ) );
            try {
                LoggingInfo loginfo = xp.load(in,LoggingInfo.class);
                return loginfo;
            }
            finally {
                in.close();
            }
View Full Code Here

                    throws IOException {
                XStreamPersister p = xpf.createXMLPersister();
                p.setCatalog( catalog );
               
                configurePersister(p,this);
                return p.load( in, clazz );
            }
        };
    }
   
    @Override
View Full Code Here

                    throws IOException {
                XStreamPersister p = xpf.createJSONPersister();
                p.setCatalog(catalog);
               
                configurePersister(p,this);
                return p.load( input, clazz );
            }
        };
    }
   
    /**
 
View Full Code Here

        XStreamPersister xmlPersister = this.persisterFactory.createXMLPersister();
        configureXstream(xmlPersister.getXStream());
        try {
            InputStream in = new FileInputStream(configFile);
            try {
                this.config = xmlPersister.load(in, GWCConfig.class);
            } finally {
                in.close();
            }
            LOGGER.fine("GWC GeoServer specific configuration loaded from " + GWC_CONFIG_FILE);
        } catch (Exception e) {
View Full Code Here

        String encrypted = xpath.evaluate("//entry[@key='passwd']", dom.getDocumentElement());
        assertTrue((prefix+"secret").equals(encrypted));
        XStreamPersister xs = new XStreamPersisterFactory().createXMLPersister();

        FileInputStream fin = new FileInputStream(store);
        DataStoreInfo load = xs.load(fin, DataStoreInfo.class);
        fin.close();

        assertEquals("secret",load.getConnectionParameters().get("passwd"));
       
        // now encrypt
View Full Code Here

       
        xs = new XStreamPersisterFactory().createXMLPersister();

        fin = new FileInputStream(store);

        load = xs.load(fin, DataStoreInfo.class);
        assertEquals("secret",load.getConnectionParameters().get("passwd"));
        fin.close();
    }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.