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.asset.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 AssetTag. 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 AssetTagLocalServiceUtil 037 * @see com.liferay.portlet.asset.service.base.AssetTagLocalServiceBaseImpl 038 * @see com.liferay.portlet.asset.service.impl.AssetTagLocalServiceImpl 039 * @generated 040 */ 041 @ProviderType 042 @Transactional(isolation = Isolation.PORTAL, rollbackFor = { 043 PortalException.class, SystemException.class}) 044 public interface AssetTagLocalService extends BaseLocalService, 045 PersistedModelLocalService { 046 /* 047 * NOTE FOR DEVELOPERS: 048 * 049 * Never modify or reference this interface directly. Always use {@link AssetTagLocalServiceUtil} to access the asset tag local service. Add custom service methods to {@link com.liferay.portlet.asset.service.impl.AssetTagLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. 050 */ 051 public void addAssetEntryAssetTag(long entryId, 052 com.liferay.portlet.asset.model.AssetTag assetTag); 053 054 public void addAssetEntryAssetTag(long entryId, long tagId); 055 056 public void addAssetEntryAssetTags(long entryId, 057 java.util.List<com.liferay.portlet.asset.model.AssetTag> AssetTags); 058 059 public void addAssetEntryAssetTags(long entryId, long[] tagIds); 060 061 /** 062 * Adds the asset tag to the database. Also notifies the appropriate model listeners. 063 * 064 * @param assetTag the asset tag 065 * @return the asset tag that was added 066 */ 067 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 068 public com.liferay.portlet.asset.model.AssetTag addAssetTag( 069 com.liferay.portlet.asset.model.AssetTag assetTag); 070 071 /** 072 * Adds an asset tag. 073 * 074 * @param userId the primary key of the user adding the asset tag 075 * @param groupId the primary key of the group in which the asset tag is to 076 be added 077 * @param name the asset tag's name 078 * @param serviceContext the service context to be applied 079 * @return the asset tag that was added 080 */ 081 public com.liferay.portlet.asset.model.AssetTag addTag(long userId, 082 long groupId, java.lang.String name, 083 com.liferay.portal.service.ServiceContext serviceContext) 084 throws PortalException; 085 086 /** 087 * Returns the asset tags matching the group and names, creating new asset 088 * tags matching the names if the group doesn't already have them. 089 * 090 * <p> 091 * For each name, if an asset tag with the name doesn't already exist in the 092 * group, this method creates a new asset tag with the name in the group. 093 * </p> 094 * 095 * @param userId the primary key of the user checking the asset tags 096 * @param group the group in which to check the asset tags 097 * @param names the asset tag names 098 * @return the asset tags matching the group and names and new asset tags 099 matching the names that don't already exist in the group 100 */ 101 public java.util.List<com.liferay.portlet.asset.model.AssetTag> checkTags( 102 long userId, com.liferay.portal.model.Group group, 103 java.lang.String[] names) throws PortalException; 104 105 /** 106 * Returns the asset tags matching the group and names, creating new asset 107 * tags matching the names if the group doesn't already have them. 108 * 109 * @param userId the primary key of the user checking the asset tags 110 * @param groupId the primary key of the group in which check the asset 111 tags 112 * @param names the asset tag names 113 * @return the asset tags matching the group and names and new asset tags 114 matching the names that don't already exist in the group 115 */ 116 public java.util.List<com.liferay.portlet.asset.model.AssetTag> checkTags( 117 long userId, long groupId, java.lang.String[] names) 118 throws PortalException; 119 120 public void clearAssetEntryAssetTags(long entryId); 121 122 /** 123 * Creates a new asset tag with the primary key. Does not add the asset tag to the database. 124 * 125 * @param tagId the primary key for the new asset tag 126 * @return the new asset tag 127 */ 128 public com.liferay.portlet.asset.model.AssetTag createAssetTag(long tagId); 129 130 /** 131 * Decrements the number of assets to which the asset tag has been applied. 132 * 133 * @param tagId the primary key of the asset tag 134 * @param classNameId the class name ID of the entity to which the asset 135 tag had been applied 136 * @return the asset tag 137 */ 138 public com.liferay.portlet.asset.model.AssetTag decrementAssetCount( 139 long tagId, long classNameId) throws PortalException; 140 141 public void deleteAssetEntryAssetTag(long entryId, 142 com.liferay.portlet.asset.model.AssetTag assetTag); 143 144 public void deleteAssetEntryAssetTag(long entryId, long tagId); 145 146 public void deleteAssetEntryAssetTags(long entryId, 147 java.util.List<com.liferay.portlet.asset.model.AssetTag> AssetTags); 148 149 public void deleteAssetEntryAssetTags(long entryId, long[] tagIds); 150 151 /** 152 * Deletes the asset tag from the database. Also notifies the appropriate model listeners. 153 * 154 * @param assetTag the asset tag 155 * @return the asset tag that was removed 156 */ 157 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 158 public com.liferay.portlet.asset.model.AssetTag deleteAssetTag( 159 com.liferay.portlet.asset.model.AssetTag assetTag); 160 161 /** 162 * Deletes the asset tag with the primary key from the database. Also notifies the appropriate model listeners. 163 * 164 * @param tagId the primary key of the asset tag 165 * @return the asset tag that was removed 166 * @throws PortalException if a asset tag with the primary key could not be found 167 */ 168 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 169 public com.liferay.portlet.asset.model.AssetTag deleteAssetTag(long tagId) 170 throws PortalException; 171 172 /** 173 * Deletes all asset tags in the group. 174 * 175 * @param groupId the primary key of the group in which to delete all asset 176 tags 177 */ 178 public void deleteGroupTags(long groupId) throws PortalException; 179 180 /** 181 * @throws PortalException 182 */ 183 @Override 184 public com.liferay.portal.model.PersistedModel deletePersistedModel( 185 com.liferay.portal.model.PersistedModel persistedModel) 186 throws PortalException; 187 188 /** 189 * Deletes the asset tag. 190 * 191 * @param tag the asset tag to be deleted 192 */ 193 @com.liferay.portal.kernel.systemevent.SystemEvent(type = SystemEventConstants.TYPE_DELETE) 194 public void deleteTag(com.liferay.portlet.asset.model.AssetTag tag) 195 throws PortalException; 196 197 /** 198 * Deletes the asset tag. 199 * 200 * @param tagId the primary key of the asset tag 201 */ 202 public void deleteTag(long tagId) throws PortalException; 203 204 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery(); 205 206 /** 207 * Performs a dynamic query on the database and returns the matching rows. 208 * 209 * @param dynamicQuery the dynamic query 210 * @return the matching rows 211 */ 212 public <T> java.util.List<T> dynamicQuery( 213 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 214 215 /** 216 * Performs a dynamic query on the database and returns a range of the matching rows. 217 * 218 * <p> 219 * 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.asset.model.impl.AssetTagModelImpl}. 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. 220 * </p> 221 * 222 * @param dynamicQuery the dynamic query 223 * @param start the lower bound of the range of model instances 224 * @param end the upper bound of the range of model instances (not inclusive) 225 * @return the range of matching rows 226 */ 227 public <T> java.util.List<T> dynamicQuery( 228 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 229 int end); 230 231 /** 232 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 233 * 234 * <p> 235 * 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.asset.model.impl.AssetTagModelImpl}. 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. 236 * </p> 237 * 238 * @param dynamicQuery the dynamic query 239 * @param start the lower bound of the range of model instances 240 * @param end the upper bound of the range of model instances (not inclusive) 241 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 242 * @return the ordered range of matching rows 243 */ 244 public <T> java.util.List<T> dynamicQuery( 245 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 246 int end, 247 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator); 248 249 /** 250 * Returns the number of rows matching the dynamic query. 251 * 252 * @param dynamicQuery the dynamic query 253 * @return the number of rows matching the dynamic query 254 */ 255 public long dynamicQueryCount( 256 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 257 258 /** 259 * Returns the number of rows matching the dynamic query. 260 * 261 * @param dynamicQuery the dynamic query 262 * @param projection the projection to apply to the query 263 * @return the number of rows matching the dynamic query 264 */ 265 public long dynamicQueryCount( 266 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 267 com.liferay.portal.kernel.dao.orm.Projection projection); 268 269 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 270 public com.liferay.portlet.asset.model.AssetTag fetchAssetTag(long tagId); 271 272 /** 273 * Returns the asset tag matching the UUID and group. 274 * 275 * @param uuid the asset tag's UUID 276 * @param groupId the primary key of the group 277 * @return the matching asset tag, or <code>null</code> if a matching asset tag could not be found 278 */ 279 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 280 public com.liferay.portlet.asset.model.AssetTag fetchAssetTagByUuidAndGroupId( 281 java.lang.String uuid, long groupId); 282 283 /** 284 * Returns the asset tag with the name in the group. 285 * 286 * @param groupId the primary key of the group 287 * @param name the asset tag's name 288 * @return the asset tag with the name in the group or <code>null</code> if 289 it could not be found 290 */ 291 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 292 public com.liferay.portlet.asset.model.AssetTag fetchTag(long groupId, 293 java.lang.String name); 294 295 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 296 public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery(); 297 298 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 299 public java.util.List<com.liferay.portlet.asset.model.AssetTag> getAssetEntryAssetTags( 300 long entryId); 301 302 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 303 public java.util.List<com.liferay.portlet.asset.model.AssetTag> getAssetEntryAssetTags( 304 long entryId, int start, int end); 305 306 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 307 public java.util.List<com.liferay.portlet.asset.model.AssetTag> getAssetEntryAssetTags( 308 long entryId, int start, int end, 309 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetTag> orderByComparator); 310 311 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 312 public int getAssetEntryAssetTagsCount(long entryId); 313 314 /** 315 * Returns the entryIds of the asset entries associated with the asset tag. 316 * 317 * @param tagId the tagId of the asset tag 318 * @return long[] the entryIds of asset entries associated with the asset tag 319 */ 320 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 321 public long[] getAssetEntryPrimaryKeys(long tagId); 322 323 /** 324 * Returns the asset tag with the primary key. 325 * 326 * @param tagId the primary key of the asset tag 327 * @return the asset tag 328 * @throws PortalException if a asset tag with the primary key could not be found 329 */ 330 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 331 public com.liferay.portlet.asset.model.AssetTag getAssetTag(long tagId) 332 throws PortalException; 333 334 /** 335 * Returns the asset tag matching the UUID and group. 336 * 337 * @param uuid the asset tag's UUID 338 * @param groupId the primary key of the group 339 * @return the matching asset tag 340 * @throws PortalException if a matching asset tag could not be found 341 */ 342 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 343 public com.liferay.portlet.asset.model.AssetTag getAssetTagByUuidAndGroupId( 344 java.lang.String uuid, long groupId) throws PortalException; 345 346 /** 347 * Returns a range of all the asset tags. 348 * 349 * <p> 350 * 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.asset.model.impl.AssetTagModelImpl}. 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. 351 * </p> 352 * 353 * @param start the lower bound of the range of asset tags 354 * @param end the upper bound of the range of asset tags (not inclusive) 355 * @return the range of asset tags 356 */ 357 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 358 public java.util.List<com.liferay.portlet.asset.model.AssetTag> getAssetTags( 359 int start, int end); 360 361 /** 362 * Returns all the asset tags matching the UUID and company. 363 * 364 * @param uuid the UUID of the asset tags 365 * @param companyId the primary key of the company 366 * @return the matching asset tags, or an empty list if no matches were found 367 */ 368 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 369 public java.util.List<com.liferay.portlet.asset.model.AssetTag> getAssetTagsByUuidAndCompanyId( 370 java.lang.String uuid, long companyId); 371 372 /** 373 * Returns a range of asset tags matching the UUID and company. 374 * 375 * @param uuid the UUID of the asset tags 376 * @param companyId the primary key of the company 377 * @param start the lower bound of the range of asset tags 378 * @param end the upper bound of the range of asset tags (not inclusive) 379 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 380 * @return the range of matching asset tags, or an empty list if no matches were found 381 */ 382 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 383 public java.util.List<com.liferay.portlet.asset.model.AssetTag> getAssetTagsByUuidAndCompanyId( 384 java.lang.String uuid, long companyId, int start, int end, 385 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetTag> orderByComparator); 386 387 /** 388 * Returns the number of asset tags. 389 * 390 * @return the number of asset tags 391 */ 392 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 393 public int getAssetTagsCount(); 394 395 /** 396 * Returns the asset tags of the asset entry. 397 * 398 * @param entryId the primary key of the asset entry 399 * @return the asset tags of the asset entry 400 */ 401 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 402 public java.util.List<com.liferay.portlet.asset.model.AssetTag> getEntryTags( 403 long entryId); 404 405 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 406 public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( 407 com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext); 408 409 /** 410 * Returns the asset tags in the group. 411 * 412 * @param groupId the primary key of the group 413 * @return the asset tags in the group 414 */ 415 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 416 public java.util.List<com.liferay.portlet.asset.model.AssetTag> getGroupTags( 417 long groupId); 418 419 /** 420 * Returns a range of all the asset tags in the group. 421 * 422 * @param groupId the primary key of the group 423 * @param start the lower bound of the range of asset tags 424 * @param end the upper bound of the range of asset tags (not inclusive) 425 * @return the range of matching asset tags 426 */ 427 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 428 public java.util.List<com.liferay.portlet.asset.model.AssetTag> getGroupTags( 429 long groupId, int start, int end); 430 431 /** 432 * Returns the number of asset tags in the group. 433 * 434 * @param groupId the primary key of the group 435 * @return the number of asset tags in the group 436 */ 437 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 438 public int getGroupTagsCount(long groupId); 439 440 /** 441 * Returns the asset tags in the groups. 442 * 443 * @param groupIds the primary keys of the groups 444 * @return the asset tags in the groups 445 */ 446 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 447 public java.util.List<com.liferay.portlet.asset.model.AssetTag> getGroupsTags( 448 long[] groupIds); 449 450 /** 451 * Returns the OSGi service identifier. 452 * 453 * @return the OSGi service identifier 454 */ 455 public java.lang.String getOSGiServiceIdentifier(); 456 457 @Override 458 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 459 public com.liferay.portal.model.PersistedModel getPersistedModel( 460 java.io.Serializable primaryKeyObj) throws PortalException; 461 462 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 463 public java.util.List<com.liferay.portlet.asset.model.AssetTag> getSocialActivityCounterOffsetTags( 464 long groupId, java.lang.String socialActivityCounterName, 465 int startOffset, int endOffset); 466 467 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 468 public java.util.List<com.liferay.portlet.asset.model.AssetTag> getSocialActivityCounterPeriodTags( 469 long groupId, java.lang.String socialActivityCounterName, 470 int startPeriod, int endPeriod); 471 472 /** 473 * Returns the asset tag with the name in the group. 474 * 475 * @param groupId the primary key of the group 476 * @param name the name of the asset tag 477 * @return the asset tag with the name in the group 478 */ 479 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 480 public com.liferay.portlet.asset.model.AssetTag getTag(long groupId, 481 java.lang.String name) throws PortalException; 482 483 /** 484 * Returns the asset tag with the primary key. 485 * 486 * @param tagId the primary key of the asset tag 487 * @return the asset tag with the primary key 488 */ 489 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 490 public com.liferay.portlet.asset.model.AssetTag getTag(long tagId) 491 throws PortalException; 492 493 /** 494 * Returns the primary keys of the asset tags with the names in the group. 495 * 496 * @param groupId the primary key of the group 497 * @param names the names of the asset tags 498 * @return the primary keys of the asset tags with the names in the group 499 */ 500 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 501 public long[] getTagIds(long groupId, java.lang.String[] names); 502 503 /** 504 * Returns the primary keys of the asset tags with the name in the groups. 505 * 506 * @param groupIds the primary keys of the groups 507 * @param name the name of the asset tags 508 * @return the primary keys of the asset tags with the name in the groups 509 */ 510 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 511 public long[] getTagIds(long[] groupIds, java.lang.String name); 512 513 /** 514 * Returns the primary keys of the asset tags with the names in the groups. 515 * 516 * @param groupIds the primary keys of the groups 517 * @param names the names of the asset tags 518 * @return the primary keys of the asset tags with the names in the groups 519 */ 520 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 521 public long[] getTagIds(long[] groupIds, java.lang.String[] names); 522 523 /** 524 * Returns the names of all the asset tags. 525 * 526 * @return the names of all the asset tags 527 */ 528 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 529 public java.lang.String[] getTagNames(); 530 531 /** 532 * Returns the names of the asset tags of the entity 533 * 534 * @param className the class name of the entity 535 * @param classPK the primary key of the entity 536 * @return the names of the asset tags of the entity 537 */ 538 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 539 public java.lang.String[] getTagNames(java.lang.String className, 540 long classPK); 541 542 /** 543 * Returns the names of the asset tags of the entity. 544 * 545 * @param classNameId the class name ID of the entity 546 * @param classPK the primary key of the entity 547 * @return the names of the asset tags of the entity 548 */ 549 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 550 public java.lang.String[] getTagNames(long classNameId, long classPK); 551 552 /** 553 * Returns all the asset tags. 554 * 555 * @return the asset tags 556 */ 557 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 558 public java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags(); 559 560 /** 561 * Returns the asset tags of the entity. 562 * 563 * @param className the class name of the entity 564 * @param classPK the primary key of the entity 565 * @return the asset tags of the entity 566 */ 567 @com.liferay.portal.kernel.cache.thread.local.ThreadLocalCachable 568 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 569 public java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags( 570 java.lang.String className, long classPK); 571 572 /** 573 * Returns the asset tags of the entity. 574 * 575 * @param classNameId the class name ID of the entity 576 * @param classPK the primary key of the entity 577 * @return the asset tags of the entity 578 */ 579 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 580 public java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags( 581 long classNameId, long classPK); 582 583 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 584 public java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags( 585 long groupId, long classNameId, java.lang.String name); 586 587 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 588 public java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags( 589 long groupId, long classNameId, java.lang.String name, int start, 590 int end); 591 592 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 593 public int getTagsSize(long groupId, long classNameId, java.lang.String name); 594 595 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 596 public boolean hasAssetEntryAssetTag(long entryId, long tagId); 597 598 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 599 public boolean hasAssetEntryAssetTags(long entryId); 600 601 /** 602 * Returns <code>true</code> if the group contains an asset tag with the 603 * name. 604 * 605 * @param groupId the primary key of the group 606 * @param name the name of the asset tag 607 * @return <code>true</code> if the group contains an asset tag with the 608 name; <code>false</code> otherwise. 609 */ 610 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 611 public boolean hasTag(long groupId, java.lang.String name); 612 613 /** 614 * Increments the number of assets to which the asset tag has been applied. 615 * 616 * @param tagId the primary key of the asset tag 617 * @param classNameId the class name ID of the entity to which the asset 618 tag is being applied 619 * @return the asset tag 620 */ 621 public com.liferay.portlet.asset.model.AssetTag incrementAssetCount( 622 long tagId, long classNameId) throws PortalException; 623 624 /** 625 * Replaces all occurrences of the first asset tag with the second asset tag 626 * and deletes the first asset tag. 627 * 628 * @param fromTagId the primary key of the asset tag to be replaced 629 * @param toTagId the primary key of the asset tag to apply to the asset 630 entries of the other asset tag 631 */ 632 public void mergeTags(long fromTagId, long toTagId) 633 throws PortalException; 634 635 /** 636 * Returns the asset tags in the group whose names match the pattern. 637 * 638 * @param groupId the primary key of the group 639 * @param name the pattern to match 640 * @param start the lower bound of the range of asset tags 641 * @param end the upper bound of the range of asset tags (not inclusive) 642 * @return the asset tags in the group whose names match the pattern 643 */ 644 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 645 public java.util.List<com.liferay.portlet.asset.model.AssetTag> search( 646 long groupId, java.lang.String name, int start, int end); 647 648 /** 649 * Returns the asset tags in the groups whose names match the pattern. 650 * 651 * @param groupIds the primary keys of the groups 652 * @param name the pattern to match 653 * @param start the lower bound of the range of asset tags 654 * @param end the upper bound of the range of asset tags (not inclusive) 655 * @return the asset tags in the groups whose names match the pattern 656 */ 657 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 658 public java.util.List<com.liferay.portlet.asset.model.AssetTag> search( 659 long[] groupIds, java.lang.String name, int start, int end); 660 661 public void setAssetEntryAssetTags(long entryId, long[] tagIds); 662 663 /** 664 * Updates the asset tag in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 665 * 666 * @param assetTag the asset tag 667 * @return the asset tag that was updated 668 */ 669 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 670 public com.liferay.portlet.asset.model.AssetTag updateAssetTag( 671 com.liferay.portlet.asset.model.AssetTag assetTag); 672 673 public com.liferay.portlet.asset.model.AssetTag updateTag(long userId, 674 long tagId, java.lang.String name, 675 com.liferay.portal.service.ServiceContext serviceContext) 676 throws PortalException; 677 }