简体   繁体   English

如何使用Drupal或Drupal插件从Java应用程序中删除/替换Alfresco?

[英]How to Remove/Replace Alfresco from Java application with Drupal or Drupal plugin?

OK, here are some more details. 好的,这里有更多详细信息。 I need to remove/replace Alfresco from a Java application, the content that Alfresco manages is some HTML and some PDFs. 我需要从Java应用程序中删除/替换Alfresco,Alfresco管理的内容是一些HTML和一些PDF。 My team wants to move the content to a remote website that runs with Drupal. 我的团队希望将内容移动到与Drupal一起运行的远程网站。

So is there a supported way to have my Java application retrieve the content from alfresco and move it to Drupal? 那么,是否有一种受支持的方法可以让我的Java应用程序从露天取回内容并将其移至Drupal? Thanks in advance. 提前致谢。

It sounds like you are trying to permanently remove Alfresco from your solution. 听起来您正在尝试从解决方案中永久删除Alfresco。 To do that, you'll need to export the HTML and PDFs out of the Alfresco repository and make those available to Drupal. 为此,您需要将HTML和PDF导出到Alfresco存储库中,并将其提供给Drupal。 As mitpatoliya suggests, there are multiple approaches to getting the files out of Alfresco, including FTP and WebDAV. 正如mitpatoliya所建议的,有多种方法可以将文件从Alfresco中删除,包括FTP和WebDAV。 You could also use OpenCMIS to write a little Java application that will grab the files out of Alfresco and write them somewhere. 您还可以使用OpenCMIS编写一个小的Java应用程序,该应用程序将从Alfresco中抓取文件并将它们写入某个位置。

It's not clear from your question whether or not your Alfresco objects have custom metadata. 从您的问题尚不清楚,您的Alfresco对象是否具有自定义元数据。 If they do, and Drupal needs to know about it, you'll need more than the binary files exported out of Alfresco. 如果这样做了,而Drupal需要了解这一点,那么您将需要的不仅仅是从Alfresco导出的二进制文件。 You'll also need property values from those objects. 您还将需要这些对象的属性值。 The advantage to using OpenCMIS to do the export is that you can use it to read the metadata stored about the files and then write that to a CSV or some other format for loading into Drupal. 使用OpenCMIS进行导出的优势在于,您可以使用它来读取存储在文件中的元数据,然后将其写入CSV或其他格式以加载到Drupal中。

Now that you have all of the files and potentially metadata copied out of Alfresco you need to import that into Drupal. 现在您已经从Alfresco复制了所有文件和潜在的元数据,您需要将其导入Drupal。 But Drupal's model is completely different from Alfresco, so how you do that will depend very much on how your Drupal site was built. 但是Drupal的模型与Alfresco完全不同,因此您的操作方式将很大程度上取决于Drupal网站的构建方式。 Your binary files might not go into Drupal at all but will instead be served up as static assets, for example. 例如,您的二进制文件可能根本不会进入Drupal,而是被用作静态资产。 Or you might need to take some of that metadata you exported out of Alfresco and create Drupal nodes. 或者,您可能需要提取从Alfresco导出的一些元数据并创建Drupal节点。

If you need to create those Drupal nodes programmatically and you have to use Java, you might want to look at Drupal's RESTful module and just use an HTTP client from your Java code to make calls against endpoints that create the nodes. 如果您需要以编程方式创建那些Drupal节点并且必须使用Java,则可能需要查看Drupal的RESTful模块,而仅使用Java代码中的HTTP客户端对创建节点的端点进行调用。 But there are many ways to go about this. 但是有很多方法可以解决这个问题。

Drupal 8 provides RESTful Web Services which you can use to retrieve data from the Drupal site into your Java application. Drupal 8提供了RESTful Web服务 ,您可以使用它来将数据从Drupal站点检索到Java应用程序中。 A similar feature exists for Drupal 7 with the RESTful module . 具有RESTful模块的 Drupal 7也具有类似的功能。

You also have the Services module, available for both Drupal 8 and 7 and providing a different Web Service interface 您还具有服务模块,可用于Drupal 8和7,并提供不同的Web服务界面

If you only have some HTML and PDF files which are stored in alfresco and you do not want to pull any metadata then you can just get all your contents from alfresco via FTP or Webdev and then dump it to your Drupal site. 如果您只有一些HTML和PDF文件存储在alfresco中,并且不想提取任何元数据,则可以通过FTP或Webdev从alfresco获取所有内容,然后将其转储到Drupal站点。

There are Alfresco Drupal connector available but It is not required in your case because you just want to migrate data one time right? 有可用的Alfresco Drupal连接器,但是您只需要一次迁移数据就可以了吗?

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM