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