1
22
23 package com.liferay.documentlibrary.service;
24
25 import com.liferay.portal.PortalException;
26 import com.liferay.portal.SystemException;
27 import com.liferay.portal.kernel.search.Hits;
28
29 import java.io.File;
30 import java.io.InputStream;
31
32 import java.util.Date;
33
34
40 public class DLLocalServiceUtil {
41
42 public static 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 InputStream is)
47 throws PortalException, SystemException {
48
49 _service.addFile(
50 companyId, portletId, groupId, repositoryId, fileName, fileEntryId,
51 properties, modifiedDate, tagsCategories, tagsEntries, is);
52 }
53
54 public static void checkRoot(long companyId) throws SystemException {
55 _service.checkRoot(companyId);
56 }
57
58 public static InputStream getFileAsStream(
59 long companyId, long repositoryId, String fileName)
60 throws PortalException, SystemException {
61
62 return _service.getFileAsStream(companyId, repositoryId, fileName);
63 }
64
65 public static InputStream getFileAsStream(
66 long companyId, long repositoryId, String fileName,
67 double versionNumber)
68 throws PortalException, SystemException {
69
70 return _service.getFileAsStream(
71 companyId, repositoryId, fileName, versionNumber);
72 }
73
74 public static boolean hasFile(
75 long companyId, long repositoryId, String fileName,
76 double versionNumber)
77 throws PortalException, SystemException {
78
79 return _service.hasFile(
80 companyId, repositoryId, fileName, versionNumber);
81 }
82
83 public static void move(String srcDir, String destDir)
84 throws SystemException {
85
86 _service.move(srcDir, destDir);
87 }
88
89 public static Hits search(
90 long companyId, String portletId, long groupId,
91 long userId, long[] repositoryIds, String keywords, int start,
92 int end)
93 throws SystemException {
94
95 return _service.search(
96 companyId, portletId, groupId, userId, repositoryIds, keywords,
97 start, end);
98 }
99
100 public static void updateFile(
101 long companyId, String portletId, long groupId, long repositoryId,
102 String fileName, double versionNumber, String sourceFileName,
103 long fileEntryId, String properties, Date modifiedDate,
104 String[] tagsCategories, String[] tagsEntries, InputStream is)
105 throws PortalException, SystemException {
106
107 _service.updateFile(
108 companyId, portletId, groupId, repositoryId, fileName,
109 versionNumber, sourceFileName, fileEntryId, properties,
110 modifiedDate, tagsCategories, tagsEntries, is);
111 }
112
113 public static void validate(String fileName, File file)
114 throws PortalException, SystemException {
115
116 _service.validate(fileName, file);
117 }
118
119 public static void validate(String fileName, byte[] bytes)
120 throws PortalException, SystemException {
121
122 _service.validate(fileName, bytes);
123 }
124
125 public static void validate(String fileName, InputStream is)
126 throws PortalException, SystemException {
127
128 _service.validate(fileName, is);
129 }
130
131 public static void validate(
132 String fileName, String sourceFileName, InputStream is)
133 throws PortalException {
134
135 _service.validate(fileName, sourceFileName, is);
136 }
137
138 public void setService(DLLocalService service) {
139 _service = service;
140 }
141
142 private static DLLocalService _service;
143
144 }