Foren

Home » Liferay Portal » English » 3. Development

Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Chris Buley
[RESOLVED] - Journal Articles and Categories in Web Services
23. Oktober 2010 05:56
Antwort

Chris Buley

Rang: New Member

Nachrichten: 4

Eintrittsdatum: 21. Oktober 2010

Neue 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.
Corné Aussems
RE: Journal Articles and Categories in Web Services
22. Oktober 2010 14:24
Antwort

Corné Aussems

Rang: Liferay Legend

Nachrichten: 1260

Eintrittsdatum: 3. Oktober 2006

Neue Beiträge

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
23. Oktober 2010 05:54
Antwort

Chris Buley

Rang: New Member

Nachrichten: 4

Eintrittsdatum: 21. Oktober 2010

Neue 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.
Orin Fink
RE: Journal Articles and Categories in Web Services
22. November 2010 07:15
Antwort

Orin Fink

Rang: Junior Member

Nachrichten: 40

Eintrittsdatum: 24. März 2010

Neue 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.