Package org.geoserver.platform.resource

Examples of org.geoserver.platform.resource.Resource.dir()


     * @param location The components of the path that make up the location of the directory to
     *  find or create.
     */
    public File findOrCreateDirectory( File parentFile, String... location ) throws IOException {
        Resource directory = get(Paths.convert(getBaseDirectory(), parentFile, location));
        return directory.dir(); // will create directory as needed
    }
   
    /**
     * Performs a directory lookup, creating the file if it does not exist.
     *
 
View Full Code Here


     *
     * @throws IOException If any i/o errors occur.
     */
    public File findOrCreateDirectory( String location ) throws IOException {
        Resource directory = get( Paths.convert(location) );       
        return directory.dir(); // will create directory as needed
    }
   
    /**
     * Performs a directory lookup, creating the file if it does not exist.
     *
 
View Full Code Here

     *
     * @throws IOException If any i/o errors occur.
     */
    public File findOrCreateDirectory( File parentFile, String location ) throws IOException {
        Resource directory = get( Paths.convert(getBaseDirectory(),parentFile,location) );
        return directory.dir(); // will create directory as needed
    }
   
    /**
     * Creates a new directory specifying components of the location.
     * <p>
 
View Full Code Here

    String footerTemplate;

    public AuditLogger(MonitorConfig config, GeoServerResourceLoader loader) throws IOException {
        this.config = config;
        Resource monitoring = loader.get("monitoring");       
        defaultPath = monitoring.dir().getAbsolutePath();
        templateConfig = new Configuration();
        templateConfig.setTemplateLoader(new AuditTemplateLoader(loader));
    }

    void initDumper() throws IOException {
View Full Code Here

    public void clearCache(FeatureTypeInfo cfg){
        try{
            GeoServerResourceLoader loader = gs.getCatalog().getResourceLoader();
            Resource geosearch = loader.get("geosearch");
            if( geosearch.getType() == Type.DIRECTORY ){
                File directory = geosearch.dir();
                DeleteDbFiles.execute(
                        directory.getCanonicalPath(),
                    "h2cache_" + getDatabaseName(cfg),
                    true
                    );
View Full Code Here

    public DemoRequestsPage() {
        try {
            GeoServerResourceLoader loader = this.getGeoServer().getCatalog().getResourceLoader();
            Resource demo = loader.get("demo");
            demoDir = demo.dir(); // find or create
        } catch (Exception e) {
            throw new WicketRuntimeException("Can't access demo requests directory: "
                    + e.getMessage());
        }
        DemoRequest model = new DemoRequest(demoDir);
View Full Code Here

    protected void onSetUp(SystemTestData testData) throws Exception {
        super.onSetUp(testData);
        testData.addRasterLayer(WATTEMP, "watertemp.zip", null, null, SystemTestData.class, getCatalog());
        GeoServerDataDirectory dataDirectory = getDataDirectory();
        Resource watertemp = dataDirectory.getResourceLoader().get("watertemp");
        File data = watertemp.dir();
        FilenameFilter groundElevationFilter = new FilenameFilter() {
     
      @Override
      public boolean accept(File dir, String name) {
        return name.matches(".*_000_.*tiff") || name.matches("watertemp\\..*");
 
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.