*/ interface ItemDefinition { /** * Gets the node type that contains the declaration of this * ItemDefinition. * * @return a NodeType object. */ public function getDeclaringNodeType(); /** * Gets the name of the child item. If "*", this * ItemDefinition defines a residual set of child items. That is, * it defines the characteristics of all those child items with names apart * from the names explicitly used in other child item definitions. * * @return a String denoting the name or "*". */ public function getName(); /** * Reports whether the item is to be automatically created when its parent node is created. * If true, then this ItemDefinition will necessarily not be a residual * set definition but will specify an actual item name (in other words getName() will not * return �*�). * * @return a boolean. */ public function isAutoCreate(); /** * Reports whether the item is mandatory. A mandatory child node is one that, * if its parent node exists, must also exist. A mandatory property is one that * must have a value. In the case of single-value properties this means that it * must exist (since there is no such thing a null value). In the case of * multi-value properties this means that the property must exist and must have * at least one value (it cannot hold an empty array). *

* A mandatory item cannot be removed, short of removing its parent. * Nor can it be set to the empty array (if it is a multi-value property). *

* An attempt to save a node that has a mandatory child item without first * creating that child item and, if it is a property, giving it a value, * will throw a ConstraintViolationException on save. * * @return a boolean */ public function isMandatory(); /** * Gets the on-parent-version status of the child item. This governs what to do if * the parent node of this child item is versioned. * * @return an int. */ public function getOnParentVersion(); /** * Reports whether the child item is protected. In level 2 implementations, a protected item is one that cannot be removed * (except by removing its parent) or modified through the the standard write methods of this API (that is, Item.remove, * Node.addNode, Node.setProperty and Property.setValue). *

* A protected node may be removed or modified (in a level 2 implementation), however, through some * mechanism not defined by this specification or as a side-effect of operations other than * the standard write methods of the API. For example, in those repositories that support versioning, the * Node.checkin method has the side-effect of changing a node's jcr:isCheckedOut * property, even though that property is protected. *

* Note that when a node is protected this means that all its * properties are also protected (regardless of their protected setting). The protected status of a property * only becomes relevant if its parent node is not protected. * * @return a boolean. */ public function isProtected(); } ?>