掲示板
How to programmatically import LAR file into Liferay?
14年前 に Chew Boon Aik によって更新されました。
How to programmatically import LAR file into Liferay?
New Member 投稿: 13 参加年月日: 10/03/05 最新の投稿
Is there a way to use API to import LAR file into Liferay, probably to different community?
14年前 に Arun Kumar S によって更新されました。
RE: How to programmatically import LAR file into Liferay?
Regular Member 投稿: 182 参加年月日: 08/06/23 最新の投稿Chew Boon Aik:
Is there a way to use API to import LAR file into Liferay, probably to different community?
Use the below code
public static void addDefaultLayoutsByLAR(
long userId, long groupId, boolean privateLayout, File larFile)
throws PortalException, SystemException {
Map<string, string[]> parameterMap = new HashMap<string, string[]>();
parameterMap.put(
PortletDataHandlerKeys.PERMISSIONS,
new String[] {Boolean.TRUE.toString()});
parameterMap.put(
PortletDataHandlerKeys.PORTLET_DATA,
new String[] {Boolean.TRUE.toString()});
parameterMap.put(
PortletDataHandlerKeys.PORTLET_DATA_CONTROL_DEFAULT,
new String[] {Boolean.TRUE.toString()});
parameterMap.put(
PortletDataHandlerKeys.PORTLET_SETUP,
new String[] {Boolean.TRUE.toString()});
parameterMap.put(
PortletDataHandlerKeys.USER_PERMISSIONS,
new String[] {Boolean.FALSE.toString()});
LayoutLocalServiceUtil.importLayouts(
userId, groupId, privateLayout, parameterMap, larFile);
}
</string,></string,>
HTH,
Arun
14年前 に Chew Boon Aik によって更新されました。
RE: How to programmatically import LAR file into Liferay?
New Member 投稿: 13 参加年月日: 10/03/05 最新の投稿
Thanks, it works!
13年前 に petar banicevic によって更新されました。
RE: How to programmatically import LAR file into Liferay?
Junior Member 投稿: 73 参加年月日: 08/05/27 最新の投稿
Thanks for sharing !
13年前 に Apoorva Prakash によって更新されました。
RE: How to programmatically import LAR file into Liferay?
Liferay Master 投稿: 658 参加年月日: 10/06/15 最新の投稿
Hello Arun,
Can you please explain this process in little detail... What changes are required to make in portal.properties file...
Means, files to be changed and flow of it...
Thanks and Regards...
Can you please explain this process in little detail... What changes are required to make in portal.properties file...
Means, files to be changed and flow of it...
Thanks and Regards...
10年前 に Rushikesh S Thakkar によって更新されました。
RE: How to programmatically import LAR file into Liferay?
New Member 投稿: 9 参加年月日: 10/05/14 最新の投稿
Thanks Arun! This was very helpful.