简体   繁体   English

露天内容中的常见元数据字段如何工作?

[英]how does common metadata fields from content alfresco work?

I created with the help of model manager a custom type for my folders and all I want is to have some sort of popup window to fill all the properties and then spread to all the files inside that folder, Is there any relation with the rules of folders and common metadata fields from content?我在模型管理器的帮助下为我的文件夹创建了一个自定义类型,我想要的只是有某种弹出窗口来填充所有属性,然后传播到该文件夹​​内的所有文件,是否与规则有任何关系内容中的文件夹和通用元数据字段? Any help would be apreciated thx任何帮助都会受到赞赏 thx

If you configured a form along with your custom model, you should already have a way to edit the custom metadata on your folders.如果您随自定义模型一起配置了表单,则您应该已经可以编辑文件夹中的自定义元数据。

If you also want that same metadata on your content, then hopefully you implemented your custom metadata on an aspect.如果您还希望在您的内容中使用相同的元数据,那么希望您在某个方面实现了自定义元数据。 The aspect can be applied to folder instances as well as content instances.该方面可以应用于文件夹实例以及内容实例。

Once you have an aspect applied to the folder and content instances, it sounds like the next thing you want to do is copy metadata values from the folder to the content.一旦您将某个方面应用于文件夹和内容实例,听起来您接下来要做的就是将元数据值从文件夹复制到内容。 There is nothing out-of-the-box that will do this for you.没有任何开箱即用的东西可以为您做到这一点。 You can do this with a rule.您可以使用规则执行此操作。

I suggest reading the documentation on the Alfresco server-side JavaScript API and also installing the Alfresco JavaScript Console add-on.我建议阅读有关 Alfresco 服务器端 JavaScript API文档并安装Alfresco JavaScript Console附加组件。 You can create a server-side JavaScript file that will reside in Data Dictionary/Scripts.您可以创建将驻留在数据字典/脚本中的服务器端 JavaScript 文件。 Then you can set up a rule on your folder to invoke that JavaScript to copy metadata from the folder to the documents when the documents are created.然后,您可以在文件夹上设置规则,以在创建文档时调用该 JavaScript 将元数据从文件夹复制到文档。

Keep in mind that if the metadata on the folder changes you will have write a rule to deal with that if you want to copy the updated values to the content instances in the folder.请记住,如果文件夹上的元数据发生更改,如果您想将更新的值复制到文件夹中的内容实例,您将需要编写规则来处理该问题。 This could get very expensive if the folder grows in size.如果文件夹变大,这可能会变得非常昂贵。

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

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