简体   繁体   English

Liferay:DLFileEntryLocalServiceUtil和DLAppLocalServiceUtil之间的区别?

[英]Liferay: Difference between DLFileEntryLocalServiceUtil and DLAppLocalServiceUtil?

What is the difference between this services? 这项服务有什么区别?

DLFileEntryLocalServiceUtil

and

DLAppLocalServiceUtil

When should we use one and when the other? 我们什么时候应该使用另一个? Is DLAppLocal a new interface in Liferay 6.1 which discourages the old DLFileEntry for application level code? DLAppLocal是Liferay 6.1中的一个新界面,它不鼓励旧的DLFileEntry用于应用程序级代码吗?

What is the difference between these services DLFileEntryLocalServiceUtil and DLAppLocalServiceUtil ? 这些服务DLFileEntryLocalServiceUtilDLAppLocalServiceUtil什么DLAppLocalServiceUtil

DLFileEntry services and DLFolderEntry services are specifically for storing file and folder entries in liferay's database and are totally unaware of the new repository concept introduced in 6.1. DLFileEntry服务和DLFolderEntry服务专门用于在liferay的数据库中存储文件和文件夹条目,并且完全不知道6.1中引入的新存储库概念 The user-guide & this wiki explains how to add a new repository. 用户指南和此Wiki介绍了如何添加新存储库。
Were as DLApp ( DLAppService & DLAppLocalService ) services take into account these things ie to say that they take care of syncing documents between liferay database and other repositories, and not just store entries in Liferay database. DLAppDLAppServiceDLAppLocalService )服务考虑到这些事情时,即他们负责在liferay数据库和其他存储库之间同步文档,而不仅仅是在Liferay数据库中存储条目。

The documentation for the class DLAppServiceImpl explains it all (this is almost same for DLAppLocalServiceImpl ), the following is an excerpt from the documentation: DLAppServiceImpl类的文档解释了这一切(这与DLAppLocalServiceImpl几乎相同),以下是文档的摘录:

The document library local service. 文档库本地服务。 All portlets should interact with the document library through this class or through DLAppServiceImpl, rather than through the individual document library service classes. 所有portlet都应该通过此类或通过DLAppServiceImpl与文档库交互,而不是通过单个文档库服务类。

This class provides a unified interface to all Liferay and third party repositories. 此类为所有Liferay和第三方存储库提供统一接口。 While the method signatures are universal for all repositories. 虽然方法签名对所有存储库都是通用的。 Additional implementation-specific parameters may be specified in the serviceContext. 可以在serviceContext中指定其他特定于实现的参数。

The repositoryId parameter used by most of the methods is the primary key of the specific repository. 大多数方法使用的repositoryId参数是特定存储库的主键。 If the repository is a default Liferay repository, the repositoryId is the groupId or scopeGroupId . 如果存储库是默认的Liferay存储库,则repositoryIdgroupIdscopeGroupId Otherwise, the repositoryId will correspond to values obtained from RepositoryLocalServiceUtil . 否则,repositoryId将对应于从RepositoryLocalServiceUtil获取的值。


Is DLAppLocal a new interface in Liferay 6.1? DLAppLocal是Liferay 6.1中的新界面吗?

Yes

which discourages the old DLFileEntry for application level code? 这会阻止旧的DLFileEntry获取应用程序级代码?

In a sense yes, refer the above explanation. 从某种意义上说,参考上面的解释。 DlAppLocalServices is much better to use as its scope is much greater than the individual document services. DlAppLocalServices更好用,因为它的范围远远大于单个文档服务。 Still if you want to use these interfaces for storing the documents & media from your custom plugin portlet you can go ahead and use these, I don't think there should be a problem since even DlAppLocalServices also internally uses the individual document services for storing in liferay repository. 仍然如果你想使用这些接口来存储自定义插件portlet中的文档和媒体,你可以继续使用它们,我认为不应该有问题,因为即使DlAppLocalServices也在内部使用单独的文档服务进行存储liferay存储库。

Hope this provides some relevant information for your question. 希望这能为您的问题提供一些相关信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 DLFileEntryLocalServiceUtil.getFileAsStream(…)在Liferay服务器中不起作用 - DLFileEntryLocalServiceUtil.getFileAsStream(…) not working in liferay server Liferay CE和Liferay EE有什么区别? - What is the difference between Liferay CE and Liferay EE? Liferay Mobile SDK和Liferay屏幕之间的区别 - Difference between Liferay Mobile SDK and Liferay Screens Liferay DLFileEntryLocalServiceUtil.addFileEntry 不创建 AssetEntry 记录 - Liferay DLFileEntryLocalServiceUtil.addFileEntry does not create AssetEntry record 在DLFileEntryLocalServiceUtil.addFileEntry之后,Liferay给我一个NoSuchEntryException - Liferay throw me a NoSuchEntryException after DLFileEntryLocalServiceUtil.addFileEntry Liferay中的doView()和render()函数有什么区别? - What is the difference between doView() and render() functions in Liferay? ext插件和liferay中的hook之间的区别? - Difference between ext plugin and hook in liferay? Liferay资源和操作URL之间的参数差异 - Difference in the parameters between Liferay Resource and Action URLs Liferay - Widget、Fragment 和 Portlet 之间的区别 - Liferay - Difference between Widget, Fragment and Portlet Liferay dxp中的Indexer和IndexWriter类之间有什么区别? - What is the difference between Indexer and IndexWriter classes in Liferay dxp?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM