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 folderId, long toFileEntryId, 064 com.liferay.portal.service.ServiceContext serviceContext) 065 throws com.liferay.portal.kernel.exception.PortalException; 066 067 public void addFileShortcutResources( 068 com.liferay.portlet.documentlibrary.model.DLFileShortcut fileShortcut, 069 boolean addGroupPermissions, boolean addGuestPermissions) 070 throws com.liferay.portal.kernel.exception.PortalException; 071 072 public void addFileShortcutResources( 073 com.liferay.portlet.documentlibrary.model.DLFileShortcut fileShortcut, 074 java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) 075 throws com.liferay.portal.kernel.exception.PortalException; 076 077 public void addFileShortcutResources(long fileShortcutId, 078 boolean addGroupPermissions, boolean addGuestPermissions) 079 throws com.liferay.portal.kernel.exception.PortalException; 080 081 public void addFileShortcutResources(long fileShortcutId, 082 java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) 083 throws com.liferay.portal.kernel.exception.PortalException; 084 085 /** 086 * Creates a new document library file shortcut with the primary key. Does not add the document library file shortcut to the database. 087 * 088 * @param fileShortcutId the primary key for the new document library file shortcut 089 * @return the new document library file shortcut 090 */ 091 public com.liferay.portlet.documentlibrary.model.DLFileShortcut createDLFileShortcut( 092 long fileShortcutId); 093 094 /** 095 * Deletes the document library file shortcut from the database. Also notifies the appropriate model listeners. 096 * 097 * @param dlFileShortcut the document library file shortcut 098 * @return the document library file shortcut that was removed 099 */ 100 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 101 public com.liferay.portlet.documentlibrary.model.DLFileShortcut deleteDLFileShortcut( 102 com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut); 103 104 /** 105 * Deletes the document library file shortcut with the primary key from the database. Also notifies the appropriate model listeners. 106 * 107 * @param fileShortcutId the primary key of the document library file shortcut 108 * @return the document library file shortcut that was removed 109 * @throws PortalException if a document library file shortcut with the primary key could not be found 110 */ 111 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 112 public com.liferay.portlet.documentlibrary.model.DLFileShortcut deleteDLFileShortcut( 113 long fileShortcutId) 114 throws com.liferay.portal.kernel.exception.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 com.liferay.portal.kernel.exception.PortalException; 120 121 public void deleteFileShortcut(long fileShortcutId) 122 throws com.liferay.portal.kernel.exception.PortalException; 123 124 public void deleteFileShortcuts(long groupId, long folderId) 125 throws com.liferay.portal.kernel.exception.PortalException; 126 127 public void deleteFileShortcuts(long groupId, long folderId, 128 boolean includeTrashedEntries) 129 throws com.liferay.portal.kernel.exception.PortalException; 130 131 public void deleteFileShortcuts(long toFileEntryId) 132 throws com.liferay.portal.kernel.exception.PortalException; 133 134 /** 135 * @throws PortalException 136 */ 137 @Override 138 public com.liferay.portal.model.PersistedModel deletePersistedModel( 139 com.liferay.portal.model.PersistedModel persistedModel) 140 throws com.liferay.portal.kernel.exception.PortalException; 141 142 public void disableFileShortcuts(long toFileEntryId); 143 144 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery(); 145 146 /** 147 * Performs a dynamic query on the database and returns the matching rows. 148 * 149 * @param dynamicQuery the dynamic query 150 * @return the matching rows 151 */ 152 public <T> java.util.List<T> dynamicQuery( 153 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 154 155 /** 156 * Performs a dynamic query on the database and returns a range of the matching rows. 157 * 158 * <p> 159 * 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. 160 * </p> 161 * 162 * @param dynamicQuery the dynamic query 163 * @param start the lower bound of the range of model instances 164 * @param end the upper bound of the range of model instances (not inclusive) 165 * @return the range of matching rows 166 */ 167 public <T> java.util.List<T> dynamicQuery( 168 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 169 int end); 170 171 /** 172 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 173 * 174 * <p> 175 * 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. 176 * </p> 177 * 178 * @param dynamicQuery the dynamic query 179 * @param start the lower bound of the range of model instances 180 * @param end the upper bound of the range of model instances (not inclusive) 181 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 182 * @return the ordered range of matching rows 183 */ 184 public <T> java.util.List<T> dynamicQuery( 185 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 186 int end, 187 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator); 188 189 /** 190 * Returns the number of rows matching the dynamic query. 191 * 192 * @param dynamicQuery the dynamic query 193 * @return the number of rows matching the dynamic query 194 */ 195 public long dynamicQueryCount( 196 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 197 198 /** 199 * Returns the number of rows matching the dynamic query. 200 * 201 * @param dynamicQuery the dynamic query 202 * @param projection the projection to apply to the query 203 * @return the number of rows matching the dynamic query 204 */ 205 public long dynamicQueryCount( 206 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 207 com.liferay.portal.kernel.dao.orm.Projection projection); 208 209 public void enableFileShortcuts(long toFileEntryId); 210 211 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 212 public com.liferay.portlet.documentlibrary.model.DLFileShortcut fetchDLFileShortcut( 213 long fileShortcutId); 214 215 /** 216 * Returns the document library file shortcut matching the UUID and group. 217 * 218 * @param uuid the document library file shortcut's UUID 219 * @param groupId the primary key of the group 220 * @return the matching document library file shortcut, or <code>null</code> if a matching document library file shortcut could not be found 221 */ 222 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 223 public com.liferay.portlet.documentlibrary.model.DLFileShortcut fetchDLFileShortcutByUuidAndGroupId( 224 java.lang.String uuid, long groupId); 225 226 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 227 public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery(); 228 229 /** 230 * Returns the Spring bean ID for this bean. 231 * 232 * @return the Spring bean ID for this bean 233 */ 234 public java.lang.String getBeanIdentifier(); 235 236 /** 237 * Returns the document library file shortcut with the primary key. 238 * 239 * @param fileShortcutId the primary key of the document library file shortcut 240 * @return the document library file shortcut 241 * @throws PortalException if a document library file shortcut with the primary key could not be found 242 */ 243 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 244 public com.liferay.portlet.documentlibrary.model.DLFileShortcut getDLFileShortcut( 245 long fileShortcutId) 246 throws com.liferay.portal.kernel.exception.PortalException; 247 248 /** 249 * Returns the document library file shortcut matching the UUID and group. 250 * 251 * @param uuid the document library file shortcut's UUID 252 * @param groupId the primary key of the group 253 * @return the matching document library file shortcut 254 * @throws PortalException if a matching document library file shortcut could not be found 255 */ 256 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 257 public com.liferay.portlet.documentlibrary.model.DLFileShortcut getDLFileShortcutByUuidAndGroupId( 258 java.lang.String uuid, long groupId) 259 throws com.liferay.portal.kernel.exception.PortalException; 260 261 /** 262 * Returns a range of all the document library file shortcuts. 263 * 264 * <p> 265 * 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. 266 * </p> 267 * 268 * @param start the lower bound of the range of document library file shortcuts 269 * @param end the upper bound of the range of document library file shortcuts (not inclusive) 270 * @return the range of document library file shortcuts 271 */ 272 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 273 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getDLFileShortcuts( 274 int start, int end); 275 276 /** 277 * Returns all the document library file shortcuts matching the UUID and company. 278 * 279 * @param uuid the UUID of the document library file shortcuts 280 * @param companyId the primary key of the company 281 * @return the matching document library file shortcuts, or an empty list if no matches were found 282 */ 283 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 284 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getDLFileShortcutsByUuidAndCompanyId( 285 java.lang.String uuid, long companyId); 286 287 /** 288 * Returns a range of document library file shortcuts matching the UUID and company. 289 * 290 * @param uuid the UUID of the document library file shortcuts 291 * @param companyId the primary key of the company 292 * @param start the lower bound of the range of document library file shortcuts 293 * @param end the upper bound of the range of document library file shortcuts (not inclusive) 294 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 295 * @return the range of matching document library file shortcuts, or an empty list if no matches were found 296 */ 297 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 298 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getDLFileShortcutsByUuidAndCompanyId( 299 java.lang.String uuid, long companyId, int start, int end, 300 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileShortcut> orderByComparator); 301 302 /** 303 * Returns the number of document library file shortcuts. 304 * 305 * @return the number of document library file shortcuts 306 */ 307 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 308 public int getDLFileShortcutsCount(); 309 310 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 311 public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( 312 com.liferay.portal.kernel.lar.PortletDataContext portletDataContext); 313 314 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 315 public com.liferay.portlet.documentlibrary.model.DLFileShortcut getFileShortcut( 316 long fileShortcutId) 317 throws com.liferay.portal.kernel.exception.PortalException; 318 319 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 320 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getFileShortcuts( 321 long groupId, long folderId, boolean active, int status, int start, 322 int end); 323 324 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 325 public int getFileShortcutsCount(long groupId, long folderId, 326 boolean active, int status); 327 328 @Override 329 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 330 public com.liferay.portal.model.PersistedModel getPersistedModel( 331 java.io.Serializable primaryKeyObj) 332 throws com.liferay.portal.kernel.exception.PortalException; 333 334 public void rebuildTree(long companyId) 335 throws com.liferay.portal.kernel.exception.PortalException; 336 337 /** 338 * Sets the Spring bean ID for this bean. 339 * 340 * @param beanIdentifier the Spring bean ID for this bean 341 */ 342 public void setBeanIdentifier(java.lang.String beanIdentifier); 343 344 public void setTreePaths(long folderId, java.lang.String treePath) 345 throws com.liferay.portal.kernel.exception.PortalException; 346 347 public void updateAsset(long userId, 348 com.liferay.portlet.documentlibrary.model.DLFileShortcut fileShortcut, 349 long[] assetCategoryIds, java.lang.String[] assetTagNames) 350 throws com.liferay.portal.kernel.exception.PortalException; 351 352 /** 353 * Updates the document library file shortcut in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 354 * 355 * @param dlFileShortcut the document library file shortcut 356 * @return the document library file shortcut that was updated 357 */ 358 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 359 public com.liferay.portlet.documentlibrary.model.DLFileShortcut updateDLFileShortcut( 360 com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut); 361 362 public com.liferay.portlet.documentlibrary.model.DLFileShortcut updateFileShortcut( 363 long userId, long fileShortcutId, long folderId, long toFileEntryId, 364 com.liferay.portal.service.ServiceContext serviceContext) 365 throws com.liferay.portal.kernel.exception.PortalException; 366 367 public void updateFileShortcuts(long oldToFileEntryId, long newToFileEntryId); 368 369 public void updateStatus(long userId, long fileShortcutId, int status, 370 com.liferay.portal.service.ServiceContext serviceContext) 371 throws com.liferay.portal.kernel.exception.PortalException; 372 }