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.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.transaction.Transactional;
020    import com.liferay.portal.service.ServiceContext;
021    
022    import java.io.File;
023    
024    import java.util.Date;
025    
026    /**
027     * @author     Brian Wing Shun Chan
028     * @author     Alexander Chow
029     * @deprecated {@link DLLocalService}
030     */
031    @Transactional(rollbackFor = {PortalException.class, SystemException.class})
032    public interface DLService {
033    
034            public void addDirectory(long companyId, long repositoryId, String dirName)
035                    throws PortalException, SystemException;
036    
037            public void addFile(
038                            long companyId, String portletId, long groupId, long repositoryId,
039                            String fileName, long fileEntryId, String properties,
040                            Date modifiedDate, ServiceContext serviceContext, byte[] bytes)
041                    throws PortalException, SystemException;
042    
043            public void addFile(
044                            long companyId, String portletId, long groupId, long repositoryId,
045                            String fileName, long fileEntryId, String properties,
046                            Date modifiedDate, ServiceContext serviceContext, File file)
047                    throws PortalException, SystemException;
048    
049            public void deleteDirectory(
050                            long companyId, String portletId, long repositoryId, String dirName)
051                    throws PortalException, SystemException;
052    
053            public void deleteFile(
054                            long companyId, String portletId, long repositoryId,
055                            String fileName)
056                    throws PortalException, SystemException;
057    
058            public void deleteFile(
059                            long companyId, String portletId, long repositoryId,
060                            String fileName, String versionNumber)
061                    throws PortalException, SystemException;
062    
063            public byte[] getFile(long companyId, long repositoryId, String fileName)
064                    throws PortalException, SystemException;
065    
066            public byte[] getFile(
067                            long companyId, long repositoryId, String fileName,
068                            String versionNumber)
069                    throws PortalException, SystemException;
070    
071            public String[] getFileNames(
072                            long companyId, long repositoryId, String dirName)
073                    throws PortalException, SystemException;
074    
075            public long getFileSize(
076                            long companyId, long repositoryId, String fileName)
077                    throws PortalException, SystemException;
078    
079            public void updateFile(
080                            long companyId, String portletId, long groupId, long repositoryId,
081                            long newRepositoryId, String fileName, long fileEntryId)
082                    throws PortalException, SystemException;
083    
084            public void updateFile(
085                            long companyId, String portletId, long groupId, long repositoryId,
086                            String fileName, String versionNumber, String sourceFileName,
087                            long fileEntryId, String properties, Date modifiedDate,
088                            ServiceContext serviceContext, byte[] bytes)
089                    throws PortalException, SystemException;
090    
091            public void updateFile(
092                            long companyId, String portletId, long groupId, long repositoryId,
093                            String fileName, String versionNumber, String sourceFileName,
094                            long fileEntryId, String properties, Date modifiedDate,
095                            ServiceContext serviceContext, File file)
096                    throws PortalException, SystemException;
097    
098            public void updateFile(
099                            long companyId, String portletId, long groupId, long repositoryId,
100                            String fileName, String newFileName, boolean reindex)
101                    throws PortalException, SystemException;
102    
103    }