001
014
015 package com.liferay.document.library.kernel.service;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.document.library.kernel.model.DLFolder;
020
021 import com.liferay.portal.kernel.dao.orm.QueryDefinition;
022 import com.liferay.portal.kernel.exception.PortalException;
023 import com.liferay.portal.kernel.exception.SystemException;
024 import com.liferay.portal.kernel.jsonwebservice.JSONWebService;
025 import com.liferay.portal.kernel.lock.Lock;
026 import com.liferay.portal.kernel.security.access.control.AccessControlled;
027 import com.liferay.portal.kernel.service.BaseService;
028 import com.liferay.portal.kernel.service.ServiceContext;
029 import com.liferay.portal.kernel.transaction.Isolation;
030 import com.liferay.portal.kernel.transaction.Propagation;
031 import com.liferay.portal.kernel.transaction.Transactional;
032 import com.liferay.portal.kernel.util.OrderByComparator;
033
034 import java.util.List;
035
036
047 @AccessControlled
048 @JSONWebService
049 @ProviderType
050 @Transactional(isolation = Isolation.PORTAL, rollbackFor = {
051 PortalException.class, SystemException.class})
052 public interface DLFolderService extends BaseService {
053
058 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
059 public boolean hasFolderLock(long folderId) throws PortalException;
060
061 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
062 public boolean hasInheritableLock(long folderId) throws PortalException;
063
064 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
065 public boolean isFolderLocked(long folderId);
066
067 public boolean verifyInheritableLock(long folderId,
068 java.lang.String lockUuid) throws PortalException;
069
070 public DLFolder addFolder(long groupId, long repositoryId,
071 boolean mountPoint, long parentFolderId, java.lang.String name,
072 java.lang.String description, ServiceContext serviceContext)
073 throws PortalException;
074
075 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
076 public DLFolder getFolder(long folderId) throws PortalException;
077
078 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
079 public DLFolder getFolder(long groupId, long parentFolderId,
080 java.lang.String name) throws PortalException;
081
082 public DLFolder moveFolder(long folderId, long parentFolderId,
083 ServiceContext serviceContext) throws PortalException;
084
085
090 @java.lang.Deprecated
091 public DLFolder updateFolder(long folderId, java.lang.String name,
092 java.lang.String description, long defaultFileEntryTypeId,
093 List<java.lang.Long> fileEntryTypeIds, boolean overrideFileEntryTypes,
094 ServiceContext serviceContext) throws PortalException;
095
096 public DLFolder updateFolder(long folderId, java.lang.String name,
097 java.lang.String description, long defaultFileEntryTypeId,
098 List<java.lang.Long> fileEntryTypeIds, int restrictionType,
099 ServiceContext serviceContext) throws PortalException;
100
101 public DLFolder updateFolder(long folderId, long parentFolderId,
102 java.lang.String name, java.lang.String description,
103 long defaultFileEntryTypeId, List<java.lang.Long> fileEntryTypeIds,
104 int restrictionType, ServiceContext serviceContext)
105 throws PortalException;
106
107 public Lock lockFolder(long folderId) throws PortalException;
108
109 public Lock lockFolder(long folderId, java.lang.String owner,
110 boolean inheritable, long expirationTime) throws PortalException;
111
112 public Lock refreshFolderLock(java.lang.String lockUuid, long companyId,
113 long expirationTime) throws PortalException;
114
115 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
116 public int getFileEntriesAndFileShortcutsCount(long groupId, long folderId,
117 int status) throws PortalException;
118
119 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
120 public int getFileEntriesAndFileShortcutsCount(long groupId, long folderId,
121 int status, java.lang.String[] mimeTypes) throws PortalException;
122
123 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
124 public int getFoldersAndFileEntriesAndFileShortcutsCount(long groupId,
125 long folderId, int status, boolean includeMountFolders)
126 throws PortalException;
127
128 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
129 public int getFoldersAndFileEntriesAndFileShortcutsCount(long groupId,
130 long folderId, int status, java.lang.String[] mimeTypes,
131 boolean includeMountFolders) throws PortalException;
132
133 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
134 public int getFoldersAndFileEntriesAndFileShortcutsCount(long groupId,
135 long folderId, java.lang.String[] mimeTypes,
136 boolean includeMountFolders, QueryDefinition<?> queryDefinition)
137 throws PortalException;
138
139 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
140 public int getFoldersCount(long groupId, long parentFolderId)
141 throws PortalException;
142
143 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
144 public int getFoldersCount(long groupId, long parentFolderId, int status,
145 boolean includeMountfolders) throws PortalException;
146
147 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
148 public int getMountFoldersCount(long groupId, long parentFolderId)
149 throws PortalException;
150
151
156 public java.lang.String getOSGiServiceIdentifier();
157
158 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
159 public List<java.lang.Object> getFileEntriesAndFileShortcuts(long groupId,
160 long folderId, int status, int start, int end)
161 throws PortalException;
162
163 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
164 public List<java.lang.Long> getFolderIds(long groupId, long folderId)
165 throws PortalException;
166
167 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
168 public List<DLFolder> getFolders(long groupId, long parentFolderId,
169 int start, int end, OrderByComparator<DLFolder> obc)
170 throws PortalException;
171
172 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
173 public List<DLFolder> getFolders(long groupId, long parentFolderId,
174 int status, boolean includeMountfolders, int start, int end,
175 OrderByComparator<DLFolder> obc) throws PortalException;
176
177 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
178 public List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
179 long groupId, long folderId, int status, boolean includeMountFolders,
180 int start, int end, OrderByComparator<?> obc) throws PortalException;
181
182 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
183 public List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
184 long groupId, long folderId, int status, java.lang.String[] mimeTypes,
185 boolean includeMountFolders, int start, int end,
186 OrderByComparator<?> obc) throws PortalException;
187
188 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
189 public List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
190 long groupId, long folderId, java.lang.String[] mimeTypes,
191 boolean includeMountFolders, QueryDefinition<?> queryDefinition)
192 throws PortalException;
193
194 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
195 public List<DLFolder> getMountFolders(long groupId, long parentFolderId,
196 int start, int end, OrderByComparator<DLFolder> obc)
197 throws PortalException;
198
199 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
200 public List<java.lang.Long> getSubfolderIds(long groupId, long folderId,
201 boolean recurse) throws PortalException;
202
203 public void deleteFolder(long folderId) throws PortalException;
204
205 public void deleteFolder(long folderId, boolean includeTrashedEntries)
206 throws PortalException;
207
208 public void deleteFolder(long groupId, long parentFolderId,
209 java.lang.String name) throws PortalException;
210
211
215 @java.lang.Deprecated
216 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
217 public void getSubfolderIds(List<java.lang.Long> folderIds, long groupId,
218 long folderId) throws PortalException;
219
220 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
221 public void getSubfolderIds(List<java.lang.Long> folderIds, long groupId,
222 long folderId, boolean recurse) throws PortalException;
223
224 public void unlockFolder(long folderId, java.lang.String lockUuid)
225 throws PortalException;
226
227 public void unlockFolder(long groupId, long parentFolderId,
228 java.lang.String name, java.lang.String lockUuid)
229 throws PortalException;
230 }