Liferay is a Gartner Magic Quadrant Leader for the Sixth Year! Find out why

Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Chris Buley
[RESOLVED] - Journal Articles and Categories in Web Services
October 23, 2010 5:56 AM
Answer

Chris Buley

Rank: New Member

Posts: 4

Join Date: October 21, 2010

Recent Posts

Using Liferay 6, Tomcat 6, local WinXP dev environment at the moment

After piecing together many many different sources I was finally able to get a journal article posted to a site via the web service, and I have that working the way I need it to. Now I would like to associate that article with some categories after I have posted it. The problem is that I do not see any web service that seems to do that. The closest I have seen
so far is the Portlet_MB_MBCategoryService, but that does no seem to have anything that will associate an article with a category. I can see from the DB that categories are associated with assets, and that when I created my journal article that an associated asset was created. So I have investigated that path a bit, but am still coming up empty. Can anyone point me in the right direction?

Thanks in advance.
Corné Aussems
RE: Journal Articles and Categories in Web Services
October 22, 2010 2:24 PM
Answer

Corné Aussems

Rank: Liferay Legend

Posts: 1306

Join Date: October 3, 2006

Recent Posts

Categories belong to the Assets

http://svn.liferay.com/browse/portal/trunk/portal-service/src/com/liferay/portlet/asset/service

1
2com.liferay.portlet.asset.service.AssetEntryServiceUtil
3com.liferay.portlet.asset.service.AssetCategoryServiceUtil
4etc.
Chris Buley
RE: Journal Articles and Categories in Web Services
October 23, 2010 5:54 AM
Answer

Chris Buley

Rank: New Member

Posts: 4

Join Date: October 21, 2010

Recent Posts

Ah, I think I see it now. I need to use the updateEntry method in the Portlet_Asset__AssetEntryService and can pass along categories. As I look at the DB structure I can see columns for className, classPK and classUuid, which threw me for a bit of a loop the first time I looked at this service. Thank you for pointing me in the right direction.
Orin Fink
RE: Journal Articles and Categories in Web Services
November 22, 2010 7:15 AM
Answer

Orin Fink

Rank: Junior Member

Posts: 43

Join Date: March 24, 2010

Recent Posts

I too have been working toward the same end goal. However, in using 6.0.5, and looking at the DB structure for "assetcategory" I didn't see the className or classPK.

Since then, I've come to understand that I needed to look in the classname_ table. The classnameId and values are clearly stated in that table. Classname is the relevant Java class (for example: com.liferay.portlet.journal.model.JournalArticle) and I think that the classPK is the Primary Key of the appropriate record in the table that is storing information for that class. That should be noted as something different than the classNameId wich is asked for in other webservice calls.