我正在尝试从具有资源或节点内 cq5 内属性的资源或节点获取字节的 CRC 或 md5。
例如,假设我有一个 DAM Assets ,我想获取包含图像数据的字节 blob 的 MD5 指纹,以便我知道内部数据何时发生更改。
对于节点来说同样会很方便。 CQ5 中是否有任何内置方法可以实现此目的?
最佳答案
您是否尝试过将“etag”混合添加到您想要校验和的节点中?引用the spec on the etag mixin :
A jcr:etag property is an opaque string whose syntax is identical to that defined for entity tags in HTTP/1.1. Semantically, the jcr:etag is comparable to the HTTP/1.1 strong entity tag.
On creation of a mix:etag node N, or assignment of mix:etag to N, the repository must create a jcr:etag property with an implementation determined value.
The value of the jcr:etag property must change immediately on persist of any of the following changes to N:
- A BINARY property is added to N.
- A BINARY property is removed from N.
- The value of an existing BINARY property of N changes.
关于osgi - 是否可以在 CQ5 中获取节点或吊索资源的 CRC?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18381100/