Foren

Creating organization via API

Petteri Torssonen, geändert vor 14 Jahren.

Creating organization via API

New Member Beiträge: 20 Beitrittsdatum: 21.02.10 Neueste Beiträge
Hi!

I am new to liferay and I have few problems with api. I have no idea how I should create Organization, public pages and users for organization by api. I can make Users by UserLocalServie.

Now I am trying to do it like this.
1. Creating Organization by OrganizationLocalServiceUtil
2. Creating User by UserLocalServie
3. Adding users to organization at this point I get errors.

Am I doing it right or how it should go.
Thanks for your help.
thumbnail
Corné A, geändert vor 14 Jahren.

RE: Creating organization via API

Liferay Legend Beiträge: 1313 Beitrittsdatum: 03.10.06 Neueste Beiträge
It's always nice to know which version of LR you are using, assuming LR 5.2.3
i give you some attached samplecode;

There are some private functions that may help you.
Petteri Torssonen, geändert vor 14 Jahren.

RE: Creating organization via API

New Member Beiträge: 20 Beitrittsdatum: 21.02.10 Neueste Beiträge
True, I forgot that. I am using 5.2.3. Thanks for your help, I have to try that out soon.
thumbnail
Olaf Kock, geändert vor 14 Jahren.

RE: Creating organization via API

Liferay Legend Beiträge: 6403 Beitrittsdatum: 23.09.08 Neueste Beiträge
You might also refer to the 7cogs hook plugin, that creates the demonstration content via API.
Petteri Torssonen, geändert vor 14 Jahren.

RE: Creating organization via API

New Member Beiträge: 20 Beitrittsdatum: 21.02.10 Neueste Beiträge
where I could find the sources for that 7Cogs hook?
Petteri Torssonen, geändert vor 14 Jahren.

RE: Creating organization via API

New Member Beiträge: 20 Beitrittsdatum: 21.02.10 Neueste Beiträge
I founded it from repo http://svn.liferay.com/browse/plugins/trunk/hooks/sevencogs-hook/docroot/WEB-INF/src/com/liferay/sevencogs/hook/events/StartupAction.java#r45546