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 java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) 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 java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) 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 Spring bean ID for this bean. 230 * 231 * @return the Spring bean ID for this bean 232 */ 233 public java.lang.String getBeanIdentifier(); 234 235 /** 236 * Returns the document library file shortcut with the primary key. 237 * 238 * @param fileShortcutId the primary key of the document library file shortcut 239 * @return the document library file shortcut 240 * @throws PortalException if a document library file shortcut with the primary key could not be found 241 */ 242 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 243 public com.liferay.portlet.documentlibrary.model.DLFileShortcut getDLFileShortcut( 244 long fileShortcutId) throws PortalException; 245 246 /** 247 * Returns the document library file shortcut matching the UUID and group. 248 * 249 * @param uuid the document library file shortcut's UUID 250 * @param groupId the primary key of the group 251 * @return the matching document library file shortcut 252 * @throws PortalException if a matching document library file shortcut could not be found 253 */ 254 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 255 public com.liferay.portlet.documentlibrary.model.DLFileShortcut getDLFileShortcutByUuidAndGroupId( 256 java.lang.String uuid, long groupId) throws PortalException; 257 258 /** 259 * Returns a range of all the document library file shortcuts. 260 * 261 * <p> 262 * 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. 263 * </p> 264 * 265 * @param start the lower bound of the range of document library file shortcuts 266 * @param end the upper bound of the range of document library file shortcuts (not inclusive) 267 * @return the range of document library file shortcuts 268 */ 269 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 270 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getDLFileShortcuts( 271 int start, int end); 272 273 /** 274 * Returns all the document library file shortcuts matching the UUID and company. 275 * 276 * @param uuid the UUID of the document library file shortcuts 277 * @param companyId the primary key of the company 278 * @return the matching document library file shortcuts, or an empty list if no matches were found 279 */ 280 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 281 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getDLFileShortcutsByUuidAndCompanyId( 282 java.lang.String uuid, long companyId); 283 284 /** 285 * Returns a range of document library file shortcuts matching the UUID and company. 286 * 287 * @param uuid the UUID of the document library file shortcuts 288 * @param companyId the primary key of the company 289 * @param start the lower bound of the range of document library file shortcuts 290 * @param end the upper bound of the range of document library file shortcuts (not inclusive) 291 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 292 * @return the range of matching document library file shortcuts, or an empty list if no matches were found 293 */ 294 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 295 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getDLFileShortcutsByUuidAndCompanyId( 296 java.lang.String uuid, long companyId, int start, int end, 297 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileShortcut> orderByComparator); 298 299 /** 300 * Returns the number of document library file shortcuts. 301 * 302 * @return the number of document library file shortcuts 303 */ 304 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 305 public int getDLFileShortcutsCount(); 306 307 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 308 public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( 309 com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext); 310 311 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 312 public com.liferay.portlet.documentlibrary.model.DLFileShortcut getFileShortcut( 313 long fileShortcutId) throws PortalException; 314 315 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 316 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getFileShortcuts( 317 long groupId, long folderId, boolean active, int status, int start, 318 int end); 319 320 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 321 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> getFileShortcuts( 322 long toFileEntryId); 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) throws PortalException; 332 333 public void rebuildTree(long companyId) throws PortalException; 334 335 /** 336 * Sets the Spring bean ID for this bean. 337 * 338 * @param beanIdentifier the Spring bean ID for this bean 339 */ 340 public void setBeanIdentifier(java.lang.String beanIdentifier); 341 342 public void setTreePaths(long folderId, java.lang.String treePath) 343 throws PortalException; 344 345 public void updateAsset(long userId, 346 com.liferay.portlet.documentlibrary.model.DLFileShortcut fileShortcut, 347 long[] assetCategoryIds, java.lang.String[] assetTagNames) 348 throws PortalException; 349 350 /** 351 * Updates the document library file shortcut in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 352 * 353 * @param dlFileShortcut the document library file shortcut 354 * @return the document library file shortcut that was updated 355 */ 356 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 357 public com.liferay.portlet.documentlibrary.model.DLFileShortcut updateDLFileShortcut( 358 com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut); 359 360 public com.liferay.portlet.documentlibrary.model.DLFileShortcut updateFileShortcut( 361 long userId, long fileShortcutId, long repositoryId, long folderId, 362 long toFileEntryId, 363 com.liferay.portal.service.ServiceContext serviceContext) 364 throws PortalException; 365 366 public void updateFileShortcuts(long oldToFileEntryId, long newToFileEntryId); 367 368 public void updateStatus(long userId, long fileShortcutId, int status, 369 com.liferay.portal.service.ServiceContext serviceContext) 370 throws PortalException; 371 }