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