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