Support creation of cache directories, so the rdf importer can store its lucene indexes.
git-svn-id: http://google-refine.googlecode.com/svn/trunk@1090 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
89d3a2a165
commit
513283d4d1
@ -29,6 +29,7 @@ public class GridworksServlet extends Butterfly {
|
|||||||
private static final String JAVAX_SERVLET_CONTEXT_TEMPDIR = "javax.servlet.context.tempdir";
|
private static final String JAVAX_SERVLET_CONTEXT_TEMPDIR = "javax.servlet.context.tempdir";
|
||||||
|
|
||||||
static private GridworksServlet s_singleton;
|
static private GridworksServlet s_singleton;
|
||||||
|
static private File s_dataDir;
|
||||||
|
|
||||||
static final private Map<String, Command> commands = new HashMap<String, Command>();
|
static final private Map<String, Command> commands = new HashMap<String, Command>();
|
||||||
|
|
||||||
@ -153,7 +154,8 @@ public class GridworksServlet extends Butterfly {
|
|||||||
|
|
||||||
registerCommands(commandNames);
|
registerCommands(commandNames);
|
||||||
|
|
||||||
FileProjectManager.initialize(new File(data));
|
s_dataDir = new File(data);
|
||||||
|
FileProjectManager.initialize(s_dataDir);
|
||||||
|
|
||||||
if (_timer == null) {
|
if (_timer == null) {
|
||||||
_timer = new Timer("autosave");
|
_timer = new Timer("autosave");
|
||||||
@ -233,6 +235,13 @@ public class GridworksServlet extends Butterfly {
|
|||||||
public File getTempFile(String name) {
|
public File getTempFile(String name) {
|
||||||
return new File(getTempDir(), name);
|
return new File(getTempDir(), name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public File getCacheDir(String name) {
|
||||||
|
File dir = new File(new File(s_dataDir, "cache"), name);
|
||||||
|
dir.mkdirs();
|
||||||
|
|
||||||
|
return dir;
|
||||||
|
}
|
||||||
|
|
||||||
public String getConfiguration(String name, String def) {
|
public String getConfiguration(String name, String def) {
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user