001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
097            public com.liferay.portlet.documentlibrary.model.DLFileEntry fetchFileEntryByImageId(
098                    long imageId)
099                    throws com.liferay.portal.kernel.exception.PortalException,
100                            com.liferay.portal.kernel.exception.SystemException;
101    
102            public java.io.InputStream getFileAsStream(long fileEntryId,
103                    java.lang.String version)
104                    throws com.liferay.portal.kernel.exception.PortalException,
105                            com.liferay.portal.kernel.exception.SystemException;
106    
107            public java.io.InputStream getFileAsStream(long fileEntryId,
108                    java.lang.String version, boolean incrementCounter)
109                    throws com.liferay.portal.kernel.exception.PortalException,
110                            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, 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 java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
120                    long groupId, long folderId, long fileEntryTypeId, int start, int end,
121                    com.liferay.portal.kernel.util.OrderByComparator obc)
122                    throws com.liferay.portal.kernel.exception.SystemException;
123    
124            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
125            public int getFileEntriesCount(long groupId, long folderId)
126                    throws com.liferay.portal.kernel.exception.SystemException;
127    
128            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
129            public int getFileEntriesCount(long groupId, long folderId,
130                    long fileEntryTypeId)
131                    throws 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 fileEntryId)
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 getFileEntry(
141                    long groupId, long folderId, java.lang.String title)
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.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
147                    java.lang.String uuid, long groupId)
148                    throws com.liferay.portal.kernel.exception.PortalException,
149                            com.liferay.portal.kernel.exception.SystemException;
150    
151            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
152            public com.liferay.portal.model.Lock getFileEntryLock(long fileEntryId);
153    
154            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
155            public int getFoldersFileEntriesCount(long groupId,
156                    java.util.List<java.lang.Long> folderIds, int status)
157                    throws com.liferay.portal.kernel.exception.SystemException;
158    
159            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
160            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
161                    long groupId, long userId, long rootFolderId, int start, int end,
162                    com.liferay.portal.kernel.util.OrderByComparator obc)
163                    throws com.liferay.portal.kernel.exception.SystemException;
164    
165            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
166            public int getGroupFileEntriesCount(long groupId, long userId,
167                    long rootFolderId)
168                    throws com.liferay.portal.kernel.exception.SystemException;
169    
170            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
171            public boolean hasFileEntryLock(long fileEntryId)
172                    throws com.liferay.portal.kernel.exception.PortalException,
173                            com.liferay.portal.kernel.exception.SystemException;
174    
175            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
176            public boolean isFileEntryCheckedOut(long fileEntryId)
177                    throws com.liferay.portal.kernel.exception.PortalException,
178                            com.liferay.portal.kernel.exception.SystemException;
179    
180            public com.liferay.portlet.documentlibrary.model.DLFileEntry moveFileEntry(
181                    long fileEntryId, long newFolderId,
182                    com.liferay.portal.service.ServiceContext serviceContext)
183                    throws com.liferay.portal.kernel.exception.PortalException,
184                            com.liferay.portal.kernel.exception.SystemException;
185    
186            public com.liferay.portal.model.Lock refreshFileEntryLock(
187                    java.lang.String lockUuid, long expirationTime)
188                    throws com.liferay.portal.kernel.exception.PortalException,
189                            com.liferay.portal.kernel.exception.SystemException;
190    
191            public void revertFileEntry(long fileEntryId, java.lang.String version,
192                    com.liferay.portal.service.ServiceContext serviceContext)
193                    throws com.liferay.portal.kernel.exception.PortalException,
194                            com.liferay.portal.kernel.exception.SystemException;
195    
196            public com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
197                    long fileEntryId, java.lang.String sourceFileName,
198                    java.lang.String mimeType, java.lang.String title,
199                    java.lang.String description, java.lang.String changeLog,
200                    boolean majorVersion, long fileEntryTypeId,
201                    java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> fieldsMap,
202                    java.io.File file, java.io.InputStream is, long size,
203                    com.liferay.portal.service.ServiceContext serviceContext)
204                    throws com.liferay.portal.kernel.exception.PortalException,
205                            com.liferay.portal.kernel.exception.SystemException;
206    
207            public boolean verifyFileEntryCheckOut(long fileEntryId,
208                    java.lang.String lockUuid)
209                    throws com.liferay.portal.kernel.exception.PortalException,
210                            com.liferay.portal.kernel.exception.SystemException;
211    }