1
14
15 package com.liferay.portlet.documentlibrary.service;
16
17 import com.liferay.portal.kernel.annotation.Isolation;
18 import com.liferay.portal.kernel.annotation.Propagation;
19 import com.liferay.portal.kernel.annotation.Transactional;
20 import com.liferay.portal.kernel.exception.PortalException;
21 import com.liferay.portal.kernel.exception.SystemException;
22
23
47 @Transactional(isolation = Isolation.PORTAL, rollbackFor = {
48 PortalException.class, SystemException.class})
49 public interface DLFileEntryService {
50 public com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
51 long groupId, long folderId, java.lang.String name,
52 java.lang.String title, java.lang.String description,
53 java.lang.String versionDescription, java.lang.String extraSettings,
54 byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext)
55 throws com.liferay.portal.kernel.exception.PortalException,
56 com.liferay.portal.kernel.exception.SystemException;
57
58 public com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
59 long groupId, long folderId, java.lang.String name,
60 java.lang.String title, java.lang.String description,
61 java.lang.String versionDescription, java.lang.String extraSettings,
62 java.io.File file,
63 com.liferay.portal.service.ServiceContext serviceContext)
64 throws com.liferay.portal.kernel.exception.PortalException,
65 com.liferay.portal.kernel.exception.SystemException;
66
67 public void deleteFileEntry(long groupId, long folderId,
68 java.lang.String name)
69 throws com.liferay.portal.kernel.exception.PortalException,
70 com.liferay.portal.kernel.exception.SystemException;
71
72 public void deleteFileEntry(long groupId, long folderId,
73 java.lang.String name, java.lang.String version)
74 throws com.liferay.portal.kernel.exception.PortalException,
75 com.liferay.portal.kernel.exception.SystemException;
76
77 public void deleteFileEntryByTitle(long groupId, long folderId,
78 java.lang.String titleWithExtension)
79 throws com.liferay.portal.kernel.exception.PortalException,
80 com.liferay.portal.kernel.exception.SystemException;
81
82 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
83 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
84 long groupId, long folderId)
85 throws com.liferay.portal.kernel.exception.PortalException,
86 com.liferay.portal.kernel.exception.SystemException;
87
88 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
89 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
90 long groupId, long folderId, int start, int end)
91 throws com.liferay.portal.kernel.exception.PortalException,
92 com.liferay.portal.kernel.exception.SystemException;
93
94 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
95 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
96 long groupId, long folderId, int start, int end,
97 com.liferay.portal.kernel.util.OrderByComparator obc)
98 throws com.liferay.portal.kernel.exception.PortalException,
99 com.liferay.portal.kernel.exception.SystemException;
100
101 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
102 public int getFileEntriesCount(long groupId, long folderId)
103 throws com.liferay.portal.kernel.exception.PortalException,
104 com.liferay.portal.kernel.exception.SystemException;
105
106 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
107 public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
108 long groupId, long folderId, java.lang.String name)
109 throws com.liferay.portal.kernel.exception.PortalException,
110 com.liferay.portal.kernel.exception.SystemException;
111
112 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
113 public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByTitle(
114 long groupId, long folderId, java.lang.String titleWithExtension)
115 throws com.liferay.portal.kernel.exception.PortalException,
116 com.liferay.portal.kernel.exception.SystemException;
117
118 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
119 public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
120 java.lang.String uuid, long groupId)
121 throws com.liferay.portal.kernel.exception.PortalException,
122 com.liferay.portal.kernel.exception.SystemException;
123
124 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
125 public int getFoldersFileEntriesCount(long groupId,
126 java.util.List<java.lang.Long> folderIds, int status)
127 throws com.liferay.portal.kernel.exception.SystemException;
128
129 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
130 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
131 long groupId, long userId, int start, int end)
132 throws com.liferay.portal.kernel.exception.SystemException;
133
134 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
135 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
136 long groupId, long userId, int start, int end,
137 com.liferay.portal.kernel.util.OrderByComparator obc)
138 throws com.liferay.portal.kernel.exception.SystemException;
139
140 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
141 public int getGroupFileEntriesCount(long groupId, long userId)
142 throws com.liferay.portal.kernel.exception.SystemException;
143
144 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
145 public boolean hasFileEntryLock(long groupId, long folderId,
146 java.lang.String name)
147 throws com.liferay.portal.kernel.exception.PortalException,
148 com.liferay.portal.kernel.exception.SystemException;
149
150 public com.liferay.portal.model.Lock lockFileEntry(long groupId,
151 long folderId, java.lang.String name)
152 throws com.liferay.portal.kernel.exception.PortalException,
153 com.liferay.portal.kernel.exception.SystemException;
154
155 public com.liferay.portal.model.Lock lockFileEntry(long groupId,
156 long folderId, java.lang.String name, java.lang.String owner,
157 long expirationTime)
158 throws com.liferay.portal.kernel.exception.PortalException,
159 com.liferay.portal.kernel.exception.SystemException;
160
161 public com.liferay.portal.model.Lock refreshFileEntryLock(
162 java.lang.String lockUuid, long expirationTime)
163 throws com.liferay.portal.kernel.exception.PortalException,
164 com.liferay.portal.kernel.exception.SystemException;
165
166 public void unlockFileEntry(long groupId, long folderId,
167 java.lang.String name)
168 throws com.liferay.portal.kernel.exception.SystemException;
169
170 public void unlockFileEntry(long groupId, long folderId,
171 java.lang.String name, java.lang.String lockUuid)
172 throws com.liferay.portal.kernel.exception.PortalException,
173 com.liferay.portal.kernel.exception.SystemException;
174
175 public com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
176 long groupId, long folderId, long newFolderId, java.lang.String name,
177 java.lang.String sourceFileName, java.lang.String title,
178 java.lang.String description, java.lang.String versionDescription,
179 boolean majorVersion, java.lang.String extraSettings, byte[] bytes,
180 com.liferay.portal.service.ServiceContext serviceContext)
181 throws com.liferay.portal.kernel.exception.PortalException,
182 com.liferay.portal.kernel.exception.SystemException;
183
184 public com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
185 long groupId, long folderId, long newFolderId, java.lang.String name,
186 java.lang.String sourceFileName, java.lang.String title,
187 java.lang.String description, java.lang.String versionDescription,
188 boolean majorVersion, java.lang.String extraSettings,
189 java.io.File file,
190 com.liferay.portal.service.ServiceContext serviceContext)
191 throws com.liferay.portal.kernel.exception.PortalException,
192 com.liferay.portal.kernel.exception.SystemException;
193
194 public boolean verifyFileEntryLock(long groupId, long folderId,
195 java.lang.String name, java.lang.String lockUuid)
196 throws com.liferay.portal.kernel.exception.PortalException,
197 com.liferay.portal.kernel.exception.SystemException;
198 }