当前位置: 首页>>代码示例>>Java>>正文


Java StagedModelDataHandlerUtil类代码示例

本文整理汇总了Java中com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil的典型用法代码示例。如果您正苦于以下问题:Java StagedModelDataHandlerUtil类的具体用法?Java StagedModelDataHandlerUtil怎么用?Java StagedModelDataHandlerUtil使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


StagedModelDataHandlerUtil类属于com.liferay.exportimport.kernel.lar包,在下文中一共展示了StagedModelDataHandlerUtil类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doImportData

import com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil; //导入依赖的package包/类
@Override
protected PortletPreferences doImportData(PortletDataContext portletDataContext, String portletId,
        PortletPreferences portletPreferences, String data) throws Exception {

    if (!portletDataContext.getBooleanParameter(NAMESPACE, "task-records")) {
        return null;
    }

    portletDataContext.importPortletPermissions(TimetrackerPortletPermission.RESOURCE_NAME);

    Element entriesElement = portletDataContext.getImportDataGroupElement(TaskRecord.class);

    List<Element> entryElements = entriesElement.elements();

    for (Element entryElement : entryElements) {
        StagedModelDataHandlerUtil.importStagedModel(portletDataContext, entryElement);
    }

    return null;
}
 
开发者ID:inofix,项目名称:ch-inofix-timetracker,代码行数:21,代码来源:TimetrackerPortletDataHandler.java

示例2: doImportData

import com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil; //导入依赖的package包/类
@Override
protected PortletPreferences doImportData(PortletDataContext portletDataContext, String portletId,
        PortletPreferences portletPreferences, String data) throws Exception {

    if (!portletDataContext.getBooleanParameter(NAMESPACE, "contacts")) {
        return null;
    }

    portletDataContext.importPortletPermissions(ContactManagerPortletPermission.RESOURCE_NAME);

    Element entriesElement = portletDataContext.getImportDataGroupElement(Contact.class);

    List<Element> entryElements = entriesElement.elements();

    for (Element entryElement : entryElements) {
        StagedModelDataHandlerUtil.importStagedModel(portletDataContext, entryElement);
    }

    return null;
}
 
开发者ID:inofix,项目名称:ch-inofix-contact-manager,代码行数:21,代码来源:ContactManagerPortletDataHandler.java

示例3: getExportActionableDynamicQuery

import com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil; //导入依赖的package包/类
@Override
public ExportActionableDynamicQuery getExportActionableDynamicQuery(
	final PortletDataContext portletDataContext) {
	final ExportActionableDynamicQuery exportActionableDynamicQuery = new ExportActionableDynamicQuery() {
			@Override
			public long performCount() throws PortalException {
				ManifestSummary manifestSummary = portletDataContext.getManifestSummary();

				StagedModelType stagedModelType = getStagedModelType();

				long modelAdditionCount = super.performCount();

				manifestSummary.addModelAdditionCount(stagedModelType,
					modelAdditionCount);

				long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(portletDataContext,
						stagedModelType);

				manifestSummary.addModelDeletionCount(stagedModelType,
					modelDeletionCount);

				return modelAdditionCount;
			}
		};

	initActionableDynamicQuery(exportActionableDynamicQuery);

	exportActionableDynamicQuery.setAddCriteriaMethod(new ActionableDynamicQuery.AddCriteriaMethod() {
			@Override
			public void addCriteria(DynamicQuery dynamicQuery) {
				portletDataContext.addDateRangeCriteria(dynamicQuery,
					"modifiedDate");
			}
		});

	exportActionableDynamicQuery.setCompanyId(portletDataContext.getCompanyId());

	exportActionableDynamicQuery.setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod<Foo>() {
			@Override
			public void performAction(Foo foo) throws PortalException {
				StagedModelDataHandlerUtil.exportStagedModel(portletDataContext,
					foo);
			}
		});
	exportActionableDynamicQuery.setStagedModelType(new StagedModelType(
			PortalUtil.getClassNameId(Foo.class.getName())));

	return exportActionableDynamicQuery;
}
 
开发者ID:liferay,项目名称:liferay-blade-samples,代码行数:50,代码来源:FooLocalServiceBaseImpl.java


注:本文中的com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。