Package net.rim.blackberry.api.mail

Examples of net.rim.blackberry.api.mail.ServiceConfiguration


                            {
                              String name = record.getName();
                          
                              if (name.equalsIgnoreCase(emailService))
                              {
                                    ServiceConfiguration sc = new ServiceConfiguration(record);
                             
                                    if (sc != null)
                                    {
                                        Session session = Session.getInstance(sc);
                                       
View Full Code Here


            }
            _serviceConfig = _store.getServiceConfiguration();

        } else {
            try {
                _serviceConfig = new ServiceConfiguration( s.getUid(), s.getCid() );
                _store = Session.getInstance( _serviceConfig ).getStore();
            } catch( NoSuchServiceException e ) {
                _store = Session.getDefaultInstance().getStore();
                _serviceConfig = _store.getServiceConfiguration();
            }
View Full Code Here

        if( args.length > 2 ) {
            s = (ServiceObject) args[ 2 ];
        }

        Store store = null;
        ServiceConfiguration serviceConfig = null;
        if( s == null ) {
            store = Session.getDefaultInstance().getStore();
            serviceConfig = store.getServiceConfiguration();
        } else {
            try {
                serviceConfig = new ServiceConfiguration( s.getUid(), s.getCid() );
            } catch( NoSuchServiceException e ) {
                serviceConfig = null;
            } finally {
                if( serviceConfig != null ) {
                    store = Session.getInstance( serviceConfig ).getStore();
View Full Code Here

                final ServiceRecord serviceRecord = serviceRecords[ i ];
                String emailAddress = null;

                if( type == ServiceObject.TYPE_EMAIL ) {
                    final ServiceConfiguration serviceConfig = new ServiceConfiguration( serviceRecord );
                    emailAddress = serviceConfig.getEmailAddress();
                }

                serviceList[ i ] = new ServiceObject( emailAddress, serviceRecord.getName(), new Integer( type ), serviceRecord
                        .getUid(), serviceRecord.getCid() );
View Full Code Here

    try {
      ServiceBook sb = ServiceBook.getSB();
      ServiceRecord[] records = sb.findRecordsByCid(CMIME);
      mailStores = new Store[records.length];
      for (int i = 0; i < records.length; i++) {
        ServiceConfiguration sc = new ServiceConfiguration(records[i]);
        Session session = Session.getInstance(sc);
        mailStores[i] = session.getStore();
      }
    } catch (Exception e) {
      // carry on
View Full Code Here

        final ServiceBook serviceBook = ServiceBook.getSB();
        final ServiceRecord[] mailServiceRecords =
                serviceBook.findRecordsByCid("CMIME");

        for (int cnt = mailServiceRecords.length - 1; cnt >= 0; --cnt) {
            final ServiceConfiguration sc =
                    new ServiceConfiguration(mailServiceRecords[cnt]);
            final Store store = Session.getInstance(sc).getStore();
            populateMessages(store.list(Folder.SUBTREE));
        }

        return !_messageVector.isEmpty();
View Full Code Here

        // Find an outbox folder and use it to construct a new message
        Folder outbox = null;

        final Session session = Session.getDefaultInstance();
        if (session != null) {
            final ServiceConfiguration serviceConfiguration =
                    session.getServiceConfiguration();
            if (serviceConfiguration != null) {
                outbox = session.getStore().findFolder("Outbox")[0];
            } else {
                PIMDemo.errorDialog("Error: Email service not available, could not send notification to invitees");
View Full Code Here

    /**
     * Displays information about the message's send and recieve properties
     */
    protected void displayMessageInformation() {
        // Add a field describing the source service
        final ServiceConfiguration sc =
                _message.getFolder().getStore().getServiceConfiguration();
        final EditField service =
                new EditField("Service: ", sc.getName(), MAX_CHARS,
                        Field.READONLY | Field.NON_FOCUSABLE);
        addTextFieldToTableAndScreen(service, INFO);

        // Add the folder field
        final EditField folder =
View Full Code Here

            Dialog.alert("Goodbye");
            close();
        }

        // Open the ServiceConfiguration
        final ServiceConfiguration sc =
                new ServiceConfiguration(_mailServiceRecords[choice]);

        // Get the mail store
        _store = Session.getInstance(sc).getStore();
    }
View Full Code Here

TOP

Related Classes of net.rim.blackberry.api.mail.ServiceConfiguration

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.