1   /**
2    * Copyright (c) 2000-2009 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   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.documentlibrary.service;
21  
22  import com.liferay.portal.PortalException;
23  import com.liferay.portal.SystemException;
24  import com.liferay.portal.kernel.annotation.Propagation;
25  import com.liferay.portal.kernel.annotation.Transactional;
26  
27  /**
28   * <a href="DLFileEntryService.java.html"><b><i>View Source</i></b></a>
29   *
30   * <p>
31   * ServiceBuilder generated this class. Modifications in this class will be
32   * overwritten the next time is generated.
33   * </p>
34   *
35   * <p>
36   * This interface defines the service. The default implementation is
37   * <code>com.liferay.portlet.documentlibrary.service.impl.DLFileEntryServiceImpl</code>.
38   * Modify methods in that class and rerun ServiceBuilder to populate this class
39   * and all other generated classes.
40   * </p>
41   *
42   * <p>
43   * 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.
44   * </p>
45   *
46   * @author Brian Wing Shun Chan
47   *
48   * @see com.liferay.portlet.documentlibrary.service.DLFileEntryServiceUtil
49   *
50   */
51  @Transactional(rollbackFor =  {
52      PortalException.class, SystemException.class})
53  public interface DLFileEntryService {
54      public com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
55          long folderId, java.lang.String name, java.lang.String title,
56          java.lang.String description, java.lang.String[] tagsEntries,
57          java.lang.String extraSettings, java.io.File file,
58          boolean addCommunityPermissions, boolean addGuestPermissions)
59          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
60              com.liferay.portal.SystemException;
61  
62      public com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
63          long folderId, java.lang.String name, java.lang.String title,
64          java.lang.String description, java.lang.String[] tagsEntries,
65          java.lang.String extraSettings, byte[] bytes,
66          boolean addCommunityPermissions, boolean addGuestPermissions)
67          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
68              com.liferay.portal.SystemException;
69  
70      public com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
71          long folderId, java.lang.String name, java.lang.String title,
72          java.lang.String description, java.lang.String[] tagsEntries,
73          java.lang.String extraSettings, java.io.File file,
74          java.lang.String[] communityPermissions,
75          java.lang.String[] guestPermissions)
76          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
77              com.liferay.portal.SystemException;
78  
79      public com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
80          long folderId, java.lang.String name, java.lang.String title,
81          java.lang.String description, java.lang.String[] tagsEntries,
82          java.lang.String extraSettings, byte[] bytes,
83          java.lang.String[] communityPermissions,
84          java.lang.String[] guestPermissions)
85          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
86              com.liferay.portal.SystemException;
87  
88      public void deleteFileEntry(long folderId, java.lang.String name)
89          throws com.liferay.portal.PortalException,
90              com.liferay.portal.SystemException, java.rmi.RemoteException;
91  
92      public void deleteFileEntry(long folderId, java.lang.String name,
93          double version)
94          throws com.liferay.portal.PortalException,
95              com.liferay.portal.SystemException, java.rmi.RemoteException;
96  
97      public void deleteFileEntryByTitle(long folderId,
98          java.lang.String titleWithExtension)
99          throws com.liferay.portal.PortalException,
100             com.liferay.portal.SystemException, java.rmi.RemoteException;
101 
102     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
103     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
104         long folderId)
105         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
106             com.liferay.portal.SystemException;
107 
108     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
109     public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
110         long folderId, java.lang.String name)
111         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
112             com.liferay.portal.SystemException;
113 
114     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
115     public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByTitle(
116         long folderId, java.lang.String titleWithExtension)
117         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
118             com.liferay.portal.SystemException;
119 
120     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
121     public com.liferay.lock.model.Lock getFileEntryLock(long folderId,
122         java.lang.String name)
123         throws com.liferay.portal.PortalException, java.rmi.RemoteException;
124 
125     public com.liferay.lock.model.Lock lockFileEntry(long folderId,
126         java.lang.String name)
127         throws com.liferay.portal.PortalException,
128             com.liferay.portal.SystemException, java.rmi.RemoteException;
129 
130     public com.liferay.lock.model.Lock lockFileEntry(long folderId,
131         java.lang.String name, java.lang.String owner, long expirationTime)
132         throws com.liferay.portal.PortalException,
133             com.liferay.portal.SystemException, java.rmi.RemoteException;
134 
135     public com.liferay.lock.model.Lock refreshFileEntryLock(
136         java.lang.String lockUuid, long expirationTime)
137         throws com.liferay.portal.PortalException, java.rmi.RemoteException;
138 
139     public void unlockFileEntry(long folderId, java.lang.String name)
140         throws java.rmi.RemoteException;
141 
142     public void unlockFileEntry(long folderId, java.lang.String name,
143         java.lang.String lockUuid)
144         throws com.liferay.portal.PortalException, java.rmi.RemoteException;
145 
146     public com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
147         long folderId, long newFolderId, java.lang.String name,
148         java.lang.String sourceFileName, java.lang.String title,
149         java.lang.String description, java.lang.String[] tagsEntries,
150         java.lang.String extraSettings, byte[] bytes)
151         throws com.liferay.portal.PortalException,
152             com.liferay.portal.SystemException, java.rmi.RemoteException;
153 }