1
14
15 package com.liferay.documentlibrary.service;
16
17 import com.liferay.portal.kernel.annotation.Transactional;
18 import com.liferay.portal.kernel.exception.PortalException;
19 import com.liferay.portal.kernel.exception.SystemException;
20 import com.liferay.portal.service.ServiceContext;
21
22 import java.io.File;
23
24 import java.util.Date;
25
26 @Transactional(rollbackFor = {PortalException.class, SystemException.class})
27
32 public interface DLService {
33
34 public void addDirectory(long companyId, long repositoryId, String dirName)
35 throws PortalException, SystemException;
36
37 public void addFile(
38 long companyId, String portletId, long groupId, long repositoryId,
39 String fileName, long fileEntryId, String properties,
40 Date modifiedDate, ServiceContext serviceContext, byte[] bytes)
41 throws PortalException, SystemException;
42
43 public void addFile(
44 long companyId, String portletId, long groupId, long repositoryId,
45 String fileName, long fileEntryId, String properties,
46 Date modifiedDate, ServiceContext serviceContext, File file)
47 throws PortalException, SystemException;
48
49 public void deleteDirectory(
50 long companyId, String portletId, long repositoryId, String dirName)
51 throws PortalException, SystemException;
52
53 public void deleteFile(
54 long companyId, String portletId, long repositoryId,
55 String fileName)
56 throws PortalException, SystemException;
57
58 public void deleteFile(
59 long companyId, String portletId, long repositoryId,
60 String fileName, String versionNumber)
61 throws PortalException, SystemException;
62
63 public byte[] getFile(long companyId, long repositoryId, String fileName)
64 throws PortalException, SystemException;
65
66 public byte[] getFile(
67 long companyId, long repositoryId, String fileName,
68 String versionNumber)
69 throws PortalException, SystemException;
70
71 public String[] getFileNames(
72 long companyId, long repositoryId, String dirName)
73 throws PortalException, SystemException;
74
75 public long getFileSize(
76 long companyId, long repositoryId, String fileName)
77 throws PortalException, SystemException;
78
79 public void updateFile(
80 long companyId, String portletId, long groupId, long repositoryId,
81 long newRepositoryId, String fileName, long fileEntryId)
82 throws PortalException, SystemException;
83
84 public void updateFile(
85 long companyId, String portletId, long groupId, long repositoryId,
86 String fileName, String versionNumber, String sourceFileName,
87 long fileEntryId, String properties, Date modifiedDate,
88 ServiceContext serviceContext, byte[] bytes)
89 throws PortalException, SystemException;
90
91 public void updateFile(
92 long companyId, String portletId, long groupId, long repositoryId,
93 String fileName, String versionNumber, String sourceFileName,
94 long fileEntryId, String properties, Date modifiedDate,
95 ServiceContext serviceContext, File file)
96 throws PortalException, SystemException;
97
98 public void updateFile(
99 long companyId, String portletId, long groupId, long repositoryId,
100 String fileName, String newFileName, boolean reindex)
101 throws PortalException, SystemException;
102
103 }