Alfresco内容服务 - 范围/放大器/自定义 - 它如何工作?
我最近开始学习有关Alfresco内容服务的信息。
我有一些问题:
我的理解是,添加自定义的标准方法是创建AMP。
- 为什么为每个自定义创建一个AMP,而不是将其直接添加到ACS的配置中?是否有一些好处,例如不必重新启动服务或其他东西?
- 如果Apply_amps将所有自定义AMP添加到Alfresco Server(.war文件),是否存在互相自定义写作的风险? 例如,如果两个不同的放大器更改共享服务中的相同标准按钮。
我发现还有两种添加这些自定义的方法:
- 向POM文件添加依赖关系。 (仅适用于.jar)
- 实际上编译.AMP并将其移动到正确的文件夹并运行Apply_Amps.sh。
从文档中,在我看来,就像AMP文件一样,曾经是添加自定义的标准方式,但是现在已经有了一个转变,而不是使用常规JAR文件,最终在7.1中,而转发使用JSON。
我发现的其他教程提到了诸如“始终使用.AMP”之类的东西。如果它与官方文档有关的信息矛盾,那似乎很奇怪。
我还发现有关通过共享接口添加AMP的一些东西吗?还是在构建服务器(.war)时必须始终添加它们?
有人可以向我提供对将自定义应用程序应用于Alfresco内容服务的最佳实践的详尽解释?最好提供有关现场生产环境的详细信息。
感谢您帮助我使其中的一些更清晰。
I have recently started learning about Alfresco Content Service.
I have some questions:
My understanding is that the standard way to add customization is to create AMP's.
- Why create an amps for each customization instead of adding it directly to the configurations of ACS? Are there some benefits like not having to restart the service or something?
- If apply_amps adds all custom amps to the alfresco server (.war files), won't there be a risk of customizations writing over each other?
E.g if two different amps change the same standard button in the share service.
I have found that there are 2 ways to add these customizations as well:
- Add dependency to the pom file. (works only for .jar)
- Actually compile the .amp and move it to the correct folder and run apply_amps.sh.
From the documentation it seems to my like AMP-files used to be the standard way of adding customization but that there have now been a move away from this in favor of using regular jar files and eventually in 7.1 and forward use JSON instead.
Yet other tutorials I find mentions things like "always use .amp". Which then seems strange if it contradicts the information on the official documentation.
Also I found something about adding amps through the share interface? Or must they always be added when building the server (.war)?
Could someone provide me with a thorough explanation of the best practice for applying customizations to the alfresco content service? Preferably with details regarding a live production setting.
Thanks for helping me make some of this clearer.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我会尝试给您有用的答案:
制作应用程序包(APM或罐子)比手动更改配置要好得多。它非常适合版本控制,可移植性(测试VS vs vs vs vs of),组成(您可以添加一些插件女巫通常非常有用)...这是标准的构建Web应用程序的好方法。
关于自定义冲突,我不确定它是如何工作的。是好的练习始终为每个放大器使用自己的名称空间。
如果放大器写入同一文件,则始终将结果附加(share-config-custom.xml可以变得很大)。
关于罐子和放大器的问题很简单。 Alfresco的旧版本比JARS支持更多的AMP。现在,您使用的方式并不重要。尝试在这些包裹内看它们看起来非常相似。
我从未听说过通过共享界面添加AMP的。您有一些消息来源吗?唯一类似的事情是通过Model Manager创建内容模型( https:// docs.alfresco.com/content-services/latest/tutorial/model/ )
我用于产品组合放大器和罐子。我在放大器中有很多旧的代码和插件以及罐子中的新事物。 Alfresco与他们一起工作...
I'll try to give you helpful answers:
Making app packages (APMs or JARs) is much better than changing config manually. It's good for versioning, portability (TEST vs PROD or between projects), composition (you can add some addons witch are often very useful)... It is standard and good way how to build a web app.
About conflict of customizations, I'm not sure how it works. Is good practise always use own namespace for every AMP.
If AMPs write to the same file, result is always append (share-config-custom.xml can get be very big).
Problem about JARs and AMPs is simple. Old version of Alfresco supports more AMPs than JARs. Now it does not matter with way you use. Try to look inside these packages they look very similarly.
I never heard about adding AMPs through the share interface. Have you some source? Only thing which is similar is creating content model through Model manager (https://docs.alfresco.com/content-services/latest/tutorial/model/)
I use for PROD combination of AMPs and JARs. I have a lot of legacy code and addons in AMPs and new things in JARs. Alfresco work with them same...