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            /**
066            * Returns the Spring bean ID for this bean.
067            *
068            * @return the Spring bean ID for this bean
069            */
070            public java.lang.String getBeanIdentifier();
071    
072            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
073            public java.util.List<java.lang.Object> getFileEntriesAndFileShortcuts(
074                    long groupId, long folderId, int status, int start, int end)
075                    throws PortalException;
076    
077            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
078            public int getFileEntriesAndFileShortcutsCount(long groupId, long folderId,
079                    int status) throws PortalException;
080    
081            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
082            public int getFileEntriesAndFileShortcutsCount(long groupId, long folderId,
083                    int status, java.lang.String[] mimeTypes) throws PortalException;
084    
085            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
086            public com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
087                    long folderId) throws PortalException;
088    
089            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
090            public com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
091                    long groupId, long parentFolderId, java.lang.String name)
092                    throws PortalException;
093    
094            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
095            public java.util.List<java.lang.Long> getFolderIds(long groupId,
096                    long folderId) throws PortalException;
097    
098            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
099            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
100                    long groupId, long parentFolderId, 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<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
106                    long groupId, long parentFolderId, int status,
107                    boolean includeMountfolders, int start, int end,
108                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFolder> obc)
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            * @deprecated As of 7.0.0, replaced by {@link #getSubfolderIds(List, long,
155            long, boolean)}
156            */
157            @java.lang.Deprecated
158            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
159            public void getSubfolderIds(java.util.List<java.lang.Long> folderIds,
160                    long groupId, long folderId) throws PortalException;
161    
162            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
163            public void getSubfolderIds(java.util.List<java.lang.Long> folderIds,
164                    long groupId, long folderId, boolean recurse) throws PortalException;
165    
166            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
167            public java.util.List<java.lang.Long> getSubfolderIds(long groupId,
168                    long folderId, boolean recurse) throws PortalException;
169    
170            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
171            public boolean hasFolderLock(long folderId) throws PortalException;
172    
173            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
174            public boolean hasInheritableLock(long folderId) throws PortalException;
175    
176            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
177            public boolean isFolderLocked(long folderId);
178    
179            public com.liferay.portal.kernel.lock.Lock lockFolder(long folderId)
180                    throws PortalException;
181    
182            public com.liferay.portal.kernel.lock.Lock lockFolder(long folderId,
183                    java.lang.String owner, boolean inheritable, long expirationTime)
184                    throws PortalException;
185    
186            public com.liferay.portlet.documentlibrary.model.DLFolder moveFolder(
187                    long folderId, long parentFolderId,
188                    com.liferay.portal.service.ServiceContext serviceContext)
189                    throws PortalException;
190    
191            public com.liferay.portal.kernel.lock.Lock refreshFolderLock(
192                    java.lang.String lockUuid, long companyId, long expirationTime)
193                    throws PortalException;
194    
195            /**
196            * Sets the Spring bean ID for this bean.
197            *
198            * @param beanIdentifier the Spring bean ID for this bean
199            */
200            public void setBeanIdentifier(java.lang.String beanIdentifier);
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    }