掲示板

New liferay 7 API

thumbnail
7年前 に Miguel Ángel Júlvez によって更新されました。

New liferay 7 API

Junior Member 投稿: 63 参加年月日: 11/03/29 最新の投稿
Hi,

is posible to have two different layouts with the same uuid in the same company in liferay 7?

I don't see in the new API the old function getLayoutByUuidAndCompanyId(uuid, companyId) . However this other function exits getLayoutsByUuidAndCompanyId(uuid, companyId) that returns a List<Layout>.

Besides, there's this other function getLayoutByUuidAndGroupId(uuid,groupId,isPrivateLayout) , so ¿is even posible to have the same uuid in the same group for a layout, but one public and another private?

Thanks
thumbnail
7年前 に Jorge Díaz によって更新されました。

RE: New liferay 7 API

Liferay Master 投稿: 753 参加年月日: 14/01/09 最新の投稿
Hi Miguel,

UUID is unique at group level, as it is used to link objects during LAR/Staging export/import.
UUID is not recalculated in export/import operations, so when you import a LAR in a site, it will update the existing object that have the same UUID, with newer information.
So at company level you can have two objects with same uuid in case you execute a LAR export/import between two sites of same company or you active staging local.

About 6.2 method getLayoutByUuidAndCompanyId(uuid, companyId), it was changed to new getLayoutsByUuidAndCompanyId(uuid, companyId) because it was wrong as you can have more than one Layout with same UUID in one company. (It was not changed until 7.0, as we cannot change the API in a released version)

About getLayoutByUuidAndGroupId(uuid,groupId,isPrivateLayout) it is not possible in one group to have two layouts (one private and one public) with same uuid. I think that method is provided by convenience, allowing to filter by that extra parameter (isPrivateLayout)
thumbnail
7年前 に Miguel Ángel Júlvez によって更新されました。

RE: New liferay 7 API

Junior Member 投稿: 63 参加年月日: 11/03/29 最新の投稿
Cheers Jorge!! Crystal-clear.