001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.documentlibrary.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.exception.PortalException;
020    import com.liferay.portal.kernel.exception.SystemException;
021    import com.liferay.portal.kernel.jsonwebservice.JSONWebService;
022    import com.liferay.portal.kernel.security.access.control.AccessControlled;
023    import com.liferay.portal.kernel.transaction.Isolation;
024    import com.liferay.portal.kernel.transaction.Propagation;
025    import com.liferay.portal.kernel.transaction.Transactional;
026    import com.liferay.portal.service.BaseService;
027    
028    /**
029     * Provides the remote service interface for DLFolder. Methods of this
030     * service are expected to have security checks based on the propagated JAAS
031     * credentials because this service can be accessed remotely.
032     *
033     * @author Brian Wing Shun Chan
034     * @see DLFolderServiceUtil
035     * @see com.liferay.portlet.documentlibrary.service.base.DLFolderServiceBaseImpl
036     * @see com.liferay.portlet.documentlibrary.service.impl.DLFolderServiceImpl
037     * @generated
038     */
039    @AccessControlled
040    @JSONWebService
041    @ProviderType
042    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
043            PortalException.class, SystemException.class})
044    public interface DLFolderService extends BaseService {
045            /*
046             * NOTE FOR DEVELOPERS:
047             *
048             * Never modify or reference this interface directly. Always use {@link DLFolderServiceUtil} to access the document library folder remote service. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLFolderServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
049             */
050            public com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
051                    long groupId, long repositoryId, boolean mountPoint,
052                    long parentFolderId, java.lang.String name,
053                    java.lang.String description,
054                    com.liferay.portal.service.ServiceContext serviceContext)
055                    throws PortalException;
056    
057            public void deleteFolder(long folderId) throws PortalException;
058    
059            public void deleteFolder(long folderId, boolean includeTrashedEntries)
060                    throws PortalException;
061    
062            public void deleteFolder(long groupId, long parentFolderId,
063                    java.lang.String name) throws PortalException;
064    
065            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
066            public java.util.List<java.lang.Object> getFileEntriesAndFileShortcuts(
067                    long groupId, long folderId, int status, int start, int end)
068                    throws PortalException;
069    
070            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
071            public int getFileEntriesAndFileShortcutsCount(long groupId, long folderId,
072                    int status) throws PortalException;
073    
074            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
075            public int getFileEntriesAndFileShortcutsCount(long groupId, long folderId,
076                    int status, java.lang.String[] mimeTypes) throws PortalException;
077    
078            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
079            public com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
080                    long folderId) throws PortalException;
081    
082            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
083            public com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
084                    long groupId, long parentFolderId, java.lang.String name)
085                    throws PortalException;
086    
087            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
088            public java.util.List<java.lang.Long> getFolderIds(long groupId,
089                    long folderId) throws PortalException;
090    
091            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
092            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
093                    long groupId, long parentFolderId, int start, int end,
094                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFolder> obc)
095                    throws PortalException;
096    
097            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
098            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
099                    long groupId, long parentFolderId, int status,
100                    boolean includeMountfolders, int start, int end,
101                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFolder> obc)
102                    throws PortalException;
103    
104            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
105            public java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
106                    long groupId, long folderId, java.lang.String[] mimeTypes,
107                    boolean includeMountFolders,
108                    com.liferay.portal.kernel.dao.orm.QueryDefinition<?> queryDefinition)
109                    throws PortalException;
110    
111            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
112            public java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
113                    long groupId, long folderId, int status, boolean includeMountFolders,
114                    int start, int end,
115                    com.liferay.portal.kernel.util.OrderByComparator<?> obc)
116                    throws PortalException;
117    
118            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
119            public java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
120                    long groupId, long folderId, int status, java.lang.String[] mimeTypes,
121                    boolean includeMountFolders, int start, int end,
122                    com.liferay.portal.kernel.util.OrderByComparator<?> obc)
123                    throws PortalException;
124    
125            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
126            public int getFoldersAndFileEntriesAndFileShortcutsCount(long groupId,
127                    long folderId, int status, boolean includeMountFolders)
128                    throws PortalException;
129    
130            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
131            public int getFoldersAndFileEntriesAndFileShortcutsCount(long groupId,
132                    long folderId, int status, java.lang.String[] mimeTypes,
133                    boolean includeMountFolders) throws PortalException;
134    
135            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
136            public int getFoldersCount(long groupId, long parentFolderId)
137                    throws PortalException;
138    
139            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
140            public int getFoldersCount(long groupId, long parentFolderId, int status,
141                    boolean includeMountfolders) throws PortalException;
142    
143            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
144            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getMountFolders(
145                    long groupId, long parentFolderId, int start, int end,
146                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFolder> obc)
147                    throws PortalException;
148    
149            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
150            public int getMountFoldersCount(long groupId, long parentFolderId)
151                    throws PortalException;
152    
153            /**
154            * Returns the OSGi service identifier.
155            *
156            * @return the OSGi service identifier
157            */
158            public java.lang.String getOSGiServiceIdentifier();
159    
160            /**
161            * @deprecated As of 7.0.0, replaced by {@link #getSubfolderIds(List, long,
162            long, boolean)}
163            */
164            @java.lang.Deprecated
165            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
166            public void getSubfolderIds(java.util.List<java.lang.Long> folderIds,
167                    long groupId, long folderId) throws PortalException;
168    
169            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
170            public void getSubfolderIds(java.util.List<java.lang.Long> folderIds,
171                    long groupId, long folderId, boolean recurse) throws PortalException;
172    
173            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
174            public java.util.List<java.lang.Long> getSubfolderIds(long groupId,
175                    long folderId, boolean recurse) throws PortalException;
176    
177            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
178            public boolean hasFolderLock(long folderId) throws PortalException;
179    
180            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
181            public boolean hasInheritableLock(long folderId) throws PortalException;
182    
183            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
184            public boolean isFolderLocked(long folderId);
185    
186            public com.liferay.portal.kernel.lock.Lock lockFolder(long folderId)
187                    throws PortalException;
188    
189            public com.liferay.portal.kernel.lock.Lock lockFolder(long folderId,
190                    java.lang.String owner, boolean inheritable, long expirationTime)
191                    throws PortalException;
192    
193            public com.liferay.portlet.documentlibrary.model.DLFolder moveFolder(
194                    long folderId, long parentFolderId,
195                    com.liferay.portal.service.ServiceContext serviceContext)
196                    throws PortalException;
197    
198            public com.liferay.portal.kernel.lock.Lock refreshFolderLock(
199                    java.lang.String lockUuid, long companyId, long expirationTime)
200                    throws PortalException;
201    
202            public void unlockFolder(long folderId, java.lang.String lockUuid)
203                    throws PortalException;
204    
205            public void unlockFolder(long groupId, long parentFolderId,
206                    java.lang.String name, java.lang.String lockUuid)
207                    throws PortalException;
208    
209            /**
210            * @deprecated As of 7.0.0, replaced by more general {@link
211            #updateFolder(long, String, String, long, List, int,
212            ServiceContext)}
213            */
214            @java.lang.Deprecated
215            public com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
216                    long folderId, java.lang.String name, java.lang.String description,
217                    long defaultFileEntryTypeId,
218                    java.util.List<java.lang.Long> fileEntryTypeIds,
219                    boolean overrideFileEntryTypes,
220                    com.liferay.portal.service.ServiceContext serviceContext)
221                    throws PortalException;
222    
223            public com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
224                    long folderId, java.lang.String name, java.lang.String description,
225                    long defaultFileEntryTypeId,
226                    java.util.List<java.lang.Long> fileEntryTypeIds, int restrictionType,
227                    com.liferay.portal.service.ServiceContext serviceContext)
228                    throws PortalException;
229    
230            public com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
231                    long folderId, long parentFolderId, java.lang.String name,
232                    java.lang.String description, long defaultFileEntryTypeId,
233                    java.util.List<java.lang.Long> fileEntryTypeIds, int restrictionType,
234                    com.liferay.portal.service.ServiceContext serviceContext)
235                    throws PortalException;
236    
237            public boolean verifyInheritableLock(long folderId,
238                    java.lang.String lockUuid) throws PortalException;
239    }