AnsweredAssumed Answered

Creating child association in ScriptNode

Question asked by compaqnx7300 on Apr 1, 2009
I realized that ScriptNode class has not possibility to create child association, so I think that it would be usefully to add function:

/**
     * Create an child association between this node and the specified target node.
     *
     * @param target        Destination node for the association
     * @param assocType     Child association type qname (short form or fully qualified)
     */
    public void addChild(ScriptNode target, String assocType)
    {
        ParameterCheck.mandatory("Target", target);
        ParameterCheck.mandatoryString("ChildAssociation Type Name", assocType);
       
        this.nodeService.addChild(this.nodeRef, target.nodeRef, createQName(assocType), createQName(assocType));
        reset();
    }   

Outcomes