org.hippoecm.hst.util
Class PropertyDefinitionUtils

java.lang.Object
  extended by org.hippoecm.hst.util.PropertyDefinitionUtils

public class PropertyDefinitionUtils
extends Object

PropertyDefinitionUtils

Version:
$Id$

Method Summary
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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getPropertyDefinition

public 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. 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.

Parameters:
nodeType -
propertyName -
propertyType -
Returns:

getPropertyDefinition

public 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. 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.

Parameters:
nodeType -
propertyName -
requiredPropertyType -
Returns:

getPropertyDefinition

public static javax.jcr.nodetype.PropertyDefinition getPropertyDefinition(javax.jcr.Node node,
                                                                          String propertyName)
                                                                   throws javax.jcr.RepositoryException
Returns a 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.

Parameters:
node -
propertyName -
Returns:
Throws:
javax.jcr.RepositoryException

getPropertyDefinition

public static javax.jcr.nodetype.PropertyDefinition getPropertyDefinition(javax.jcr.Node node,
                                                                          String propertyName,
                                                                          int requiredPropertyType)
                                                                   throws javax.jcr.RepositoryException
Returns a 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.

Parameters:
node -
propertyName -
requiredPropertyType -
Returns:
Throws:
javax.jcr.RepositoryException

isResidualPropertyDefinition

public static boolean isResidualPropertyDefinition(javax.jcr.nodetype.PropertyDefinition pd)


Copyright © 2008-2012 Hippo. All Rights Reserved.