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