Liferay AssetEntryQuery按资产类型筛选(Jython)

2024-09-25 00:21:13 发布

您现在位置:Python中文网/ 问答频道 /正文

尝试获取按类别和资产类型筛选的资产列表(例如博客)。我让AssetEntryQuery在python portlet中工作:

from com.liferay.portlet.asset.service.persistence import AssetEntryQuery
from com.liferay.portlet.asset.service import AssetEntryServiceUtil

aq = AssetEntryQuery()
aq.setAllCategoryIds([442492])
articles = AssetEntryServiceUtil.getEntries(aq)

for a in articles:
  out.write(str(a.title))
  out.write(str(a))

Tags: fromimportcomservice资产assetout类别