001 /** 002 * Copyright (c) 2000-present Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portlet.documentlibrary.service; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.exception.PortalException; 020 import com.liferay.portal.kernel.exception.SystemException; 021 import com.liferay.portal.kernel.search.IndexableType; 022 import com.liferay.portal.kernel.transaction.Isolation; 023 import com.liferay.portal.kernel.transaction.Propagation; 024 import com.liferay.portal.kernel.transaction.Transactional; 025 import com.liferay.portal.model.SystemEventConstants; 026 import com.liferay.portal.service.BaseLocalService; 027 import com.liferay.portal.service.PersistedModelLocalService; 028 029 /** 030 * Provides the local service interface for DLFileShortcut. Methods of this 031 * service will not have security checks based on the propagated JAAS 032 * credentials because this service can only be accessed from within the same 033 * VM. 034 * 035 * @author Brian Wing Shun Chan 036 * @see DLFileShortcutLocalServiceUtil 037 * @see com.liferay.portlet.documentlibrary.service.base.DLFileShortcutLocalServiceBaseImpl 038 * @see com.liferay.portlet.documentlibrary.service.impl.DLFileShortcutLocalServiceImpl 039 * @generated 040 */ 041 @ProviderType 042 @Transactional(isolation = Isolation.PORTAL, rollbackFor = { 043 PortalException.class, SystemException.class}) 044 public interface DLFileShortcutLocalService extends BaseLocalService, 045 PersistedModelLocalService { 046 /* 047 * NOTE FOR DEVELOPERS: 048 * 049 * Never modify or reference this interface directly. Always use {@link DLFileShortcutLocalServiceUtil} to access the document library file shortcut local service. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLFileShortcutLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. 050 */ 051 052 /** 053 * Adds the document library file shortcut to the database. Also notifies the appropriate model listeners. 054 * 055 * @param dlFileShortcut the document library file shortcut 056 * @return the document library file shortcut that was added 057 */ 058 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 059 public com.liferay.portlet.documentlibrary.model.DLFileShortcut addDLFileShortcut( 060 com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut); 061 062 public com.liferay.portlet.documentlibrary.model.DLFileShortcut addFileShortcut( 063 long userId, long groupId, long repositoryId, long folderId, 064 long toFileEntryId, 065 com.liferay.portal.service.ServiceContext serviceContext) 066 throws PortalException; 067 068 public void addFileShortcutResources( 069 com.liferay.portlet.documentlibrary.model.DLFileShortcut fileShortcut, 070 boolean addGroupPermissions, boolean addGuestPermissions) 071 throws PortalException; 072 073 public void addFileShortcutResources( 074 com.liferay.portlet.documentlibrary.model.DLFileShortcut fileShortcut, 075 com.liferay.portal.service.permission.ModelPermissions modelPermissions) 076 throws PortalException; 077 078 public void addFileShortcutResources(long fileShortcutId, 079 boolean addGroupPermissions, boolean addGuestPermissions) 080 throws PortalException; 081 082 public void addFileShortcutResources(long fileShortcutId, 083 com.liferay.portal.service.permission.ModelPermissions modelPermissions) 084 throws PortalException; 085 086 /** 087 * Creates a new document library file shortcut with the primary key. Does not add the document library file shortcut to the database. 088 * 089 * @param fileShortcutId the primary key for the new document library file shortcut 090 * @return the new document library file shortcut 091 */ 092 public com.liferay.portlet.documentlibrary.model.DLFileShortcut createDLFileShortcut( 093 long fileShortcutId); 094 095 /** 096 * Deletes the document library file shortcut from the database. Also notifies the appropriate model listeners. 097 * 098 * @param dlFileShortcut the document library file shortcut 099 * @return the document library file shortcut that was removed 100 */ 101 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 102 public com.liferay.portlet.documentlibrary.model.DLFileShortcut deleteDLFileShortcut( 103 com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut); 104 105 /** 106 * Deletes the document library file shortcut with the primary key from the database. Also notifies the appropriate model listeners. 107 * 108 * @param fileShortcutId the primary key of the document library file shortcut 109 * @return the document library file shortcut that was removed 110 * @throws PortalException if a document library file shortcut with the primary key could not be found 111 */ 112 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 113 public com.liferay.portlet.documentlibrary.model.DLFileShortcut deleteDLFileShortcut( 114 long fileShortcutId) throws PortalException; 115 116 @com.liferay.portal.kernel.systemevent.SystemEvent(type = SystemEventConstants.TYPE_DELETE) 117 public void deleteFileShortcut( 118 com.liferay.portlet.documentlibrary.model.DLFileShortcut fileShortcut) 119 throws PortalException; 120 121 public void deleteFileShortcut(long fileShortcutId) 122 throws PortalException; 123 124 public void deleteFileShortcuts(long groupId, long folderId) 125 throws PortalException; 126 127 public void deleteFileShortcuts(long groupId, long folderId, 128 boolean includeTrashedEntries) throws PortalException; 129 130 public void deleteFileShortcuts(long toFileEntryId) 131 throws PortalException; 132 133 /** 134 * @throws PortalException 135 */ 136 @Override 137 public com.liferay.portal.model.PersistedModel deletePersistedModel( 138 com.liferay.portal.model.PersistedModel persistedModel) 139 throws PortalException; 140 141 public void disableFileShortcuts(long toFileEntryId); 142 143 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery(); 144 145 /** 146 * Performs a dynamic query on the database and returns the matching rows. 147 * 148 * @param dynamicQuery the dynamic query 149 * @return the matching rows 150 */ 151 public <T> java.util.List<T> dynamicQuery( 152 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 153 154 /** 155 * Performs a dynamic query on the database and returns a range of the matching rows. 156 * 157 * <p> 158 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.documentlibrary.model.impl.DLFileShortcutModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 159 * </p> 160 * 161 * @param dynamicQuery the dynamic query 162 * @param start the lower bound of the range of model instances 163 * @param end the upper bound of the range of model instances (not inclusive) 164 * @return the range of matching rows 165 */ 166 public <T> java.util.List<T> dynamicQuery( 167 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 168 int end); 169 170 /** 171 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 172 * 173 * <p> 174 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.documentlibrary.model.impl.DLFileShortcutModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 175 * </p> 176 * 177 * @param dynamicQuery the dynamic query 178 * @param start the lower bound of the range of model instances 179 * @param end the upper bound of the range of model instances (not inclusive) 180 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 181 * @return the ordered range of matching rows 182 */ 183 public <T> java.util.List<T> dynamicQuery( 184 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 185 int end, 186 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator); 187 188 /** 189 * Returns the number of rows matching the dynamic query. 190 * 191 * @param dynamicQuery the dynamic query 192 * @return the number of rows matching the dynamic query 193 */ 194 public long dynamicQueryCount( 195 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 196 197 /** 198 * Returns the number of rows matching the dynamic query. 199 * 200 * @param dynamicQuery the dynamic query 201 * @param projection the projection to apply to the query 202 * @return the number of rows matching the dynamic query 203 */ 204 public long dynamicQueryCount( 205 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 206 com.liferay.portal.kernel.dao.orm.Projection projection); 207 208 public void enableFileShortcuts(long toFileEntryId); 209 210 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 211 public com.liferay.portlet.documentlibrary.model.DLFileShortcut fetchDLFileShortcut( 212 long fileShortcutId); 213 214 /** 215 * Returns the document library file shortcut matching the UUID and group. 216 * 217 * @param uuid the document library file shortcut's UUID 218 * @param groupId the primary key of the group 219 * @return the matching document library file shortcut, or <code>null</code> if a matching document library file shortcut could not be found 220 */ 221 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 222 public com.liferay.portlet.documentlibrary.model.DLFileShortcut fetchDLFileShortcutByUuidAndGroupId( 223 java.lang.String uuid, long groupId); 224 225 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 226 public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery(); 227 228 /** 229 * Returns the document library file shortcut with the primary key. 230 * 231 * @param fileShortcutId the primary key of the document library file shortcut 232 * @return the document library file shortcut 233 * @throws PortalException if a document library file shortcut with the primary key could not be found 234 */ 235 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 236 public com.liferay.portlet.documentlibrary.model.DLFileShortcut getDLFileShortcut( 237 long fileShortcutId) throws PortalException; 238 239 /** 240 * Returns the document library file shortcut matching the UUID and group. 241 * 242 * @param uuid the document library file shortcut's UUID 243 * @param groupId the primary key of the group 244 * @return the matching document library file shortcut 245 * @throws PortalException if a matching document library file shortcut could not be found 246 */ 247 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 248 public com.liferay.portlet.documentlibrary.model.DLFileShortcut getDLFileShortcutByUuidAndGroupId( 249 java.lang.String uuid, long groupId) throws PortalException; 250 251 /** 252 * Returns a range of all the document library file shortcuts. 253 * 254 * <p> 255 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.documentlibrary.model.impl.DLFileShortcutModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 256 * </p> 257 * 258 * @param start the lower bound of the range of document library file shortcuts 259 * @param end the upper bound of the range of document library file shortcuts (not inclusive) 260 * @return the range of document library file shortcuts 261 */ 262 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 263 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getDLFileShortcuts( 264 int start, int end); 265 266 /** 267 * Returns all the document library file shortcuts matching the UUID and company. 268 * 269 * @param uuid the UUID of the document library file shortcuts 270 * @param companyId the primary key of the company 271 * @return the matching document library file shortcuts, or an empty list if no matches were found 272 */ 273 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 274 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getDLFileShortcutsByUuidAndCompanyId( 275 java.lang.String uuid, long companyId); 276 277 /** 278 * Returns a range of document library file shortcuts matching the UUID and company. 279 * 280 * @param uuid the UUID of the document library file shortcuts 281 * @param companyId the primary key of the company 282 * @param start the lower bound of the range of document library file shortcuts 283 * @param end the upper bound of the range of document library file shortcuts (not inclusive) 284 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 285 * @return the range of matching document library file shortcuts, or an empty list if no matches were found 286 */ 287 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 288 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getDLFileShortcutsByUuidAndCompanyId( 289 java.lang.String uuid, long companyId, int start, int end, 290 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileShortcut> orderByComparator); 291 292 /** 293 * Returns the number of document library file shortcuts. 294 * 295 * @return the number of document library file shortcuts 296 */ 297 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 298 public int getDLFileShortcutsCount(); 299 300 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 301 public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( 302 com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext); 303 304 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 305 public com.liferay.portlet.documentlibrary.model.DLFileShortcut getFileShortcut( 306 long fileShortcutId) throws PortalException; 307 308 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 309 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getFileShortcuts( 310 long groupId, long folderId, boolean active, int status, int start, 311 int end); 312 313 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 314 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getFileShortcuts( 315 long toFileEntryId); 316 317 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 318 public int getFileShortcutsCount(long groupId, long folderId, 319 boolean active, int status); 320 321 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 322 public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery(); 323 324 /** 325 * Returns the OSGi service identifier. 326 * 327 * @return the OSGi service identifier 328 */ 329 public java.lang.String getOSGiServiceIdentifier(); 330 331 @Override 332 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 333 public com.liferay.portal.model.PersistedModel getPersistedModel( 334 java.io.Serializable primaryKeyObj) throws PortalException; 335 336 public void rebuildTree(long companyId) throws PortalException; 337 338 public void setTreePaths(long folderId, java.lang.String treePath) 339 throws PortalException; 340 341 public void updateAsset(long userId, 342 com.liferay.portlet.documentlibrary.model.DLFileShortcut fileShortcut, 343 long[] assetCategoryIds, java.lang.String[] assetTagNames) 344 throws PortalException; 345 346 /** 347 * Updates the document library file shortcut in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 348 * 349 * @param dlFileShortcut the document library file shortcut 350 * @return the document library file shortcut that was updated 351 */ 352 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 353 public com.liferay.portlet.documentlibrary.model.DLFileShortcut updateDLFileShortcut( 354 com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut); 355 356 public com.liferay.portlet.documentlibrary.model.DLFileShortcut updateFileShortcut( 357 long userId, long fileShortcutId, long repositoryId, long folderId, 358 long toFileEntryId, 359 com.liferay.portal.service.ServiceContext serviceContext) 360 throws PortalException; 361 362 public void updateFileShortcuts(long oldToFileEntryId, long newToFileEntryId); 363 364 public void updateFileShortcutsActive(long toFileEntryId, boolean active); 365 366 public void updateStatus(long userId, long fileShortcutId, int status, 367 com.liferay.portal.service.ServiceContext serviceContext) 368 throws PortalException; 369 }