Salome HOME
SimulationContextFacade has been moved into Siman-Common. Import document action...
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / service / technical / RepositoryServiceImpl.java
1 /*****************************************************************************
2  * Company         OPEN CASCADE
3  * Application     SIMAN
4  * File            $Id$ 
5  * Creation date   06.10.2012
6  * @author         $Author$
7  * @version        $Revision$
8  *****************************************************************************/
9
10 package org.splat.service.technical;
11
12 import java.io.File;
13
14 import org.splat.dal.bo.kernel.User;
15
16 /**
17  * @author RKV
18  * 
19  */
20 public class RepositoryServiceImpl implements RepositoryService {
21
22         private String _basepath;
23
24         public File getRepositoryIndexDirectory() {
25                 return new File(getBasepath() + "lucin/");
26         }
27
28         public String getRepositoryVaultPath() {
29                 return (getBasepath() + "vault/");
30         }
31
32         public File getDownloadDirectory(User user) {
33                 StringBuffer path = new StringBuffer(_basepath).append("downloads/")
34                                 .append(user.getUsername()).append("/");
35                 return new File(path.toString());
36         }
37
38         public String getTemplatePath() {
39                 return (_basepath + "templates/");
40         }
41
42         /**
43          * Get the basepath.
44          * @return the basepath
45          */
46         public String getBasepath() {
47                 return _basepath;
48         }
49
50         /**
51          * Set the basepath.
52          * @param basepath the basepath to set
53          */
54         public void setBasepath(String basepath) {
55                 _basepath = basepath;
56         }
57 }