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