|
Liferay 6.2-ce-ga5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.liferay.portal.service.BaseLocalServiceImpl com.liferay.portlet.asset.service.base.AssetTagLocalServiceBaseImpl com.liferay.portlet.asset.service.impl.AssetTagLocalServiceImpl
public class AssetTagLocalServiceImpl
Provides the local service for accessing, adding, checking, deleting, merging, and updating asset tags.
Field Summary |
---|
Fields inherited from class com.liferay.portal.service.BaseLocalServiceImpl |
---|
layoutPersistence |
Constructor Summary | |
---|---|
AssetTagLocalServiceImpl()
|
Method Summary | |
---|---|
AssetTag |
addTag(long userId,
String name,
String[] tagProperties,
ServiceContext serviceContext)
Adds an asset tag. |
void |
addTagResources(AssetTag tag,
boolean addGroupPermissions,
boolean addGuestPermissions)
Adds resources for the asset tag. |
void |
addTagResources(AssetTag tag,
String[] groupPermissions,
String[] guestPermissions)
Adds resources for the asset tag using the group and guest permissions. |
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. |
void |
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. |
AssetTag |
decrementAssetCount(long tagId,
long classNameId)
Decrements the number of assets to which the asset tag has been applied. |
void |
deleteGroupTags(long groupId)
Deletes all asset tags in the group. |
void |
deleteTag(AssetTag tag)
Deletes the asset tag. |
void |
deleteTag(long tagId)
Deletes the asset tag. |
List<AssetTag> |
getEntryTags(long entryId)
Returns the asset tags of the asset entry. |
List<AssetTag> |
getGroupsTags(long[] groupIds)
Returns the asset tags in the groups. |
List<AssetTag> |
getGroupTags(long groupId)
Returns the asset tags in the group. |
List<AssetTag> |
getGroupTags(long groupId,
int start,
int end)
Returns a range of all the asset tags in the group. |
int |
getGroupTagsCount(long groupId)
Returns the number of asset tags in the group. |
List<AssetTag> |
getSocialActivityCounterOffsetTags(long groupId,
String socialActivityCounterName,
int startOffset,
int endOffset)
|
List<AssetTag> |
getSocialActivityCounterPeriodTags(long groupId,
String socialActivityCounterName,
int startPeriod,
int endPeriod)
|
AssetTag |
getTag(long tagId)
Returns the asset tag with the primary key. |
AssetTag |
getTag(long groupId,
String name)
Returns the asset tag with the name in the group. |
long[] |
getTagIds(long[] groupIds,
String name)
Returns the primary keys of the asset tags with the name in the groups. |
long[] |
getTagIds(long[] groupIds,
String[] names)
Returns the primary keys of the asset tags with the names in the groups. |
long[] |
getTagIds(long groupId,
String[] names)
Returns the primary keys of the asset tags with the names in the group. |
String[] |
getTagNames()
Returns the names of all the asset tags. |
protected String[] |
getTagNames(List<AssetTag> tags)
|
String[] |
getTagNames(long classNameId,
long classPK)
Returns the names of the asset tags of the entity. |
String[] |
getTagNames(String className,
long classPK)
Returns the names of the asset tags of the entity |
List<AssetTag> |
getTags()
Returns all the asset tags. |
List<AssetTag> |
getTags(long classNameId,
long classPK)
Returns the asset tags of the entity. |
List<AssetTag> |
getTags(long groupId,
long classNameId,
String name)
|
List<AssetTag> |
getTags(long groupId,
long classNameId,
String name,
int start,
int end)
|
List<AssetTag> |
getTags(String className,
long classPK)
Returns the asset tags of the entity. |
int |
getTagsSize(long groupId,
long classNameId,
String name)
|
boolean |
hasTag(long groupId,
String name)
Returns true if the group contains an asset tag with the
name. |
AssetTag |
incrementAssetCount(long tagId,
long classNameId)
Increments the number of assets to which the asset tag has been applied. |
void |
mergeTags(long fromTagId,
long toTagId,
boolean overrideProperties)
Replaces all occurrences of the first asset tag with the second asset tag and deletes the first asset tag. |
List<AssetTag> |
search(long[] groupIds,
String name,
String[] tagProperties,
int start,
int end)
Returns the asset tags in the groups whose names match the pattern and the properties. |
List<AssetTag> |
search(long groupId,
String name,
String[] tagProperties,
int start,
int end)
Returns the asset tags in the group whose names match the pattern and the properties. |
AssetTag |
updateTag(long userId,
long tagId,
String name,
String[] tagProperties,
ServiceContext serviceContext)
|
protected void |
validate(String name)
|
Methods inherited from class com.liferay.portal.service.BaseLocalServiceImpl |
---|
getClassLoader, getLayoutURL, getLayoutURL |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AssetTagLocalServiceImpl()
Method Detail |
---|
public AssetTag addTag(long userId, String name, String[] tagProperties, ServiceContext serviceContext) throws PortalException, SystemException
userId
- the primary key of the user adding the asset tagname
- the asset tag's nametagProperties
- the tag's propertiesserviceContext
- the service context
PortalException
- if a user with the primary key could not be
found, if an asset tag already exists with the name, or if a
portal exception occurred
SystemException
- if a system exception occurredpublic void addTagResources(AssetTag tag, boolean addGroupPermissions, boolean addGuestPermissions) throws PortalException, SystemException
tag
- the asset tag for which to add resourcesaddGroupPermissions
- whether to add group permissionsaddGuestPermissions
- whether to add guest permissions
PortalException
- if resources could not be added for the asset tag
or if a portal exception occurred
SystemException
- if a system exception occurredpublic void addTagResources(AssetTag tag, String[] groupPermissions, String[] guestPermissions) throws PortalException, SystemException
tag
- the asset tag for which to add resourcesgroupPermissions
- the group permissions to be appliedguestPermissions
- the guest permissions to be applied
PortalException
- if resources could not be added for the asset tag
or if a portal exception occurred
SystemException
- if a system exception occurredpublic List<AssetTag> checkTags(long userId, Group group, String[] names) throws PortalException, SystemException
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 names
PortalException
- if a matching group could not be found or if a
portal exception occurred
SystemException
- if a system exception occurredpublic void checkTags(long userId, long groupId, String[] names) throws PortalException, SystemException
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 names
PortalException
- if a matching group could not be found or if a
portal exception occurred
SystemException
- if a system exception occurredpublic AssetTag decrementAssetCount(long tagId, long classNameId) throws PortalException, SystemException
tagId
- the primary key of the asset tagclassNameId
- the class name ID of the entity to which the asset
tag had been applied
PortalException
- if an asset tag with the primary key could not be
found or if a portal exception occurred
SystemException
- if a system exception occurredpublic void deleteGroupTags(long groupId) throws PortalException, SystemException
groupId
- the primary key of the group in which to delete all asset
tags
PortalException
- if a portal exception occurred
SystemException
- if a system exception occurredpublic void deleteTag(AssetTag tag) throws PortalException, SystemException
tag
- the asset tag to be deleted
PortalException
- if a portal exception occurred
SystemException
- if a system exception occurredpublic void deleteTag(long tagId) throws PortalException, SystemException
tagId
- the primary key of the asset tag
PortalException
- if no asset tag could be found with the primary
key or if a portal exception occurred
SystemException
- if a system exception occurredpublic List<AssetTag> getEntryTags(long entryId) throws SystemException
entryId
- the primary key of the asset entry
SystemException
- if a system exception occurredpublic List<AssetTag> getGroupsTags(long[] groupIds) throws SystemException
groupIds
- the primary keys of the groups
SystemException
- if a system exception occurredpublic List<AssetTag> getGroupTags(long groupId) throws SystemException
groupId
- the primary key of the group
SystemException
- if a system exception occurredpublic List<AssetTag> getGroupTags(long groupId, int start, int end) throws SystemException
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)
SystemException
- if a system exception occurredpublic int getGroupTagsCount(long groupId) throws SystemException
groupId
- the primary key of the group
SystemException
- if a system exception occurredpublic List<AssetTag> getSocialActivityCounterOffsetTags(long groupId, String socialActivityCounterName, int startOffset, int endOffset) throws SystemException
SystemException
public List<AssetTag> getSocialActivityCounterPeriodTags(long groupId, String socialActivityCounterName, int startPeriod, int endPeriod) throws SystemException
SystemException
public AssetTag getTag(long tagId) throws PortalException, SystemException
tagId
- the primary key of the asset tag
PortalException
- if an asset tag with the primary key could not be
found
SystemException
- if a system exception occurredpublic AssetTag getTag(long groupId, String name) throws PortalException, SystemException
groupId
- the primary key of the groupname
- the name of the asset tag
PortalException
- if a matching asset tag could not be found
SystemException
- if a system exception occurredpublic long[] getTagIds(long groupId, String[] names) throws PortalException, SystemException
groupId
- the primary key of the groupnames
- the names of the asset tags
PortalException
- if a portal exception occurred
SystemException
- if a system exception occurredpublic long[] getTagIds(long[] groupIds, String name) throws PortalException, SystemException
groupIds
- the primary keys of the groupsname
- the name of the asset tags
PortalException
- if a portal exception occurred
SystemException
- if a system exception occurredpublic long[] getTagIds(long[] groupIds, String[] names) throws PortalException, SystemException
groupIds
- the primary keys of the groupsnames
- the names of the asset tags
PortalException
- if a portal exception occurred
SystemException
- if a system exception occurredpublic String[] getTagNames() throws SystemException
SystemException
- if a system exception occurredpublic String[] getTagNames(long classNameId, long classPK) throws SystemException
classNameId
- the class name ID of the entityclassPK
- the primary key of the entity
SystemException
- if a system exception occurredpublic String[] getTagNames(String className, long classPK) throws SystemException
className
- the class name of the entityclassPK
- the primary key of the entity
SystemException
- if a system exception occurredpublic List<AssetTag> getTags() throws SystemException
SystemException
- if a system exception occurredpublic List<AssetTag> getTags(long classNameId, long classPK) throws SystemException
classNameId
- the class name ID of the entityclassPK
- the primary key of the entity
SystemException
- if a system exception occurredpublic List<AssetTag> getTags(long groupId, long classNameId, String name) throws SystemException
SystemException
public List<AssetTag> getTags(long groupId, long classNameId, String name, int start, int end) throws SystemException
SystemException
@ThreadLocalCachable public List<AssetTag> getTags(String className, long classPK) throws SystemException
className
- the class name of the entityclassPK
- the primary key of the entity
SystemException
- if a system exception occurredpublic int getTagsSize(long groupId, long classNameId, String name) throws SystemException
SystemException
public boolean hasTag(long groupId, String name) throws PortalException, SystemException
true
if the group contains an asset tag with the
name.
groupId
- the primary key of the groupname
- the name of the asset tag
true
if the group contains an asset tag with the
name; false
otherwise.
PortalException
- if a portal exception occurred
SystemException
- if a system exception occurredpublic AssetTag incrementAssetCount(long tagId, long classNameId) throws PortalException, SystemException
tagId
- the primary key of the asset tagclassNameId
- the class name ID of the entity to which the asset
tag is being applied
PortalException
- if a asset tag with the primary key could not be
found or if a portal exception occurred
SystemException
- if a system exception occurredpublic void mergeTags(long fromTagId, long toTagId, boolean overrideProperties) throws PortalException, SystemException
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 tagoverrideProperties
- whether to override the properties of the
second asset tag with the properties of the first asset tag
PortalException
- if a portal exception occurred
SystemException
- if a system exception occurredpublic List<AssetTag> search(long groupId, String name, String[] tagProperties, int start, int end) throws SystemException
groupId
- the primary key of the groupname
- the pattern to matchtagProperties
- the properties to matchstart
- the lower bound of the range of asset tagsend
- the upper bound of the range of asset tags (not inclusive)
SystemException
- if a system exception occurredpublic List<AssetTag> search(long[] groupIds, String name, String[] tagProperties, int start, int end) throws SystemException
groupIds
- the primary keys of the groupsname
- the pattern to matchtagProperties
- the properties to matchstart
- the lower bound of the range of asset tagsend
- the upper bound of the range of asset tags (not inclusive)
SystemException
- if a system exception occurredpublic AssetTag updateTag(long userId, long tagId, String name, String[] tagProperties, ServiceContext serviceContext) throws PortalException, SystemException
PortalException
SystemException
protected String[] getTagNames(List<AssetTag> tags)
protected void validate(String name) throws PortalException
PortalException
|
Liferay 6.2-ce-ga5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |