public class PropertyDefinitionUtils extends Object
Modifier and Type | Method and Description |
---|---|
static javax.jcr.nodetype.PropertyDefinition |
getPropertyDefinition(javax.jcr.Node node,
String propertyName)
Returns a
PropertyDefinition for the given property name. |
static javax.jcr.nodetype.PropertyDefinition |
getPropertyDefinition(javax.jcr.Node node,
String propertyName,
int requiredPropertyType)
Returns a
PropertyDefinition for the given property name. |
static javax.jcr.nodetype.PropertyDefinition |
getPropertyDefinition(javax.jcr.nodetype.NodeType nodeType,
String propertyName)
Returns the
PropertyDefinition for the name property in
the given node type. |
static javax.jcr.nodetype.PropertyDefinition |
getPropertyDefinition(javax.jcr.nodetype.NodeType nodeType,
String propertyName,
int requiredPropertyType)
Returns the
PropertyDefinition for the name property in
the given node type. |
static boolean |
isResidualPropertyDefinition(javax.jcr.nodetype.PropertyDefinition pd) |
public static javax.jcr.nodetype.PropertyDefinition getPropertyDefinition(javax.jcr.nodetype.NodeType nodeType, String propertyName)
PropertyDefinition
for the name property in
the given node type. If the node type has no matching property
definition null
is returned.
This method scans as follows: If a PropertyDefinition with the exact
name is found, this property definition is returned.
Otherwise the first residual property definition is returned.
Otherwise null
is returned.
nodeType
- propertyName
- propertyType
- public static javax.jcr.nodetype.PropertyDefinition getPropertyDefinition(javax.jcr.nodetype.NodeType nodeType, String propertyName, int requiredPropertyType)
PropertyDefinition
for the name property in
the given node type. If the node type has no matching property
definition null
is returned.
This method scans as follows: If a PropertyDefinition with the exact
name is found, this property definition is returned.
Otherwise the first residual property definition, which has the same required property type
as specified, is returned.
Otherwise null
is returned.
nodeType
- propertyName
- requiredPropertyType
- public static javax.jcr.nodetype.PropertyDefinition getPropertyDefinition(javax.jcr.Node node, String propertyName) throws javax.jcr.RepositoryException
PropertyDefinition
for the given property name.
This method first looks for a matching property definition in the
primary node type and then in the list of mixin node types of the node.
If a definition whose name is the same as the propertyName
is found, this definition is returned. Otherwise a residual property
definition may be returned if any available.
If there's no matching property, null
is returned.node
- propertyName
- javax.jcr.RepositoryException
public static javax.jcr.nodetype.PropertyDefinition getPropertyDefinition(javax.jcr.Node node, String propertyName, int requiredPropertyType) throws javax.jcr.RepositoryException
PropertyDefinition
for the given property name.
This method first looks for a matching property definition in the
primary node type and then in the list of mixin node types of the node.
If a definition whose name is the same as the propertyName
is found, this definition is returned. Otherwise a residual property
definition, which has the same required property type
as specified, may be returned if any available.
If there's no matching property, null
is returned.node
- propertyName
- requiredPropertyType
- javax.jcr.RepositoryException
public static boolean isResidualPropertyDefinition(javax.jcr.nodetype.PropertyDefinition pd)
Copyright © 2008–2016 Hippo B.V. (http://www.onehippo.com). All rights reserved.