Liferay以编程方式创建网站/页面 [英] Liferay create site / page programmatically

查看:106
本文介绍了Liferay以编程方式创建网站/页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用Liferay工作了两个星期.我注意到很难找到好的文档和教程. 到目前为止,我是从Web门户创建页面的.创建它们后,我将portlet拖放.我不太喜欢这种方法,我更喜欢使用编码方法.有没有办法像我创建portlet一样通过定义项目来以编程方式创建网站或页面?

I have been using Liferay for work for 2 weeks. I noticed that it's a bit difficult to find good documentation and tutorials. Until now I created pages from the web portal. After I create them, I drag and drop portlets. I don't really like this approach, I would prefer to use a coding approach. Is there a way to create a website or page programmatically by defining a project as I do to create portlets?

此外,我将Liferay与WebLogic 10.3.6一起使用.我想知道liferay将通过Web门户创建的页面放在文件系统上的位置.我想在Liferay Web门户上声明一个新站点时会创建一个文件或类似文件.

Moreover, I am using Liferay with WebLogic 10.3.6. I want to know where liferay puts pages I created via web-portal on the file system. I suppose that a file, or something similar, is created when I declare a new site on the Liferay web-portal.

谢谢大家

马可

推荐答案

是的,Liferay拥有数据库,任何Liferay对象的所有数据都存储在数据库和/或文件系统中,具体取决于您的配置.

Yes Liferay has it's Database, all data of any Liferay object is stored in the database and / or on the file system depending on your configuration.

但是,Liferay的功能之一是允许您通过UI创建页面/站点.如Java Portal规范和Liferay服务器文档中所述,您可以采用其他方法来创建页面,但是它是Liferay门户服务的一部分.您可以使用Liferay的服务(HTTP REST)API来调用相关服务.要访问这些API,您需要配置Liferay服务器.

However, one of the functionality of Liferay is to let you create pages / sites through the UI. As documented in the Java Portal Specification and Liferay Server Documents your approach to create pages in an alternative way is possible but it is part of Liferay's Portal Services. You can use Liferay's Service (HTTP REST) API to call the related service. To access those APIs you need to configure your Liferay Server.

如果要以编程方式进行操作,则仍然需要从代码中配置,启用和调用这些外部HTTP服务.您不应使用自己的代码作为Liferay实例内部的扩展托管来创建Liferay对象,因为这将导致Liferay数据库/文件系统不一致. (就像创建页面一样,Liferay在数据库/文件系统中创建一组其他相关对象.)

In case you want to do programmatically you still need to configure, enable and call those external HTTP services from your code. You should not create Liferay Objects from your own code hosted as an extension inside your Liferay Instance as that will result inconsistency in your Liferay Database / filesystem. (As in case of page creation Liferay creates a set of other related objects in it's database / filesystem.)

这篇关于Liferay以编程方式创建网站/页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆