1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
13   */
14  
15  package com.liferay.documentlibrary.service;
16  
17  import com.liferay.portal.PortalException;
18  import com.liferay.portal.SystemException;
19  import com.liferay.portal.kernel.annotation.Transactional;
20  import com.liferay.portal.kernel.search.Hits;
21  
22  import java.io.File;
23  import java.io.InputStream;
24  
25  import java.util.Date;
26  
27  @Transactional(rollbackFor = {PortalException.class, SystemException.class})
28  /**
29   * <a href="DLLocalService.java.html"><b><i>View Source</i></b></a>
30   *
31   * @author Brian Wing Shun Chan
32   */
33  public interface DLLocalService {
34  
35      public void addFile(
36              long companyId, String portletId, long groupId, long repositoryId,
37              String fileName, String properties, Date modifiedDate,
38              String[] tagsEntries, InputStream is)
39          throws PortalException, SystemException;
40  
41      public void checkRoot(long companyId) throws SystemException;
42  
43      public InputStream getFileAsStream(
44              long companyId, long repositoryId, String fileName)
45          throws PortalException, SystemException;
46  
47      public InputStream getFileAsStream(
48              long companyId, long repositoryId, String fileName,
49              double versionNumber)
50          throws PortalException, SystemException;
51  
52      public boolean hasFile(
53              long companyId, long repositoryId, String fileName,
54              double versionNumber)
55          throws PortalException, SystemException;
56  
57      public void move(String srcDir, String destDir) throws SystemException;
58  
59      public Hits search(
60              long companyId, String portletId, long groupId,
61              long[] repositoryIds, String keywords, int start, int end)
62          throws SystemException;
63  
64      public void updateFile(
65              long companyId, String portletId, long groupId, long repositoryId,
66              String fileName, double versionNumber, String sourceFileName,
67              String properties, Date modifiedDate, String[] tagsEntries,
68              InputStream is)
69          throws PortalException, SystemException;
70  
71      public void validate(String fileName, File file)
72          throws PortalException, SystemException;
73  
74      public void validate(String fileName, byte[] bytes)
75          throws PortalException, SystemException;
76  
77      public void validate(String fileName, InputStream is)
78          throws PortalException, SystemException;
79  
80      public void validate(String fileName, String sourceFileName, InputStream is)
81          throws PortalException, SystemException;
82  
83  }