]> git.argeo.org Git - gpl/argeo-slc.git/blob - legacy/org.argeo.slc.spring/src/org/argeo/slc/core/execution/ExecutionResources.java
Merge remote-tracking branch 'origin/master' into testing
[gpl/argeo-slc.git] / legacy / org.argeo.slc.spring / src / org / argeo / slc / core / execution / ExecutionResources.java
1 package org.argeo.slc.core.execution;
2
3 import java.io.File;
4
5 import org.springframework.core.io.Resource;
6
7 /** Provides write access to resources during execution */
8 public interface ExecutionResources {
9 /** The base directory where this execution can write */
10 public File getWritableBaseDir();
11
12 /** Allocates a local file in the writable area and return it as a resource. */
13 public Resource getWritableResource(String relativePath);
14
15 /**
16 * Allocates a local file in the writable area and return it as a fully
17 * qualified OS path.
18 */
19 public String getWritableOsPath(String relativePath);
20
21 /**
22 * Allocates a local file in the writable area and return it as a
23 * {@link File}.
24 */
25 public File getWritableOsFile(String relativePath);
26
27 /**
28 * Returns the resource as a file path. If the resource is not writable it
29 * is copied as a file in the writable area and the path to this local file
30 * is returned.
31 */
32 public String getAsOsPath(Resource resource, Boolean overwrite);
33 }