コード例 #1
0
ファイル: JDFNodeInfo.cs プロジェクト: cip4/JDFLibNet
        ///
        ///	 <summary> * gets the subscription query for a given messagetype or creates one if not yet there note that newly created query
        ///	 * do not contain a subscription
        ///	 *  </summary>
        ///	 * <param name="queryType"> </param>
        ///	 * <returns> the appropriate query </returns>
        ///
        public virtual JDFQuery getCreateJMFQuery(EnumType queryType)
        {
            JDFQuery q = null;
            VElement v = getChildElementVector(ElementName.JMF, null);

            if (v != null)
            {
                int siz = v.Count;
                for (int i = 0; i < siz; i++)
                {
                    JDFJMF jmf = (JDFJMF)v[i];
                    q = (JDFQuery)jmf.getMessageElement(EnumFamily.Query, queryType, 0);
                    if (q != null)
                    {
                        break;
                    }
                }
            }

            if (q == null)
            {
                q = appendJMF().appendQuery(queryType);
            }

            return(q);
        }
コード例 #2
0
ファイル: MISGoldenTicket.cs プロジェクト: cip4/JDFLibNet
        ///
        ///	 * <param name="icsLevel"> </param>
        ///
        protected internal override JDFNodeInfo initNodeInfo()
        {
            JDFNodeInfo ni = base.initNodeInfo();

            if (theParentNode == null)
            {
                JDFEmployee emp = ni.appendEmployee();
                emp.setPersonalID("personalID1");
                emp.setRoles(new VString("CSR", null));
                if (returnURL != null)
                {
                    ni.setTargetRoute(returnURL);
                }

                if (jmfICSLevel >= 1 && misICSLevel >= 2 || misURL != null)
                {
                    JDFJMF jmf = ni.appendJMF();
                    jmf.setSenderID("MISGTSender");
                    JDFQuery q = jmf.appendQuery(EnumType.Status);
                    q.setID(q.getID() + (System.DateTime.Now.Ticks - 621355968000000000) / 10000 % 100000);

                    //ORIGINAL LINE: final JDFStatusQuParams statusQuParams = q.appendStatusQuParams();
                    JDFStatusQuParams statusQuParams = q.appendStatusQuParams();
                    statusQuParams.setJobID(theNode.getJobID(true));
                    statusQuParams.setJobPartID(theNode.getJobPartID(false));
                    statusQuParams.setJobDetails(EnumJobDetails.Brief);

                    //ORIGINAL LINE: final JDFSubscription subscription = q.appendSubscription();
                    JDFSubscription subscription = q.appendSubscription();
                    subscription.setRepeatTime(600);
                    subscription.setURL(misURL == null ? "http://MIS.printer.com/JMFSignal" : misURL);
                }
            }
            return(ni);
        }
コード例 #3
0
ファイル: JDFAutoJMF.cs プロジェクト: cip4/JDFLibNet
        ///
        ///     <summary> * Get all Query from the current element
        ///     *  </summary>
        ///     * <returns> Collection<JDFQuery> </returns>
        ///
        public virtual ICollection <JDFQuery> getAllQuery()
        {
            List <JDFQuery> v = new List <JDFQuery>();

            JDFQuery kElem = (JDFQuery)getFirstChildElement(ElementName.QUERY,null);

            while (kElem != null)
            {
                v.Add(kElem);

                kElem = (JDFQuery)kElem.getNextSiblingElement(ElementName.QUERY,null);
            }

            return(v);
        }