Skip to content

Commit

Permalink
CLDIDE-2535: added property for mount projects root
Browse files Browse the repository at this point in the history
  • Loading branch information
akorneta committed Sep 12, 2015
1 parent af49104 commit ad1d63c
Showing 1 changed file with 7 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,26 @@
import org.eclipse.che.commons.env.EnvironmentContext;
import org.eclipse.che.vfs.impl.fs.LocalFSMountStrategy;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Reader;
import java.io.Writer;
import java.nio.file.Files;
import java.util.Map;
import java.util.Properties;
import java.util.concurrent.ConcurrentHashMap;

/**
* @author andrew00x
*/
@Singleton
public class MachineFSMountStrategy implements LocalFSMountStrategy {
public final String mountProjectsRoot;

@Inject
public MachineFSMountStrategy(@Named("vfs.local.fs_root_dir") String mountProjectsRoot) {
this.mountProjectsRoot = mountProjectsRoot;
}

@Override
public java.io.File getMountPath(String workspaceId) throws ServerException {
return new File("/projects");//TODO avoid hardcoding need use properties
return new File(mountProjectsRoot);
}

@Override
Expand Down

0 comments on commit ad1d63c

Please sign in to comment.