public override void setUp()
        {
            base.setUp();
            JDFDoc d = new JDFDoc(ElementName.QUEUE);

            theQueue = (JDFQueue)d.getRoot();
            d        = new JDFDoc(ElementName.JMF);
            theJMF   = d.getJMFRoot();
            qsp      = theJMF.appendCommand(EnumType.SubmitQueueEntry).appendQueueSubmissionParams();
        }
Пример #2
0
        ///
        ///	 <summary> * get the @URL of this message if it is either a submitQueueEntry, a returnQueuentry or a resubmitqueueentry
        ///	 *
        ///	 * @return </summary>
        ///
        public virtual string getSubmissionURL()
        {
            JDFCommand cSubmit = (JDFCommand)getMessageElement(EnumFamily.Command, EnumType.SubmitQueueEntry, 0);

            if (cSubmit != null)
            {
                JDFQueueSubmissionParams qsp = cSubmit.getQueueSubmissionParams(0);
                return(qsp == null ? null : isWildCard(qsp.getURL()) ? null : qsp.getURL());
            }
            cSubmit = (JDFCommand)getMessageElement(EnumFamily.Command, EnumType.ResubmitQueueEntry, 0);
            if (cSubmit != null)
            {
                JDFResubmissionParams rsp = cSubmit.getResubmissionParams(0);
                return(rsp == null ? null : isWildCard(rsp.getURL()) ? null : rsp.getURL());
            }
            cSubmit = (JDFCommand)getMessageElement(EnumFamily.Command, EnumType.ReturnQueueEntry, 0);
            if (cSubmit != null)
            {
                JDFReturnQueueEntryParams rsp = cSubmit.getReturnQueueEntryParams(0);
                return(rsp == null ? null : isWildCard(rsp.getURL()) ? null : rsp.getURL());
            }
            return(null);
        }
        public virtual void testGetMimeURL()
        {
            JDFDoc d1 = new JDFDoc("JMF");

            d1.setOriginalFileName("JMF.jmf");
            JDFJMF     jmf = d1.getJMFRoot();
            JDFCommand com = (JDFCommand)jmf.appendMessageElement(JDFMessage.EnumFamily.Command, JDFMessage.EnumType.SubmitQueueEntry);

            com.appendQueueSubmissionParams().setURL("cid:TheJDF");

            JDFDoc doc = new JDFDoc("JDF");

            doc.setOriginalFileName("JDF.jdf");
            JDFNode n = doc.getJDFRoot();

            n.setType(JDFNode.EnumType.ColorSpaceConversion);
            JDFColorSpaceConversionParams cscp = (JDFColorSpaceConversionParams)n.addResource(ElementName.COLORSPACECONVERSIONPARAMS, null, EnumUsage.Input, null, null, null, null);
            JDFFileSpec fs0 = cscp.appendFinalTargetDevice();

            fs0.setURL(StringUtil.uncToUrl(sm_dirTestData + "test.icc", true));
            JDFRunList rl = (JDFRunList)n.addResource(ElementName.RUNLIST, null, EnumUsage.Input, null, null, null, null);

            rl.addPDF(StringUtil.uncToUrl(sm_dirTestData + "url1.pdf", false), 0, -1);
            System.Net.Mail.AttachmentCollection m = MimeUtil.buildMimePackage(d1, doc, true);

            JDFDoc[] d2 = MimeUtil.GetJMFSubmission(m);
            Assert.IsNotNull(d2);
            JDFQueueSubmissionParams queueSubmissionParams = d2[0].getJMFRoot().getCommand(0).getQueueSubmissionParams(0);

            Assert.AreEqual("cid:JDF.jdf", queueSubmissionParams.getURL());
            Assert.AreEqual(JDFNode.EnumType.ColorSpaceConversion, d2[1].getJDFRoot().getEnumType());
            JDFDoc d3 = queueSubmissionParams.getURLDoc();

            Assert.IsNotNull(d3);
            Assert.AreEqual(JDFNode.EnumType.ColorSpaceConversion, d3.getJDFRoot().getEnumType());
        }