留言板

Acessing metadata from Asset Publisher Assets

Tim Cardwell,修改在11 年前。

Acessing metadata from Asset Publisher Assets

Junior Member 帖子: 29 加入日期: 12-7-19 最近的帖子
I need to access the metadata from each asset in my asset publishers that I have on my portal, but I'm not sure how to get a handle on any of the asset publishers...

Is there a way to cycle through all of the portlets on a portal, and then recognize which is an asset publisher and which isn't?

If anyone has a better way of getting a handle on an asset publisher let me know.

Thanks,
-Tim
thumbnail
Hitoshi Ozawa,修改在11 年前。

RE: Acessing metadata from Asset Publisher Assets

Liferay Legend 帖子: 7942 加入日期: 10-3-24 最近的帖子
Just use PortletLocalServiceUtil.dynamicQuery with criteria portletId = 101

The above will get the portlet but I think you want the content?
Do a dynamicQuery on AssetEntryLocalServiceUtil
Tim Cardwell,修改在11 年前。

RE: Acessing metadata from Asset Publisher Assets

Junior Member 帖子: 29 加入日期: 12-7-19 最近的帖子
Alright, then here's a follow up question...

The dynamic query will give me a list of portlets or a list of asset entries, dependind on which query I do. What I need is a list of all the asset entries in a certain asset publisher.

Currently, the list of assets I get after a AssetEntryLocalServiceUtil.dynamicQuery() doesn't give me any information about if they belong to an asset publisher or not. Also, the list of portlets I get after I do a PortletLocalServiceUtil.dynamicQuery with criteria portletId = 101 doesn't give me any information about the assets that it is using. I checked the javadocs and can't find any method like Portlet.getAssets() or AssetEntry.getPortlet(). Is there a similar method to either one of these?

Does this make sense?

-Tim
thumbnail
Hitoshi Ozawa,修改在11 年前。

RE: Acessing metadata from Asset Publisher Assets

Liferay Legend 帖子: 7942 加入日期: 10-3-24 最近的帖子
The following thread may help you on that.

http://www.liferay.com/community/forums/-/message_boards/message/12859746