Liferay 7.0-ce-m3

com.liferay.portlet.asset.service
Interface AssetTagLocalService

All Superinterfaces:
BaseLocalService, PersistedModelLocalService
All Known Implementing Classes:
AssetTagLocalServiceWrapper

@ProviderType
@Transactional(isolation=PORTAL,
               rollbackFor={PortalException.class,SystemException.class})
public interface AssetTagLocalService
extends BaseLocalService, PersistedModelLocalService

Provides the local service interface for AssetTag. 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:
AssetTagLocalServiceUtil, com.liferay.portlet.asset.service.base.AssetTagLocalServiceBaseImpl, com.liferay.portlet.asset.service.impl.AssetTagLocalServiceImpl

Method Summary
 void addAssetEntryAssetTag(long entryId, AssetTag assetTag)
           
 void addAssetEntryAssetTag(long entryId, long tagId)
           
 void addAssetEntryAssetTags(long entryId, List<AssetTag> AssetTags)
           
 void addAssetEntryAssetTags(long entryId, long[] tagIds)
           
 AssetTag addAssetTag(AssetTag assetTag)
          Adds the asset tag to the database.
 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)
           
 void clearAssetEntryAssetTags(long entryId)
           
 AssetTag createAssetTag(long tagId)
          Creates a new asset tag with the primary key.
 AssetTag decrementAssetCount(long tagId, long classNameId)
           
 void deleteAssetEntryAssetTag(long entryId, AssetTag assetTag)
           
 void deleteAssetEntryAssetTag(long entryId, long tagId)
           
 void deleteAssetEntryAssetTags(long entryId, List<AssetTag> AssetTags)
           
 void deleteAssetEntryAssetTags(long entryId, long[] tagIds)
           
 AssetTag deleteAssetTag(AssetTag assetTag)
          Deletes the asset tag from the database.
 AssetTag deleteAssetTag(long tagId)
          Deletes the asset tag with the primary key from the database.
 void deleteGroupTags(long groupId)
           
 PersistedModel deletePersistedModel(PersistedModel persistedModel)
           
 void deleteTag(AssetTag tag)
           
 void deleteTag(long tagId)
           
 DynamicQuery dynamicQuery()
           
<T> List<T>
dynamicQuery(DynamicQuery dynamicQuery)
          Performs a dynamic query on the database and returns the matching rows.
<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.
<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.
 long dynamicQueryCount(DynamicQuery dynamicQuery)
          Returns the number of rows matching the dynamic query.
 long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection)
          Returns the number of rows matching the dynamic query.
 AssetTag fetchAssetTag(long tagId)
           
 ActionableDynamicQuery getActionableDynamicQuery()
           
 List<AssetTag> getAssetEntryAssetTags(long entryId)
           
 List<AssetTag> getAssetEntryAssetTags(long entryId, int start, int end)
           
 List<AssetTag> getAssetEntryAssetTags(long entryId, int start, int end, OrderByComparator<AssetTag> orderByComparator)
           
 int getAssetEntryAssetTagsCount(long entryId)
           
 long[] getAssetEntryPrimaryKeys(long tagId)
          Returns the entryIds of the asset entries associated with the asset tag.
 AssetTag getAssetTag(long tagId)
          Returns the asset tag with the primary key.
 List<AssetTag> getAssetTags(int start, int end)
          Returns a range of all the asset tags.
 int getAssetTagsCount()
          Returns the number of asset tags.
 String getBeanIdentifier()
          Returns the Spring bean ID for this bean.
 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)
           
 PersistedModel getPersistedModel(Serializable primaryKeyObj)
           
 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()
           
 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 hasAssetEntryAssetTag(long entryId, long tagId)
           
 boolean hasAssetEntryAssetTags(long entryId)
           
 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)
           
 void setAssetEntryAssetTags(long entryId, long[] tagIds)
           
 void setBeanIdentifier(String beanIdentifier)
          Sets the Spring bean ID for this bean.
 AssetTag updateAssetTag(AssetTag assetTag)
          Updates the asset tag in the database or adds it if it does not yet exist.
 AssetTag updateTag(long userId, long tagId, String name, String[] tagProperties, ServiceContext serviceContext)
           
 

Method Detail

addAssetEntryAssetTag

void addAssetEntryAssetTag(long entryId,
                           AssetTag assetTag)

addAssetEntryAssetTag

void addAssetEntryAssetTag(long entryId,
                           long tagId)

addAssetEntryAssetTags

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

addAssetEntryAssetTags

void addAssetEntryAssetTags(long entryId,
                            long[] tagIds)

addAssetTag

@Indexable(type=REINDEX)
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

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

addTagResources

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

addTagResources

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

checkTags

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

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

clearAssetEntryAssetTags

void clearAssetEntryAssetTags(long entryId)

createAssetTag

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

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

deleteAssetEntryAssetTag

void deleteAssetEntryAssetTag(long entryId,
                              AssetTag assetTag)

deleteAssetEntryAssetTag

void deleteAssetEntryAssetTag(long entryId,
                              long tagId)

deleteAssetEntryAssetTags

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

deleteAssetEntryAssetTags

void deleteAssetEntryAssetTags(long entryId,
                               long[] tagIds)

deleteAssetTag

@Indexable(type=DELETE)
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

@Indexable(type=DELETE)
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

void deleteGroupTags(long groupId)
                     throws PortalException
Throws:
PortalException

deletePersistedModel

PersistedModel deletePersistedModel(PersistedModel persistedModel)
                                    throws PortalException
Specified by:
deletePersistedModel in interface PersistedModelLocalService
Throws:
PortalException

deleteTag

void deleteTag(AssetTag tag)
               throws PortalException
Throws:
PortalException

deleteTag

void deleteTag(long tagId)
               throws PortalException
Throws:
PortalException

dynamicQuery

DynamicQuery dynamicQuery()

dynamicQuery

<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

<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

<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

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

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

@Transactional(propagation=SUPPORTS,
               readOnly=true)
AssetTag fetchAssetTag(long tagId)

getActionableDynamicQuery

@Transactional(propagation=SUPPORTS,
               readOnly=true)
ActionableDynamicQuery getActionableDynamicQuery()

getAssetEntryAssetTags

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<AssetTag> getAssetEntryAssetTags(long entryId)

getAssetEntryAssetTags

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<AssetTag> getAssetEntryAssetTags(long entryId,
                                                                               int start,
                                                                               int end)

getAssetEntryAssetTags

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<AssetTag> getAssetEntryAssetTags(long entryId,
                                                                               int start,
                                                                               int end,
                                                                               OrderByComparator<AssetTag> orderByComparator)

getAssetEntryAssetTagsCount

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int getAssetEntryAssetTagsCount(long entryId)

getAssetEntryPrimaryKeys

@Transactional(propagation=SUPPORTS,
               readOnly=true)
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

@Transactional(propagation=SUPPORTS,
               readOnly=true)
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

@Transactional(propagation=SUPPORTS,
               readOnly=true)
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

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int getAssetTagsCount()
Returns the number of asset tags.

Returns:
the number of asset tags

getBeanIdentifier

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

Returns:
the Spring bean ID for this bean

getEntryTags

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<AssetTag> getEntryTags(long entryId)

getGroupTags

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<AssetTag> getGroupTags(long groupId)

getGroupTags

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<AssetTag> getGroupTags(long groupId,
                                                                     int start,
                                                                     int end)

getGroupTagsCount

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int getGroupTagsCount(long groupId)

getGroupsTags

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<AssetTag> getGroupsTags(long[] groupIds)

getPersistedModel

@Transactional(propagation=SUPPORTS,
               readOnly=true)
PersistedModel getPersistedModel(Serializable primaryKeyObj)
                                 throws PortalException
Specified by:
getPersistedModel in interface PersistedModelLocalService
Throws:
PortalException

getSocialActivityCounterOffsetTags

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<AssetTag> getSocialActivityCounterOffsetTags(long groupId,
                                                                                           String socialActivityCounterName,
                                                                                           int startOffset,
                                                                                           int endOffset)

getSocialActivityCounterPeriodTags

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<AssetTag> getSocialActivityCounterPeriodTags(long groupId,
                                                                                           String socialActivityCounterName,
                                                                                           int startPeriod,
                                                                                           int endPeriod)

getTag

@Transactional(propagation=SUPPORTS,
               readOnly=true)
AssetTag getTag(long groupId,
                                                         String name)
                throws PortalException
Throws:
PortalException

getTag

@Transactional(propagation=SUPPORTS,
               readOnly=true)
AssetTag getTag(long tagId)
                throws PortalException
Throws:
PortalException

getTagIds

@Transactional(propagation=SUPPORTS,
               readOnly=true)
long[] getTagIds(long groupId,
                                                          String[] names)
                 throws PortalException
Throws:
PortalException

getTagIds

@Transactional(propagation=SUPPORTS,
               readOnly=true)
long[] getTagIds(long[] groupIds,
                                                          String name)
                 throws PortalException
Throws:
PortalException

getTagIds

@Transactional(propagation=SUPPORTS,
               readOnly=true)
long[] getTagIds(long[] groupIds,
                                                          String[] names)
                 throws PortalException
Throws:
PortalException

getTagNames

@Transactional(propagation=SUPPORTS,
               readOnly=true)
String[] getTagNames()

getTagNames

@Transactional(propagation=SUPPORTS,
               readOnly=true)
String[] getTagNames(String className,
                                                              long classPK)

getTagNames

@Transactional(propagation=SUPPORTS,
               readOnly=true)
String[] getTagNames(long classNameId,
                                                              long classPK)

getTags

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<AssetTag> getTags()

getTags

@ThreadLocalCachable
@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<AssetTag> getTags(String className,
                                                                                    long classPK)

getTags

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<AssetTag> getTags(long classNameId,
                                                                long classPK)

getTags

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<AssetTag> getTags(long groupId,
                                                                long classNameId,
                                                                String name)

getTags

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<AssetTag> getTags(long groupId,
                                                                long classNameId,
                                                                String name,
                                                                int start,
                                                                int end)

getTagsSize

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int getTagsSize(long groupId,
                                                         long classNameId,
                                                         String name)

hasAssetEntryAssetTag

@Transactional(propagation=SUPPORTS,
               readOnly=true)
boolean hasAssetEntryAssetTag(long entryId,
                                                                       long tagId)

hasAssetEntryAssetTags

@Transactional(propagation=SUPPORTS,
               readOnly=true)
boolean hasAssetEntryAssetTags(long entryId)

hasTag

@Transactional(propagation=SUPPORTS,
               readOnly=true)
boolean hasTag(long groupId,
                                                        String name)
               throws PortalException
Throws:
PortalException

incrementAssetCount

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

mergeTags

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

search

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<AssetTag> search(long groupId,
                                                               String name,
                                                               String[] tagProperties,
                                                               int start,
                                                               int end)

search

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<AssetTag> search(long[] groupIds,
                                                               String name,
                                                               String[] tagProperties,
                                                               int start,
                                                               int end)

setAssetEntryAssetTags

void setAssetEntryAssetTags(long entryId,
                            long[] tagIds)

setBeanIdentifier

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

Parameters:
beanIdentifier - the Spring bean ID for this bean

updateAssetTag

@Indexable(type=REINDEX)
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

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

Liferay 7.0-ce-m3