Example #1
0
        ///
        ///	 <summary> * Append a PhaseTime audit element
        ///	 *  </summary>
        ///	 * <param name="phase"> the node status at this time </param>
        ///	 * <param name="by"> the author keyword </param>
        ///	 * <param name="vmParts"> defines a vector of map of parts for which the Spawned is valid </param>
        ///	 * <returns> the newly created PhaseTime audit
        ///	 *
        ///	 *         default: AddPhaseTime(phase, JDFConstants.EMPTYSTRING, new VJDFAttributeMap()) </returns>
        ///
        public virtual JDFPhaseTime addPhaseTime(EnumNodeStatus phase, string by, VJDFAttributeMap vmParts)
        {
            JDFPhaseTime myAudit = (JDFPhaseTime)addAudit(JDFAudit.EnumAuditType.PhaseTime, by);

            myAudit.setStatus(phase);
            myAudit.setStart(new JDFDate());
            myAudit.setEnd(new JDFDate());
            myAudit.setPartMapVector(vmParts);
            JDFNode parentJDF = getParentJDF();

            if (parentJDF != null)
            {
                myAudit.setSpawnID(StringUtil.getNonEmpty(parentJDF.getSpawnID(true)));
            }

            return(myAudit);
        }