Exemplo n.º 1
0
        public virtual void testAudit()
        {
            JDFAuditPool ap = n.getAuditPool();

            Assert.IsNotNull(ap);
            JDFCreated crea  = (JDFCreated)ap.getAudit(0, EnumAuditType.Created, null, null);
            string     agent = crea.getAgentName();

            Assert.IsNotNull(agent);
            string author = crea.getAuthor();

            Assert.IsNotNull(author);

            n.fixVersion(EnumVersion.Version_1_1);
            author = crea.getAuthor();
            Assert.AreEqual(agent, StringUtil.token(author, 1, "_|_"));
            Assert.IsTrue(author.StartsWith(agent));
            string agent2 = crea.getAgentName();

            Assert.AreEqual("", agent2);

            n.fixVersion(EnumVersion.Version_1_3);
            author = crea.getAuthor();
            Assert.AreEqual(-1, author.IndexOf("_|_"));
            agent2 = crea.getAgentName();
            Assert.AreEqual(agent, agent2);

            n.fixVersion(EnumVersion.Version_1_2);
            author = crea.getAuthor();
            Assert.AreEqual(-1, author.IndexOf("_|_"));
            agent2 = crea.getAgentName();
            Assert.AreEqual(agent, agent2);
        }
Exemplo n.º 2
0
        ///
        ///     <summary> *  </summary>
        ///
        public virtual void initAuditPool(JDFNode node)
        {
            JDFAuditPool auditPool = node.getCreateAuditPool();
            JDFAudit     a         = auditPool.getAudit(-1, EnumAuditType.Created, null, null);

            if (a == null)
            {
                a = auditPool.addAudit(EnumAuditType.Created, null);
            }
        }
Exemplo n.º 3
0
        ///
        ///     <summary> * overwrite this method in case you want to customize the hotfolder for returnqueueentryparams and paramtetrizing
        ///     * the ReturnQueueEntryParams template is insufficient
        ///     * </summary>
        ///     * <param name="stringURL"> the file url of the hotfolder jdf in the local storage directory (NOT the hf) </param>
        ///     * <param name="newCommand"> the command that was generated from the template </param>
        ///     * <param name="jdfRoot"> the root jdfnode of the dropped file </param>
        ///
        protected internal virtual void extractReturnParams(string stringURL, JDFCommand newCommand, JDFNode jdfRoot)
        {
            JDFReturnQueueEntryParams rqp = newCommand.getCreateReturnQueueEntryParams(0);

            rqp.setURL(stringURL);
            JDFAuditPool ap = jdfRoot == null ? null : jdfRoot.getCreateAuditPool();

            if (ap != null)
            {
                JDFProcessRun pr       = (JDFProcessRun)ap.getAudit(-1, EnumAuditType.ProcessRun, null, null);
                string        queueEID = pr == null ? null : pr.getAttribute(AttributeName.QUEUEENTRYID);
                if (!KElement.isWildCard(queueEID))
                {
                    rqp.setQueueEntryID(queueEID);
                }
            }
        }