Class NodeTypeInstanceHandler


  • public class NodeTypeInstanceHandler
    extends Object
    The NodeTypeInstanceHandler is used to provide or initialize system protected properties (or child nodes).
    • 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