Liferay 7.0-ce-m3

com.liferay.portlet.asset.service
Class AssetTagLocalServiceUtil

java.lang.Object
  extended by com.liferay.portlet.asset.service.AssetTagLocalServiceUtil

@ProviderType
public class AssetTagLocalServiceUtil
extends Object

Provides the local service utility for AssetTag. This utility wraps com.liferay.portlet.asset.service.impl.AssetTagLocalServiceImpl and is the primary 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.

See Also:
AssetTagLocalService, com.liferay.portlet.asset.service.base.AssetTagLocalServiceBaseImpl, com.liferay.portlet.asset.service.impl.AssetTagLocalServiceImpl

Constructor Summary
AssetTagLocalServiceUtil()
           
 
Method Summary
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, String name, String[] tagProperties, ServiceContext serviceContext)
           
static void addTagResources(AssetTag tag, boolean addGroupPermissions, boolean addGuestPermissions)
           
static void addTagResources(AssetTag tag, String[] groupPermissions, String[] guestPermissions)
           
static 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.
static void checkTags(long userId, long groupId, String[] names)
           
static void clearAssetEntryAssetTags(long entryId)
           
static AssetTag createAssetTag(long tagId)
          Creates a new asset tag with the primary key.
static AssetTag decrementAssetCount(long tagId, long classNameId)
           
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)
           
static PersistedModel deletePersistedModel(PersistedModel persistedModel)
           
static void deleteTag(AssetTag tag)
           
static void deleteTag(long tagId)
           
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 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 List<AssetTag> getAssetTags(int start, int end)
          Returns a range of all the asset tags.
static int getAssetTagsCount()
          Returns the number of asset tags.
static String getBeanIdentifier()
          Returns the Spring bean ID for this bean.
static List<AssetTag> getEntryTags(long entryId)
           
static List<AssetTag> getGroupsTags(long[] groupIds)
           
static List<AssetTag> getGroupTags(long groupId)
           
static List<AssetTag> getGroupTags(long groupId, int start, int end)
           
static int getGroupTagsCount(long groupId)
           
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)
           
static AssetTag getTag(long groupId, String name)
           
static long[] getTagIds(long[] groupIds, String name)
           
static long[] getTagIds(long[] groupIds, String[] names)
           
static long[] getTagIds(long groupId, String[] names)
           
static String[] getTagNames()
           
static String[] getTagNames(long classNameId, long classPK)
           
static String[] getTagNames(String className, long classPK)
           
static List<AssetTag> getTags()
           
static List<AssetTag> getTags(long classNameId, long classPK)
           
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)
           
static int getTagsSize(long groupId, long classNameId, String name)
           
static boolean hasAssetEntryAssetTag(long entryId, long tagId)
           
static boolean hasAssetEntryAssetTags(long entryId)
           
static boolean hasTag(long groupId, String name)
           
static AssetTag incrementAssetCount(long tagId, long classNameId)
           
static void mergeTags(long fromTagId, long toTagId, boolean overrideProperties)
           
static List<AssetTag> search(long[] groupIds, String name, String[] tagProperties, int start, int end)
           
static List<AssetTag> search(long groupId, String name, String[] tagProperties, int start, int end)
           
static void setAssetEntryAssetTags(long entryId, long[] tagIds)
           
static void setBeanIdentifier(String beanIdentifier)
          Sets the Spring bean ID for this bean.
 void setService(AssetTagLocalService service)
          Deprecated. As of 6.2.0
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, String[] tagProperties, ServiceContext serviceContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssetTagLocalServiceUtil

public AssetTagLocalServiceUtil()
Method Detail

addAssetEntryAssetTag

public static void addAssetEntryAssetTag(long entryId,
                                         AssetTag assetTag)

addAssetEntryAssetTag

public static void addAssetEntryAssetTag(long entryId,
                                         long tagId)

addAssetEntryAssetTags

public static void addAssetEntryAssetTags(long entryId,
                                          List<AssetTag> AssetTags)

addAssetEntryAssetTags

public static void addAssetEntryAssetTags(long entryId,
                                          long[] tagIds)

addAssetTag

public static AssetTag addAssetTag(AssetTag assetTag)
Adds the asset tag to the database. Also notifies the appropriate model listeners.

Parameters:
assetTag - the asset tag
Returns:
the asset tag that was added

addTag

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

addTagResources

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

addTagResources

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

checkTags

public static 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 static void checkTags(long userId,
                             long groupId,
                             String[] names)
                      throws PortalException
Throws:
PortalException

clearAssetEntryAssetTags

public static void clearAssetEntryAssetTags(long entryId)

createAssetTag

public static AssetTag createAssetTag(long tagId)
Creates a new asset tag with the primary key. Does not add the asset tag to the database.

Parameters:
tagId - the primary key for the new asset tag
Returns:
the new asset tag

decrementAssetCount

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

deleteAssetEntryAssetTag

public static void deleteAssetEntryAssetTag(long entryId,
                                            AssetTag assetTag)

deleteAssetEntryAssetTag

public static void deleteAssetEntryAssetTag(long entryId,
                                            long tagId)

deleteAssetEntryAssetTags

public static void deleteAssetEntryAssetTags(long entryId,
                                             List<AssetTag> AssetTags)

deleteAssetEntryAssetTags

public static void deleteAssetEntryAssetTags(long entryId,
                                             long[] tagIds)

deleteAssetTag

public static AssetTag deleteAssetTag(AssetTag assetTag)
Deletes the asset tag from the database. Also notifies the appropriate model listeners.

Parameters:
assetTag - the asset tag
Returns:
the asset tag that was removed

deleteAssetTag

public static AssetTag deleteAssetTag(long tagId)
                               throws PortalException
Deletes the asset tag with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
tagId - the primary key of the asset tag
Returns:
the asset tag that was removed
Throws:
PortalException - if a asset tag with the primary key could not be found

deleteGroupTags

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

deletePersistedModel

public static PersistedModel deletePersistedModel(PersistedModel persistedModel)
                                           throws PortalException
Throws:
PortalException

deleteTag

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

deleteTag

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

dynamicQuery

public static DynamicQuery dynamicQuery()

dynamicQuery

public static <T> List<T> dynamicQuery(DynamicQuery dynamicQuery)
Performs a dynamic query on the database and returns the matching rows.

Parameters:
dynamicQuery - the dynamic query
Returns:
the matching rows

dynamicQuery

public 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.

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 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 and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from com.liferay.portlet.asset.model.impl.AssetTagModelImpl. If both orderByComparator 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.

Parameters:
dynamicQuery - the dynamic query
start - the lower bound of the range of model instances
end - the upper bound of the range of model instances (not inclusive)
Returns:
the range of matching rows

dynamicQuery

public 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.

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 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 and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from com.liferay.portlet.asset.model.impl.AssetTagModelImpl. If both orderByComparator 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.

Parameters:
dynamicQuery - the dynamic query
start - the lower bound of the range of model instances
end - the upper bound of the range of model instances (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching rows

dynamicQueryCount

public static long dynamicQueryCount(DynamicQuery dynamicQuery)
Returns the number of rows matching the dynamic query.

Parameters:
dynamicQuery - the dynamic query
Returns:
the number of rows matching the dynamic query

dynamicQueryCount

public static long dynamicQueryCount(DynamicQuery dynamicQuery,
                                     Projection projection)
Returns the number of rows matching the dynamic query.

Parameters:
dynamicQuery - the dynamic query
projection - the projection to apply to the query
Returns:
the number of rows matching the dynamic query

fetchAssetTag

public static AssetTag fetchAssetTag(long tagId)

getActionableDynamicQuery

public static ActionableDynamicQuery getActionableDynamicQuery()

getAssetEntryAssetTags

public static List<AssetTag> getAssetEntryAssetTags(long entryId)

getAssetEntryAssetTags

public static List<AssetTag> getAssetEntryAssetTags(long entryId,
                                                    int start,
                                                    int end)

getAssetEntryAssetTags

public static List<AssetTag> getAssetEntryAssetTags(long entryId,
                                                    int start,
                                                    int end,
                                                    OrderByComparator<AssetTag> orderByComparator)

getAssetEntryAssetTagsCount

public static int getAssetEntryAssetTagsCount(long entryId)

getAssetEntryPrimaryKeys

public static long[] getAssetEntryPrimaryKeys(long tagId)
Returns the entryIds of the asset entries associated with the asset tag.

Parameters:
tagId - the tagId of the asset tag
Returns:
long[] the entryIds of asset entries associated with the asset tag

getAssetTag

public static AssetTag getAssetTag(long tagId)
                            throws PortalException
Returns the asset tag with the primary key.

Parameters:
tagId - the primary key of the asset tag
Returns:
the asset tag
Throws:
PortalException - if a asset tag with the primary key could not be found

getAssetTags

public static List<AssetTag> getAssetTags(int start,
                                          int end)
Returns a range of all the asset tags.

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 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 and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from com.liferay.portlet.asset.model.impl.AssetTagModelImpl. If both orderByComparator 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.

Parameters:
start - the lower bound of the range of asset tags
end - the upper bound of the range of asset tags (not inclusive)
Returns:
the range of asset tags

getAssetTagsCount

public static int getAssetTagsCount()
Returns the number of asset tags.

Returns:
the number of asset tags

getBeanIdentifier

public static String getBeanIdentifier()
Returns the Spring bean ID for this bean.

Returns:
the Spring bean ID for this bean

getEntryTags

public static List<AssetTag> getEntryTags(long entryId)

getGroupTags

public static List<AssetTag> getGroupTags(long groupId)

getGroupTags

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

getGroupTagsCount

public static int getGroupTagsCount(long groupId)

getGroupsTags

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

getPersistedModel

public static PersistedModel getPersistedModel(Serializable primaryKeyObj)
                                        throws PortalException
Throws:
PortalException

getSocialActivityCounterOffsetTags

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

getSocialActivityCounterPeriodTags

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

getTag

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

getTag

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

getTagIds

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

getTagIds

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

getTagIds

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

getTagNames

public static String[] getTagNames()

getTagNames

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

getTagNames

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

getTags

public static List<AssetTag> getTags()

getTags

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

getTags

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

getTags

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

getTags

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

getTagsSize

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

hasAssetEntryAssetTag

public static boolean hasAssetEntryAssetTag(long entryId,
                                            long tagId)

hasAssetEntryAssetTags

public static boolean hasAssetEntryAssetTags(long entryId)

hasTag

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

incrementAssetCount

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

mergeTags

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

search

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

search

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

setAssetEntryAssetTags

public static void setAssetEntryAssetTags(long entryId,
                                          long[] tagIds)

setBeanIdentifier

public static void setBeanIdentifier(String beanIdentifier)
Sets the Spring bean ID for this bean.

Parameters:
beanIdentifier - the Spring bean ID for this bean

updateAssetTag

public static AssetTag updateAssetTag(AssetTag assetTag)
Updates the asset tag in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

Parameters:
assetTag - the asset tag
Returns:
the asset tag that was updated

updateTag

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

getService

public static AssetTagLocalService getService()

setService

@Deprecated
public void setService(AssetTagLocalService service)
Deprecated. As of 6.2.0


Liferay 7.0-ce-m3