Foren

[RESOLVED] - Journal Articles and Categories in Web Services

Chris Buley, geändert vor 13 Jahren.

[RESOLVED] - Journal Articles and Categories in Web Services

New Member Beiträge: 4 Beitrittsdatum: 21.10.10 Neueste Beiträge
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.
thumbnail
Corné Aussems, geändert vor 13 Jahren.

RE: Journal Articles and Categories in Web Services

Liferay Legend Beiträge: 1313 Beitrittsdatum: 03.10.06 Neueste Beiträge
Categories belong to the Assets

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


com.liferay.portlet.asset.service.AssetEntryServiceUtil
com.liferay.portlet.asset.service.AssetCategoryServiceUtil
etc.
Chris Buley, geändert vor 13 Jahren.

RE: Journal Articles and Categories in Web Services

New Member Beiträge: 4 Beitrittsdatum: 21.10.10 Neueste Beiträge
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.
thumbnail
Orin Fink, geändert vor 13 Jahren.

RE: Journal Articles and Categories in Web Services

Junior Member Beiträge: 65 Beitrittsdatum: 25.03.10 Neueste Beiträge
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.