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.rmi.RemoteException;
24
25 import java.util.Date;
26
27 @Transactional(rollbackFor = {PortalException.class, SystemException.class})
28
33 public interface DLService {
34
35 public void addDirectory(long companyId, long repositoryId, String dirName)
36 throws PortalException, RemoteException, SystemException;
37
38 public void addFile(
39 long companyId, String portletId, long groupId, long repositoryId,
40 String fileName, String properties, Date modifiedDate,
41 String[] tagsEntries, byte[] bytes)
42 throws PortalException, RemoteException, SystemException;
43
44 public void addFile(
45 long companyId, String portletId, long groupId, long repositoryId,
46 String fileName, String properties, Date modifiedDate,
47 String[] tagsEntries, File file)
48 throws PortalException, RemoteException, SystemException;
49
50 public void deleteDirectory(
51 long companyId, String portletId, long repositoryId, String dirName)
52 throws PortalException, RemoteException, SystemException;
53
54 public void deleteFile(
55 long companyId, String portletId, long repositoryId,
56 String fileName)
57 throws PortalException, RemoteException, SystemException;
58
59 public void deleteFile(
60 long companyId, String portletId, long repositoryId,
61 String fileName, double versionNumber)
62 throws PortalException, RemoteException, SystemException;
63
64 public byte[] getFile(long companyId, long repositoryId, String fileName)
65 throws PortalException, RemoteException, SystemException;
66
67 public byte[] getFile(
68 long companyId, long repositoryId, String fileName,
69 double versionNumber)
70 throws PortalException, RemoteException, SystemException;
71
72 public String[] getFileNames(
73 long companyId, long repositoryId, String dirName)
74 throws PortalException, RemoteException, SystemException;
75
76 public long getFileSize(
77 long companyId, long repositoryId, String fileName)
78 throws PortalException, RemoteException, SystemException;
79
80 public void reIndex(String[] ids) throws RemoteException, SystemException;
81
82 public void updateFile(
83 long companyId, String portletId, long groupId, long repositoryId,
84 String fileName, double versionNumber, String sourceFileName,
85 String properties, Date modifiedDate, String[] tagsEntries,
86 byte[] bytes)
87 throws PortalException, RemoteException, SystemException;
88
89 public void updateFile(
90 long companyId, String portletId, long groupId, long repositoryId,
91 String fileName, double versionNumber, String sourceFileName,
92 String properties, Date modifiedDate, String[] tagsEntries,
93 File file)
94 throws PortalException, RemoteException, SystemException;
95
96 public void updateFile(
97 long companyId, String portletId, long groupId, long repositoryId,
98 long newRepositoryId, String fileName)
99 throws PortalException, RemoteException, SystemException;
100
101 }