org.apache.jackrabbit.core
Class NodeTypeInstanceHandler

java.lang.Object
  extended by org.apache.jackrabbit.core.NodeTypeInstanceHandler

public class NodeTypeInstanceHandler
extends Object

The NodeTypeInstanceHandler is used to provide or initialize system protected properties (or child nodes).


Field Summary
static String DEFAULT_USERID
          Default user id in the case where the creating user cannot be determined.
 
Constructor Summary
NodeTypeInstanceHandler(String userId)
          Creates a new node type instance handler.
 
Method Summary
 InternalValue[] computeSystemGeneratedPropertyValues(NodeState parent, QPropertyDefinition def)
          Computes the values of well-known system (i.e. protected) properties.
 void setDefaultValues(PropertyState property, NodeState parent, QPropertyDefinition def)
          Sets the system-generated or node type -specified default values of the given property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_USERID

public static final String DEFAULT_USERID
Default user id in the case where the creating user cannot be determined.

See Also:
Constant Field Values
Constructor Detail

NodeTypeInstanceHandler

public NodeTypeInstanceHandler(String userId)
Creates a new node type instance handler.

Parameters:
userId - the user id. if null, "system" is used.
Method Detail

setDefaultValues

public void setDefaultValues(PropertyState property,
                             NodeState parent,
                             QPropertyDefinition def)
                      throws RepositoryException
Sets the system-generated or node type -specified default values of the given property. If such values are not specified, then the property is not modified.

Parameters:
property - property state
parent - parent node state
def - property definition
Throws:
RepositoryException - if the default values could not be created

computeSystemGeneratedPropertyValues

public InternalValue[] computeSystemGeneratedPropertyValues(NodeState parent,
                                                            QPropertyDefinition def)
Computes the values of well-known system (i.e. protected) properties.

Parameters:
parent - the parent node state
def - the definition of the property to compute
Returns:
the computed values


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.