Liferay 7.0-ce-m3

com.liferay.portlet.asset.service.impl
Class AssetTagLocalServiceImpl

java.lang.Object
  extended by com.liferay.portal.service.BaseLocalServiceImpl
      extended by com.liferay.portlet.asset.service.base.AssetTagLocalServiceBaseImpl
          extended by com.liferay.portlet.asset.service.impl.AssetTagLocalServiceImpl
All Implemented Interfaces:
IdentifiableBean, BaseLocalService, PersistedModelLocalService, AssetTagLocalService

public class AssetTagLocalServiceImpl
extends AssetTagLocalServiceBaseImpl

Provides the local service for accessing, adding, checking, deleting, merging, and updating asset tags.


Field Summary
 
Fields inherited from class com.liferay.portlet.asset.service.base.AssetTagLocalServiceBaseImpl
assetEntryFinder, assetEntryLocalService, assetEntryPersistence, assetEntryService, assetTagFinder, assetTagLocalService, assetTagPersistence, assetTagPropertyFinder, assetTagPropertyLocalService, assetTagPropertyPersistence, assetTagPropertyService, assetTagService, assetTagStatsLocalService, assetTagStatsPersistence, classNameLocalService, classNamePersistence, classNameService, counterLocalService, groupFinder, groupLocalService, groupPersistence, groupService, persistedModelLocalServiceRegistry, resourceLocalService, userFinder, userLocalService, userPersistence, userService
 
Constructor Summary
AssetTagLocalServiceImpl()
           
 
Method Summary
 AssetTag addTag(long userId, String name, String[] tagProperties, ServiceContext serviceContext)
           
 void addTagResources(AssetTag tag, boolean addGroupPermissions, boolean addGuestPermissions)
           
 void addTagResources(AssetTag tag, String[] groupPermissions, String[] guestPermissions)
           
 List<AssetTag> checkTags(long userId, Group group, String[] names)
          Returns the tags matching the group and names, creating new tags with the names if the group doesn't already have them.
 void checkTags(long userId, long groupId, String[] names)
           
 AssetTag decrementAssetCount(long tagId, long classNameId)
           
 void deleteGroupTags(long groupId)
           
 void deleteTag(AssetTag tag)
           
 void deleteTag(long tagId)
           
 List<AssetTag> getEntryTags(long entryId)
           
 List<AssetTag> getGroupsTags(long[] groupIds)
           
 List<AssetTag> getGroupTags(long groupId)
           
 List<AssetTag> getGroupTags(long groupId, int start, int end)
           
 int getGroupTagsCount(long groupId)
           
 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)
           
 AssetTag getTag(long groupId, String name)
           
 long[] getTagIds(long[] groupIds, String name)
           
 long[] getTagIds(long[] groupIds, String[] names)
           
 long[] getTagIds(long groupId, String[] names)
           
 String[] getTagNames()
           
protected  String[] getTagNames(List<AssetTag> tags)
           
 String[] getTagNames(long classNameId, long classPK)
           
 String[] getTagNames(String className, long classPK)
           
 List<AssetTag> getTags()
           
 List<AssetTag> getTags(long classNameId, long classPK)
           
 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)
           
 int getTagsSize(long groupId, long classNameId, String name)
           
 boolean hasTag(long groupId, String name)
           
 AssetTag incrementAssetCount(long tagId, long classNameId)
           
 void mergeTags(long fromTagId, long toTagId, boolean overrideProperties)
           
 List<AssetTag> search(long[] groupIds, String name, String[] tagProperties, int start, int end)
           
 List<AssetTag> search(long groupId, String name, String[] tagProperties, int start, int end)
           
 AssetTag updateTag(long userId, long tagId, String name, String[] tagProperties, ServiceContext serviceContext)
           
protected  void validate(String name)
           
 
Methods inherited from class com.liferay.portlet.asset.service.base.AssetTagLocalServiceBaseImpl
addAssetEntryAssetTag, addAssetEntryAssetTag, addAssetEntryAssetTags, addAssetEntryAssetTags, addAssetTag, afterPropertiesSet, clearAssetEntryAssetTags, createAssetTag, deleteAssetEntryAssetTag, deleteAssetEntryAssetTag, deleteAssetEntryAssetTags, deleteAssetEntryAssetTags, deleteAssetTag, deleteAssetTag, deletePersistedModel, destroy, dynamicQuery, dynamicQuery, dynamicQuery, dynamicQuery, dynamicQueryCount, dynamicQueryCount, fetchAssetTag, getActionableDynamicQuery, getAssetEntryAssetTags, getAssetEntryAssetTags, getAssetEntryAssetTags, getAssetEntryAssetTagsCount, getAssetEntryFinder, getAssetEntryLocalService, getAssetEntryPersistence, getAssetEntryPrimaryKeys, getAssetEntryService, getAssetTag, getAssetTagFinder, getAssetTagLocalService, getAssetTagPersistence, getAssetTagPropertyFinder, getAssetTagPropertyLocalService, getAssetTagPropertyPersistence, getAssetTagPropertyService, getAssetTags, getAssetTagsCount, getAssetTagService, getAssetTagStatsLocalService, getAssetTagStatsPersistence, getBeanIdentifier, getClassNameLocalService, getClassNamePersistence, getClassNameService, getCounterLocalService, getGroupFinder, getGroupLocalService, getGroupPersistence, getGroupService, getModelClass, getModelClassName, getPersistedModel, getResourceLocalService, getUserFinder, getUserLocalService, getUserPersistence, getUserService, hasAssetEntryAssetTag, hasAssetEntryAssetTags, initActionableDynamicQuery, runSQL, setAssetEntryAssetTags, setAssetEntryFinder, setAssetEntryLocalService, setAssetEntryPersistence, setAssetEntryService, setAssetTagFinder, setAssetTagLocalService, setAssetTagPersistence, setAssetTagPropertyFinder, setAssetTagPropertyLocalService, setAssetTagPropertyPersistence, setAssetTagPropertyService, setAssetTagService, setAssetTagStatsLocalService, setAssetTagStatsPersistence, setBeanIdentifier, setClassNameLocalService, setClassNamePersistence, setClassNameService, setCounterLocalService, setGroupFinder, setGroupLocalService, setGroupPersistence, setGroupService, setResourceLocalService, setUserFinder, setUserLocalService, setUserPersistence, setUserService, updateAssetTag
 
Methods inherited from class com.liferay.portal.service.BaseLocalServiceImpl
getClassLoader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssetTagLocalServiceImpl

public AssetTagLocalServiceImpl()
Method Detail

addTag

public AssetTag addTag(long userId,
                       String name,
                       String[] tagProperties,
                       ServiceContext serviceContext)
                throws PortalException
Throws:
PortalException

addTagResources

public void addTagResources(AssetTag tag,
                            boolean addGroupPermissions,
                            boolean addGuestPermissions)
                     throws PortalException
Throws:
PortalException

addTagResources

public void addTagResources(AssetTag tag,
                            String[] groupPermissions,
                            String[] guestPermissions)
                     throws PortalException
Throws:
PortalException

checkTags

public List<AssetTag> checkTags(long userId,
                                Group group,
                                String[] names)
                         throws PortalException
Returns the tags matching the group and names, creating new tags with the names if the group doesn't already have them.

For each name, if a tag with that name doesn't already exist for the group, this method creates a new tag with that name for the group. If a tag with that name already exists in the company group, this method copies that company group's tag's properties to the group's new tag.

Parameters:
userId - the primary key of the user
group - ID the primary key of the tag's group
names - the tag names
Returns:
the tags matching the group and names and new tags matching the names that don't already exist for the group
Throws:
PortalException - if a matching group could not be found, if the tag's key or value were invalid, or if a portal exception occurred

checkTags

public void checkTags(long userId,
                      long groupId,
                      String[] names)
               throws PortalException
Throws:
PortalException

decrementAssetCount

public AssetTag decrementAssetCount(long tagId,
                                    long classNameId)
                             throws PortalException
Throws:
PortalException

deleteGroupTags

public void deleteGroupTags(long groupId)
                     throws PortalException
Throws:
PortalException

deleteTag

public void deleteTag(AssetTag tag)
               throws PortalException
Throws:
PortalException

deleteTag

public void deleteTag(long tagId)
               throws PortalException
Throws:
PortalException

getEntryTags

public List<AssetTag> getEntryTags(long entryId)

getGroupsTags

public List<AssetTag> getGroupsTags(long[] groupIds)

getGroupTags

public List<AssetTag> getGroupTags(long groupId)

getGroupTags

public List<AssetTag> getGroupTags(long groupId,
                                   int start,
                                   int end)

getGroupTagsCount

public int getGroupTagsCount(long groupId)

getSocialActivityCounterOffsetTags

public List<AssetTag> getSocialActivityCounterOffsetTags(long groupId,
                                                         String socialActivityCounterName,
                                                         int startOffset,
                                                         int endOffset)

getSocialActivityCounterPeriodTags

public List<AssetTag> getSocialActivityCounterPeriodTags(long groupId,
                                                         String socialActivityCounterName,
                                                         int startPeriod,
                                                         int endPeriod)

getTag

public AssetTag getTag(long tagId)
                throws PortalException
Throws:
PortalException

getTag

public AssetTag getTag(long groupId,
                       String name)
                throws PortalException
Throws:
PortalException

getTagIds

public long[] getTagIds(long groupId,
                        String[] names)
                 throws PortalException
Throws:
PortalException

getTagIds

public long[] getTagIds(long[] groupIds,
                        String name)
                 throws PortalException
Throws:
PortalException

getTagIds

public long[] getTagIds(long[] groupIds,
                        String[] names)
                 throws PortalException
Throws:
PortalException

getTagNames

public String[] getTagNames()

getTagNames

public String[] getTagNames(long classNameId,
                            long classPK)

getTagNames

public String[] getTagNames(String className,
                            long classPK)

getTags

public List<AssetTag> getTags()

getTags

public List<AssetTag> getTags(long classNameId,
                              long classPK)

getTags

public List<AssetTag> getTags(long groupId,
                              long classNameId,
                              String name)

getTags

public List<AssetTag> getTags(long groupId,
                              long classNameId,
                              String name,
                              int start,
                              int end)

getTags

@ThreadLocalCachable
public List<AssetTag> getTags(String className,
                                                  long classPK)

getTagsSize

public int getTagsSize(long groupId,
                       long classNameId,
                       String name)

hasTag

public boolean hasTag(long groupId,
                      String name)
               throws PortalException
Throws:
PortalException

incrementAssetCount

public AssetTag incrementAssetCount(long tagId,
                                    long classNameId)
                             throws PortalException
Throws:
PortalException

mergeTags

public void mergeTags(long fromTagId,
                      long toTagId,
                      boolean overrideProperties)
               throws PortalException
Throws:
PortalException

search

public List<AssetTag> search(long groupId,
                             String name,
                             String[] tagProperties,
                             int start,
                             int end)

search

public List<AssetTag> search(long[] groupIds,
                             String name,
                             String[] tagProperties,
                             int start,
                             int end)

updateTag

public AssetTag updateTag(long userId,
                          long tagId,
                          String name,
                          String[] tagProperties,
                          ServiceContext serviceContext)
                   throws PortalException
Throws:
PortalException

getTagNames

protected String[] getTagNames(List<AssetTag> tags)

validate

protected void validate(String name)
                 throws PortalException
Throws:
PortalException

Liferay 7.0-ce-m3