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.dao.orm.QueryDefinition;
020    import com.liferay.portal.kernel.exception.PortalException;
021    import com.liferay.portal.kernel.exception.SystemException;
022    import com.liferay.portal.kernel.jsonwebservice.JSONWebService;
023    import com.liferay.portal.kernel.lock.Lock;
024    import com.liferay.portal.kernel.security.access.control.AccessControlled;
025    import com.liferay.portal.kernel.transaction.Isolation;
026    import com.liferay.portal.kernel.transaction.Propagation;
027    import com.liferay.portal.kernel.transaction.Transactional;
028    import com.liferay.portal.kernel.util.OrderByComparator;
029    import com.liferay.portal.service.BaseService;
030    import com.liferay.portal.service.ServiceContext;
031    
032    import com.liferay.portlet.documentlibrary.model.DLFolder;
033    
034    import java.util.List;
035    
036    /**
037     * Provides the remote service interface for DLFolder. Methods of this
038     * service are expected to have security checks based on the propagated JAAS
039     * credentials because this service can be accessed remotely.
040     *
041     * @author Brian Wing Shun Chan
042     * @see DLFolderServiceUtil
043     * @see com.liferay.portlet.documentlibrary.service.base.DLFolderServiceBaseImpl
044     * @see com.liferay.portlet.documentlibrary.service.impl.DLFolderServiceImpl
045     * @generated
046     */
047    @AccessControlled
048    @JSONWebService
049    @ProviderType
050    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
051            PortalException.class, SystemException.class})
052    public interface DLFolderService extends BaseService {
053            /*
054             * NOTE FOR DEVELOPERS:
055             *
056             * 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.
057             */
058            public DLFolder addFolder(long groupId, long repositoryId,
059                    boolean mountPoint, long parentFolderId, java.lang.String name,
060                    java.lang.String description, ServiceContext serviceContext)
061                    throws PortalException;
062    
063            public void deleteFolder(long folderId) throws PortalException;
064    
065            public void deleteFolder(long folderId, boolean includeTrashedEntries)
066                    throws PortalException;
067    
068            public void deleteFolder(long groupId, long parentFolderId,
069                    java.lang.String name) throws PortalException;
070    
071            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
072            public List<java.lang.Object> getFileEntriesAndFileShortcuts(long groupId,
073                    long folderId, int status, int start, int end)
074                    throws PortalException;
075    
076            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
077            public int getFileEntriesAndFileShortcutsCount(long groupId, long folderId,
078                    int status) throws PortalException;
079    
080            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
081            public int getFileEntriesAndFileShortcutsCount(long groupId, long folderId,
082                    int status, java.lang.String[] mimeTypes) throws PortalException;
083    
084            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
085            public DLFolder getFolder(long folderId) throws PortalException;
086    
087            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
088            public DLFolder getFolder(long groupId, long parentFolderId,
089                    java.lang.String name) throws PortalException;
090    
091            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
092            public List<java.lang.Long> getFolderIds(long groupId, long folderId)
093                    throws PortalException;
094    
095            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
096            public List<DLFolder> getFolders(long groupId, long parentFolderId,
097                    int start, int end, OrderByComparator<DLFolder> obc)
098                    throws PortalException;
099    
100            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
101            public List<DLFolder> getFolders(long groupId, long parentFolderId,
102                    int status, boolean includeMountfolders, int start, int end,
103                    OrderByComparator<DLFolder> obc) throws PortalException;
104    
105            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
106            public List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
107                    long groupId, long folderId, java.lang.String[] mimeTypes,
108                    boolean includeMountFolders, QueryDefinition<?> queryDefinition)
109                    throws PortalException;
110    
111            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
112            public List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
113                    long groupId, long folderId, int status, boolean includeMountFolders,
114                    int start, int end, OrderByComparator<?> obc) throws PortalException;
115    
116            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
117            public List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
118                    long groupId, long folderId, int status, java.lang.String[] mimeTypes,
119                    boolean includeMountFolders, int start, int end,
120                    OrderByComparator<?> obc) throws PortalException;
121    
122            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
123            public int getFoldersAndFileEntriesAndFileShortcutsCount(long groupId,
124                    long folderId, java.lang.String[] mimeTypes,
125                    boolean includeMountFolders, QueryDefinition<?> queryDefinition)
126                    throws PortalException;
127    
128            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
129            public int getFoldersAndFileEntriesAndFileShortcutsCount(long groupId,
130                    long folderId, int status, boolean includeMountFolders)
131                    throws PortalException;
132    
133            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
134            public int getFoldersAndFileEntriesAndFileShortcutsCount(long groupId,
135                    long folderId, int status, java.lang.String[] mimeTypes,
136                    boolean includeMountFolders) throws PortalException;
137    
138            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
139            public int getFoldersCount(long groupId, long parentFolderId)
140                    throws PortalException;
141    
142            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
143            public int getFoldersCount(long groupId, long parentFolderId, int status,
144                    boolean includeMountfolders) throws PortalException;
145    
146            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
147            public List<DLFolder> getMountFolders(long groupId, long parentFolderId,
148                    int start, int end, OrderByComparator<DLFolder> obc)
149                    throws PortalException;
150    
151            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
152            public int getMountFoldersCount(long groupId, long parentFolderId)
153                    throws PortalException;
154    
155            /**
156            * Returns the OSGi service identifier.
157            *
158            * @return the OSGi service identifier
159            */
160            public java.lang.String getOSGiServiceIdentifier();
161    
162            /**
163            * @deprecated As of 7.0.0, replaced by {@link #getSubfolderIds(List, long,
164            long, boolean)}
165            */
166            @java.lang.Deprecated
167            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
168            public void getSubfolderIds(List<java.lang.Long> folderIds, long groupId,
169                    long folderId) throws PortalException;
170    
171            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
172            public void getSubfolderIds(List<java.lang.Long> folderIds, long groupId,
173                    long folderId, boolean recurse) throws PortalException;
174    
175            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
176            public List<java.lang.Long> getSubfolderIds(long groupId, long folderId,
177                    boolean recurse) throws PortalException;
178    
179            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
180            public boolean hasFolderLock(long folderId) throws PortalException;
181    
182            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
183            public boolean hasInheritableLock(long folderId) throws PortalException;
184    
185            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
186            public boolean isFolderLocked(long folderId);
187    
188            public Lock lockFolder(long folderId) throws PortalException;
189    
190            public Lock lockFolder(long folderId, java.lang.String owner,
191                    boolean inheritable, long expirationTime) throws PortalException;
192    
193            public DLFolder moveFolder(long folderId, long parentFolderId,
194                    ServiceContext serviceContext) throws PortalException;
195    
196            public Lock refreshFolderLock(java.lang.String lockUuid, long companyId,
197                    long expirationTime) throws PortalException;
198    
199            public void unlockFolder(long folderId, java.lang.String lockUuid)
200                    throws PortalException;
201    
202            public void unlockFolder(long groupId, long parentFolderId,
203                    java.lang.String name, java.lang.String lockUuid)
204                    throws PortalException;
205    
206            /**
207            * @deprecated As of 7.0.0, replaced by more general {@link
208            #updateFolder(long, String, String, long, List, int,
209            ServiceContext)}
210            */
211            @java.lang.Deprecated
212            public DLFolder updateFolder(long folderId, java.lang.String name,
213                    java.lang.String description, long defaultFileEntryTypeId,
214                    List<java.lang.Long> fileEntryTypeIds, boolean overrideFileEntryTypes,
215                    ServiceContext serviceContext) throws PortalException;
216    
217            public DLFolder updateFolder(long folderId, java.lang.String name,
218                    java.lang.String description, long defaultFileEntryTypeId,
219                    List<java.lang.Long> fileEntryTypeIds, int restrictionType,
220                    ServiceContext serviceContext) throws PortalException;
221    
222            public DLFolder updateFolder(long folderId, long parentFolderId,
223                    java.lang.String name, java.lang.String description,
224                    long defaultFileEntryTypeId, List<java.lang.Long> fileEntryTypeIds,
225                    int restrictionType, ServiceContext serviceContext)
226                    throws PortalException;
227    
228            public boolean verifyInheritableLock(long folderId,
229                    java.lang.String lockUuid) throws PortalException;
230    }