Package ke.go.moh.oec

Examples of ke.go.moh.oec.Work


        personRequest.setRequestReference(session.getReference());
        return personRequest;
    }

    private Work createDummyWork() {
        Work work = new Work();
        work.setNotificationId("-1");
        work.setReassignAddress(OECReception.applicationAddress());
        work.setSourceAddress(OECReception.applicationAddress());
        return work;
    }
View Full Code Here


    public NotificationDialogHelper(NotificationDialog notificationDialog) {
        this.notificationDialog = notificationDialog;
    }

    private Work createWork(Notification notification) {
        Work work = new Work();
        work.setSourceAddress(OECReception.applicationAddress());
        work.setNotificationId(notification.getPersonWrapper().getReference());
        work.setReassignAddress(notification.getReassignAggress());
        return work;
    }
View Full Code Here

     */
    @Test
    public void testGetWork() {
        System.out.println("Testing GET_WORK");
        int requestTypeId = RequestTypeId.GET_WORK;
        Work work = new Work();
        work.setSourceAddress(Mediator.getProperty("Instance.Address"));
        work.setNotificationId("7");
        work.setReassignAddress("mch");
        mediator.getData(requestTypeId, work);

    }
View Full Code Here

     * @param m notification message contents to pack
     * @return packed notification messages
     */
    private Document packWorkMessage(Message m) {

        Work work = (Work) m.getMessageData();
        // Create instance of DocumentBuilderFactory
        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
        // Get the DocumentBuilder
        DocumentBuilder db = null;
        try {
            db = dbf.newDocumentBuilder();
        } catch (ParserConfigurationException ex) {
            Logger.getLogger(XmlPacker.class.getName()).log(Level.SEVERE, null, ex);
        }
        Document doc = db.newDocument(); // Create a blank Document
        MessageType messageType = m.getMessageType();
        String rootName = messageType.getRootXmlTag();//get's the root tag
        Element root = doc.createElement(rootName);
        doc.appendChild(root); // Root element is child of the Document
        packNewElement(doc, root, "sourceAddress", work.getSourceAddress());
        packNewElement(doc, root, "notificationId", work.getNotificationId());
        packNewElement(doc, root, "reassignAddress", work.getReassignAddress());

        return doc;
    }
View Full Code Here

     *
     * @param m the message contents to fill in
     * @param e root of the person message <code>Document</code> parsed from XML
     */
    private void unpackWorkMessage(Message m, Element e) {
        Work work = new Work();
        m.setMessageData(work);
        work.setSourceAddress(e.getElementsByTagName("sourceAddress").item(0).getTextContent());
        work.setNotificationId(e.getElementsByTagName("notificationId").item(0).getTextContent());
        work.setReassignAddress(e.getElementsByTagName("reassignAddress").item(0).getTextContent());
    }
View Full Code Here

TOP

Related Classes of ke.go.moh.oec.Work

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.