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
38 public class DLLocalServiceUtil {
39
40 public static void addFile(
41 long companyId, String portletId, long groupId, long repositoryId,
42 String fileName, String properties, String[] tagsEntries,
43 InputStream is)
44 throws PortalException, SystemException {
45
46 _service.addFile(
47 companyId, portletId, groupId, repositoryId, fileName, properties,
48 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[] repositoryIds, String keywords, int start, int end)
89 throws SystemException {
90
91 return _service.search(
92 companyId, portletId, groupId, repositoryIds, keywords, start, end);
93 }
94
95 public static void updateFile(
96 long companyId, String portletId, long groupId, long repositoryId,
97 String fileName, double versionNumber, String sourceFileName,
98 String properties, String[] tagsEntries, InputStream is)
99 throws PortalException, SystemException {
100
101 _service.updateFile(
102 companyId, portletId, groupId, repositoryId, fileName,
103 versionNumber, sourceFileName, properties, tagsEntries, is);
104 }
105
106 public static void validate(String fileName, File file)
107 throws PortalException {
108
109 _service.validate(fileName, file);
110 }
111
112 public static void validate(String fileName, byte[] bytes)
113 throws PortalException {
114
115 _service.validate(fileName, bytes);
116 }
117
118 public static void validate(String fileName, InputStream is)
119 throws PortalException {
120
121 _service.validate(fileName, is);
122 }
123
124 public static void validate(
125 String fileName, String sourceFileName, InputStream is)
126 throws PortalException {
127
128 _service.validate(fileName, sourceFileName, is);
129 }
130
131 public void setService(DLLocalService service) {
132 _service = service;
133 }
134
135 private static DLLocalService _service;
136
137 }