cm:countable方面如何在露天工作?

编程入门 行业动态 更新时间:2024-10-10 08:18:34
本文介绍了cm:countable方面如何在露天工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我添加了:

<mandatory-aspects> <aspect>cm:countable</aspect> </mandatory-aspects>

要列出定义,因此每个项目都应具有增量字段。但是,当创建列表项时,nothig发生了。我检查了以下代码:

To list definition, so every item should have "increment" field. But when list items are created nothig happened. I have check the follwoing code:

  • nodeService.getAspects(nodeRef)定义的项目方面,此列表中显示 cm:countable 。
  • nodeService.getProperty(nodeRef,QName .createQName( www.alfresco/model/content/1.0,可数))返回null。
  • nodeService.getProperties(nodeRef)返回所有属性,但没有 countable 键。
  • nodeService.getAspects(nodeRef) return all defined aspects for item, cm:countable presents in this list.
  • nodeService.getProperty(nodeRef, QName.createQName("www.alfresco/model/content/1.0", "countable")) return null.
  • nodeService.getProperties(nodeRef) returns all properties but no countable key is present.
  • 我在露天资源中进行搜索,发现 CounterIncrementActionExecuter 是扩展的 ActionExecuterAbstractBase 并定义了 executeImpl ,但是:

    I have search in alfresco sources and found CounterIncrementActionExecuter is extends ActionExecuterAbstractBase and defines executeImpl, but:

  • executeImpl 在创建新列表项时不会被调用。
  • ActionExecuterAbstractBase#isApplicableType 也不会被调用。
  • ActionExecuterAbstractBase#isApplicableType 在 applicableTypes 变量处看 不在 CounterIncrementActionExecuter 中明确显示。因此,尚不清楚应如何填充它以及何时填充。
  • executeImpl is not invoked at new list item creation.
  • ActionExecuterAbstractBase#isApplicableType also not invoked.
  • ActionExecuterAbstractBase#isApplicableType "looks" at applicableTypes variable which is not populatd explicitly in CounterIncrementActionExecuter. So it is unclear how it should be populated and when.
  • 所以问题是- cm如何:可计数方面实际上在露天工作吗?

    So the question is - how does cm:countable aspect actually works in alfresco?

    UDPATE

    我看到计数器在Java代码中增加了。那么,将它与一个数据库和连接到数据库的多个露天实例一起使用是否安全?

    As I see counter is incremented in java code. So is safe to use it with one database and multuple alfresco instances connected to db?

    推荐答案

    Alfresco管理员通常使用此方面当节点被服务击中时,它将自动增加数字(整数)属性的值。通常仅由Alfresco管理员使用。

    This aspect is used generally by Alfresco administrator.It automatically increments the value of a number (integer) property when node is hit by services. This will generally only be used by Alfresco Administrators

    cm:countable 方面具有名为 cm:counter 的属性,

    cm:countable aspect has property called cm:counter which keeps track of current count.

    因此,您用于获取属性的代码应该是。

    So, your code for fetching property should be.

    nodeService.getProperty(nodeRef, QName.createQName("www.alfresco/model/content/1.0", "counter"))

    现在,它基于与该方面相关的政策起作用。因此,无论何时调用节点,该计数器都会递增。

    Now it works based on policy which is tied to that aspect. So, whenever node is invoked that counter is incremented.

    更多推荐

    cm:countable方面如何在露天工作?

    本文发布于:2023-11-28 11:10:21,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1642162.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:露天   如何在   工作   cm   countable

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!