Forums de discussion

get Article Type with Liferay API

thumbnail
Christian Schulze, modifié il y a 14 années.

get Article Type with Liferay API

Junior Member Publications: 87 Date d'inscription: 19/11/09 Publications récentes
Hello,

I want to get some Information about my running Liferay 5.2.3.
I add Article with the API and now I want to get a List of all available StructureIDs, TemplateIDs, GroupID and all available Article Types.
How did I get these Infos?

greetz
Haroun Bella, modifié il y a 13 années.

RE: get Article Type with Liferay API

New Member Publications: 10 Date d'inscription: 30/03/10 Publications récentes
Hello,

I'm having the same problem I would like to retrieve the list of all available Article Types.
have you found a way to do that ?


thx

haroun
Oliver Bayer, modifié il y a 13 années.

RE: get Article Type with Liferay API

Liferay Master Publications: 894 Date d'inscription: 18/02/09 Publications récentes
Hi Christian,

for retrieving all of this data you should use the liferay services e.g.:

- retrieve all structures: List<JournalStructure> allStructures = JournalStructureLocalServiceUtil.getStructures(long groupId);
- retrieve all templates: List<JournalTemplate> allTemplates = JournalTemplateLocalServiceUtil.getTemplates(long groupId);

The journalarticle types are defined in portal.properties or portal-ext.properties so you can use "PropsUtil.get(String key);" to read the value. If you need only the types which are used in journal articles use "JournalArticleLocalServiceUtil".

HTH Oli
Haroun Bella, modifié il y a 13 années.

RE: get Article Type with Liferay API

New Member Publications: 10 Date d'inscription: 30/03/10 Publications récentes
Thank you !!!