本文整理汇总了Java中com.liferay.portal.service.LayoutLocalServiceUtil.deleteLayouts方法的典型用法代码示例。如果您正苦于以下问题:Java LayoutLocalServiceUtil.deleteLayouts方法的具体用法?Java LayoutLocalServiceUtil.deleteLayouts怎么用?Java LayoutLocalServiceUtil.deleteLayouts使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.liferay.portal.service.LayoutLocalServiceUtil
的用法示例。
在下文中一共展示了LayoutLocalServiceUtil.deleteLayouts方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setupSitemap
import com.liferay.portal.service.LayoutLocalServiceUtil; //导入方法依赖的package包/类
protected void setupSitemap(String fileName) throws Exception {
LayoutLocalServiceUtil.deleteLayouts(
groupId, true, new ServiceContext());
LayoutLocalServiceUtil.deleteLayouts(
groupId, false, new ServiceContext());
JSONObject jsonObject = getJSONObject(fileName);
if (jsonObject == null) {
return;
}
_defaultLayoutTemplateId = jsonObject.getString(
"layoutTemplateId", StringPool.BLANK);
updateLayoutSetThemeId(jsonObject);
JSONArray layoutsJSONArray = jsonObject.getJSONArray("layouts");
if (layoutsJSONArray != null) {
addLayouts(
false, LayoutConstants.DEFAULT_PARENT_LAYOUT_ID,
layoutsJSONArray);
}
else {
JSONArray publicPagesJSONArray = jsonObject.getJSONArray(
"publicPages");
if (publicPagesJSONArray != null) {
addLayouts(
false, LayoutConstants.DEFAULT_PARENT_LAYOUT_ID,
publicPagesJSONArray);
}
JSONArray privatePagesJSONArray = jsonObject.getJSONArray(
"privatePages");
if (privatePagesJSONArray != null) {
addLayouts(
true, LayoutConstants.DEFAULT_PARENT_LAYOUT_ID,
privatePagesJSONArray);
}
}
}