001    /**
002     * Copyright (c) 2000-2011 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 com.liferay.portal.kernel.exception.PortalException;
018    import com.liferay.portal.kernel.exception.SystemException;
019    import com.liferay.portal.kernel.jsonwebservice.JSONWebService;
020    import com.liferay.portal.kernel.transaction.Isolation;
021    import com.liferay.portal.kernel.transaction.Propagation;
022    import com.liferay.portal.kernel.transaction.Transactional;
023    
024    /**
025     * The interface for the document library file entry remote service.
026     *
027     * <p>
028     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
029     * </p>
030     *
031     * @author Brian Wing Shun Chan
032     * @see DLFileEntryServiceUtil
033     * @see com.liferay.portlet.documentlibrary.service.base.DLFileEntryServiceBaseImpl
034     * @see com.liferay.portlet.documentlibrary.service.impl.DLFileEntryServiceImpl
035     * @generated
036     */
037    @JSONWebService
038    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
039            PortalException.class, SystemException.class})
040    public interface DLFileEntryService {
041            /*
042             * NOTE FOR DEVELOPERS:
043             *
044             * Never modify or reference this interface directly. Always use {@link DLFileEntryServiceUtil} to access the document library file entry remote service. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLFileEntryServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
045             */
046            public com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
047                    long groupId, long repositoryId, long folderId,
048                    java.lang.String sourceFileName, java.lang.String mimeType,
049                    java.lang.String title, java.lang.String description,
050                    java.lang.String changeLog, long fileEntryTypeId,
051                    java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> fieldsMap,
052                    java.io.File file, java.io.InputStream is, long size,
053                    com.liferay.portal.service.ServiceContext serviceContext)
054                    throws com.liferay.portal.kernel.exception.PortalException,
055                            com.liferay.portal.kernel.exception.SystemException;
056    
057            public void cancelCheckOut(long fileEntryId)
058                    throws com.liferay.portal.kernel.exception.PortalException,
059                            com.liferay.portal.kernel.exception.SystemException;
060    
061            public void checkInFileEntry(long fileEntryId, boolean major,
062                    java.lang.String changeLog,
063                    com.liferay.portal.service.ServiceContext serviceContext)
064                    throws com.liferay.portal.kernel.exception.PortalException,
065                            com.liferay.portal.kernel.exception.SystemException;
066    
067            public void checkInFileEntry(long fileEntryId, java.lang.String lockUuid)
068                    throws com.liferay.portal.kernel.exception.PortalException,
069                            com.liferay.portal.kernel.exception.SystemException;
070    
071            public com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
072                    long fileEntryId)
073                    throws com.liferay.portal.kernel.exception.PortalException,
074                            com.liferay.portal.kernel.exception.SystemException;
075    
076            public com.liferay.portlet.documentlibrary.model.DLFileEntry checkOutFileEntry(
077                    long fileEntryId, java.lang.String owner, long expirationTime)
078                    throws com.liferay.portal.kernel.exception.PortalException,
079                            com.liferay.portal.kernel.exception.SystemException;
080    
081            public com.liferay.portlet.documentlibrary.model.DLFileEntry copyFileEntry(
082                    long groupId, long repositoryId, long fileEntryId, long destFolderId,
083                    com.liferay.portal.service.ServiceContext serviceContext)
084                    throws com.liferay.portal.kernel.exception.PortalException,
085                            com.liferay.portal.kernel.exception.SystemException;
086    
087            public void deleteFileEntry(long fileEntryId)
088                    throws com.liferay.portal.kernel.exception.PortalException,
089                            com.liferay.portal.kernel.exception.SystemException;
090    
091            public void deleteFileEntry(long groupId, long folderId,
092                    java.lang.String title)
093                    throws com.liferay.portal.kernel.exception.PortalException,
094                            com.liferay.portal.kernel.exception.SystemException;
095    
096            public java.io.InputStream getFileAsStream(long fileEntryId,
097                    java.lang.String version)
098                    throws com.liferay.portal.kernel.exception.PortalException,
099                            com.liferay.portal.kernel.exception.SystemException;
100    
101            public java.io.InputStream getFileAsStream(long fileEntryId,
102                    java.lang.String version, boolean incrementCounter)
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 java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
108                    long groupId, long folderId, int start, int end,
109                    com.liferay.portal.kernel.util.OrderByComparator obc)
110                    throws com.liferay.portal.kernel.exception.SystemException;
111    
112            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
113            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
114                    long groupId, long folderId, long fileEntryTypeId, int start, int end,
115                    com.liferay.portal.kernel.util.OrderByComparator obc)
116                    throws com.liferay.portal.kernel.exception.SystemException;
117    
118            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
119            public int getFileEntriesCount(long groupId, long folderId)
120                    throws com.liferay.portal.kernel.exception.SystemException;
121    
122            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
123            public int getFileEntriesCount(long groupId, long folderId,
124                    long fileEntryTypeId)
125                    throws com.liferay.portal.kernel.exception.SystemException;
126    
127            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
128            public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
129                    long fileEntryId)
130                    throws com.liferay.portal.kernel.exception.PortalException,
131                            com.liferay.portal.kernel.exception.SystemException;
132    
133            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
134            public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
135                    long groupId, long folderId, java.lang.String title)
136                    throws com.liferay.portal.kernel.exception.PortalException,
137                            com.liferay.portal.kernel.exception.SystemException;
138    
139            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
140            public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
141                    java.lang.String uuid, long groupId)
142                    throws com.liferay.portal.kernel.exception.PortalException,
143                            com.liferay.portal.kernel.exception.SystemException;
144    
145            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
146            public com.liferay.portal.model.Lock getFileEntryLock(long fileEntryId);
147    
148            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
149            public int getFoldersFileEntriesCount(long groupId,
150                    java.util.List<java.lang.Long> folderIds, int status)
151                    throws com.liferay.portal.kernel.exception.SystemException;
152    
153            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
154            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
155                    long groupId, long userId, long rootFolderId, int start, int end,
156                    com.liferay.portal.kernel.util.OrderByComparator obc)
157                    throws com.liferay.portal.kernel.exception.SystemException;
158    
159            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
160            public int getGroupFileEntriesCount(long groupId, long userId,
161                    long rootFolderId)
162                    throws com.liferay.portal.kernel.exception.SystemException;
163    
164            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
165            public boolean hasFileEntryLock(long fileEntryId)
166                    throws com.liferay.portal.kernel.exception.PortalException,
167                            com.liferay.portal.kernel.exception.SystemException;
168    
169            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
170            public boolean isFileEntryCheckedOut(long fileEntryId)
171                    throws com.liferay.portal.kernel.exception.PortalException,
172                            com.liferay.portal.kernel.exception.SystemException;
173    
174            public com.liferay.portlet.documentlibrary.model.DLFileEntry moveFileEntry(
175                    long fileEntryId, long newFolderId,
176                    com.liferay.portal.service.ServiceContext serviceContext)
177                    throws com.liferay.portal.kernel.exception.PortalException,
178                            com.liferay.portal.kernel.exception.SystemException;
179    
180            public com.liferay.portal.model.Lock refreshFileEntryLock(
181                    java.lang.String lockUuid, long expirationTime)
182                    throws com.liferay.portal.kernel.exception.PortalException,
183                            com.liferay.portal.kernel.exception.SystemException;
184    
185            public void revertFileEntry(long fileEntryId, java.lang.String version,
186                    com.liferay.portal.service.ServiceContext serviceContext)
187                    throws com.liferay.portal.kernel.exception.PortalException,
188                            com.liferay.portal.kernel.exception.SystemException;
189    
190            public com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
191                    long fileEntryId, java.lang.String sourceFileName,
192                    java.lang.String mimeType, java.lang.String title,
193                    java.lang.String description, java.lang.String changeLog,
194                    boolean majorVersion, long fileEntryTypeId,
195                    java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> fieldsMap,
196                    java.io.File file, java.io.InputStream is, long size,
197                    com.liferay.portal.service.ServiceContext serviceContext)
198                    throws com.liferay.portal.kernel.exception.PortalException,
199                            com.liferay.portal.kernel.exception.SystemException;
200    
201            public boolean verifyFileEntryCheckOut(long fileEntryId,
202                    java.lang.String lockUuid)
203                    throws com.liferay.portal.kernel.exception.PortalException,
204                            com.liferay.portal.kernel.exception.SystemException;
205    }