Examples of CommunicationController


Examples of com.rim.samples.device.communicationapidemo.CommunicationController

    /**
     * Creates a new MenuManager object
     */
    public MenuManager() {
        _controller = new CommunicationController();
        _app = UiApplication.getUiApplication();
        _sendBlockScreen = new SendBlockScreen(_controller);
        _sendNonBlockJsonScreen = new SendNonBlockJsonScreen(_controller);
        _sendNonBlockRssScreen = new SendNonBlockRssScreen(_controller);
        _sendNonBlockAtomScreen = new SendNonBlockAtomScreen(_controller);
View Full Code Here

Examples of org.spw.controller.CommunicationController

   
    private void deleteCommunication(Communication communication) {
        Contact contact = getContact();
        contact.getParticipate().remove(communication);
        new ContactController().update(contact);
        new CommunicationController().delete(communication);
       
    }
View Full Code Here

Examples of org.spw.controller.CommunicationController

        return "success";
    }

    private void addCommunication() {
        String[] selected = getSessionBean1().getChoices();
        CommunicationController comCtl = new CommunicationController();
        ContactController contactCtl = new ContactController();
        Contact contact = getContact();
        Communication communication = getCommunication();
       
        //Create communication (needed for new object)
        communication = comCtl.update(communication);
       
        //Insert the participants after converting the array to List
        java.util.List<Contact> participants = new ArrayList<Contact>();
        participants.add(contact);
        if (selected != null) {
            for (int i= 0; i < selected.length; i++) {
                Contact aParticipant = contactCtl.parse("["+selected[i]+"]");
                if (aParticipant != null && !aParticipant.equals(contact)) {
                    participants.add(aParticipant);
                }
            }
        }
        communication = comCtl.updateParticipants(communication, participants);

        // update the current properties in the session
        setCommunication(communication);
        contact = contactCtl.read(contact.getIdContact());
        setContact(contact);
View Full Code Here

Examples of org.spw.controller.CommunicationController

        RowKey rk = tableRowGroup1.getRowKey();
        if (rk != null) {
            Communication communication = (Communication)getSessionBean1().
                    getCommunicationDataProvider().getObject(rk);
            communication.setDateOfCompletion(new Date());
            new CommunicationController().update(communication);
        }
        // Refresh
        actionsNotCompletedList.refreshListActionsNotCompleted();
       
        return null;
View Full Code Here

Examples of org.spw.controller.CommunicationController

   
    private void deleteCommunication(Communication communication) {
        Contact contact = getContact();
        contact.getParticipate().remove(communication);
        new ContactController().update(contact);
        new CommunicationController().delete(communication);
       
    }
View Full Code Here

Examples of org.spw.controller.CommunicationController

     * Add a Faces message if the list can't be refresh (it's the case if
     * the object was created from a list).
     */
    public void refreshList() {
        aList.clear();
        aList.addAll(new CommunicationController().getCommunications());
    }
View Full Code Here

Examples of org.spw.controller.CommunicationController

     * Refresh the list from the database with the selected contact.
     * Add a Faces message if the list can't be refresh (it's the case if
     * the object was created from a list).
     */
    public void refreshListActionsNotCompleted() {
        CommunicationController comCtl = new CommunicationController();
        aList.clear();
       
        aList.addAll(comCtl.getActionsNotCompleted());
    }
View Full Code Here

Examples of org.spw.controller.CommunicationController

        return "success";
    }

    private void addCommunication() {
        String[] selected = getSessionBean1().getChoices();
        CommunicationController comCtl = new CommunicationController();
        ContactController contactCtl = new ContactController();
        Contact contact = getContact();
        Communication communication = getCommunication();
       
        //Create communication (needed for new object)
        communication = comCtl.update(communication);
       
        //Insert the participants after converting the array to List
        java.util.List<Contact> participants = new ArrayList<Contact>();
        participants.add(contact);
        if (selected != null) {
            for (int i= 0; i < selected.length; i++) {
                Contact aParticipant = contactCtl.parse("["+selected[i]+"]");
                if (aParticipant != null && !aParticipant.equals(contact)) {
                    participants.add(aParticipant);
                }
            }
        }
        communication = comCtl.updateParticipants(communication, participants);

        // update the current properties in the session
        setCommunication(communication);
        contact = contactCtl.read(contact.getIdContact());
        setContact(contact);
View Full Code Here

Examples of org.spw.controller.CommunicationController

        RowKey rk = tableRowGroup1.getRowKey();
        if (rk != null) {
            Communication communication = (Communication)getSessionBean1().
                    getCommunicationDataProvider().getObject(rk);
            communication.setDateOfCompletion(new Date());
            new CommunicationController().update(communication);
        }
        // Refresh
        actionsNotCompletedList.refreshListActionsNotCompleted();
       
        return null;
View Full Code Here

Examples of org.spw.controller.CommunicationController

            close();
        }
    }
   
    private void historize(Contact contact) {
        CommunicationController comCtl = new CommunicationController();
        Communication com = new Communication();
        com.setDateCommunication(new Date());
        com.setMedia("Email");
        com.setTopic(this.getSubject());
        List<Contact> participants = new ArrayList<Contact>(1);
        participants.add(contact);
        com.setParticipants(participants);
        comCtl.create(com);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.