我添加了:
<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:
我在露天资源中进行搜索,发现 CounterIncrementActionExecuter 是扩展的 ActionExecuterAbstractBase 并定义了 executeImpl ,但是:
I have search in alfresco sources and found CounterIncrementActionExecuter is extends ActionExecuterAbstractBase and defines executeImpl, but:
所以问题是- 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方面如何在露天工作?
发布评论