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