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.bean.PortalBeanLocatorUtil; 020 import com.liferay.portal.kernel.util.ReferenceRegistry; 021 022 /** 023 * Provides the local service utility for AssetTag. This utility wraps 024 * {@link com.liferay.portlet.asset.service.impl.AssetTagLocalServiceImpl} and is the 025 * primary access point for service operations in application layer code running 026 * on the local server. Methods of this service will not have security checks 027 * based on the propagated JAAS credentials because this service can only be 028 * accessed from within the same VM. 029 * 030 * @author Brian Wing Shun Chan 031 * @see AssetTagLocalService 032 * @see com.liferay.portlet.asset.service.base.AssetTagLocalServiceBaseImpl 033 * @see com.liferay.portlet.asset.service.impl.AssetTagLocalServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class AssetTagLocalServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.asset.service.impl.AssetTagLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. 042 */ 043 public static void addAssetEntryAssetTag(long entryId, 044 com.liferay.portlet.asset.model.AssetTag assetTag) { 045 getService().addAssetEntryAssetTag(entryId, assetTag); 046 } 047 048 public static void addAssetEntryAssetTag(long entryId, long tagId) { 049 getService().addAssetEntryAssetTag(entryId, tagId); 050 } 051 052 public static void addAssetEntryAssetTags(long entryId, 053 java.util.List<com.liferay.portlet.asset.model.AssetTag> AssetTags) { 054 getService().addAssetEntryAssetTags(entryId, AssetTags); 055 } 056 057 public static void addAssetEntryAssetTags(long entryId, long[] tagIds) { 058 getService().addAssetEntryAssetTags(entryId, tagIds); 059 } 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 public static com.liferay.portlet.asset.model.AssetTag addAssetTag( 068 com.liferay.portlet.asset.model.AssetTag assetTag) { 069 return getService().addAssetTag(assetTag); 070 } 071 072 /** 073 * Adds an asset tag. 074 * 075 * @param userId the primary key of the user adding the asset tag 076 * @param groupId the primary key of the group in which the asset tag is to 077 be added 078 * @param name the asset tag's name 079 * @param serviceContext the service context to be applied 080 * @return the asset tag that was added 081 * @throws PortalException if a user with the primary key could not be found 082 or if a portal exception occurred 083 */ 084 public static com.liferay.portlet.asset.model.AssetTag addTag(long userId, 085 long groupId, java.lang.String name, 086 com.liferay.portal.service.ServiceContext serviceContext) 087 throws com.liferay.portal.kernel.exception.PortalException { 088 return getService().addTag(userId, groupId, name, serviceContext); 089 } 090 091 /** 092 * Returns the asset tags matching the group and names, creating new asset 093 * tags matching the names if the group doesn't already have them. 094 * 095 * <p> 096 * For each name, if an asset tag with the name doesn't already exist in the 097 * group, this method creates a new asset tag with the name in the group. 098 * </p> 099 * 100 * @param userId the primary key of the user checking the asset tags 101 * @param group the group in which to check the asset tags 102 * @param names the asset tag names 103 * @return the asset tags matching the group and names and new asset tags 104 matching the names that don't already exist in the group 105 * @throws PortalException if a matching group could not be found or if a 106 portal exception occurred 107 */ 108 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> checkTags( 109 long userId, com.liferay.portal.model.Group group, 110 java.lang.String[] names) 111 throws com.liferay.portal.kernel.exception.PortalException { 112 return getService().checkTags(userId, group, names); 113 } 114 115 /** 116 * Returns the asset tags matching the group and names, creating new asset 117 * tags matching the names if the group doesn't already have them. 118 * 119 * @param userId the primary key of the user checking the asset tags 120 * @param groupId the primary key of the group in which check the asset 121 tags 122 * @param names the asset tag names 123 * @return the asset tags matching the group and names and new asset tags 124 matching the names that don't already exist in the group 125 * @throws PortalException if a matching group could not be found or if a 126 portal exception occurred 127 */ 128 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> checkTags( 129 long userId, long groupId, java.lang.String[] names) 130 throws com.liferay.portal.kernel.exception.PortalException { 131 return getService().checkTags(userId, groupId, names); 132 } 133 134 public static void clearAssetEntryAssetTags(long entryId) { 135 getService().clearAssetEntryAssetTags(entryId); 136 } 137 138 /** 139 * Creates a new asset tag with the primary key. Does not add the asset tag to the database. 140 * 141 * @param tagId the primary key for the new asset tag 142 * @return the new asset tag 143 */ 144 public static com.liferay.portlet.asset.model.AssetTag createAssetTag( 145 long tagId) { 146 return getService().createAssetTag(tagId); 147 } 148 149 /** 150 * Decrements the number of assets to which the asset tag has been applied. 151 * 152 * @param tagId the primary key of the asset tag 153 * @param classNameId the class name ID of the entity to which the asset 154 tag had been applied 155 * @return the asset tag 156 * @throws PortalException if an asset tag with the primary key could not be 157 found or if a portal exception occurred 158 */ 159 public static com.liferay.portlet.asset.model.AssetTag decrementAssetCount( 160 long tagId, long classNameId) 161 throws com.liferay.portal.kernel.exception.PortalException { 162 return getService().decrementAssetCount(tagId, classNameId); 163 } 164 165 public static void deleteAssetEntryAssetTag(long entryId, 166 com.liferay.portlet.asset.model.AssetTag assetTag) { 167 getService().deleteAssetEntryAssetTag(entryId, assetTag); 168 } 169 170 public static void deleteAssetEntryAssetTag(long entryId, long tagId) { 171 getService().deleteAssetEntryAssetTag(entryId, tagId); 172 } 173 174 public static void deleteAssetEntryAssetTags(long entryId, 175 java.util.List<com.liferay.portlet.asset.model.AssetTag> AssetTags) { 176 getService().deleteAssetEntryAssetTags(entryId, AssetTags); 177 } 178 179 public static void deleteAssetEntryAssetTags(long entryId, long[] tagIds) { 180 getService().deleteAssetEntryAssetTags(entryId, tagIds); 181 } 182 183 /** 184 * Deletes the asset tag from the database. Also notifies the appropriate model listeners. 185 * 186 * @param assetTag the asset tag 187 * @return the asset tag that was removed 188 */ 189 public static com.liferay.portlet.asset.model.AssetTag deleteAssetTag( 190 com.liferay.portlet.asset.model.AssetTag assetTag) { 191 return getService().deleteAssetTag(assetTag); 192 } 193 194 /** 195 * Deletes the asset tag with the primary key from the database. Also notifies the appropriate model listeners. 196 * 197 * @param tagId the primary key of the asset tag 198 * @return the asset tag that was removed 199 * @throws PortalException if a asset tag with the primary key could not be found 200 */ 201 public static com.liferay.portlet.asset.model.AssetTag deleteAssetTag( 202 long tagId) throws com.liferay.portal.kernel.exception.PortalException { 203 return getService().deleteAssetTag(tagId); 204 } 205 206 /** 207 * Deletes all asset tags in the group. 208 * 209 * @param groupId the primary key of the group in which to delete all asset 210 tags 211 * @throws PortalException if a portal exception occurred 212 */ 213 public static void deleteGroupTags(long groupId) 214 throws com.liferay.portal.kernel.exception.PortalException { 215 getService().deleteGroupTags(groupId); 216 } 217 218 /** 219 * @throws PortalException 220 */ 221 public static com.liferay.portal.model.PersistedModel deletePersistedModel( 222 com.liferay.portal.model.PersistedModel persistedModel) 223 throws com.liferay.portal.kernel.exception.PortalException { 224 return getService().deletePersistedModel(persistedModel); 225 } 226 227 /** 228 * Deletes the asset tag. 229 * 230 * @param tag the asset tag to be deleted 231 * @throws PortalException if a portal exception occurred 232 */ 233 public static void deleteTag(com.liferay.portlet.asset.model.AssetTag tag) 234 throws com.liferay.portal.kernel.exception.PortalException { 235 getService().deleteTag(tag); 236 } 237 238 /** 239 * Deletes the asset tag. 240 * 241 * @param tagId the primary key of the asset tag 242 * @throws PortalException if no asset tag could be found with the primary 243 key or if a portal exception occurred 244 */ 245 public static void deleteTag(long tagId) 246 throws com.liferay.portal.kernel.exception.PortalException { 247 getService().deleteTag(tagId); 248 } 249 250 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 251 return getService().dynamicQuery(); 252 } 253 254 /** 255 * Performs a dynamic query on the database and returns the matching rows. 256 * 257 * @param dynamicQuery the dynamic query 258 * @return the matching rows 259 */ 260 public static <T> java.util.List<T> dynamicQuery( 261 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 262 return getService().dynamicQuery(dynamicQuery); 263 } 264 265 /** 266 * Performs a dynamic query on the database and returns a range of the matching rows. 267 * 268 * <p> 269 * 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. 270 * </p> 271 * 272 * @param dynamicQuery the dynamic query 273 * @param start the lower bound of the range of model instances 274 * @param end the upper bound of the range of model instances (not inclusive) 275 * @return the range of matching rows 276 */ 277 public static <T> java.util.List<T> dynamicQuery( 278 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 279 int end) { 280 return getService().dynamicQuery(dynamicQuery, start, end); 281 } 282 283 /** 284 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 285 * 286 * <p> 287 * 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. 288 * </p> 289 * 290 * @param dynamicQuery the dynamic query 291 * @param start the lower bound of the range of model instances 292 * @param end the upper bound of the range of model instances (not inclusive) 293 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 294 * @return the ordered range of matching rows 295 */ 296 public static <T> java.util.List<T> dynamicQuery( 297 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 298 int end, 299 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 300 return getService() 301 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 302 } 303 304 /** 305 * Returns the number of rows matching the dynamic query. 306 * 307 * @param dynamicQuery the dynamic query 308 * @return the number of rows matching the dynamic query 309 */ 310 public static long dynamicQueryCount( 311 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 312 return getService().dynamicQueryCount(dynamicQuery); 313 } 314 315 /** 316 * Returns the number of rows matching the dynamic query. 317 * 318 * @param dynamicQuery the dynamic query 319 * @param projection the projection to apply to the query 320 * @return the number of rows matching the dynamic query 321 */ 322 public static long dynamicQueryCount( 323 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 324 com.liferay.portal.kernel.dao.orm.Projection projection) { 325 return getService().dynamicQueryCount(dynamicQuery, projection); 326 } 327 328 public static com.liferay.portlet.asset.model.AssetTag fetchAssetTag( 329 long tagId) { 330 return getService().fetchAssetTag(tagId); 331 } 332 333 /** 334 * Returns the asset tag matching the UUID and group. 335 * 336 * @param uuid the asset tag's UUID 337 * @param groupId the primary key of the group 338 * @return the matching asset tag, or <code>null</code> if a matching asset tag could not be found 339 */ 340 public static com.liferay.portlet.asset.model.AssetTag fetchAssetTagByUuidAndGroupId( 341 java.lang.String uuid, long groupId) { 342 return getService().fetchAssetTagByUuidAndGroupId(uuid, groupId); 343 } 344 345 /** 346 * Returns the asset tag with the name in the group. 347 * 348 * @param groupId the primary key of the group 349 * @param name the asset tag's name 350 * @return the asset tag with the name in the group or <code>null</code> if 351 it could not be found 352 */ 353 public static com.liferay.portlet.asset.model.AssetTag fetchTag( 354 long groupId, java.lang.String name) { 355 return getService().fetchTag(groupId, name); 356 } 357 358 public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { 359 return getService().getActionableDynamicQuery(); 360 } 361 362 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getAssetEntryAssetTags( 363 long entryId) { 364 return getService().getAssetEntryAssetTags(entryId); 365 } 366 367 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getAssetEntryAssetTags( 368 long entryId, int start, int end) { 369 return getService().getAssetEntryAssetTags(entryId, start, end); 370 } 371 372 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getAssetEntryAssetTags( 373 long entryId, int start, int end, 374 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetTag> orderByComparator) { 375 return getService() 376 .getAssetEntryAssetTags(entryId, start, end, 377 orderByComparator); 378 } 379 380 public static int getAssetEntryAssetTagsCount(long entryId) { 381 return getService().getAssetEntryAssetTagsCount(entryId); 382 } 383 384 /** 385 * Returns the entryIds of the asset entries associated with the asset tag. 386 * 387 * @param tagId the tagId of the asset tag 388 * @return long[] the entryIds of asset entries associated with the asset tag 389 */ 390 public static long[] getAssetEntryPrimaryKeys(long tagId) { 391 return getService().getAssetEntryPrimaryKeys(tagId); 392 } 393 394 /** 395 * Returns the asset tag with the primary key. 396 * 397 * @param tagId the primary key of the asset tag 398 * @return the asset tag 399 * @throws PortalException if a asset tag with the primary key could not be found 400 */ 401 public static com.liferay.portlet.asset.model.AssetTag getAssetTag( 402 long tagId) throws com.liferay.portal.kernel.exception.PortalException { 403 return getService().getAssetTag(tagId); 404 } 405 406 /** 407 * Returns the asset tag matching the UUID and group. 408 * 409 * @param uuid the asset tag's UUID 410 * @param groupId the primary key of the group 411 * @return the matching asset tag 412 * @throws PortalException if a matching asset tag could not be found 413 */ 414 public static com.liferay.portlet.asset.model.AssetTag getAssetTagByUuidAndGroupId( 415 java.lang.String uuid, long groupId) 416 throws com.liferay.portal.kernel.exception.PortalException { 417 return getService().getAssetTagByUuidAndGroupId(uuid, groupId); 418 } 419 420 /** 421 * Returns a range of all the asset tags. 422 * 423 * <p> 424 * 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. 425 * </p> 426 * 427 * @param start the lower bound of the range of asset tags 428 * @param end the upper bound of the range of asset tags (not inclusive) 429 * @return the range of asset tags 430 */ 431 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getAssetTags( 432 int start, int end) { 433 return getService().getAssetTags(start, end); 434 } 435 436 /** 437 * Returns all the asset tags matching the UUID and company. 438 * 439 * @param uuid the UUID of the asset tags 440 * @param companyId the primary key of the company 441 * @return the matching asset tags, or an empty list if no matches were found 442 */ 443 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getAssetTagsByUuidAndCompanyId( 444 java.lang.String uuid, long companyId) { 445 return getService().getAssetTagsByUuidAndCompanyId(uuid, companyId); 446 } 447 448 /** 449 * Returns a range of asset tags matching the UUID and company. 450 * 451 * @param uuid the UUID of the asset tags 452 * @param companyId the primary key of the company 453 * @param start the lower bound of the range of asset tags 454 * @param end the upper bound of the range of asset tags (not inclusive) 455 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 456 * @return the range of matching asset tags, or an empty list if no matches were found 457 */ 458 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getAssetTagsByUuidAndCompanyId( 459 java.lang.String uuid, long companyId, int start, int end, 460 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetTag> orderByComparator) { 461 return getService() 462 .getAssetTagsByUuidAndCompanyId(uuid, companyId, start, end, 463 orderByComparator); 464 } 465 466 /** 467 * Returns the number of asset tags. 468 * 469 * @return the number of asset tags 470 */ 471 public static int getAssetTagsCount() { 472 return getService().getAssetTagsCount(); 473 } 474 475 /** 476 * Returns the Spring bean ID for this bean. 477 * 478 * @return the Spring bean ID for this bean 479 */ 480 public static java.lang.String getBeanIdentifier() { 481 return getService().getBeanIdentifier(); 482 } 483 484 /** 485 * Returns the asset tags of the asset entry. 486 * 487 * @param entryId the primary key of the asset entry 488 * @return the asset tags of the asset entry 489 */ 490 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getEntryTags( 491 long entryId) { 492 return getService().getEntryTags(entryId); 493 } 494 495 public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( 496 com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext) { 497 return getService().getExportActionableDynamicQuery(portletDataContext); 498 } 499 500 /** 501 * Returns the asset tags in the group. 502 * 503 * @param groupId the primary key of the group 504 * @return the asset tags in the group 505 */ 506 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getGroupTags( 507 long groupId) { 508 return getService().getGroupTags(groupId); 509 } 510 511 /** 512 * Returns a range of all the asset tags in the group. 513 * 514 * @param groupId the primary key of the group 515 * @param start the lower bound of the range of asset tags 516 * @param end the upper bound of the range of asset tags (not inclusive) 517 * @return the range of matching asset tags 518 */ 519 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getGroupTags( 520 long groupId, int start, int end) { 521 return getService().getGroupTags(groupId, start, end); 522 } 523 524 /** 525 * Returns the number of asset tags in the group. 526 * 527 * @param groupId the primary key of the group 528 * @return the number of asset tags in the group 529 */ 530 public static int getGroupTagsCount(long groupId) { 531 return getService().getGroupTagsCount(groupId); 532 } 533 534 /** 535 * Returns the asset tags in the groups. 536 * 537 * @param groupIds the primary keys of the groups 538 * @return the asset tags in the groups 539 */ 540 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getGroupsTags( 541 long[] groupIds) { 542 return getService().getGroupsTags(groupIds); 543 } 544 545 public static com.liferay.portal.model.PersistedModel getPersistedModel( 546 java.io.Serializable primaryKeyObj) 547 throws com.liferay.portal.kernel.exception.PortalException { 548 return getService().getPersistedModel(primaryKeyObj); 549 } 550 551 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getSocialActivityCounterOffsetTags( 552 long groupId, java.lang.String socialActivityCounterName, 553 int startOffset, int endOffset) { 554 return getService() 555 .getSocialActivityCounterOffsetTags(groupId, 556 socialActivityCounterName, startOffset, endOffset); 557 } 558 559 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getSocialActivityCounterPeriodTags( 560 long groupId, java.lang.String socialActivityCounterName, 561 int startPeriod, int endPeriod) { 562 return getService() 563 .getSocialActivityCounterPeriodTags(groupId, 564 socialActivityCounterName, startPeriod, endPeriod); 565 } 566 567 /** 568 * Returns the asset tag with the name in the group. 569 * 570 * @param groupId the primary key of the group 571 * @param name the name of the asset tag 572 * @return the asset tag with the name in the group 573 * @throws PortalException if a matching asset tag could not be found 574 */ 575 public static com.liferay.portlet.asset.model.AssetTag getTag( 576 long groupId, java.lang.String name) 577 throws com.liferay.portal.kernel.exception.PortalException { 578 return getService().getTag(groupId, name); 579 } 580 581 /** 582 * Returns the asset tag with the primary key. 583 * 584 * @param tagId the primary key of the asset tag 585 * @return the asset tag with the primary key 586 * @throws PortalException if an asset tag with the primary key could not be 587 found 588 */ 589 public static com.liferay.portlet.asset.model.AssetTag getTag(long tagId) 590 throws com.liferay.portal.kernel.exception.PortalException { 591 return getService().getTag(tagId); 592 } 593 594 /** 595 * Returns the primary keys of the asset tags with the names in the group. 596 * 597 * @param groupId the primary key of the group 598 * @param names the names of the asset tags 599 * @return the primary keys of the asset tags with the names in the group 600 */ 601 public static long[] getTagIds(long groupId, java.lang.String[] names) { 602 return getService().getTagIds(groupId, names); 603 } 604 605 /** 606 * Returns the primary keys of the asset tags with the name in the groups. 607 * 608 * @param groupIds the primary keys of the groups 609 * @param name the name of the asset tags 610 * @return the primary keys of the asset tags with the name in the groups 611 */ 612 public static long[] getTagIds(long[] groupIds, java.lang.String name) { 613 return getService().getTagIds(groupIds, name); 614 } 615 616 /** 617 * Returns the primary keys of the asset tags with the names in the groups. 618 * 619 * @param groupIds the primary keys of the groups 620 * @param names the names of the asset tags 621 * @return the primary keys of the asset tags with the names in the groups 622 */ 623 public static long[] getTagIds(long[] groupIds, java.lang.String[] names) { 624 return getService().getTagIds(groupIds, names); 625 } 626 627 /** 628 * Returns the names of all the asset tags. 629 * 630 * @return the names of all the asset tags 631 */ 632 public static java.lang.String[] getTagNames() { 633 return getService().getTagNames(); 634 } 635 636 /** 637 * Returns the names of the asset tags of the entity 638 * 639 * @param className the class name of the entity 640 * @param classPK the primary key of the entity 641 * @return the names of the asset tags of the entity 642 */ 643 public static java.lang.String[] getTagNames(java.lang.String className, 644 long classPK) { 645 return getService().getTagNames(className, classPK); 646 } 647 648 /** 649 * Returns the names of the asset tags of the entity. 650 * 651 * @param classNameId the class name ID of the entity 652 * @param classPK the primary key of the entity 653 * @return the names of the asset tags of the entity 654 */ 655 public static java.lang.String[] getTagNames(long classNameId, long classPK) { 656 return getService().getTagNames(classNameId, classPK); 657 } 658 659 /** 660 * Returns all the asset tags. 661 * 662 * @return the asset tags 663 */ 664 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags() { 665 return getService().getTags(); 666 } 667 668 /** 669 * Returns the asset tags of the entity. 670 * 671 * @param className the class name of the entity 672 * @param classPK the primary key of the entity 673 * @return the asset tags of the entity 674 */ 675 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags( 676 java.lang.String className, long classPK) { 677 return getService().getTags(className, classPK); 678 } 679 680 /** 681 * Returns the asset tags of the entity. 682 * 683 * @param classNameId the class name ID of the entity 684 * @param classPK the primary key of the entity 685 * @return the asset tags of the entity 686 */ 687 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags( 688 long classNameId, long classPK) { 689 return getService().getTags(classNameId, classPK); 690 } 691 692 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags( 693 long groupId, long classNameId, java.lang.String name) { 694 return getService().getTags(groupId, classNameId, name); 695 } 696 697 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags( 698 long groupId, long classNameId, java.lang.String name, int start, 699 int end) { 700 return getService().getTags(groupId, classNameId, name, start, end); 701 } 702 703 public static int getTagsSize(long groupId, long classNameId, 704 java.lang.String name) { 705 return getService().getTagsSize(groupId, classNameId, name); 706 } 707 708 public static boolean hasAssetEntryAssetTag(long entryId, long tagId) { 709 return getService().hasAssetEntryAssetTag(entryId, tagId); 710 } 711 712 public static boolean hasAssetEntryAssetTags(long entryId) { 713 return getService().hasAssetEntryAssetTags(entryId); 714 } 715 716 /** 717 * Returns <code>true</code> if the group contains an asset tag with the 718 * name. 719 * 720 * @param groupId the primary key of the group 721 * @param name the name of the asset tag 722 * @return <code>true</code> if the group contains an asset tag with the 723 name; <code>false</code> otherwise. 724 */ 725 public static boolean hasTag(long groupId, java.lang.String name) { 726 return getService().hasTag(groupId, name); 727 } 728 729 /** 730 * Increments the number of assets to which the asset tag has been applied. 731 * 732 * @param tagId the primary key of the asset tag 733 * @param classNameId the class name ID of the entity to which the asset 734 tag is being applied 735 * @return the asset tag 736 * @throws PortalException if a asset tag with the primary key could not be 737 found or if a portal exception occurred 738 */ 739 public static com.liferay.portlet.asset.model.AssetTag incrementAssetCount( 740 long tagId, long classNameId) 741 throws com.liferay.portal.kernel.exception.PortalException { 742 return getService().incrementAssetCount(tagId, classNameId); 743 } 744 745 /** 746 * Replaces all occurrences of the first asset tag with the second asset tag 747 * and deletes the first asset tag. 748 * 749 * @param fromTagId the primary key of the asset tag to be replaced 750 * @param toTagId the primary key of the asset tag to apply to the asset 751 entries of the other asset tag 752 * @throws PortalException if a portal exception occurred 753 */ 754 public static void mergeTags(long fromTagId, long toTagId) 755 throws com.liferay.portal.kernel.exception.PortalException { 756 getService().mergeTags(fromTagId, toTagId); 757 } 758 759 /** 760 * Returns the asset tags in the group whose names match the pattern. 761 * 762 * @param groupId the primary key of the group 763 * @param name the pattern to match 764 * @param start the lower bound of the range of asset tags 765 * @param end the upper bound of the range of asset tags (not inclusive) 766 * @return the asset tags in the group whose names match the pattern 767 */ 768 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> search( 769 long groupId, java.lang.String name, int start, int end) { 770 return getService().search(groupId, name, start, end); 771 } 772 773 /** 774 * Returns the asset tags in the groups whose names match the pattern. 775 * 776 * @param groupIds the primary keys of the groups 777 * @param name the pattern to match 778 * @param start the lower bound of the range of asset tags 779 * @param end the upper bound of the range of asset tags (not inclusive) 780 * @return the asset tags in the groups whose names match the pattern 781 */ 782 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> search( 783 long[] groupIds, java.lang.String name, int start, int end) { 784 return getService().search(groupIds, name, start, end); 785 } 786 787 public static void setAssetEntryAssetTags(long entryId, long[] tagIds) { 788 getService().setAssetEntryAssetTags(entryId, tagIds); 789 } 790 791 /** 792 * Sets the Spring bean ID for this bean. 793 * 794 * @param beanIdentifier the Spring bean ID for this bean 795 */ 796 public static void setBeanIdentifier(java.lang.String beanIdentifier) { 797 getService().setBeanIdentifier(beanIdentifier); 798 } 799 800 /** 801 * Updates the asset tag in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 802 * 803 * @param assetTag the asset tag 804 * @return the asset tag that was updated 805 */ 806 public static com.liferay.portlet.asset.model.AssetTag updateAssetTag( 807 com.liferay.portlet.asset.model.AssetTag assetTag) { 808 return getService().updateAssetTag(assetTag); 809 } 810 811 public static com.liferay.portlet.asset.model.AssetTag updateTag( 812 long userId, long tagId, java.lang.String name, 813 com.liferay.portal.service.ServiceContext serviceContext) 814 throws com.liferay.portal.kernel.exception.PortalException { 815 return getService().updateTag(userId, tagId, name, serviceContext); 816 } 817 818 public static AssetTagLocalService getService() { 819 if (_service == null) { 820 _service = (AssetTagLocalService)PortalBeanLocatorUtil.locate(AssetTagLocalService.class.getName()); 821 822 ReferenceRegistry.registerReference(AssetTagLocalServiceUtil.class, 823 "_service"); 824 } 825 826 return _service; 827 } 828 829 /** 830 * @deprecated As of 6.2.0 831 */ 832 @Deprecated 833 public void setService(AssetTagLocalService service) { 834 } 835 836 private static AssetTagLocalService _service; 837 }