public class AssetTagLocalServiceUtil
extends Object
com.liferay.portlet.asset.service.impl.AssetTagLocalServiceImpl
and
is an access point for service operations in application layer code running
on the local server. Methods of this service will not have security checks
based on the propagated JAAS credentials because this service can only be
accessed from within the same VM.AssetTagLocalService
Constructor and Description |
---|
AssetTagLocalServiceUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
addAssetEntryAssetTag(long entryId,
AssetTag assetTag) |
static void |
addAssetEntryAssetTag(long entryId,
long tagId) |
static void |
addAssetEntryAssetTags(long entryId,
List<AssetTag> assetTags) |
static void |
addAssetEntryAssetTags(long entryId,
long[] tagIds) |
static AssetTag |
addAssetTag(AssetTag assetTag)
Adds the asset tag to the database.
|
static AssetTag |
addTag(long userId,
long groupId,
String name,
ServiceContext serviceContext)
Adds an asset tag.
|
static List<AssetTag> |
checkTags(long userId,
Group group,
String[] names)
Returns the asset tags matching the group and names, creating new asset
tags matching the names if the group doesn't already have them.
|
static List<AssetTag> |
checkTags(long userId,
long groupId,
String[] names)
Returns the asset tags matching the group and names, creating new asset
tags matching the names if the group doesn't already have them.
|
static void |
clearAssetEntryAssetTags(long entryId) |
static AssetTag |
createAssetTag(long tagId)
Creates a new asset tag with the primary key.
|
static PersistedModel |
createPersistedModel(Serializable primaryKeyObj) |
static AssetTag |
decrementAssetCount(long tagId,
long classNameId)
Decrements the number of assets to which the asset tag has been applied.
|
static void |
deleteAssetEntryAssetTag(long entryId,
AssetTag assetTag) |
static void |
deleteAssetEntryAssetTag(long entryId,
long tagId) |
static void |
deleteAssetEntryAssetTags(long entryId,
List<AssetTag> assetTags) |
static void |
deleteAssetEntryAssetTags(long entryId,
long[] tagIds) |
static AssetTag |
deleteAssetTag(AssetTag assetTag)
Deletes the asset tag from the database.
|
static AssetTag |
deleteAssetTag(long tagId)
Deletes the asset tag with the primary key from the database.
|
static void |
deleteGroupTags(long groupId)
Deletes all asset tags in the group.
|
static PersistedModel |
deletePersistedModel(PersistedModel persistedModel) |
static void |
deleteTag(AssetTag tag)
Deletes the asset tag.
|
static void |
deleteTag(long tagId)
Deletes the asset tag.
|
static <T> T |
dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) |
static int |
dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) |
static DynamicQuery |
dynamicQuery() |
static <T> List<T> |
dynamicQuery(DynamicQuery dynamicQuery)
Performs a dynamic query on the database and returns the matching rows.
|
static <T> List<T> |
dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end)
Performs a dynamic query on the database and returns a range of the matching rows.
|
static <T> List<T> |
dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end,
OrderByComparator<T> orderByComparator)
Performs a dynamic query on the database and returns an ordered range of the matching rows.
|
static long |
dynamicQueryCount(DynamicQuery dynamicQuery)
Returns the number of rows matching the dynamic query.
|
static long |
dynamicQueryCount(DynamicQuery dynamicQuery,
Projection projection)
Returns the number of rows matching the dynamic query.
|
static AssetTag |
fetchAssetTag(long tagId) |
static AssetTag |
fetchAssetTagByUuidAndGroupId(String uuid,
long groupId)
Returns the asset tag matching the UUID and group.
|
static AssetTag |
fetchTag(long groupId,
String name)
Returns the asset tag with the name in the group.
|
static ActionableDynamicQuery |
getActionableDynamicQuery() |
static List<AssetTag> |
getAssetEntryAssetTags(long entryId) |
static List<AssetTag> |
getAssetEntryAssetTags(long entryId,
int start,
int end) |
static List<AssetTag> |
getAssetEntryAssetTags(long entryId,
int start,
int end,
OrderByComparator<AssetTag> orderByComparator) |
static int |
getAssetEntryAssetTagsCount(long entryId) |
static long[] |
getAssetEntryPrimaryKeys(long tagId)
Returns the entryIds of the asset entries associated with the asset tag.
|
static AssetTag |
getAssetTag(long tagId)
Returns the asset tag with the primary key.
|
static AssetTag |
getAssetTagByUuidAndGroupId(String uuid,
long groupId)
Returns the asset tag matching the UUID and group.
|
static List<AssetTag> |
getAssetTags(int start,
int end)
Returns a range of all the asset tags.
|
static List<AssetTag> |
getAssetTagsByUuidAndCompanyId(String uuid,
long companyId)
Returns all the asset tags matching the UUID and company.
|
static List<AssetTag> |
getAssetTagsByUuidAndCompanyId(String uuid,
long companyId,
int start,
int end,
OrderByComparator<AssetTag> orderByComparator)
Returns a range of asset tags matching the UUID and company.
|
static int |
getAssetTagsCount()
Returns the number of asset tags.
|
static List<AssetTag> |
getEntryTags(long entryId)
Returns the asset tags of the asset entry.
|
static ExportActionableDynamicQuery |
getExportActionableDynamicQuery(PortletDataContext portletDataContext) |
static List<AssetTag> |
getGroupsTags(long[] groupIds)
Returns the asset tags in the groups.
|
static List<AssetTag> |
getGroupTags(long groupId)
Returns the asset tags in the group.
|
static List<AssetTag> |
getGroupTags(long groupId,
int start,
int end)
Returns a range of all the asset tags in the group.
|
static int |
getGroupTagsCount(long groupId)
Returns the number of asset tags in the group.
|
static IndexableActionableDynamicQuery |
getIndexableActionableDynamicQuery() |
static String |
getOSGiServiceIdentifier()
Returns the OSGi service identifier.
|
static PersistedModel |
getPersistedModel(Serializable primaryKeyObj) |
static AssetTagLocalService |
getService() |
static List<AssetTag> |
getSocialActivityCounterOffsetTags(long groupId,
String socialActivityCounterName,
int startOffset,
int endOffset) |
static List<AssetTag> |
getSocialActivityCounterPeriodTags(long groupId,
String socialActivityCounterName,
int startPeriod,
int endPeriod) |
static AssetTag |
getTag(long tagId)
Returns the asset tag with the primary key.
|
static AssetTag |
getTag(long groupId,
String name)
Returns the asset tag with the name in the group.
|
static long[] |
getTagIds(long[] groupIds,
String name)
Returns the primary keys of the asset tags with the name in the groups.
|
static long[] |
getTagIds(long[] groupIds,
String[] names)
Returns the primary keys of the asset tags with the names in the groups.
|
static long[] |
getTagIds(long groupId,
String[] names)
Returns the primary keys of the asset tags with the names in the group.
|
static long[] |
getTagIds(String name)
Returns the primary keys of the asset tags with the names.
|
static String[] |
getTagNames()
Returns the names of all the asset tags.
|
static String[] |
getTagNames(long classNameId,
long classPK)
Returns the names of the asset tags of the entity.
|
static String[] |
getTagNames(String className,
long classPK)
Returns the names of the asset tags of the entity
|
static List<AssetTag> |
getTags()
Returns all the asset tags.
|
static List<AssetTag> |
getTags(long classNameId,
long classPK)
Returns the asset tags of the entity.
|
static List<AssetTag> |
getTags(long groupId,
long classNameId,
String name) |
static List<AssetTag> |
getTags(long groupId,
long classNameId,
String name,
int start,
int end) |
static List<AssetTag> |
getTags(String className,
long classPK)
Returns the asset tags of the entity.
|
static int |
getTagsSize(long groupId,
long classNameId,
String name) |
static int |
getTagsSize(long groupId,
String name) |
static boolean |
hasAssetEntryAssetTag(long entryId,
long tagId) |
static boolean |
hasAssetEntryAssetTags(long entryId) |
static boolean |
hasTag(long groupId,
String name)
Returns
true if the group contains an asset tag with the
name. |
static AssetTag |
incrementAssetCount(long tagId,
long classNameId)
Increments the number of assets to which the asset tag has been applied.
|
static void |
mergeTags(long fromTagId,
long toTagId)
Replaces all occurrences of the first asset tag with the second asset tag
and deletes the first asset tag.
|
static List<AssetTag> |
search(long[] groupIds,
String name,
int start,
int end)
Returns the asset tags in the groups whose names match the pattern.
|
static List<AssetTag> |
search(long groupId,
String name,
int start,
int end)
Returns the asset tags in the group whose names match the pattern.
|
static BaseModelSearchResult<AssetTag> |
searchTags(long[] groupIds,
String name,
int start,
int end,
Sort sort) |
static void |
setAssetEntryAssetTags(long entryId,
long[] tagIds) |
static void |
subscribeTag(long userId,
long groupId,
long tagId) |
static void |
unsubscribeTag(long userId,
long tagId) |
static AssetTag |
updateAssetTag(AssetTag assetTag)
Updates the asset tag in the database or adds it if it does not yet exist.
|
static AssetTag |
updateTag(long userId,
long tagId,
String name,
ServiceContext serviceContext) |
public static void addAssetEntryAssetTag(long entryId, AssetTag assetTag)
public static void addAssetEntryAssetTag(long entryId, long tagId)
public static void addAssetEntryAssetTags(long entryId, List<AssetTag> assetTags)
public static void addAssetEntryAssetTags(long entryId, long[] tagIds)
public static AssetTag addAssetTag(AssetTag assetTag)
Important: Inspect AssetTagLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
assetTag
- the asset tagpublic static AssetTag addTag(long userId, long groupId, String name, ServiceContext serviceContext) throws PortalException
userId
- the primary key of the user adding the asset taggroupId
- the primary key of the group in which the asset tag is to
be addedname
- the asset tag's nameserviceContext
- the service context to be appliedPortalException
public static List<AssetTag> checkTags(long userId, Group group, String[] names) throws PortalException
For each name, if an asset tag with the name doesn't already exist in the group, this method creates a new asset tag with the name in the group.
userId
- the primary key of the user checking the asset tagsgroup
- the group in which to check the asset tagsnames
- the asset tag namesPortalException
public static List<AssetTag> checkTags(long userId, long groupId, String[] names) throws PortalException
userId
- the primary key of the user checking the asset tagsgroupId
- the primary key of the group in which check the asset
tagsnames
- the asset tag namesPortalException
public static void clearAssetEntryAssetTags(long entryId)
public static AssetTag createAssetTag(long tagId)
tagId
- the primary key for the new asset tagpublic static PersistedModel createPersistedModel(Serializable primaryKeyObj) throws PortalException
PortalException
public static AssetTag decrementAssetCount(long tagId, long classNameId) throws PortalException
tagId
- the primary key of the asset tagclassNameId
- the class name ID of the entity to which the asset
tag had been appliedPortalException
public static void deleteAssetEntryAssetTag(long entryId, AssetTag assetTag)
public static void deleteAssetEntryAssetTag(long entryId, long tagId)
public static void deleteAssetEntryAssetTags(long entryId, List<AssetTag> assetTags)
public static void deleteAssetEntryAssetTags(long entryId, long[] tagIds)
public static AssetTag deleteAssetTag(AssetTag assetTag)
Important: Inspect AssetTagLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
assetTag
- the asset tagpublic static AssetTag deleteAssetTag(long tagId) throws PortalException
Important: Inspect AssetTagLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
tagId
- the primary key of the asset tagPortalException
- if a asset tag with the primary key could not be foundpublic static void deleteGroupTags(long groupId) throws PortalException
groupId
- the primary key of the group in which to delete all asset
tagsPortalException
public static PersistedModel deletePersistedModel(PersistedModel persistedModel) throws PortalException
PortalException
public static void deleteTag(AssetTag tag) throws PortalException
tag
- the asset tag to be deletedPortalException
public static void deleteTag(long tagId) throws PortalException
tagId
- the primary key of the asset tagPortalException
public static <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
public static int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
public static DynamicQuery dynamicQuery()
public static <T> List<T> dynamicQuery(DynamicQuery dynamicQuery)
dynamicQuery
- the dynamic querypublic static <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent, then the query will include the default ORDER BY logic from com.liferay.portlet.asset.model.impl.AssetTagModelImpl
.
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)public static <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> orderByComparator)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent, then the query will include the default ORDER BY logic from com.liferay.portlet.asset.model.impl.AssetTagModelImpl
.
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static long dynamicQueryCount(DynamicQuery dynamicQuery)
dynamicQuery
- the dynamic querypublic static long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection)
dynamicQuery
- the dynamic queryprojection
- the projection to apply to the querypublic static AssetTag fetchAssetTag(long tagId)
public static AssetTag fetchAssetTagByUuidAndGroupId(String uuid, long groupId)
uuid
- the asset tag's UUIDgroupId
- the primary key of the groupnull
if a matching asset tag could not be foundpublic static AssetTag fetchTag(long groupId, String name)
groupId
- the primary key of the groupname
- the asset tag's namenull
if
it could not be foundpublic static ActionableDynamicQuery getActionableDynamicQuery()
public static List<AssetTag> getAssetEntryAssetTags(long entryId)
public static List<AssetTag> getAssetEntryAssetTags(long entryId, int start, int end)
public static List<AssetTag> getAssetEntryAssetTags(long entryId, int start, int end, OrderByComparator<AssetTag> orderByComparator)
public static int getAssetEntryAssetTagsCount(long entryId)
public static long[] getAssetEntryPrimaryKeys(long tagId)
tagId
- the tagId of the asset tagpublic static AssetTag getAssetTag(long tagId) throws PortalException
tagId
- the primary key of the asset tagPortalException
- if a asset tag with the primary key could not be foundpublic static AssetTag getAssetTagByUuidAndGroupId(String uuid, long groupId) throws PortalException
uuid
- the asset tag's UUIDgroupId
- the primary key of the groupPortalException
- if a matching asset tag could not be foundpublic static List<AssetTag> getAssetTags(int start, int end)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent, then the query will include the default ORDER BY logic from com.liferay.portlet.asset.model.impl.AssetTagModelImpl
.
start
- the lower bound of the range of asset tagsend
- the upper bound of the range of asset tags (not inclusive)public static List<AssetTag> getAssetTagsByUuidAndCompanyId(String uuid, long companyId)
uuid
- the UUID of the asset tagscompanyId
- the primary key of the companypublic static List<AssetTag> getAssetTagsByUuidAndCompanyId(String uuid, long companyId, int start, int end, OrderByComparator<AssetTag> orderByComparator)
uuid
- the UUID of the asset tagscompanyId
- the primary key of the companystart
- the lower bound of the range of asset tagsend
- the upper bound of the range of asset tags (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static int getAssetTagsCount()
public static List<AssetTag> getEntryTags(long entryId)
entryId
- the primary key of the asset entrypublic static ExportActionableDynamicQuery getExportActionableDynamicQuery(PortletDataContext portletDataContext)
public static List<AssetTag> getGroupsTags(long[] groupIds)
groupIds
- the primary keys of the groupspublic static List<AssetTag> getGroupTags(long groupId)
groupId
- the primary key of the grouppublic static List<AssetTag> getGroupTags(long groupId, int start, int end)
groupId
- the primary key of the groupstart
- the lower bound of the range of asset tagsend
- the upper bound of the range of asset tags (not inclusive)public static int getGroupTagsCount(long groupId)
groupId
- the primary key of the grouppublic static IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
public static String getOSGiServiceIdentifier()
public static PersistedModel getPersistedModel(Serializable primaryKeyObj) throws PortalException
PortalException
public static List<AssetTag> getSocialActivityCounterOffsetTags(long groupId, String socialActivityCounterName, int startOffset, int endOffset)
public static List<AssetTag> getSocialActivityCounterPeriodTags(long groupId, String socialActivityCounterName, int startPeriod, int endPeriod)
public static AssetTag getTag(long tagId) throws PortalException
tagId
- the primary key of the asset tagPortalException
public static AssetTag getTag(long groupId, String name) throws PortalException
groupId
- the primary key of the groupname
- the name of the asset tagPortalException
public static long[] getTagIds(long groupId, String[] names)
groupId
- the primary key of the groupnames
- the names of the asset tagspublic static long[] getTagIds(long[] groupIds, String name)
groupIds
- the primary keys of the groupsname
- the name of the asset tagspublic static long[] getTagIds(long[] groupIds, String[] names)
groupIds
- the primary keys of the groupsnames
- the names of the asset tagspublic static long[] getTagIds(String name)
name
- the name of the asset tagspublic static String[] getTagNames()
public static String[] getTagNames(long classNameId, long classPK)
classNameId
- the class name ID of the entityclassPK
- the primary key of the entitypublic static String[] getTagNames(String className, long classPK)
className
- the class name of the entityclassPK
- the primary key of the entitypublic static List<AssetTag> getTags()
public static List<AssetTag> getTags(long classNameId, long classPK)
classNameId
- the class name ID of the entityclassPK
- the primary key of the entitypublic static List<AssetTag> getTags(long groupId, long classNameId, String name)
public static List<AssetTag> getTags(long groupId, long classNameId, String name, int start, int end)
public static List<AssetTag> getTags(String className, long classPK)
className
- the class name of the entityclassPK
- the primary key of the entitypublic static int getTagsSize(long groupId, long classNameId, String name)
public static int getTagsSize(long groupId, String name)
public static boolean hasAssetEntryAssetTag(long entryId, long tagId)
public static boolean hasAssetEntryAssetTags(long entryId)
public static boolean hasTag(long groupId, String name)
true
if the group contains an asset tag with the
name.groupId
- the primary key of the groupname
- the name of the asset tagtrue
if the group contains an asset tag with the
name; false
otherwise.public static AssetTag incrementAssetCount(long tagId, long classNameId) throws PortalException
tagId
- the primary key of the asset tagclassNameId
- the class name ID of the entity to which the asset
tag is being appliedPortalException
public static void mergeTags(long fromTagId, long toTagId) throws PortalException
fromTagId
- the primary key of the asset tag to be replacedtoTagId
- the primary key of the asset tag to apply to the asset
entries of the other asset tagPortalException
public static List<AssetTag> search(long groupId, String name, int start, int end)
groupId
- the primary key of the groupname
- the pattern to matchstart
- the lower bound of the range of asset tagsend
- the upper bound of the range of asset tags (not inclusive)public static List<AssetTag> search(long[] groupIds, String name, int start, int end)
groupIds
- the primary keys of the groupsname
- the pattern to matchstart
- the lower bound of the range of asset tagsend
- the upper bound of the range of asset tags (not inclusive)public static BaseModelSearchResult<AssetTag> searchTags(long[] groupIds, String name, int start, int end, Sort sort) throws PortalException
PortalException
public static void setAssetEntryAssetTags(long entryId, long[] tagIds)
public static void subscribeTag(long userId, long groupId, long tagId) throws PortalException
PortalException
public static void unsubscribeTag(long userId, long tagId) throws PortalException
PortalException
public static AssetTag updateAssetTag(AssetTag assetTag)
Important: Inspect AssetTagLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
assetTag
- the asset tagpublic static AssetTag updateTag(long userId, long tagId, String name, ServiceContext serviceContext) throws PortalException
PortalException
public static AssetTagLocalService getService()