Examples of StaticDataHelper


Examples of com.funambol.syncclient.util.StaticDataHelper

    // This constructor must be called once at the beginning of the
    // application.
    Configuration(Class c) throws Exception {
        // load the language.xml configuration file
        // in the 'language' string...
        StaticDataHelper sdh = new StaticDataHelper();
        sdh.loadLanguage(c);

        // ... and load the default properties from
        // that file (and **not** from a .jad file)
        // into private static fields of StaticDataHelper
        sdh.loadDefaultValue();

        copyDefaults();
    }
View Full Code Here

Examples of com.funambol.syncclient.util.StaticDataHelper

    Configuration() {
    }
   
    private static void copyDefaults() {

        StaticDataHelper sdh = new StaticDataHelper();
                   
        syncUrl = sdh.getHomePageDefault();
        userName = sdh.getUserDefault();
        password = sdh.getPasswordDefault();
       
        syncContact  = sdh.getSyncContactDefault() ;
        contactSourceUri = sdh.getContactSourceUriDefault() ;
       
        syncCalendar = sdh.getSyncCalendarDefault();
        calendarSourceUri = sdh.getCalendarSourceUriDefault() ;
       
        //syncMail = sdh.getSyncMailDefault();
        mailSourceUri = sdh.getMailSourceUriDefault() ;
        mailAddress = sdh.getEmailIdDefault() ;
        enablePolling = sdh.getEnablePollingDefault();

        // FIXME: hardcoded value in minutes. Change ConfigurationScreen too
        pollInterval = INTERVAL ;
        enableSmsSync  = sdh.getSmsServerAlertedSyncDefault() ;
       
        gatewayApn = sdh.getGatewayApnDefault() ;
        gatewayIp = sdh.getGatewayIpDefault() ;
        gatewayPort = sdh.getGatewayPortDefault() ;

        // XXX: for direct push, not used now
        listeningPort = sdh.getAlertingPortDefault() ;

    }
View Full Code Here

Examples of com.funambol.syncclient.util.StaticDataHelper

    public BlackBerryContact addContact(String contactString) throws SyncException {
        Hashtable contactMap = buildMapFromXML(contactString);

        if (contactMap != null) {
            try {
                StaticDataHelper sdh = null;
                String osVersion = null;

                sdh = new StaticDataHelper();
                osVersion = sdh.getOS();

                /*
                 * This array is added here below to the contact
                 * through BlackBerryContact.NAME (so you can see
                 * BlackBerryContact.NAME as BlackBerryContact.NAME_FAMILY
View Full Code Here

Examples of com.funambol.syncclient.util.StaticDataHelper

        String[] arrayFieldWork = null;
        String[] arrayFieldHome = null;

        Hashtable contactMap = buildMapFromXML(contactString);

        StaticDataHelper sdh = new StaticDataHelper();
        String osVersion = sdh.getOS();

        if (contactMap != null) {
            try {
                String[] arrayField = new String[5];
                arrayField[BlackBerryContact.NAME_FAMILY] = getValue(contactMap, LAST_NAME);
View Full Code Here

Examples of com.funambol.syncclient.util.StaticDataHelper

     */
    public String toString(BlackBerryContact contact) {
        StaticDataHelper.log(">>> Entering XMLContactParser.toString()...");
        StringBuffer contactBuffer = new StringBuffer();

        StaticDataHelper sdh = null;
        String osVersion = null;

        sdh = new StaticDataHelper();

        osVersion = sdh.getOS();

        contactBuffer.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");

        contactBuffer.append("<contact>\n");

        /*
         * to let Outlook display the name
         * on the Contacts start page
         */
        //appendFileAs(contactBuffer);

        appendName(contactBuffer, contact);

        appendField(contactBuffer,
                contact,
                BlackBerryContact.ORG,//the int native code of this contact field on the device
                COMPANY);//<CompanyName></CompanyName>

        appendField(contactBuffer,
                contact,
                BlackBerryContact.NOTE,//the int native code of this contact field on the device
                NOTE);//<Body></Body>

        appendField(contactBuffer,
                contact,
                BlackBerryContact.TITLE,//the int native code of this contact field on the device
                TITLE);//<JobTitle></JobTitle>

        appendField(contactBuffer,
                contact,
                BlackBerryContact.EMAIL,//the int native code of this contact field on the device
                EMAIL_1);//<Email1Address></Email1Address>

        appendField(contactBuffer,
                contact,
                BlackBerryContact.URL,//the int native code of this contact field on the device
                WEB_PAGE);//<WebPage></WebPage>

        //bugfix 877
        appendCategories(contactBuffer);

        appendTelephoneFields(contactBuffer, contact);

        if (checkOS(osVersion)) {
            appendAddress(contactBuffer, contact);
        }

        contactBuffer.append("</contact>");

        sdh.log(">>> returned SIF-C content after fixing bug 856:\n" + contactBuffer.toString());
        return contactBuffer.toString();
    }
View Full Code Here

Examples of com.funambol.syncclient.util.StaticDataHelper

     * @param BlackBerryContact: Blackberry contact
     * @return void
     */
    private void appendAddress(StringBuffer buffer, BlackBerryContact contact) {

        StaticDataHelper sdh = null;
        String osVersion = null;
        boolean findHome = false;
        boolean findBusiness = false;

        sdh = new StaticDataHelper();

        osVersion = sdh.getOS();

        if (checkOS(osVersion)) {

            if (list.isSupportedField(BlackBerryContact.ADDR) && contact.countValues(BlackBerryContact.ADDR) > 0) {

View Full Code Here

Examples of com.funambol.syncclient.util.StaticDataHelper

     * @param handled OS
     * @return true if OS >= 4.0.2
     */
    private boolean checkOS(String os) {
        if (os == null || os.length() == 0) {
            StaticDataHelper sdh = new StaticDataHelper();
            sdh.setOS();
            os = sdh.getOS();
        }

        if (os == null || !(os.length() > 3)) {
            return false;
        }
View Full Code Here

Examples of com.funambol.syncclient.util.StaticDataHelper

       
        // Set the log level
        Log.setLevel(Configuration.logLevel);
       
        // Init the class member to access StaticDataHelper
        sdh = new StaticDataHelper();
       
        newVersion = checkOSVersion();

        //a list of contacts from the device's store
        listContact = (BlackBerryPIMList)
View Full Code Here

Examples of com.funambol.syncclient.util.StaticDataHelper

        this.sourceType = sourceType;
        this.sourceName = sourceName;
        this.mappings   = new Hashtable();
        this.dataStore  = DataStore.getDataStore(dataStoreName);
       
        sdh = new StaticDataHelper();
        statusCommands = new Vector();
    }
View Full Code Here

Examples of com.funambol.syncclient.util.StaticDataHelper

         * The constructor here creates the Configuration
         * screen with all the UI components on it and sets
         * default input values
         */
        public ConfigurationScreen() {
            StaticDataHelper sdh = new StaticDataHelper() ;
            Configuration c = new Configuration() ;
           
            setTitle(new LabelField(sdh.getLanguage("configure-sync4j-bb")));

            Log.debug("Username:" + c.userName);
            Log.debug("Sync Calendar: " + c.syncCalendar);
           
            userNameField           = new BasicEditField
                                        (sdh.getLanguage("user") + " " , c.userName );

            passwordField           = new PasswordEditField
                                        (sdh.getLanguage("password") + " " , c.password );

            homePageField           = new BasicEditField
                                        (sdh.getLanguage("homepage") + " \n" , c.syncUrl );
                                       
            listeningPortField      = new BasicEditField
                                        (sdh.getLanguage("alerting-port") + "  " ,
                                        c.listeningPort);
           
            mailIDField             = new BasicEditField
                                        (sdh.getLanguage("email-id") + "  " , c.mailAddress);
                                       
           
                                       
            mailSourceUriField      = new BasicEditField
                                        (sdh.getLanguage("source-uri-mail") + "  "  ,
                                        c.mailSourceUri);
            contactSourceUriField   = new BasicEditField
                                        (sdh.getLanguage("source-uri-contact") + "  "  ,
                                        c.contactSourceUri );

            calendarSourceUriField  = new BasicEditField
                                        (sdh.getLanguage("source-uri-calendar") + "  " ,
                                        c.calendarSourceUri );
                                       

            syncContactField        = new CheckboxField
                                        (sdh.getLanguage("enable-sync-contact")       ,
                                        c.syncContact );

            syncCalendarField       = new CheckboxField
                                        (sdh.getLanguage("enable-sync-calendar")      ,
                                        c.syncCalendar );
                                       
            syncMailField           = new CheckboxField
                                        (sdh.getLanguage("enable-sync-mail")      ,
                                        c.syncMail);
                                       
            pollingField            = new CheckboxField(
                                        sdh.getLanguage("enable-polling"),
                                        c.enablePolling);
                                      
            smsField                = new CheckboxField(
                                        sdh.getLanguage("enable-sms-server-alerted-sync"),
                                        c.enableSmsSync);
                                      
            gatewayApnField         = new BasicEditField
                                        (sdh.getLanguage("gateway-apn") + " "        ,
                                        c.gatewayApn );

            gatewayIpField          = new BasicEditField
                                        (sdh.getLanguage("gateway-ip") + " "         ,
                                        c.gatewayIp );

            gatewayPortField        = new BasicEditField
                                        (sdh.getLanguage("gateway-port") + " "      ,
                                        c.gatewayPort  ,
                                        6              ,
                                        EditField.FILTER_INTEGER );
           
            ///////////////////////////////////////////////////////////////////////////
           
         
            pollIntervalField  = new NumericChoiceField
                                   (sdh.getLanguage("polling-duration")+ "  "  ,
                                    1                                          ,//begin
                                    60                                         ,//end
                                    1                                          ,//increment
                                    Configuration.pollInterval - 1            );//initial index (not value!)
          
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.