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