Property Policies
Property policies provide places where you can hook in behaviors that trigger when a property is created, updated or deleted. They allow you to get very granular about when you custom code is invoked - such as only when a specific property in your content is affected.
The following property policies are available:
Policy QName | Description |
---|---|
p:beforeCreateProperty | Raised before a property on a node is created |
p:afterCreateProperty | Raised after a property on a node is created |
p:beforeUpdateProperty | Raised before a property on a node is updated |
p:afterUpdateProperty | Raised after a property on a node is updated |
p:beforeDeleteProperty | Raised before a property on a node is deleted |
p:afterDeleteProperty | Raised after a property on a node is deleted |
p:beforeTouchProperty | Raised before a property on a node is touched (created, updated or deleted) |
p:afterTouchProperty | Raised after a property on a node is touched (created, updated or deleted) |
Method Signatures
The following method signatures apply for the policies mentioned above:
p:beforeCreateProperty
(JavaScript)
function beforeCreateProperty(node, name, value);
(Java)
public void beforeCreateProperty(Node node, String name, Object value);
p:afterCreateProperty
(JavaScript)
function afterCreateProperty(node, name, value);
(Java)
public void afterCreateProperty(Node node, String name, Object value);
p:beforeUpdateProperty
(JavaScript)
function beforeUpdateProperty(node, name, value, originalNode, originalValue);
(Java)
public void beforeUpdateProperty(Node node, String name, Object value, Node originalNode, Object originalValue);
p:afterUpdateProperty
(JavaScript)
function afterUpdateProperty(node, name, value, originalNode, originalValue);
(Java)
public void afterUpdateProperty(Node node, String name, Object value, Node originalNode, Object originalValue);
p:beforeDeleteProperty
(JavaScript)
function beforeDeleteProperty(node, name, value);
(Java)
public void beforeDeleteProperty(Node node, String name, Object value);
p:afterDeleteProperty
(JavaScript)
function afterDeleteProperty(node, name, value);
(Java)
public void afterDeleteProperty(Node node, String name, Object value);
p:beforeTouchProperty
(JavaScript)
function beforeTouchProperty(node, name, value, originalValue);
(Java)
public void beforeTouchProperty(Node node, String name, Object value, Object originalValue);
p:afterTouchProperty
(JavaScript)
function afterTouchProperty(node, name, value, originalValue);
(Java)
public void afterTouchProperty(Node node, String name, Object value, Object originalValue);