Rev 1310 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1310 | Rev 1703 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | package pt.estgp.estgweb.services.processes; |
1 | package pt.estgp.estgweb.services.processes; |
2 | 2 | ||
3 | import jomm.utils.FilesUtils; |
3 | import jomm.utils.FilesUtils; |
4 | import org.apache.log4j.Logger; |
4 | import org.apache.log4j.Logger; |
5 | import org.apache.struts.upload.FormFile; |
5 | import org.apache.struts.upload.FormFile; |
6 | import org.dom4j.Document; |
- | |
7 | import pt.estgp.estgweb.Globals; |
- | |
8 | import pt.estgp.estgweb.domain.*; |
6 | import pt.estgp.estgweb.domain.*; |
9 | import pt.estgp.estgweb.domain.dao.DaoFactory; |
7 | import pt.estgp.estgweb.domain.dao.DaoFactory; |
10 | import pt.estgp.estgweb.domain.views.CourseView; |
- | |
11 | import pt.estgp.estgweb.filters.chains.ResourceAccessControlEnum; |
8 | import pt.estgp.estgweb.filters.chains.ResourceAccessControlEnum; |
12 | import pt.estgp.estgweb.services.data.IRepositoryFile; |
- | |
13 | import pt.estgp.estgweb.services.data.RepositoryService; |
9 | import pt.estgp.estgweb.services.data.RepositoryService; |
14 | import pt.estgp.estgweb.services.expceptions.AlreadyExistsException; |
- | |
15 | import pt.estgp.estgweb.services.expceptions.ServiceException; |
10 | import pt.estgp.estgweb.services.expceptions.ServiceException; |
16 | import pt.estgp.estgweb.utils.DatesUtils; |
- | |
17 | import pt.estgp.estgweb.utils.Dom4jUtil; |
- | |
18 | import pt.utl.ist.berserk.logic.serviceManager.IService; |
11 | import pt.utl.ist.berserk.logic.serviceManager.IService; |
19 | 12 | ||
20 | import java.io.IOException; |
13 | import java.io.IOException; |
21 | import java.io.InputStream; |
- | |
22 | import java.io.PrintWriter; |
- | |
23 | import java.io.StringWriter; |
- | |
24 | import java.util.*; |
14 | import java.util.*; |
25 | 15 | ||
26 | /* |
16 | /* |
27 | * @author Goncalo Luiz gedl [AT] rnl [DOT] ist [DOT] utl [DOT] pt |
17 | * @author Goncalo Luiz gedl [AT] rnl [DOT] ist [DOT] utl [DOT] pt |
28 | * |
18 | * |
Line 76... | Line 66... | ||
76 | 66 | ||
77 | 67 | ||
78 | 1.5.0/docs/api/java/lang/String.html">String repositoryId; |
68 | 1.5.0/docs/api/java/lang/String.html">String repositoryId; |
79 | try { |
69 | try { |
80 | repositoryId = repositoryService.storeRepositoryFile(file.getInputStream(),file.getContentType(), FilesUtils.getExtension(file.getFileName()), |
70 | repositoryId = repositoryService.storeRepositoryFile(file.getInputStream(),file.getContentType(), FilesUtils.getExtension(file.getFileName()), |
81 | file.getFileSize(),file.getFileName(),"Process file " + metaProcess.getName(), ResourceAccessControlEnum.processDomain,sess); |
71 | file.getFileSize(),file.getFileName(),"Process file " + metaProcess.getName(), ResourceAccessControlEnum.processDomain, null, sess); |
82 | } catch (1.5.0/docs/api/java/io/IOException.html">IOException e) { |
72 | } catch (1.5.0/docs/api/java/io/IOException.html">IOException e) { |
83 | logger.error(e,e); |
73 | logger.error(e,e); |
84 | throw e; |
74 | throw e; |
85 | } |
75 | } |
86 | 76 |