本文整理汇总了Java中com.liferay.portlet.dynamicdatamapping.service.DDMTemplateLocalServiceUtil.deleteTemplates方法的典型用法代码示例。如果您正苦于以下问题:Java DDMTemplateLocalServiceUtil.deleteTemplates方法的具体用法?Java DDMTemplateLocalServiceUtil.deleteTemplates怎么用?Java DDMTemplateLocalServiceUtil.deleteTemplates使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.liferay.portlet.dynamicdatamapping.service.DDMTemplateLocalServiceUtil
的用法示例。
在下文中一共展示了DDMTemplateLocalServiceUtil.deleteTemplates方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setupAssets
import com.liferay.portlet.dynamicdatamapping.service.DDMTemplateLocalServiceUtil; //导入方法依赖的package包/类
protected void setupAssets(String fileName) throws Exception {
List<AssetTag> assetTags = AssetTagLocalServiceUtil.getGroupTags(
groupId);
for (AssetTag assetTag : assetTags) {
AssetTagLocalServiceUtil.deleteAssetTag(assetTag);
}
RepositoryLocalServiceUtil.deleteRepositories(groupId);
JournalArticleLocalServiceUtil.deleteArticles(groupId);
DDMTemplateLocalServiceUtil.deleteTemplates(groupId);
DDMStructureLocalServiceUtil.deleteStructures(groupId);
JSONObject jsonObject = getJSONObject(fileName);
if (jsonObject != null) {
JSONArray assetsJSONArray = jsonObject.getJSONArray("assets");
setupAssets(assetsJSONArray);
}
addDLFileEntries(_DL_DOCUMENTS_DIR_NAME);
addJournalArticles(
StringPool.BLANK, StringPool.BLANK, _JOURNAL_ARTICLES_DIR_NAME);
addDDMStructures(StringPool.BLANK, _JOURNAL_DDM_STRUCTURES_DIR_NAME);
addDDMTemplates(StringPool.BLANK, _JOURNAL_DDM_TEMPLATES_DIR_NAME);
}
示例2: setupAssets
import com.liferay.portlet.dynamicdatamapping.service.DDMTemplateLocalServiceUtil; //导入方法依赖的package包/类
protected void setupAssets(String fileName) throws Exception {
if (!isCompanyGroup()) {
List<AssetTag> assetTags = AssetTagLocalServiceUtil.getGroupTags(
groupId);
for (AssetTag assetTag : assetTags) {
AssetTagLocalServiceUtil.deleteAssetTag(assetTag);
}
RepositoryLocalServiceUtil.deleteRepositories(groupId);
JournalArticleLocalServiceUtil.deleteArticles(groupId);
DDMTemplateLocalServiceUtil.deleteTemplates(groupId);
DDMStructureLocalServiceUtil.deleteStructures(groupId);
}
JSONObject jsonObject = getJSONObject(fileName);
if (jsonObject != null) {
JSONArray assetsJSONArray = jsonObject.getJSONArray("assets");
setupAssets(assetsJSONArray);
}
addDLFileEntries(_DL_DOCUMENTS_DIR_NAME);
addApplicationDisplayTemplates(_APPLICATION_DISPLAY_TEMPLATE_DIR_NAME);
addDDLStructures(_DDL_STRUCTURE_DIR_NAME);
addDDMStructures(StringPool.BLANK, _JOURNAL_DDM_STRUCTURES_DIR_NAME);
addDDMTemplates(StringPool.BLANK, _JOURNAL_DDM_TEMPLATES_DIR_NAME);
addJournalArticles(
StringPool.BLANK, StringPool.BLANK, _JOURNAL_ARTICLES_DIR_NAME);
addLayoutTemplate(_LAYOUT_TEMPLATE_DIR_NAME);
}