Foros de discusión

Acessing metadata from Asset Publisher Assets

Tim Cardwell, modificado hace 11 años.

Acessing metadata from Asset Publisher Assets

Junior Member Mensajes: 29 Fecha de incorporación: 19/07/12 Mensajes recientes
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, modificado hace 11 años.

RE: Acessing metadata from Asset Publisher Assets

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
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, modificado hace 11 años.

RE: Acessing metadata from Asset Publisher Assets

Junior Member Mensajes: 29 Fecha de incorporación: 19/07/12 Mensajes recientes
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, modificado hace 11 años.

RE: Acessing metadata from Asset Publisher Assets

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
The following thread may help you on that.

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