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