You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by lo...@apache.org on 2013/07/15 22:57:33 UTC

[01/15] CB-4228

Updated Branches:
  refs/heads/master 90779d5d6 -> 69105e073


http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/javascript/cordova.blackberry.js
----------------------------------------------------------------------
diff --git a/bbos/javascript/cordova.blackberry.js b/bbos/javascript/cordova.blackberry.js
deleted file mode 100644
index 04563ea..0000000
--- a/bbos/javascript/cordova.blackberry.js
+++ /dev/null
@@ -1,9928 +0,0 @@
-// Platform: blackberry
-// 2.9.0-0-g83dc4bd
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
- 
-     http://www.apache.org/licenses/LICENSE-2.0
- 
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-*/
-;(function() {
-var CORDOVA_JS_BUILD_LABEL = '2.9.0-0-g83dc4bd';
-// file: lib/scripts/require.js
-
-var require,
-    define;
-
-(function () {
-    var modules = {},
-    // Stack of moduleIds currently being built.
-        requireStack = [],
-    // Map of module ID -> index into requireStack of modules currently being built.
-        inProgressModules = {},
-        SEPERATOR = ".";
-
-
-
-    function build(module) {
-        var factory = module.factory,
-            localRequire = function (id) {
-                var resultantId = id;
-                //Its a relative path, so lop off the last portion and add the id (minus "./")
-                if (id.charAt(0) === ".") {
-                    resultantId = module.id.slice(0, module.id.lastIndexOf(SEPERATOR)) + SEPERATOR + id.slice(2);
-                }
-                return require(resultantId);
-            };
-        module.exports = {};
-        delete module.factory;
-        factory(localRequire, module.exports, module);
-        return module.exports;
-    }
-
-    require = function (id) {
-        if (!modules[id]) {
-            throw "module " + id + " not found";
-        } else if (id in inProgressModules) {
-            var cycle = requireStack.slice(inProgressModules[id]).join('->') + '->' + id;
-            throw "Cycle in require graph: " + cycle;
-        }
-        if (modules[id].factory) {
-            try {
-                inProgressModules[id] = requireStack.length;
-                requireStack.push(id);
-                return build(modules[id]);
-            } finally {
-                delete inProgressModules[id];
-                requireStack.pop();
-            }
-        }
-        return modules[id].exports;
-    };
-
-    define = function (id, factory) {
-        if (modules[id]) {
-            throw "module " + id + " already defined";
-        }
-
-        modules[id] = {
-            id: id,
-            factory: factory
-        };
-    };
-
-    define.remove = function (id) {
-        delete modules[id];
-    };
-
-    define.moduleMap = modules;
-})();
-
-//Export for use in node
-if (typeof module === "object" && typeof require === "function") {
-    module.exports.require = require;
-    module.exports.define = define;
-}
-
-// file: lib/cordova.js
-define("cordova", function(require, exports, module) {
-
-
-var channel = require('cordova/channel');
-
-/**
- * Listen for DOMContentLoaded and notify our channel subscribers.
- */
-document.addEventListener('DOMContentLoaded', function() {
-    channel.onDOMContentLoaded.fire();
-}, false);
-if (document.readyState == 'complete' || document.readyState == 'interactive') {
-    channel.onDOMContentLoaded.fire();
-}
-
-/**
- * Intercept calls to addEventListener + removeEventListener and handle deviceready,
- * resume, and pause events.
- */
-var m_document_addEventListener = document.addEventListener;
-var m_document_removeEventListener = document.removeEventListener;
-var m_window_addEventListener = window.addEventListener;
-var m_window_removeEventListener = window.removeEventListener;
-
-/**
- * Houses custom event handlers to intercept on document + window event listeners.
- */
-var documentEventHandlers = {},
-    windowEventHandlers = {};
-
-document.addEventListener = function(evt, handler, capture) {
-    var e = evt.toLowerCase();
-    if (typeof documentEventHandlers[e] != 'undefined') {
-        documentEventHandlers[e].subscribe(handler);
-    } else {
-        m_document_addEventListener.call(document, evt, handler, capture);
-    }
-};
-
-window.addEventListener = function(evt, handler, capture) {
-    var e = evt.toLowerCase();
-    if (typeof windowEventHandlers[e] != 'undefined') {
-        windowEventHandlers[e].subscribe(handler);
-    } else {
-        m_window_addEventListener.call(window, evt, handler, capture);
-    }
-};
-
-document.removeEventListener = function(evt, handler, capture) {
-    var e = evt.toLowerCase();
-    // If unsubscribing from an event that is handled by a plugin
-    if (typeof documentEventHandlers[e] != "undefined") {
-        documentEventHandlers[e].unsubscribe(handler);
-    } else {
-        m_document_removeEventListener.call(document, evt, handler, capture);
-    }
-};
-
-window.removeEventListener = function(evt, handler, capture) {
-    var e = evt.toLowerCase();
-    // If unsubscribing from an event that is handled by a plugin
-    if (typeof windowEventHandlers[e] != "undefined") {
-        windowEventHandlers[e].unsubscribe(handler);
-    } else {
-        m_window_removeEventListener.call(window, evt, handler, capture);
-    }
-};
-
-function createEvent(type, data) {
-    var event = document.createEvent('Events');
-    event.initEvent(type, false, false);
-    if (data) {
-        for (var i in data) {
-            if (data.hasOwnProperty(i)) {
-                event[i] = data[i];
-            }
-        }
-    }
-    return event;
-}
-
-if(typeof window.console === "undefined") {
-    window.console = {
-        log:function(){}
-    };
-}
-
-var cordova = {
-    define:define,
-    require:require,
-    /**
-     * Methods to add/remove your own addEventListener hijacking on document + window.
-     */
-    addWindowEventHandler:function(event) {
-        return (windowEventHandlers[event] = channel.create(event));
-    },
-    addStickyDocumentEventHandler:function(event) {
-        return (documentEventHandlers[event] = channel.createSticky(event));
-    },
-    addDocumentEventHandler:function(event) {
-        return (documentEventHandlers[event] = channel.create(event));
-    },
-    removeWindowEventHandler:function(event) {
-        delete windowEventHandlers[event];
-    },
-    removeDocumentEventHandler:function(event) {
-        delete documentEventHandlers[event];
-    },
-    /**
-     * Retrieve original event handlers that were replaced by Cordova
-     *
-     * @return object
-     */
-    getOriginalHandlers: function() {
-        return {'document': {'addEventListener': m_document_addEventListener, 'removeEventListener': m_document_removeEventListener},
-        'window': {'addEventListener': m_window_addEventListener, 'removeEventListener': m_window_removeEventListener}};
-    },
-    /**
-     * Method to fire event from native code
-     * bNoDetach is required for events which cause an exception which needs to be caught in native code
-     */
-    fireDocumentEvent: function(type, data, bNoDetach) {
-        var evt = createEvent(type, data);
-        if (typeof documentEventHandlers[type] != 'undefined') {
-            if( bNoDetach ) {
-              documentEventHandlers[type].fire(evt);
-            }
-            else {
-              setTimeout(function() {
-                  // Fire deviceready on listeners that were registered before cordova.js was loaded.
-                  if (type == 'deviceready') {
-                      document.dispatchEvent(evt);
-                  }
-                  documentEventHandlers[type].fire(evt);
-              }, 0);
-            }
-        } else {
-            document.dispatchEvent(evt);
-        }
-    },
-    fireWindowEvent: function(type, data) {
-        var evt = createEvent(type,data);
-        if (typeof windowEventHandlers[type] != 'undefined') {
-            setTimeout(function() {
-                windowEventHandlers[type].fire(evt);
-            }, 0);
-        } else {
-            window.dispatchEvent(evt);
-        }
-    },
-
-    /**
-     * Plugin callback mechanism.
-     */
-    // Randomize the starting callbackId to avoid collisions after refreshing or navigating.
-    // This way, it's very unlikely that any new callback would get the same callbackId as an old callback.
-    callbackId: Math.floor(Math.random() * 2000000000),
-    callbacks:  {},
-    callbackStatus: {
-        NO_RESULT: 0,
-        OK: 1,
-        CLASS_NOT_FOUND_EXCEPTION: 2,
-        ILLEGAL_ACCESS_EXCEPTION: 3,
-        INSTANTIATION_EXCEPTION: 4,
-        MALFORMED_URL_EXCEPTION: 5,
-        IO_EXCEPTION: 6,
-        INVALID_ACTION: 7,
-        JSON_EXCEPTION: 8,
-        ERROR: 9
-    },
-
-    /**
-     * Called by native code when returning successful result from an action.
-     */
-    callbackSuccess: function(callbackId, args) {
-        try {
-            cordova.callbackFromNative(callbackId, true, args.status, [args.message], args.keepCallback);
-        } catch (e) {
-            console.log("Error in error callback: " + callbackId + " = "+e);
-        }
-    },
-
-    /**
-     * Called by native code when returning error result from an action.
-     */
-    callbackError: function(callbackId, args) {
-        // TODO: Deprecate callbackSuccess and callbackError in favour of callbackFromNative.
-        // Derive success from status.
-        try {
-            cordova.callbackFromNative(callbackId, false, args.status, [args.message], args.keepCallback);
-        } catch (e) {
-            console.log("Error in error callback: " + callbackId + " = "+e);
-        }
-    },
-
-    /**
-     * Called by native code when returning the result from an action.
-     */
-    callbackFromNative: function(callbackId, success, status, args, keepCallback) {
-        var callback = cordova.callbacks[callbackId];
-        if (callback) {
-            if (success && status == cordova.callbackStatus.OK) {
-                callback.success && callback.success.apply(null, args);
-            } else if (!success) {
-                callback.fail && callback.fail.apply(null, args);
-            }
-
-            // Clear callback if not expecting any more results
-            if (!keepCallback) {
-                delete cordova.callbacks[callbackId];
-            }
-        }
-    },
-    addConstructor: function(func) {
-        channel.onCordovaReady.subscribe(function() {
-            try {
-                func();
-            } catch(e) {
-                console.log("Failed to run constructor: " + e);
-            }
-        });
-    }
-};
-
-// Register pause, resume and deviceready channels as events on document.
-channel.onPause = cordova.addDocumentEventHandler('pause');
-channel.onResume = cordova.addDocumentEventHandler('resume');
-channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready');
-
-module.exports = cordova;
-
-});
-
-// file: lib/common/argscheck.js
-define("cordova/argscheck", function(require, exports, module) {
-
-var exec = require('cordova/exec');
-var utils = require('cordova/utils');
-
-var moduleExports = module.exports;
-
-var typeMap = {
-    'A': 'Array',
-    'D': 'Date',
-    'N': 'Number',
-    'S': 'String',
-    'F': 'Function',
-    'O': 'Object'
-};
-
-function extractParamName(callee, argIndex) {
-  return (/.*?\((.*?)\)/).exec(callee)[1].split(', ')[argIndex];
-}
-
-function checkArgs(spec, functionName, args, opt_callee) {
-    if (!moduleExports.enableChecks) {
-        return;
-    }
-    var errMsg = null;
-    var typeName;
-    for (var i = 0; i < spec.length; ++i) {
-        var c = spec.charAt(i),
-            cUpper = c.toUpperCase(),
-            arg = args[i];
-        // Asterix means allow anything.
-        if (c == '*') {
-            continue;
-        }
-        typeName = utils.typeName(arg);
-        if ((arg === null || arg === undefined) && c == cUpper) {
-            continue;
-        }
-        if (typeName != typeMap[cUpper]) {
-            errMsg = 'Expected ' + typeMap[cUpper];
-            break;
-        }
-    }
-    if (errMsg) {
-        errMsg += ', but got ' + typeName + '.';
-        errMsg = 'Wrong type for parameter "' + extractParamName(opt_callee || args.callee, i) + '" of ' + functionName + ': ' + errMsg;
-        // Don't log when running jake test.
-        if (typeof jasmine == 'undefined') {
-            console.error(errMsg);
-        }
-        throw TypeError(errMsg);
-    }
-}
-
-function getValue(value, defaultValue) {
-    return value === undefined ? defaultValue : value;
-}
-
-moduleExports.checkArgs = checkArgs;
-moduleExports.getValue = getValue;
-moduleExports.enableChecks = true;
-
-
-});
-
-// file: lib/common/builder.js
-define("cordova/builder", function(require, exports, module) {
-
-var utils = require('cordova/utils');
-
-function each(objects, func, context) {
-    for (var prop in objects) {
-        if (objects.hasOwnProperty(prop)) {
-            func.apply(context, [objects[prop], prop]);
-        }
-    }
-}
-
-function clobber(obj, key, value) {
-    exports.replaceHookForTesting(obj, key);
-    obj[key] = value;
-    // Getters can only be overridden by getters.
-    if (obj[key] !== value) {
-        utils.defineGetter(obj, key, function() {
-            return value;
-        });
-    }
-}
-
-function assignOrWrapInDeprecateGetter(obj, key, value, message) {
-    if (message) {
-        utils.defineGetter(obj, key, function() {
-            console.log(message);
-            delete obj[key];
-            clobber(obj, key, value);
-            return value;
-        });
-    } else {
-        clobber(obj, key, value);
-    }
-}
-
-function include(parent, objects, clobber, merge) {
-    each(objects, function (obj, key) {
-        try {
-          var result = obj.path ? require(obj.path) : {};
-
-          if (clobber) {
-              // Clobber if it doesn't exist.
-              if (typeof parent[key] === 'undefined') {
-                  assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);
-              } else if (typeof obj.path !== 'undefined') {
-                  // If merging, merge properties onto parent, otherwise, clobber.
-                  if (merge) {
-                      recursiveMerge(parent[key], result);
-                  } else {
-                      assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);
-                  }
-              }
-              result = parent[key];
-          } else {
-            // Overwrite if not currently defined.
-            if (typeof parent[key] == 'undefined') {
-              assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);
-            } else {
-              // Set result to what already exists, so we can build children into it if they exist.
-              result = parent[key];
-            }
-          }
-
-          if (obj.children) {
-            include(result, obj.children, clobber, merge);
-          }
-        } catch(e) {
-          utils.alert('Exception building cordova JS globals: ' + e + ' for key "' + key + '"');
-        }
-    });
-}
-
-/**
- * Merge properties from one object onto another recursively.  Properties from
- * the src object will overwrite existing target property.
- *
- * @param target Object to merge properties into.
- * @param src Object to merge properties from.
- */
-function recursiveMerge(target, src) {
-    for (var prop in src) {
-        if (src.hasOwnProperty(prop)) {
-            if (target.prototype && target.prototype.constructor === target) {
-                // If the target object is a constructor override off prototype.
-                clobber(target.prototype, prop, src[prop]);
-            } else {
-                if (typeof src[prop] === 'object' && typeof target[prop] === 'object') {
-                    recursiveMerge(target[prop], src[prop]);
-                } else {
-                    clobber(target, prop, src[prop]);
-                }
-            }
-        }
-    }
-}
-
-exports.buildIntoButDoNotClobber = function(objects, target) {
-    include(target, objects, false, false);
-};
-exports.buildIntoAndClobber = function(objects, target) {
-    include(target, objects, true, false);
-};
-exports.buildIntoAndMerge = function(objects, target) {
-    include(target, objects, true, true);
-};
-exports.recursiveMerge = recursiveMerge;
-exports.assignOrWrapInDeprecateGetter = assignOrWrapInDeprecateGetter;
-exports.replaceHookForTesting = function() {};
-
-});
-
-// file: lib/common/channel.js
-define("cordova/channel", function(require, exports, module) {
-
-var utils = require('cordova/utils'),
-    nextGuid = 1;
-
-/**
- * Custom pub-sub "channel" that can have functions subscribed to it
- * This object is used to define and control firing of events for
- * cordova initialization, as well as for custom events thereafter.
- *
- * The order of events during page load and Cordova startup is as follows:
- *
- * onDOMContentLoaded*         Internal event that is received when the web page is loaded and parsed.
- * onNativeReady*              Internal event that indicates the Cordova native side is ready.
- * onCordovaReady*             Internal event fired when all Cordova JavaScript objects have been created.
- * onCordovaInfoReady*         Internal event fired when device properties are available.
- * onCordovaConnectionReady*   Internal event fired when the connection property has been set.
- * onDeviceReady*              User event fired to indicate that Cordova is ready
- * onResume                    User event fired to indicate a start/resume lifecycle event
- * onPause                     User event fired to indicate a pause lifecycle event
- * onDestroy*                  Internal event fired when app is being destroyed (User should use window.onunload event, not this one).
- *
- * The events marked with an * are sticky. Once they have fired, they will stay in the fired state.
- * All listeners that subscribe after the event is fired will be executed right away.
- *
- * The only Cordova events that user code should register for are:
- *      deviceready           Cordova native code is initialized and Cordova APIs can be called from JavaScript
- *      pause                 App has moved to background
- *      resume                App has returned to foreground
- *
- * Listeners can be registered as:
- *      document.addEventListener("deviceready", myDeviceReadyListener, false);
- *      document.addEventListener("resume", myResumeListener, false);
- *      document.addEventListener("pause", myPauseListener, false);
- *
- * The DOM lifecycle events should be used for saving and restoring state
- *      window.onload
- *      window.onunload
- *
- */
-
-/**
- * Channel
- * @constructor
- * @param type  String the channel name
- */
-var Channel = function(type, sticky) {
-    this.type = type;
-    // Map of guid -> function.
-    this.handlers = {};
-    // 0 = Non-sticky, 1 = Sticky non-fired, 2 = Sticky fired.
-    this.state = sticky ? 1 : 0;
-    // Used in sticky mode to remember args passed to fire().
-    this.fireArgs = null;
-    // Used by onHasSubscribersChange to know if there are any listeners.
-    this.numHandlers = 0;
-    // Function that is called when the first listener is subscribed, or when
-    // the last listener is unsubscribed.
-    this.onHasSubscribersChange = null;
-},
-    channel = {
-        /**
-         * Calls the provided function only after all of the channels specified
-         * have been fired. All channels must be sticky channels.
-         */
-        join: function(h, c) {
-            var len = c.length,
-                i = len,
-                f = function() {
-                    if (!(--i)) h();
-                };
-            for (var j=0; j<len; j++) {
-                if (c[j].state === 0) {
-                    throw Error('Can only use join with sticky channels.');
-                }
-                c[j].subscribe(f);
-            }
-            if (!len) h();
-        },
-        create: function(type) {
-            return channel[type] = new Channel(type, false);
-        },
-        createSticky: function(type) {
-            return channel[type] = new Channel(type, true);
-        },
-
-        /**
-         * cordova Channels that must fire before "deviceready" is fired.
-         */
-        deviceReadyChannelsArray: [],
-        deviceReadyChannelsMap: {},
-
-        /**
-         * Indicate that a feature needs to be initialized before it is ready to be used.
-         * This holds up Cordova's "deviceready" event until the feature has been initialized
-         * and Cordova.initComplete(feature) is called.
-         *
-         * @param feature {String}     The unique feature name
-         */
-        waitForInitialization: function(feature) {
-            if (feature) {
-                var c = channel[feature] || this.createSticky(feature);
-                this.deviceReadyChannelsMap[feature] = c;
-                this.deviceReadyChannelsArray.push(c);
-            }
-        },
-
-        /**
-         * Indicate that initialization code has completed and the feature is ready to be used.
-         *
-         * @param feature {String}     The unique feature name
-         */
-        initializationComplete: function(feature) {
-            var c = this.deviceReadyChannelsMap[feature];
-            if (c) {
-                c.fire();
-            }
-        }
-    };
-
-function forceFunction(f) {
-    if (typeof f != 'function') throw "Function required as first argument!";
-}
-
-/**
- * Subscribes the given function to the channel. Any time that
- * Channel.fire is called so too will the function.
- * Optionally specify an execution context for the function
- * and a guid that can be used to stop subscribing to the channel.
- * Returns the guid.
- */
-Channel.prototype.subscribe = function(f, c) {
-    // need a function to call
-    forceFunction(f);
-    if (this.state == 2) {
-        f.apply(c || this, this.fireArgs);
-        return;
-    }
-
-    var func = f,
-        guid = f.observer_guid;
-    if (typeof c == "object") { func = utils.close(c, f); }
-
-    if (!guid) {
-        // first time any channel has seen this subscriber
-        guid = '' + nextGuid++;
-    }
-    func.observer_guid = guid;
-    f.observer_guid = guid;
-
-    // Don't add the same handler more than once.
-    if (!this.handlers[guid]) {
-        this.handlers[guid] = func;
-        this.numHandlers++;
-        if (this.numHandlers == 1) {
-            this.onHasSubscribersChange && this.onHasSubscribersChange();
-        }
-    }
-};
-
-/**
- * Unsubscribes the function with the given guid from the channel.
- */
-Channel.prototype.unsubscribe = function(f) {
-    // need a function to unsubscribe
-    forceFunction(f);
-
-    var guid = f.observer_guid,
-        handler = this.handlers[guid];
-    if (handler) {
-        delete this.handlers[guid];
-        this.numHandlers--;
-        if (this.numHandlers === 0) {
-            this.onHasSubscribersChange && this.onHasSubscribersChange();
-        }
-    }
-};
-
-/**
- * Calls all functions subscribed to this channel.
- */
-Channel.prototype.fire = function(e) {
-    var fail = false,
-        fireArgs = Array.prototype.slice.call(arguments);
-    // Apply stickiness.
-    if (this.state == 1) {
-        this.state = 2;
-        this.fireArgs = fireArgs;
-    }
-    if (this.numHandlers) {
-        // Copy the values first so that it is safe to modify it from within
-        // callbacks.
-        var toCall = [];
-        for (var item in this.handlers) {
-            toCall.push(this.handlers[item]);
-        }
-        for (var i = 0; i < toCall.length; ++i) {
-            toCall[i].apply(this, fireArgs);
-        }
-        if (this.state == 2 && this.numHandlers) {
-            this.numHandlers = 0;
-            this.handlers = {};
-            this.onHasSubscribersChange && this.onHasSubscribersChange();
-        }
-    }
-};
-
-
-// defining them here so they are ready super fast!
-// DOM event that is received when the web page is loaded and parsed.
-channel.createSticky('onDOMContentLoaded');
-
-// Event to indicate the Cordova native side is ready.
-channel.createSticky('onNativeReady');
-
-// Event to indicate that all Cordova JavaScript objects have been created
-// and it's time to run plugin constructors.
-channel.createSticky('onCordovaReady');
-
-// Event to indicate that device properties are available
-channel.createSticky('onCordovaInfoReady');
-
-// Event to indicate that the connection property has been set.
-channel.createSticky('onCordovaConnectionReady');
-
-// Event to indicate that all automatically loaded JS plugins are loaded and ready.
-channel.createSticky('onPluginsReady');
-
-// Event to indicate that Cordova is ready
-channel.createSticky('onDeviceReady');
-
-// Event to indicate a resume lifecycle event
-channel.create('onResume');
-
-// Event to indicate a pause lifecycle event
-channel.create('onPause');
-
-// Event to indicate a destroy lifecycle event
-channel.createSticky('onDestroy');
-
-// Channels that must fire before "deviceready" is fired.
-channel.waitForInitialization('onCordovaReady');
-channel.waitForInitialization('onCordovaConnectionReady');
-channel.waitForInitialization('onDOMContentLoaded');
-
-module.exports = channel;
-
-});
-
-// file: lib/common/commandProxy.js
-define("cordova/commandProxy", function(require, exports, module) {
-
-
-// internal map of proxy function
-var CommandProxyMap = {};
-
-module.exports = {
-
-    // example: cordova.commandProxy.add("Accelerometer",{getCurrentAcceleration: function(successCallback, errorCallback, options) {...},...);
-    add:function(id,proxyObj) {
-        console.log("adding proxy for " + id);
-        CommandProxyMap[id] = proxyObj;
-        return proxyObj;
-    },
-
-    // cordova.commandProxy.remove("Accelerometer");
-    remove:function(id) {
-        var proxy = CommandProxyMap[id];
-        delete CommandProxyMap[id];
-        CommandProxyMap[id] = null;
-        return proxy;
-    },
-
-    get:function(service,action) {
-        return ( CommandProxyMap[service] ? CommandProxyMap[service][action] : null );
-    }
-};
-});
-
-// file: lib/blackberry/exec.js
-define("cordova/exec", function(require, exports, module) {
-
-var cordova = require('cordova'),
-    platform = require('cordova/platform'),
-    utils = require('cordova/utils');
-
-/**
- * Execute a cordova command.  It is up to the native side whether this action
- * is synchronous or asynchronous.  The native side can return:
- *      Synchronous: PluginResult object as a JSON string
- *      Asynchronous: Empty string ""
- * If async, the native side will cordova.callbackSuccess or cordova.callbackError,
- * depending upon the result of the action.
- *
- * @param {Function} success    The success callback
- * @param {Function} fail       The fail callback
- * @param {String} service      The name of the service to use
- * @param {String} action       Action to be run in cordova
- * @param {String[]} [args]     Zero or more arguments to pass to the method
- */
-
-module.exports = function(success, fail, service, action, args) {
-    try {
-        var manager = require('cordova/plugin/' + platform.runtime() + '/manager'),
-            v = manager.exec(success, fail, service, action, args);
-
-        // If status is OK, then return value back to caller
-        if (v.status == cordova.callbackStatus.OK) {
-
-            // If there is a success callback, then call it now with returned value
-            if (success) {
-                try {
-                    success(v.message);
-                }
-                catch (e) {
-                    console.log("Error in success callback: "+cordova.callbackId+" = "+e);
-                }
-            }
-            return v.message;
-        } else if (v.status == cordova.callbackStatus.NO_RESULT) {
-
-        } else {
-            // If error, then display error
-            console.log("Error: Status="+v.status+" Message="+v.message);
-
-            // If there is a fail callback, then call it now with returned value
-            if (fail) {
-                try {
-                    fail(v.message);
-                }
-                catch (e) {
-                    console.log("Error in error callback: "+cordova.callbackId+" = "+e);
-                }
-            }
-            return null;
-        }
-    } catch (e) {
-        utils.alert("Error: "+e);
-    }
-};
-
-});
-
-// file: lib/common/modulemapper.js
-define("cordova/modulemapper", function(require, exports, module) {
-
-var builder = require('cordova/builder'),
-    moduleMap = define.moduleMap,
-    symbolList,
-    deprecationMap;
-
-exports.reset = function() {
-    symbolList = [];
-    deprecationMap = {};
-};
-
-function addEntry(strategy, moduleName, symbolPath, opt_deprecationMessage) {
-    if (!(moduleName in moduleMap)) {
-        throw new Error('Module ' + moduleName + ' does not exist.');
-    }
-    symbolList.push(strategy, moduleName, symbolPath);
-    if (opt_deprecationMessage) {
-        deprecationMap[symbolPath] = opt_deprecationMessage;
-    }
-}
-
-// Note: Android 2.3 does have Function.bind().
-exports.clobbers = function(moduleName, symbolPath, opt_deprecationMessage) {
-    addEntry('c', moduleName, symbolPath, opt_deprecationMessage);
-};
-
-exports.merges = function(moduleName, symbolPath, opt_deprecationMessage) {
-    addEntry('m', moduleName, symbolPath, opt_deprecationMessage);
-};
-
-exports.defaults = function(moduleName, symbolPath, opt_deprecationMessage) {
-    addEntry('d', moduleName, symbolPath, opt_deprecationMessage);
-};
-
-function prepareNamespace(symbolPath, context) {
-    if (!symbolPath) {
-        return context;
-    }
-    var parts = symbolPath.split('.');
-    var cur = context;
-    for (var i = 0, part; part = parts[i]; ++i) {
-        cur = cur[part] = cur[part] || {};
-    }
-    return cur;
-}
-
-exports.mapModules = function(context) {
-    var origSymbols = {};
-    context.CDV_origSymbols = origSymbols;
-    for (var i = 0, len = symbolList.length; i < len; i += 3) {
-        var strategy = symbolList[i];
-        var moduleName = symbolList[i + 1];
-        var symbolPath = symbolList[i + 2];
-        var lastDot = symbolPath.lastIndexOf('.');
-        var namespace = symbolPath.substr(0, lastDot);
-        var lastName = symbolPath.substr(lastDot + 1);
-
-        var module = require(moduleName);
-        var deprecationMsg = symbolPath in deprecationMap ? 'Access made to deprecated symbol: ' + symbolPath + '. ' + deprecationMsg : null;
-        var parentObj = prepareNamespace(namespace, context);
-        var target = parentObj[lastName];
-
-        if (strategy == 'm' && target) {
-            builder.recursiveMerge(target, module);
-        } else if ((strategy == 'd' && !target) || (strategy != 'd')) {
-            if (!(symbolPath in origSymbols)) {
-                origSymbols[symbolPath] = target;
-            }
-            builder.assignOrWrapInDeprecateGetter(parentObj, lastName, module, deprecationMsg);
-        }
-    }
-};
-
-exports.getOriginalSymbol = function(context, symbolPath) {
-    var origSymbols = context.CDV_origSymbols;
-    if (origSymbols && (symbolPath in origSymbols)) {
-        return origSymbols[symbolPath];
-    }
-    var parts = symbolPath.split('.');
-    var obj = context;
-    for (var i = 0; i < parts.length; ++i) {
-        obj = obj && obj[parts[i]];
-    }
-    return obj;
-};
-
-exports.loadMatchingModules = function(matchingRegExp) {
-    for (var k in moduleMap) {
-        if (matchingRegExp.exec(k)) {
-            require(k);
-        }
-    }
-};
-
-exports.reset();
-
-
-});
-
-// file: lib/blackberry/platform.js
-define("cordova/platform", function(require, exports, module) {
-
-module.exports = {
-    id: "blackberry",
-    runtime: function () {
-        if (navigator.userAgent.indexOf("PlayBook") > -1) {
-            return 'air';
-        }
-        else if (navigator.userAgent.indexOf("BlackBerry") > -1) {
-            return 'java';
-        }
-        else {
-            console.log("Unknown user agent?!?!? defaulting to java");
-            return 'java';
-        }
-    },
-    initialize: function() {
-        var modulemapper = require('cordova/modulemapper'),
-            platform = require('cordova/plugin/' + this.runtime() + '/platform');
-
-        modulemapper.loadMatchingModules(/cordova.*\/symbols$/);
-        modulemapper.loadMatchingModules(new RegExp('cordova/.*' + this.runtime() + '/.*bbsymbols$'));
-        modulemapper.mapModules(this.contextObj);
-
-        platform.initialize();
-    },
-    contextObj: this // Used for testing.
-};
-
-});
-
-// file: lib/common/plugin/Acceleration.js
-define("cordova/plugin/Acceleration", function(require, exports, module) {
-
-var Acceleration = function(x, y, z, timestamp) {
-    this.x = x;
-    this.y = y;
-    this.z = z;
-    this.timestamp = timestamp || (new Date()).getTime();
-};
-
-module.exports = Acceleration;
-
-});
-
-// file: lib/common/plugin/Camera.js
-define("cordova/plugin/Camera", function(require, exports, module) {
-
-var argscheck = require('cordova/argscheck'),
-    exec = require('cordova/exec'),
-    Camera = require('cordova/plugin/CameraConstants'),
-    CameraPopoverHandle = require('cordova/plugin/CameraPopoverHandle');
-
-var cameraExport = {};
-
-// Tack on the Camera Constants to the base camera plugin.
-for (var key in Camera) {
-    cameraExport[key] = Camera[key];
-}
-
-/**
- * Gets a picture from source defined by "options.sourceType", and returns the
- * image as defined by the "options.destinationType" option.
-
- * The defaults are sourceType=CAMERA and destinationType=FILE_URI.
- *
- * @param {Function} successCallback
- * @param {Function} errorCallback
- * @param {Object} options
- */
-cameraExport.getPicture = function(successCallback, errorCallback, options) {
-    argscheck.checkArgs('fFO', 'Camera.getPicture', arguments);
-    options = options || {};
-    var getValue = argscheck.getValue;
-
-    var quality = getValue(options.quality, 50);
-    var destinationType = getValue(options.destinationType, Camera.DestinationType.FILE_URI);
-    var sourceType = getValue(options.sourceType, Camera.PictureSourceType.CAMERA);
-    var targetWidth = getValue(options.targetWidth, -1);
-    var targetHeight = getValue(options.targetHeight, -1);
-    var encodingType = getValue(options.encodingType, Camera.EncodingType.JPEG);
-    var mediaType = getValue(options.mediaType, Camera.MediaType.PICTURE);
-    var allowEdit = !!options.allowEdit;
-    var correctOrientation = !!options.correctOrientation;
-    var saveToPhotoAlbum = !!options.saveToPhotoAlbum;
-    var popoverOptions = getValue(options.popoverOptions, null);
-    var cameraDirection = getValue(options.cameraDirection, Camera.Direction.BACK);
-
-    var args = [quality, destinationType, sourceType, targetWidth, targetHeight, encodingType,
-                mediaType, allowEdit, correctOrientation, saveToPhotoAlbum, popoverOptions, cameraDirection];
-
-    exec(successCallback, errorCallback, "Camera", "takePicture", args);
-    return new CameraPopoverHandle();
-};
-
-cameraExport.cleanup = function(successCallback, errorCallback) {
-    exec(successCallback, errorCallback, "Camera", "cleanup", []);
-};
-
-module.exports = cameraExport;
-
-});
-
-// file: lib/common/plugin/CameraConstants.js
-define("cordova/plugin/CameraConstants", function(require, exports, module) {
-
-module.exports = {
-  DestinationType:{
-    DATA_URL: 0,         // Return base64 encoded string
-    FILE_URI: 1,         // Return file uri (content://media/external/images/media/2 for Android)
-    NATIVE_URI: 2        // Return native uri (eg. asset-library://... for iOS)
-  },
-  EncodingType:{
-    JPEG: 0,             // Return JPEG encoded image
-    PNG: 1               // Return PNG encoded image
-  },
-  MediaType:{
-    PICTURE: 0,          // allow selection of still pictures only. DEFAULT. Will return format specified via DestinationType
-    VIDEO: 1,            // allow selection of video only, ONLY RETURNS URL
-    ALLMEDIA : 2         // allow selection from all media types
-  },
-  PictureSourceType:{
-    PHOTOLIBRARY : 0,    // Choose image from picture library (same as SAVEDPHOTOALBUM for Android)
-    CAMERA : 1,          // Take picture from camera
-    SAVEDPHOTOALBUM : 2  // Choose image from picture library (same as PHOTOLIBRARY for Android)
-  },
-  PopoverArrowDirection:{
-      ARROW_UP : 1,        // matches iOS UIPopoverArrowDirection constants to specify arrow location on popover
-      ARROW_DOWN : 2,
-      ARROW_LEFT : 4,
-      ARROW_RIGHT : 8,
-      ARROW_ANY : 15
-  },
-  Direction:{
-      BACK: 0,
-      FRONT: 1
-  }
-};
-
-});
-
-// file: lib/common/plugin/CameraPopoverHandle.js
-define("cordova/plugin/CameraPopoverHandle", function(require, exports, module) {
-
-var exec = require('cordova/exec');
-
-/**
- * A handle to an image picker popover.
- */
-var CameraPopoverHandle = function() {
-    this.setPosition = function(popoverOptions) {
-        console.log('CameraPopoverHandle.setPosition is only supported on iOS.');
-    };
-};
-
-module.exports = CameraPopoverHandle;
-
-});
-
-// file: lib/common/plugin/CameraPopoverOptions.js
-define("cordova/plugin/CameraPopoverOptions", function(require, exports, module) {
-
-var Camera = require('cordova/plugin/CameraConstants');
-
-/**
- * Encapsulates options for iOS Popover image picker
- */
-var CameraPopoverOptions = function(x,y,width,height,arrowDir){
-    // information of rectangle that popover should be anchored to
-    this.x = x || 0;
-    this.y = y || 32;
-    this.width = width || 320;
-    this.height = height || 480;
-    // The direction of the popover arrow
-    this.arrowDir = arrowDir || Camera.PopoverArrowDirection.ARROW_ANY;
-};
-
-module.exports = CameraPopoverOptions;
-
-});
-
-// file: lib/common/plugin/CaptureAudioOptions.js
-define("cordova/plugin/CaptureAudioOptions", function(require, exports, module) {
-
-/**
- * Encapsulates all audio capture operation configuration options.
- */
-var CaptureAudioOptions = function(){
-    // Upper limit of sound clips user can record. Value must be equal or greater than 1.
-    this.limit = 1;
-    // Maximum duration of a single sound clip in seconds.
-    this.duration = 0;
-};
-
-module.exports = CaptureAudioOptions;
-
-});
-
-// file: lib/common/plugin/CaptureError.js
-define("cordova/plugin/CaptureError", function(require, exports, module) {
-
-/**
- * The CaptureError interface encapsulates all errors in the Capture API.
- */
-var CaptureError = function(c) {
-   this.code = c || null;
-};
-
-// Camera or microphone failed to capture image or sound.
-CaptureError.CAPTURE_INTERNAL_ERR = 0;
-// Camera application or audio capture application is currently serving other capture request.
-CaptureError.CAPTURE_APPLICATION_BUSY = 1;
-// Invalid use of the API (e.g. limit parameter has value less than one).
-CaptureError.CAPTURE_INVALID_ARGUMENT = 2;
-// User exited camera application or audio capture application before capturing anything.
-CaptureError.CAPTURE_NO_MEDIA_FILES = 3;
-// The requested capture operation is not supported.
-CaptureError.CAPTURE_NOT_SUPPORTED = 20;
-
-module.exports = CaptureError;
-
-});
-
-// file: lib/common/plugin/CaptureImageOptions.js
-define("cordova/plugin/CaptureImageOptions", function(require, exports, module) {
-
-/**
- * Encapsulates all image capture operation configuration options.
- */
-var CaptureImageOptions = function(){
-    // Upper limit of images user can take. Value must be equal or greater than 1.
-    this.limit = 1;
-};
-
-module.exports = CaptureImageOptions;
-
-});
-
-// file: lib/common/plugin/CaptureVideoOptions.js
-define("cordova/plugin/CaptureVideoOptions", function(require, exports, module) {
-
-/**
- * Encapsulates all video capture operation configuration options.
- */
-var CaptureVideoOptions = function(){
-    // Upper limit of videos user can record. Value must be equal or greater than 1.
-    this.limit = 1;
-    // Maximum duration of a single video clip in seconds.
-    this.duration = 0;
-};
-
-module.exports = CaptureVideoOptions;
-
-});
-
-// file: lib/common/plugin/CompassError.js
-define("cordova/plugin/CompassError", function(require, exports, module) {
-
-/**
- *  CompassError.
- *  An error code assigned by an implementation when an error has occurred
- * @constructor
- */
-var CompassError = function(err) {
-    this.code = (err !== undefined ? err : null);
-};
-
-CompassError.COMPASS_INTERNAL_ERR = 0;
-CompassError.COMPASS_NOT_SUPPORTED = 20;
-
-module.exports = CompassError;
-
-});
-
-// file: lib/common/plugin/CompassHeading.js
-define("cordova/plugin/CompassHeading", function(require, exports, module) {
-
-var CompassHeading = function(magneticHeading, trueHeading, headingAccuracy, timestamp) {
-  this.magneticHeading = magneticHeading;
-  this.trueHeading = trueHeading;
-  this.headingAccuracy = headingAccuracy;
-  this.timestamp = timestamp || new Date().getTime();
-};
-
-module.exports = CompassHeading;
-
-});
-
-// file: lib/common/plugin/ConfigurationData.js
-define("cordova/plugin/ConfigurationData", function(require, exports, module) {
-
-/**
- * Encapsulates a set of parameters that the capture device supports.
- */
-function ConfigurationData() {
-    // The ASCII-encoded string in lower case representing the media type.
-    this.type = null;
-    // The height attribute represents height of the image or video in pixels.
-    // In the case of a sound clip this attribute has value 0.
-    this.height = 0;
-    // The width attribute represents width of the image or video in pixels.
-    // In the case of a sound clip this attribute has value 0
-    this.width = 0;
-}
-
-module.exports = ConfigurationData;
-
-});
-
-// file: lib/common/plugin/Connection.js
-define("cordova/plugin/Connection", function(require, exports, module) {
-
-/**
- * Network status
- */
-module.exports = {
-        UNKNOWN: "unknown",
-        ETHERNET: "ethernet",
-        WIFI: "wifi",
-        CELL_2G: "2g",
-        CELL_3G: "3g",
-        CELL_4G: "4g",
-        CELL:"cellular",
-        NONE: "none"
-};
-
-});
-
-// file: lib/common/plugin/Contact.js
-define("cordova/plugin/Contact", function(require, exports, module) {
-
-var argscheck = require('cordova/argscheck'),
-    exec = require('cordova/exec'),
-    ContactError = require('cordova/plugin/ContactError'),
-    utils = require('cordova/utils');
-
-/**
-* Converts primitives into Complex Object
-* Currently only used for Date fields
-*/
-function convertIn(contact) {
-    var value = contact.birthday;
-    try {
-      contact.birthday = new Date(parseFloat(value));
-    } catch (exception){
-      console.log("Cordova Contact convertIn error: exception creating date.");
-    }
-    return contact;
-}
-
-/**
-* Converts Complex objects into primitives
-* Only conversion at present is for Dates.
-**/
-
-function convertOut(contact) {
-    var value = contact.birthday;
-    if (value !== null) {
-        // try to make it a Date object if it is not already
-        if (!utils.isDate(value)){
-            try {
-                value = new Date(value);
-            } catch(exception){
-                value = null;
-            }
-        }
-        if (utils.isDate(value)){
-            value = value.valueOf(); // convert to milliseconds
-        }
-        contact.birthday = value;
-    }
-    return contact;
-}
-
-/**
-* Contains information about a single contact.
-* @constructor
-* @param {DOMString} id unique identifier
-* @param {DOMString} displayName
-* @param {ContactName} name
-* @param {DOMString} nickname
-* @param {Array.<ContactField>} phoneNumbers array of phone numbers
-* @param {Array.<ContactField>} emails array of email addresses
-* @param {Array.<ContactAddress>} addresses array of addresses
-* @param {Array.<ContactField>} ims instant messaging user ids
-* @param {Array.<ContactOrganization>} organizations
-* @param {DOMString} birthday contact's birthday
-* @param {DOMString} note user notes about contact
-* @param {Array.<ContactField>} photos
-* @param {Array.<ContactField>} categories
-* @param {Array.<ContactField>} urls contact's web sites
-*/
-var Contact = function (id, displayName, name, nickname, phoneNumbers, emails, addresses,
-    ims, organizations, birthday, note, photos, categories, urls) {
-    this.id = id || null;
-    this.rawId = null;
-    this.displayName = displayName || null;
-    this.name = name || null; // ContactName
-    this.nickname = nickname || null;
-    this.phoneNumbers = phoneNumbers || null; // ContactField[]
-    this.emails = emails || null; // ContactField[]
-    this.addresses = addresses || null; // ContactAddress[]
-    this.ims = ims || null; // ContactField[]
-    this.organizations = organizations || null; // ContactOrganization[]
-    this.birthday = birthday || null;
-    this.note = note || null;
-    this.photos = photos || null; // ContactField[]
-    this.categories = categories || null; // ContactField[]
-    this.urls = urls || null; // ContactField[]
-};
-
-/**
-* Removes contact from device storage.
-* @param successCB success callback
-* @param errorCB error callback
-*/
-Contact.prototype.remove = function(successCB, errorCB) {
-    argscheck.checkArgs('FF', 'Contact.remove', arguments);
-    var fail = errorCB && function(code) {
-        errorCB(new ContactError(code));
-    };
-    if (this.id === null) {
-        fail(ContactError.UNKNOWN_ERROR);
-    }
-    else {
-        exec(successCB, fail, "Contacts", "remove", [this.id]);
-    }
-};
-
-/**
-* Creates a deep copy of this Contact.
-* With the contact ID set to null.
-* @return copy of this Contact
-*/
-Contact.prototype.clone = function() {
-    var clonedContact = utils.clone(this);
-    clonedContact.id = null;
-    clonedContact.rawId = null;
-
-    function nullIds(arr) {
-        if (arr) {
-            for (var i = 0; i < arr.length; ++i) {
-                arr[i].id = null;
-            }
-        }
-    }
-
-    // Loop through and clear out any id's in phones, emails, etc.
-    nullIds(clonedContact.phoneNumbers);
-    nullIds(clonedContact.emails);
-    nullIds(clonedContact.addresses);
-    nullIds(clonedContact.ims);
-    nullIds(clonedContact.organizations);
-    nullIds(clonedContact.categories);
-    nullIds(clonedContact.photos);
-    nullIds(clonedContact.urls);
-    return clonedContact;
-};
-
-/**
-* Persists contact to device storage.
-* @param successCB success callback
-* @param errorCB error callback
-*/
-Contact.prototype.save = function(successCB, errorCB) {
-    argscheck.checkArgs('FFO', 'Contact.save', arguments);
-    var fail = errorCB && function(code) {
-        errorCB(new ContactError(code));
-    };
-    var success = function(result) {
-        if (result) {
-            if (successCB) {
-                var fullContact = require('cordova/plugin/contacts').create(result);
-                successCB(convertIn(fullContact));
-            }
-        }
-        else {
-            // no Entry object returned
-            fail(ContactError.UNKNOWN_ERROR);
-        }
-    };
-    var dupContact = convertOut(utils.clone(this));
-    exec(success, fail, "Contacts", "save", [dupContact]);
-};
-
-
-module.exports = Contact;
-
-});
-
-// file: lib/common/plugin/ContactAddress.js
-define("cordova/plugin/ContactAddress", function(require, exports, module) {
-
-/**
-* Contact address.
-* @constructor
-* @param {DOMString} id unique identifier, should only be set by native code
-* @param formatted // NOTE: not a W3C standard
-* @param streetAddress
-* @param locality
-* @param region
-* @param postalCode
-* @param country
-*/
-
-var ContactAddress = function(pref, type, formatted, streetAddress, locality, region, postalCode, country) {
-    this.id = null;
-    this.pref = (typeof pref != 'undefined' ? pref : false);
-    this.type = type || null;
-    this.formatted = formatted || null;
-    this.streetAddress = streetAddress || null;
-    this.locality = locality || null;
-    this.region = region || null;
-    this.postalCode = postalCode || null;
-    this.country = country || null;
-};
-
-module.exports = ContactAddress;
-
-});
-
-// file: lib/common/plugin/ContactError.js
-define("cordova/plugin/ContactError", function(require, exports, module) {
-
-/**
- *  ContactError.
- *  An error code assigned by an implementation when an error has occurred
- * @constructor
- */
-var ContactError = function(err) {
-    this.code = (typeof err != 'undefined' ? err : null);
-};
-
-/**
- * Error codes
- */
-ContactError.UNKNOWN_ERROR = 0;
-ContactError.INVALID_ARGUMENT_ERROR = 1;
-ContactError.TIMEOUT_ERROR = 2;
-ContactError.PENDING_OPERATION_ERROR = 3;
-ContactError.IO_ERROR = 4;
-ContactError.NOT_SUPPORTED_ERROR = 5;
-ContactError.PERMISSION_DENIED_ERROR = 20;
-
-module.exports = ContactError;
-
-});
-
-// file: lib/common/plugin/ContactField.js
-define("cordova/plugin/ContactField", function(require, exports, module) {
-
-/**
-* Generic contact field.
-* @constructor
-* @param {DOMString} id unique identifier, should only be set by native code // NOTE: not a W3C standard
-* @param type
-* @param value
-* @param pref
-*/
-var ContactField = function(type, value, pref) {
-    this.id = null;
-    this.type = (type && type.toString()) || null;
-    this.value = (value && value.toString()) || null;
-    this.pref = (typeof pref != 'undefined' ? pref : false);
-};
-
-module.exports = ContactField;
-
-});
-
-// file: lib/common/plugin/ContactFindOptions.js
-define("cordova/plugin/ContactFindOptions", function(require, exports, module) {
-
-/**
- * ContactFindOptions.
- * @constructor
- * @param filter used to match contacts against
- * @param multiple boolean used to determine if more than one contact should be returned
- */
-
-var ContactFindOptions = function(filter, multiple) {
-    this.filter = filter || '';
-    this.multiple = (typeof multiple != 'undefined' ? multiple : false);
-};
-
-module.exports = ContactFindOptions;
-
-});
-
-// file: lib/common/plugin/ContactName.js
-define("cordova/plugin/ContactName", function(require, exports, module) {
-
-/**
-* Contact name.
-* @constructor
-* @param formatted // NOTE: not part of W3C standard
-* @param familyName
-* @param givenName
-* @param middle
-* @param prefix
-* @param suffix
-*/
-var ContactName = function(formatted, familyName, givenName, middle, prefix, suffix) {
-    this.formatted = formatted || null;
-    this.familyName = familyName || null;
-    this.givenName = givenName || null;
-    this.middleName = middle || null;
-    this.honorificPrefix = prefix || null;
-    this.honorificSuffix = suffix || null;
-};
-
-module.exports = ContactName;
-
-});
-
-// file: lib/common/plugin/ContactOrganization.js
-define("cordova/plugin/ContactOrganization", function(require, exports, module) {
-
-/**
-* Contact organization.
-* @constructor
-* @param {DOMString} id unique identifier, should only be set by native code // NOTE: not a W3C standard
-* @param name
-* @param dept
-* @param title
-* @param startDate
-* @param endDate
-* @param location
-* @param desc
-*/
-
-var ContactOrganization = function(pref, type, name, dept, title) {
-    this.id = null;
-    this.pref = (typeof pref != 'undefined' ? pref : false);
-    this.type = type || null;
-    this.name = name || null;
-    this.department = dept || null;
-    this.title = title || null;
-};
-
-module.exports = ContactOrganization;
-
-});
-
-// file: lib/common/plugin/Coordinates.js
-define("cordova/plugin/Coordinates", function(require, exports, module) {
-
-/**
- * This class contains position information.
- * @param {Object} lat
- * @param {Object} lng
- * @param {Object} alt
- * @param {Object} acc
- * @param {Object} head
- * @param {Object} vel
- * @param {Object} altacc
- * @constructor
- */
-var Coordinates = function(lat, lng, alt, acc, head, vel, altacc) {
-    /**
-     * The latitude of the position.
-     */
-    this.latitude = lat;
-    /**
-     * The longitude of the position,
-     */
-    this.longitude = lng;
-    /**
-     * The accuracy of the position.
-     */
-    this.accuracy = acc;
-    /**
-     * The altitude of the position.
-     */
-    this.altitude = (alt !== undefined ? alt : null);
-    /**
-     * The direction the device is moving at the position.
-     */
-    this.heading = (head !== undefined ? head : null);
-    /**
-     * The velocity with which the device is moving at the position.
-     */
-    this.speed = (vel !== undefined ? vel : null);
-
-    if (this.speed === 0 || this.speed === null) {
-        this.heading = NaN;
-    }
-
-    /**
-     * The altitude accuracy of the position.
-     */
-    this.altitudeAccuracy = (altacc !== undefined) ? altacc : null;
-};
-
-module.exports = Coordinates;
-
-});
-
-// file: lib/common/plugin/DirectoryEntry.js
-define("cordova/plugin/DirectoryEntry", function(require, exports, module) {
-
-var argscheck = require('cordova/argscheck'),
-    utils = require('cordova/utils'),
-    exec = require('cordova/exec'),
-    Entry = require('cordova/plugin/Entry'),
-    FileError = require('cordova/plugin/FileError'),
-    DirectoryReader = require('cordova/plugin/DirectoryReader');
-
-/**
- * An interface representing a directory on the file system.
- *
- * {boolean} isFile always false (readonly)
- * {boolean} isDirectory always true (readonly)
- * {DOMString} name of the directory, excluding the path leading to it (readonly)
- * {DOMString} fullPath the absolute full path to the directory (readonly)
- * TODO: implement this!!! {FileSystem} filesystem on which the directory resides (readonly)
- */
-var DirectoryEntry = function(name, fullPath) {
-     DirectoryEntry.__super__.constructor.call(this, false, true, name, fullPath);
-};
-
-utils.extend(DirectoryEntry, Entry);
-
-/**
- * Creates a new DirectoryReader to read entries from this directory
- */
-DirectoryEntry.prototype.createReader = function() {
-    return new DirectoryReader(this.fullPath);
-};
-
-/**
- * Creates or looks up a directory
- *
- * @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a directory
- * @param {Flags} options to create or exclusively create the directory
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.getDirectory = function(path, options, successCallback, errorCallback) {
-    argscheck.checkArgs('sOFF', 'DirectoryEntry.getDirectory', arguments);
-    var win = successCallback && function(result) {
-        var entry = new DirectoryEntry(result.name, result.fullPath);
-        successCallback(entry);
-    };
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(win, fail, "File", "getDirectory", [this.fullPath, path, options]);
-};
-
-/**
- * Deletes a directory and all of it's contents
- *
- * @param {Function} successCallback is called with no parameters
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.removeRecursively = function(successCallback, errorCallback) {
-    argscheck.checkArgs('FF', 'DirectoryEntry.removeRecursively', arguments);
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(successCallback, fail, "File", "removeRecursively", [this.fullPath]);
-};
-
-/**
- * Creates or looks up a file
- *
- * @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a file
- * @param {Flags} options to create or exclusively create the file
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.getFile = function(path, options, successCallback, errorCallback) {
-    argscheck.checkArgs('sOFF', 'DirectoryEntry.getFile', arguments);
-    var win = successCallback && function(result) {
-        var FileEntry = require('cordova/plugin/FileEntry');
-        var entry = new FileEntry(result.name, result.fullPath);
-        successCallback(entry);
-    };
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(win, fail, "File", "getFile", [this.fullPath, path, options]);
-};
-
-module.exports = DirectoryEntry;
-
-});
-
-// file: lib/common/plugin/DirectoryReader.js
-define("cordova/plugin/DirectoryReader", function(require, exports, module) {
-
-var exec = require('cordova/exec'),
-    FileError = require('cordova/plugin/FileError') ;
-
-/**
- * An interface that lists the files and directories in a directory.
- */
-function DirectoryReader(path) {
-    this.path = path || null;
-}
-
-/**
- * Returns a list of entries from a directory.
- *
- * @param {Function} successCallback is called with a list of entries
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryReader.prototype.readEntries = function(successCallback, errorCallback) {
-    var win = typeof successCallback !== 'function' ? null : function(result) {
-        var retVal = [];
-        for (var i=0; i<result.length; i++) {
-            var entry = null;
-            if (result[i].isDirectory) {
-                entry = new (require('cordova/plugin/DirectoryEntry'))();
-            }
-            else if (result[i].isFile) {
-                entry = new (require('cordova/plugin/FileEntry'))();
-            }
-            entry.isDirectory = result[i].isDirectory;
-            entry.isFile = result[i].isFile;
-            entry.name = result[i].name;
-            entry.fullPath = result[i].fullPath;
-            retVal.push(entry);
-        }
-        successCallback(retVal);
-    };
-    var fail = typeof errorCallback !== 'function' ? null : function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(win, fail, "File", "readEntries", [this.path]);
-};
-
-module.exports = DirectoryReader;
-
-});
-
-// file: lib/common/plugin/Entry.js
-define("cordova/plugin/Entry", function(require, exports, module) {
-
-var argscheck = require('cordova/argscheck'),
-    exec = require('cordova/exec'),
-    FileError = require('cordova/plugin/FileError'),
-    Metadata = require('cordova/plugin/Metadata');
-
-/**
- * Represents a file or directory on the local file system.
- *
- * @param isFile
- *            {boolean} true if Entry is a file (readonly)
- * @param isDirectory
- *            {boolean} true if Entry is a directory (readonly)
- * @param name
- *            {DOMString} name of the file or directory, excluding the path
- *            leading to it (readonly)
- * @param fullPath
- *            {DOMString} the absolute full path to the file or directory
- *            (readonly)
- */
-function Entry(isFile, isDirectory, name, fullPath, fileSystem) {
-    this.isFile = !!isFile;
-    this.isDirectory = !!isDirectory;
-    this.name = name || '';
-    this.fullPath = fullPath || '';
-    this.filesystem = fileSystem || null;
-}
-
-/**
- * Look up the metadata of the entry.
- *
- * @param successCallback
- *            {Function} is called with a Metadata object
- * @param errorCallback
- *            {Function} is called with a FileError
- */
-Entry.prototype.getMetadata = function(successCallback, errorCallback) {
-    argscheck.checkArgs('FF', 'Entry.getMetadata', arguments);
-    var success = successCallback && function(lastModified) {
-        var metadata = new Metadata(lastModified);
-        successCallback(metadata);
-    };
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-
-    exec(success, fail, "File", "getMetadata", [this.fullPath]);
-};
-
-/**
- * Set the metadata of the entry.
- *
- * @param successCallback
- *            {Function} is called with a Metadata object
- * @param errorCallback
- *            {Function} is called with a FileError
- * @param metadataObject
- *            {Object} keys and values to set
- */
-Entry.prototype.setMetadata = function(successCallback, errorCallback, metadataObject) {
-    argscheck.checkArgs('FFO', 'Entry.setMetadata', arguments);
-    exec(successCallback, errorCallback, "File", "setMetadata", [this.fullPath, metadataObject]);
-};
-
-/**
- * Move a file or directory to a new location.
- *
- * @param parent
- *            {DirectoryEntry} the directory to which to move this entry
- * @param newName
- *            {DOMString} new name of the entry, defaults to the current name
- * @param successCallback
- *            {Function} called with the new DirectoryEntry object
- * @param errorCallback
- *            {Function} called with a FileError
- */
-Entry.prototype.moveTo = function(parent, newName, successCallback, errorCallback) {
-    argscheck.checkArgs('oSFF', 'Entry.moveTo', arguments);
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    // source path
-    var srcPath = this.fullPath,
-        // entry name
-        name = newName || this.name,
-        success = function(entry) {
-            if (entry) {
-                if (successCallback) {
-                    // create appropriate Entry object
-                    var result = (entry.isDirectory) ? new (require('cordova/plugin/DirectoryEntry'))(entry.name, entry.fullPath) : new (require('cordova/plugin/FileEntry'))(entry.name, entry.fullPath);
-                    successCallback(result);
-                }
-            }
-            else {
-                // no Entry object returned
-                fail && fail(FileError.NOT_FOUND_ERR);
-            }
-        };
-
-    // copy
-    exec(success, fail, "File", "moveTo", [srcPath, parent.fullPath, name]);
-};
-
-/**
- * Copy a directory to a different location.
- *
- * @param parent
- *            {DirectoryEntry} the directory to which to copy the entry
- * @param newName
- *            {DOMString} new name of the entry, defaults to the current name
- * @param successCallback
- *            {Function} called with the new Entry object
- * @param errorCallback
- *            {Function} called with a FileError
- */
-Entry.prototype.copyTo = function(parent, newName, successCallback, errorCallback) {
-    argscheck.checkArgs('oSFF', 'Entry.copyTo', arguments);
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-
-        // source path
-    var srcPath = this.fullPath,
-        // entry name
-        name = newName || this.name,
-        // success callback
-        success = function(entry) {
-            if (entry) {
-                if (successCallback) {
-                    // create appropriate Entry object
-                    var result = (entry.isDirectory) ? new (require('cordova/plugin/DirectoryEntry'))(entry.name, entry.fullPath) : new (require('cordova/plugin/FileEntry'))(entry.name, entry.fullPath);
-                    successCallback(result);
-                }
-            }
-            else {
-                // no Entry object returned
-                fail && fail(FileError.NOT_FOUND_ERR);
-            }
-        };
-
-    // copy
-    exec(success, fail, "File", "copyTo", [srcPath, parent.fullPath, name]);
-};
-
-/**
- * Return a URL that can be used to identify this entry.
- */
-Entry.prototype.toURL = function() {
-    // fullPath attribute contains the full URL
-    return this.fullPath;
-};
-
-/**
- * Returns a URI that can be used to identify this entry.
- *
- * @param {DOMString} mimeType for a FileEntry, the mime type to be used to interpret the file, when loaded through this URI.
- * @return uri
- */
-Entry.prototype.toURI = function(mimeType) {
-    console.log("DEPRECATED: Update your code to use 'toURL'");
-    // fullPath attribute contains the full URI
-    return this.toURL();
-};
-
-/**
- * Remove a file or directory. It is an error to attempt to delete a
- * directory that is not empty. It is an error to attempt to delete a
- * root directory of a file system.
- *
- * @param successCallback {Function} called with no parameters
- * @param errorCallback {Function} called with a FileError
- */
-Entry.prototype.remove = function(successCallback, errorCallback) {
-    argscheck.checkArgs('FF', 'Entry.remove', arguments);
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(successCallback, fail, "File", "remove", [this.fullPath]);
-};
-
-/**
- * Look up the parent DirectoryEntry of this entry.
- *
- * @param successCallback {Function} called with the parent DirectoryEntry object
- * @param errorCallback {Function} called with a FileError
- */
-Entry.prototype.getParent = function(successCallback, errorCallback) {
-    argscheck.checkArgs('FF', 'Entry.getParent', arguments);
-    var win = successCallback && function(result) {
-        var DirectoryEntry = require('cordova/plugin/DirectoryEntry');
-        var entry = new DirectoryEntry(result.name, result.fullPath);
-        successCallback(entry);
-    };
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(win, fail, "File", "getParent", [this.fullPath]);
-};
-
-module.exports = Entry;
-
-});
-
-// file: lib/common/plugin/File.js
-define("cordova/plugin/File", function(require, exports, module) {
-
-/**
- * Constructor.
- * name {DOMString} name of the file, without path information
- * fullPath {DOMString} the full path of the file, including the name
- * type {DOMString} mime type
- * lastModifiedDate {Date} last modified date
- * size {Number} size of the file in bytes
- */
-
-var File = function(name, fullPath, type, lastModifiedDate, size){
-    this.name = name || '';
-    this.fullPath = fullPath || null;
-    this.type = type || null;
-    this.lastModifiedDate = lastModifiedDate || null;
-    this.size = size || 0;
-
-    // These store the absolute start and end for slicing the file.
-    this.start = 0;
-    this.end = this.size;
-};
-
-/**
- * Returns a "slice" of the file. Since Cordova Files don't contain the actual
- * content, this really returns a File with adjusted start and end.
- * Slices of slices are supported.
- * start {Number} The index at which to start the slice (inclusive).
- * end {Number} The index at which to end the slice (exclusive).
- */
-File.prototype.slice = function(start, end) {
-    var size = this.end - this.start;
-    var newStart = 0;
-    var newEnd = size;
-    if (arguments.length) {
-        if (start < 0) {
-            newStart = Math.max(size + start, 0);
-        } else {
-            newStart = Math.min(size, start);
-        }
-    }
-
-    if (arguments.length >= 2) {
-        if (end < 0) {
-            newEnd = Math.max(size + end, 0);
-        } else {
-            newEnd = Math.min(end, size);
-        }
-    }
-
-    var newFile = new File(this.name, this.fullPath, this.type, this.lastModifiedData, this.size);
-    newFile.start = this.start + newStart;
-    newFile.end = this.start + newEnd;
-    return newFile;
-};
-
-
-module.exports = File;
-
-});
-
-// file: lib/common/plugin/FileEntry.js
-define("cordova/plugin/FileEntry", function(require, exports, module) {
-
-var utils = require('cordova/utils'),
-    exec = require('cordova/exec'),
-    Entry = require('cordova/plugin/Entry'),
-    FileWriter = require('cordova/plugin/FileWriter'),
-    File = require('cordova/plugin/File'),
-    FileError = require('cordova/plugin/FileError');
-
-/**
- * An interface representing a file on the file system.
- *
- * {boolean} isFile always true (readonly)
- * {boolean} isDirectory always false (readonly)
- * {DOMString} name of the file, excluding the path leading to it (readonly)
- * {DOMString} fullPath the absolute full path to the file (readonly)
- * {FileSystem} filesystem on which the file resides (readonly)
- */
-var FileEntry = function(name, fullPath) {
-     FileEntry.__super__.constructor.apply(this, [true, false, name, fullPath]);
-};
-
-utils.extend(FileEntry, Entry);
-
-/**
- * Creates a new FileWriter associated with the file that this FileEntry represents.
- *
- * @param {Function} successCallback is called with the new FileWriter
- * @param {Function} errorCallback is called with a FileError
- */
-FileEntry.prototype.createWriter = function(successCallback, errorCallback) {
-    this.file(function(filePointer) {
-        var writer = new FileWriter(filePointer);
-
-        if (writer.fileName === null || writer.fileName === "") {
-            errorCallback && errorCallback(new FileError(FileError.INVALID_STATE_ERR));
-        } else {
-            successCallback && successCallback(writer);
-        }
-    }, errorCallback);
-};
-
-/**
- * Returns a File that represents the current state of the file that this FileEntry represents.
- *
- * @param {Function} successCallback is called with the new File object
- * @param {Function} errorCallback is called with a FileError
- */
-FileEntry.prototype.file = function(successCallback, errorCallback) {
-    var win = successCallback && function(f) {
-        var file = new File(f.name, f.fullPath, f.type, f.lastModifiedDate, f.size);
-        successCallback(file);
-    };
-    var fail = errorCallback && function(code) {
-        errorCallback(new FileError(code));
-    };
-    exec(win, fail, "File", "getFileMetadata", [this.fullPath]);
-};
-
-
-module.exports = FileEntry;
-
-});
-
-// file: lib/common/plugin/FileError.js
-define("cordova/plugin/FileError", function(require, exports, module) {
-
-/**
- * FileError
- */
-function FileError(error) {
-  this.code = error || null;
-}
-
-// File error codes
-// Found in DOMException
-FileError.NOT_FOUND_ERR = 1;
-FileError.SECURITY_ERR = 2;
-FileError.ABORT_ERR = 3;
-
-// Added by File API specification
-FileError.NOT_READABLE_ERR = 4;
-FileError.ENCODING_ERR = 5;
-FileError.NO_MODIFICATION_ALLOWED_ERR = 6;
-FileError.INVALID_STATE_ERR = 7;
-FileError.SYNTAX_ERR = 8;
-FileError.INVALID_MODIFICATION_ERR = 9;
-FileError.QUOTA_EXCEEDED_ERR = 10;
-FileError.TYPE_MISMATCH_ERR = 11;
-FileError.PATH_EXISTS_ERR = 12;
-
-module.exports = FileError;
-
-});
-
-// file: lib/common/plugin/FileReader.js
-define("cordova/plugin/FileReader", function(require, exports, module) {
-
-var exec = require('cordova/exec'),
-    modulemapper = require('cordova/modulemapper'),
-    utils = require('cordova/utils'),
-    File = require('cordova/plugin/File'),
-    FileError = require('cordova/plugin/FileError'),
-    ProgressEvent = require('cordova/plugin/ProgressEvent'),
-    origFileReader = modulemapper.getOriginalSymbol(this, 'FileReader');
-
-/**
- * This class reads the mobile device file system.
- *
- * For Android:
- *      The root directory is the root of the file system.
- *      To read from the SD card, the file name is "sdcard/my_file.txt"
- * @constructor
- */
-var FileReader = function() {
-    this._readyState = 0;
-    this._error = null;
-    this._result = null;
-    this._fileName = '';
-    this._realReader = origFileReader ? new origFileReader() : {};
-};
-
-// States
-FileReader.EMPTY = 0;
-FileReader.LOADING = 1;
-FileReader.DONE = 2;
-
-utils.defineGetter(FileReader.prototype, 'readyState', function() {
-    return this._fileName ? this._readyState : this._realReader.readyState;
-});
-
-utils.defineGetter(FileReader.prototype, 'error', function() {
-    return this._fileName ? this._error: this._realReader.error;
-});
-
-utils.defineGetter(FileReader.prototype, 'result', function() {
-    return this._fileName ? this._result: this._realReader.result;
-});
-
-function defineEvent(eventName) {
-    utils.defineGetterSetter(FileReader.prototype, eventName, function() {
-        return this._realReader[eventName] || null;
-    }, function(value) {
-        this._realReader[eventName] = value;
-    });
-}
-defineEvent('onloadstart');    // When the read starts.
-defineEvent('onprogress');     // While reading (and decoding) file or fileBlob data, and reporting partial file data (progress.loaded/progress.total)
-defineEvent('onload');         // When the read has successfully completed.
-defineEvent('onerror');        // When the read has failed (see errors).
-defineEvent('onloadend');      // When the request has completed (either in success or failure).
-defineEvent('onabort');        // When the read has been aborted. For instance, by invoking the abort() method.
-
-function initRead(reader, file) {
-    // Already loading something
-    if (reader.readyState == FileReader.LOADING) {
-      throw new FileError(FileError.INVALID_STATE_ERR);
-    }
-
-    reader._result = null;
-    reader._error = null;
-    reader._readyState = FileReader.LOADING;
-
-    if (typeof file.fullPath == 'string') {
-        reader._fileName = file.fullPath;
-    } else {
-        reader._fileName = '';
-        return true;
-    }
-
-    reader.onloadstart && reader.onloadstart(new ProgressEvent("loadstart", {target:reader}));
-}
-
-/**
- * Abort reading file.
- */
-FileReader.prototype.abort = function() {
-    if (origFileReader && !this._fileName) {
-        return this._realReader.abort();
-    }
-    this._result = null;
-
-    if (this._readyState == FileReader.DONE || this._readyState == FileReader.EMPTY) {
-      return;
-    }
-
-    this._readyState = FileReader.DONE;
-
-    // If abort callback
-    if (typeof this.onabort === 'function') {
-        this.onabort(new ProgressEvent('abort', {target:this}));
-    }
-    // If load end callback
-    if (typeof this.onloadend === 'function') {
-        this.onloadend(new ProgressEvent('loadend', {target:this}));
-    }
-};
-
-/**
- * Read text file.
- *
- * @param file          {File} File object containing file properties
- * @param encoding      [Optional] (see http://www.iana.org/assignments/character-sets)
- */
-FileReader.prototype.readAsText = function(file, encoding) {
-    if (initRead(this, file)) {
-        return this._realReader.readAsText(file, encoding);
-    }
-
-    // Default encoding is UTF-8
-    var enc = encoding ? encoding : "UTF-8";
-    var me = this;
-    var execArgs = [this._fileName, enc, file.start, file.end];
-
-    // Read file
-    exec(
-        // Success callback
-        function(r) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // Save result
-            me._result = r;
-
-            // If onload callback
-            if (typeof me.onload === "function") {
-                me.onload(new ProgressEvent("load", {target:me}));
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        },
-        // Error callback
-        function(e) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            // null result
-            me._result = null;
-
-            // Save error
-            me._error = new FileError(e);
-
-            // If onerror callback
-            if (typeof me.onerror === "function") {
-                me.onerror(new ProgressEvent("error", {target:me}));
-            }
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        }, "File", "readAsText", execArgs);
-};
-
-
-/**
- * Read file and return data as a base64 encoded data url.
- * A data url is of the form:
- *      data:[<mediatype>][;base64],<data>
- *
- * @param file          {File} File object containing file properties
- */
-FileReader.prototype.readAsDataURL = function(file) {
-    if (initRead(this, file)) {
-        return this._realReader.readAsDataURL(file);
-    }
-
-    var me = this;
-    var execArgs = [this._fileName, file.start, file.end];
-
-    // Read file
-    exec(
-        // Success callback
-        function(r) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            // Save result
-            me._result = r;
-
-            // If onload callback
-            if (typeof me.onload === "function") {
-                me.onload(new ProgressEvent("load", {target:me}));
-            }
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        },
-        // Error callback
-        function(e) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            me._result = null;
-
-            // Save error
-            me._error = new FileError(e);
-
-            // If onerror callback
-            if (typeof me.onerror === "function") {
-                me.onerror(new ProgressEvent("error", {target:me}));
-            }
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        }, "File", "readAsDataURL", execArgs);
-};
-
-/**
- * Read file and return data as a binary data.
- *
- * @param file          {File} File object containing file properties
- */
-FileReader.prototype.readAsBinaryString = function(file) {
-    if (initRead(this, file)) {
-        return this._realReader.readAsBinaryString(file);
-    }
-
-    var me = this;
-    var execArgs = [this._fileName, file.start, file.end];
-
-    // Read file
-    exec(
-        // Success callback
-        function(r) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            me._result = r;
-
-            // If onload callback
-            if (typeof me.onload === "function") {
-                me.onload(new ProgressEvent("load", {target:me}));
-            }
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        },
-        // Error callback
-        function(e) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            me._result = null;
-
-            // Save error
-            me._error = new FileError(e);
-
-            // If onerror callback
-            if (typeof me.onerror === "function") {
-                me.onerror(new ProgressEvent("error", {target:me}));
-            }
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        }, "File", "readAsBinaryString", execArgs);
-};
-
-/**
- * Read file and return data as a binary data.
- *
- * @param file          {File} File object containing file properties
- */
-FileReader.prototype.readAsArrayBuffer = function(file) {
-    if (initRead(this, file)) {
-        return this._realReader.readAsArrayBuffer(file);
-    }
-
-    var me = this;
-    var execArgs = [this._fileName, file.start, file.end];
-
-    // Read file
-    exec(
-        // Success callback
-        function(r) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            me._result = r;
-
-            // If onload callback
-            if (typeof me.onload === "function") {
-                me.onload(new ProgressEvent("load", {target:me}));
-            }
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        },
-        // Error callback
-        function(e) {
-            // If DONE (cancelled), then don't do anything
-            if (me._readyState === FileReader.DONE) {
-                return;
-            }
-
-            // DONE state
-            me._readyState = FileReader.DONE;
-
-            me._result = null;
-
-            // Save error
-            me._error = new FileError(e);
-
-            // If onerror callback
-            if (typeof me.onerror === "function") {
-                me.onerror(new ProgressEvent("error", {target:me}));
-            }
-
-            // If onloadend callback
-            if (typeof me.onloadend === "function") {
-                me.onloadend(new ProgressEvent("loadend", {target:me}));
-            }
-        }, "File", "readAsArrayBuffer", execArgs);
-};
-
-module.exports = FileReader;
-
-});
-
-// file: lib/common/plugin/FileSystem.js
-define("cordova/plugin/FileSystem", function(require, exports, module) {
-
-var DirectoryEntry = require('cordova/plugin/DirectoryEntry');
-
-/**
- * An interface representing a file system
- *
- * @constructor
- * {DOMString} name the unique name of the file system (readonly)
- * {DirectoryEntry} root directory of the file system (readonly)
- */
-var FileSystem = function(name, root) {
-    this.name = name || null;
-    if (root) {
-        this.root = new DirectoryEntry(root.name, root.fullPath);
-    }
-};
-
-module.exports = FileSystem;
-
-});
-
-// file: lib/common/plugin/FileTransfer.js
-define("cordova/plugin/FileTransfer", function(require, exports, module) {
-
-var argscheck = require('cordova/argscheck'),
-    exec = require('cordova/exec'),
-    FileTransferError = require('cordova/plugin/FileTransferError'),
-    ProgressEvent = require('cordova/plugin/ProgressEvent');
-
-function newProgressEvent(result) {
-    var pe = new ProgressEvent();
-    pe.lengthComputable = result.lengthComputable;
-    pe.loaded = result.loaded;
-    pe.total = result.total;
-    return pe;
-}
-
-function getBasicAuthHeader(urlString) {
-    var header =  null;
-
-    if (window.btoa) {
-        // parse the url using the Location object
-        var url = document.createElement('a');
-        url.href = urlString;
-
-        var credentials = null;
-        var protocol = url.protocol + "//";
-        var origin = protocol + url.host;
-
-        // check whether there are the username:password credentials in the url
-        if (url.href.indexOf(origin) !== 0) { // credentials found
-            var atIndex = url.href.indexOf("@");
-            credentials = url.href.substring(protocol.length, atIndex);
-        }
-
-        if (credentials) {
-            var authHeader = "Authorization";
-            var authHeaderValue = "Basic " + window.btoa(credentials);
-
-            header = {
-                name : authHeader,
-                value : authHeaderValue
-            };
-        }
-    }
-
-    return header;
-}
-
-var idCounter = 0;
-
-/**
- * FileTransfer uploads a file to a remote server.
- * @constructor
- */
-var FileTransfer = function() {
-    this._id = ++idCounter;
-    this.onprogress = null; // optional callback
-};
-
-/**
-* Given an absolute file path, uploads a file on the device to a remote server
-* using a multipart HTTP request.
-* @param filePath {String}           Full path of the file on the device
-* @param server {String}             URL of the server to receive the file
-* @param successCallback (Function}  Callback to be invoked when upload has completed
-* @param errorCallback {Function}    Callback to be invoked upon error
-* @param options {FileUploadOptions} Optional parameters such as file name and mimetype
-* @param trustAllHosts {Boolean} Optional trust all hosts (e.g. for self-signed certs), defaults to false
-*/
-FileTransfer.prototype.upload = function(filePath, server, successCallback, errorCallback, options, trustAllHosts) {
-    argscheck.checkArgs('ssFFO*', 'FileTransfer.upload', arguments);
-    // check for options
-    var fileKey = null;
-    var fileName = null;
-    var mimeType = null;
-    var params = null;
-    var chunkedMode = true;
-    var headers = null;
-    var httpMethod = null;
-    var basicAuthHeader = getBasicAuthHeader(server);
-    if (basicAuthHeader) {
-        options = options || {};
-        options.headers = options.headers || {};
-        options.headers[basicAuthHeader.name] = basicAuthHeader.value;
-    }
-
-    if (options) {
-        fileKey = options.fileKey;
-        fileName = options.fileName;
-        mimeType = options.mimeType;
-        headers = options.headers;
-        httpMethod = options.httpMethod || "POST";
-        if (httpMethod.toUpperCase() == "PUT"){
-            httpMethod = "PUT";
-        } else {
-            httpMethod = "POST";
-        }
-        if (options.chunkedMode !== null || typeof options.chunkedMode != "undefined") {
-            chunkedMode = options.chunkedMode;
-        }
-        if (options.params) {
-            params = options.params;
-        }
-        else {
-            params = {};
-        }
-    }
-
-    var fail = errorCallback && function(e) {
-        var error = new FileTransferError(e.code, e.source, e.target, e.http_status, e.body);
-        errorCallback(error);
-    };
-
-    var self = this;
-    var win = function(result) {
-        if (typeof result.lengthComputable != "undefined") {
-            if (self.onprogress) {
-                self.onprogress(newProgressEvent(result));
-            }
-        } else {
-            successCallback && successCallback(result);
-        }
-    };
-    exec(win, fail, 'FileTransfer', 'upload', [filePath, server, fileKey, fileName, mimeType, params, trustAllHosts, chunkedMode, headers, this._id, httpMethod]);
-};
-
-/**
- * Downloads a file form a given URL and saves it to the specified directory.
- * @param source {String}          URL of the server to receive the file
- * @param target {String}         Full path of the file on the device
- * @param successCallback (Function}  Callback to be invoked when upload has completed
- * @param errorCallback {Function}    Callback to be invoked upon error
- * @param trustAllHosts {Boolean} Optional trust all hosts (e.g. for self-signed certs), defaults to false
- * @param options {FileDownloadOptions} Optional parameters such as headers
- */
-FileTransfer.prototype.download = function(source, target, successCallback, errorCallback, trustAllHosts, options) {
-    argscheck.checkArgs('ssFF*', 'FileTransfer.download', arguments);
-    var self = this;
-
-    var basicAuthHeader = getBasicAuthHeader(source);
-    if (basicAuthHeader) {
-        options = options || {};
-        options.headers = options.headers || {};
-        options.headers[basicAuthHeader.name] = basicAuthHeader.value;
-    }
-
-    var headers = null;
-    if (options) {
-        headers = options.headers || null;
-    }
-
-    var win = function(result) {
-        if (typeof result.lengthComputable != "undefined") {
-            if (self.onprogress) {
-                return self.onprogress(newProgressEvent(result));
-            }
-        } else if (successCallback) {
-            var entry = null;
-            if (result.isDirectory) {
-                entry = new (require('cordova/plugin/DirectoryEntry'))();
-            }
-            else if (result.isFile) {
-                entry = new (require('cordova/plugin/FileEntry'))();
-            }
-            entry.isDirectory = result.isDirectory;
-            entry.isFile = result.isFile;
-            entry.name = result.name;
-            entry.fullPath = result.fullPath;
-            successCallback(entry);
-        }
-    };
-
-    var fail = errorCallback && function(e) {
-        var error = new FileTransferError(e.co

<TRUNCATED>

[02/15] CB-4228

Posted by lo...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/notification/ProgressDialog.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/notification/ProgressDialog.java b/bbos/framework/ext/src/org/apache/cordova/notification/ProgressDialog.java
deleted file mode 100644
index 842b97a..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/notification/ProgressDialog.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.notification;
-
-import org.apache.cordova.api.PluginResult;
-import org.apache.cordova.json4j.JSONArray;
-import org.apache.cordova.json4j.JSONException;
-import org.apache.cordova.ui.SpacerField;
-
-import net.rim.device.api.system.Characters;
-import net.rim.device.api.ui.UiApplication;
-import net.rim.device.api.ui.component.GaugeField;
-import net.rim.device.api.ui.component.LabelField;
-import net.rim.device.api.ui.component.SeparatorField;
-import net.rim.device.api.ui.container.PopupScreen;
-import net.rim.device.api.ui.container.VerticalFieldManager;
-
-/**
- * A Popup progress dialog box with an optional title and message and a progress
- * bar with a range from 0 to 100 (percent).
- */
-public final class ProgressDialog extends PopupScreen {
-    private static ProgressDialog dialog = null;
-    private GaugeField gauge = null;
-
-    /**
-     * Construct a progress dialog, with customizable title and message.
-     *
-     * @param title
-     *            Title of the progress dialog
-     * @param message
-     *            Message to print in the body of the dialog
-     */
-    private ProgressDialog(String title, String message) {
-        super(new VerticalFieldManager());
-
-        if (title != null && title.length() > 0) {
-            add(new LabelField(title));
-            add(new SeparatorField(SeparatorField.LINE_HORIZONTAL));
-        }
-
-        if (message != null && message.length() > 0) {
-            add(new SpacerField(0, 20));
-            add(new LabelField(message, FIELD_HCENTER | FIELD_VCENTER));
-        }
-        add(new SpacerField(0, 20));
-
-        gauge = new GaugeField(null, 0, 100, 0, GaugeField.PERCENT
-                | GaugeField.FIELD_HCENTER);
-        add(gauge);
-        add(new SpacerField(0, 20));
-    }
-
-    /**
-     * Changes the value displayed in the dialogs GaugeField.
-     *
-     * @param args
-     *            JSONArray of arguments.
-     * @return a PluginResult indicating success or error.
-     */
-    static synchronized PluginResult setValue(JSONArray args) {
-        if (dialog != null) {
-            if (args.length() > 0 && !args.isNull(0)) {
-                int value = -1;
-                try {
-                    value = args.getInt(0);
-                } catch (JSONException e) {
-                    return new PluginResult(PluginResult.Status.JSON_EXCEPTION,
-                            "JSONException: " + e.getMessage());
-                }
-
-                if (value >= 0 && value <= 100) {
-                    dialog.setValue(value);
-                }
-            }
-        }
-        return new PluginResult(PluginResult.Status.OK, "");
-    }
-
-    /**
-     * Creates and displays the progress dialog.
-     *
-     * @param args
-     *            JSONArray of arguments.
-     * @return a PluginResult indicating success or error.
-     */
-    static synchronized PluginResult start(JSONArray args) {
-        if (dialog == null) {
-            String message = null;
-            String title = null;
-
-            // Title and message are optional, grab the strings from the args
-            // if they are there.
-            if (args != null && args.length() > 0) {
-                try {
-                    if (!args.isNull(0)) {
-                        title = args.getString(0);
-                    }
-                    if (args.length() > 1 && !args.isNull(1)) {
-                        message = args.getString(1);
-                    }
-                } catch (JSONException e) {
-                    return new PluginResult(PluginResult.Status.JSON_EXCEPTION,
-                            "JSONException: " + e.getMessage());
-                }
-            }
-
-            dialog = new ProgressDialog(title, message);
-            final UiApplication uiApp = UiApplication.getUiApplication();
-            uiApp.invokeLater(new Runnable() {
-                public void run() {
-                    uiApp.pushModalScreen(dialog);
-                }
-            });
-        }
-
-        return new PluginResult(PluginResult.Status.OK, "");
-    }
-
-    /**
-     * Closes the progress dialog.
-     *
-     * @return a PluginResult indicating success or error.
-     */
-    static synchronized PluginResult stop() {
-        if (dialog != null) {
-            final UiApplication uiApp = UiApplication.getUiApplication();
-            final ProgressDialog tmpDialog = dialog;
-            uiApp.invokeLater(new Runnable() {
-                public void run() {
-                    uiApp.popScreen(tmpDialog);
-                }
-            });
-            dialog = null;
-        }
-
-        return new PluginResult(PluginResult.Status.OK, "");
-    }
-
-    /**
-     * @see net.rim.device.api.ui.Screen#keyChar(char, int, int)
-     */
-    protected boolean keyChar(char key, int status, int time) {
-        // If the user clicks back key while progress dialog is displayed, close
-        // the progress dialog.
-        if (key == Characters.ESCAPE) {
-            stop();
-        }
-
-        return super.keyChar(key, status, time);
-    }
-
-    /**
-     * Changes the value displayed in the GaugeField.
-     *
-     * @param value
-     *            the value (percentage) to set in GaugeField.
-     */
-    private void setValue(final int value) {
-        UiApplication.getUiApplication().invokeLater(new Runnable() {
-            public void run() {
-                gauge.setValue(value);
-            }
-        });
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/notification/VibrateAction.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/notification/VibrateAction.java b/bbos/framework/ext/src/org/apache/cordova/notification/VibrateAction.java
deleted file mode 100644
index 76a545f..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/notification/VibrateAction.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.notification;
-
-import org.apache.cordova.api.PluginResult;
-import org.apache.cordova.json4j.JSONArray;
-import org.apache.cordova.json4j.JSONException;
-
-import net.rim.device.api.system.Alert;
-
-/**
- * Vibrate Action
- *
- * Vibrates the device for specified duration.
- */
-public class VibrateAction {
-
-	private static final int DEFAULT_DURATION = 1000;
-
-	/**
-	 * Vibrates the device for a given amount of time.
-	 *
-	 * @param args JSONArray formatted as [ duration ]
-	 *             duration: specifies the vibration length in milliseconds (default: 1000).
-	 * @return A PluginResult object with the success or failure state for vibrating the device.
-	 */
-	public static PluginResult execute(JSONArray args) {
-		PluginResult result = null;
-
-		if (Alert.isVibrateSupported()) {
-			try {
-				int duration = (args.length() >= 1) ? args.getInt(0) : DEFAULT_DURATION;
-
-				Alert.startVibrate(duration);
-			}
-			catch (JSONException e) {
-				result = new PluginResult(PluginResult.Status.JSON_EXCEPTION, "JSONException: " + e.getMessage());
-			}
-
-			result = new PluginResult(PluginResult.Status.OK, "OK");
-		}
-		else {
-			result = new PluginResult(PluginResult.Status.ILLEGAL_ACCESS_EXCEPTION, "Vibrate not supported");
-		}
-
-		return result;
-	}
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/pim/Contact.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/pim/Contact.java b/bbos/framework/ext/src/org/apache/cordova/pim/Contact.java
deleted file mode 100644
index 3e8e6d7..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/pim/Contact.java
+++ /dev/null
@@ -1,430 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.pim;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-import javax.microedition.io.Connector;
-import javax.microedition.io.HttpConnection;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.PIMItem;
-
-import org.apache.cordova.api.Plugin;
-import org.apache.cordova.api.PluginResult;
-import org.apache.cordova.http.HttpUtils;
-import org.apache.cordova.json4j.JSONArray;
-import org.apache.cordova.json4j.JSONException;
-import org.apache.cordova.util.FileUtils;
-import org.apache.cordova.util.Logger;
-
-import net.rim.blackberry.api.pdap.BlackBerryContact;
-import net.rim.blackberry.api.pdap.BlackBerryContactList;
-import net.rim.device.api.io.Base64InputStream;
-import net.rim.device.api.io.FileNotFoundException;
-import net.rim.device.api.io.IOUtilities;
-import net.rim.device.api.io.http.HttpProtocolConstants;
-import net.rim.device.api.math.Fixed32;
-import net.rim.device.api.system.Bitmap;
-import net.rim.device.api.system.EncodedImage;
-import net.rim.device.api.system.PNGEncodedImage;
-
-/**
- * Performs operations on Contacts stored in the BlackBerry Contacts database.
- */
-public class Contact extends Plugin {
-
-    /**
-     * Possible actions
-     */
-    public static final int ACTION_SET_PICTURE  = 0;
-    public static final int ACTION_GET_PICTURE  = 1;
-
-    /**
-     * Maximum object size is 64KB in contact database.  The raw image is Base64
-     * encoded before insertion.
-     * Base64 = (Bytes + 2 - ((Bytes + 2) MOD 3)) / 3 * 4
-     */
-    private static final long MAX_BYTES = 46080L;
-
-    /**
-     * Executes the requested action and returns a PluginResult.
-     *
-     * @param action        The action to execute.
-     * @param callbackId    The callback ID to be invoked upon action completion.
-     * @param args          JSONArry of arguments for the action.
-     * @return              A PluginResult object with a status and message.
-     */
-    public PluginResult execute(String action, JSONArray args, String callbackId) {
-
-        PluginResult result = null;
-        int a = getAction(action);
-
-        // perform specified action
-        if (a == ACTION_SET_PICTURE) {
-            // get parameters
-            String uid;
-            String type;
-            String value;
-            try {
-                uid = args.isNull(0) ? null : args.getString(0);
-                type = args.isNull(1) ? null : args.getString(1).toLowerCase();
-                value = args.isNull(2) ? null : args.getString(2);
-            } catch (JSONException e) {
-                Logger.log(this.getClass().getName() + ": " + e);
-                return new PluginResult(PluginResult.Status.JSON_EXCEPTION,
-                        "Invalid or missing photo parameters");
-            }
-
-            // get the raw image data
-            byte[] photo = null;
-            if ("base64".equals(type)) {
-                // decode the image string
-                try {
-                    photo = decodeBase64(value.getBytes());
-                }
-                catch (Exception e) {
-                    Logger.log(this.getClass().getName() + ": " + e);
-                    return new PluginResult(PluginResult.Status.ERROR, "Unable to decode image.");
-                }
-            }
-            else {
-                // retrieve the photo from URL
-                try {
-                    photo = getPhotoFromUrl(value);
-                }
-                catch (Exception e) {
-                    Logger.log(this.getClass().getName() + ": " + e);
-                    return new PluginResult(PluginResult.Status.ERROR, "Unable to retrieve image at " + value);
-                }
-            }
-
-            // set the contact picture
-            result = setPicture(uid, photo);
-        }
-        else if (a == ACTION_GET_PICTURE) {
-            // get required parameters
-            String uid = null;
-            try {
-                uid = args.getString(0);
-            } catch (JSONException e) {
-                Logger.log(this.getClass().getName() + ": " + e);
-                return new PluginResult(PluginResult.Status.JSON_EXCEPTION,
-                        "Invalid or missing image URL");
-            }
-            result = getPictureURI(uid);
-        }
-        else {
-            // invalid action
-            result = new PluginResult(PluginResult.Status.INVALID_ACTION,
-                    "Contact: invalid action " + action);
-        }
-
-        return result;
-    }
-
-    /**
-     * Decodes the base64 encoded data provided.
-     * @param data Base64 encoded data
-     * @return byte array containing decoded data
-     * @throws IllegalArgumentException if encodedData is null
-     * @throws IOException if there is an error decoding
-     */
-    protected byte[] decodeBase64(final byte[] encodedData) throws IllegalArgumentException, IOException {
-        if (encodedData == null) {
-            throw new IllegalArgumentException();
-        }
-        ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(encodedData, 0, encodedData.length);
-        Base64InputStream base64InputStream = new Base64InputStream(byteArrayInputStream);
-        byte[] raw = null;
-        try {
-            raw = IOUtilities.streamToBytes(base64InputStream);
-        }
-        finally {
-            base64InputStream.close();
-        }
-        return raw;
-    }
-
-    /**
-     * Sets the photo of the specified contact to the picture at the specified URL.
-     * Local file-based (file:///) and web-based (http://) URLs are supported.
-     * The specified photo is retrieved and a scaled down copy is created and stored
-     * in the contacts database.
-     * @param uid   Unique identifier of contact
-     * @param url   URL of the photo to use for contact photo
-     * @return PluginResult providing status of operation
-     */
-    protected PluginResult setPicture(final String uid, final byte[] photo) {
-        Logger.log(this.getClass().getName() + ": setting picture for contact " + uid);
-
-        // We need to ensure the image encoding is supported, and resize the image
-        // so that it will fit in the persistent store.  Note: testing indicates
-        // that the max image size is 64KB, so we scale it down considerably.
-        byte[] thumbnail = null;
-        try {
-            thumbnail = resizeImage(photo);
-        }
-        catch (IllegalArgumentException e) {
-            // unsupported image format
-            Logger.log(this.getClass().getName() + ": " + e);
-            return new PluginResult(PluginResult.Status.JSON_EXCEPTION, "Unsupported image format.");
-        }
-
-        // lookup contact and save the photo
-        BlackBerryContactList contactList = null;
-        try {
-            // lookup the contact
-            contactList = (BlackBerryContactList) PIM.getInstance().openPIMList(
-                    PIM.CONTACT_LIST, PIM.READ_WRITE);
-            BlackBerryContact contact = contactList.getByUID(uid);
-            if (contact == null) {
-                return new PluginResult(PluginResult.Status.ERROR, "Contact " + uid + " not found.");
-            }
-
-            // save photo image
-            if(contact.countValues(javax.microedition.pim.Contact.PHOTO) > 0) {
-                contact.setBinary(javax.microedition.pim.Contact.PHOTO, 0,
-                        PIMItem.ATTR_NONE, thumbnail, 0, thumbnail.length);
-            }
-            else {
-                contact.addBinary(javax.microedition.pim.Contact.PHOTO,
-                        PIMItem.ATTR_NONE, thumbnail, 0, thumbnail.length);
-            }
-
-            // commit contact record to persistent store
-            contact.commit();
-        }
-        catch (Exception e) {
-            Logger.log(this.getClass().getName() + ": " + e);
-            return new PluginResult(PluginResult.Status.ERROR, e.getMessage());
-        }
-        finally {
-            // be sure to close the contact list to avoid locking it up
-            if (contactList != null) {
-                try { contactList.close(); } catch (PIMException ignored) { }
-            }
-        }
-
-        return new PluginResult(PluginResult.Status.OK);
-    }
-
-    /**
-     * Returns the URI of the contact photo.  The photo image is extracted from
-     * the Contacts database and saved to a temporary file system.  The URI of
-     * the saved photo is returned.
-     * @param uid unique Contact identifier
-     * @return PluginResult containing photo URI
-     */
-    protected PluginResult getPictureURI(final String uid) {
-        Logger.log(this.getClass().getName() + ": retrieving picture for contact " + uid);
-        String photoPath = null;
-
-        // lookup contact
-        BlackBerryContactList contactList = null;
-        try {
-            // lookup the contact
-            contactList = (BlackBerryContactList) PIM.getInstance().openPIMList(
-                    PIM.CONTACT_LIST, PIM.READ_WRITE);
-            BlackBerryContact contact = contactList.getByUID(uid);
-            if (contact == null) {
-                return new PluginResult(PluginResult.Status.ERROR, "Contact " + uid + " not found.");
-            }
-
-            // get photo
-            if(contact.countValues(javax.microedition.pim.Contact.PHOTO) > 0) {
-                // decode from base64
-                byte[] encPhoto = contact.getBinary(javax.microedition.pim.Contact.PHOTO, 0);
-                byte[] photo = Base64InputStream.decode(encPhoto, 0, encPhoto.length);
-
-                // save photo to file system and return file URI
-                saveImage(uid, photo);
-            }
-        }
-        catch (Exception e) {
-            Logger.log(this.getClass().getName() + ": " + e);
-            return new PluginResult(PluginResult.Status.ERROR, e.getMessage());
-        }
-        finally {
-            // be sure to close the contact list to avoid locking it up
-            if (contactList != null) {
-                try { contactList.close(); } catch (PIMException ignored) { }
-            }
-        }
-
-        return new PluginResult(PluginResult.Status.OK, photoPath);
-    }
-
-    /**
-     * Retrieves the raw image data from the URL provided.
-     * @param url  URL of the image
-     * @return raw image data from the URL provided
-     * @throws FileNotFoundException - if file URL could not be found
-     * @throws IOException - if there was an error processing the image file
-     */
-    protected byte[] getPhotoFromUrl(final String url) throws FileNotFoundException, IOException {
-        byte[] photo = null;
-
-        // externally hosted image
-        if (url != null && url.startsWith("http")) {
-            // open connection
-            HttpConnection conn = HttpUtils.getHttpConnection(url);
-            if (conn == null) {
-                throw new IllegalArgumentException("Invalid URL: " + url);
-            }
-
-            // retrieve image
-            InputStream in = null;
-            try {
-                conn.setRequestMethod(HttpConnection.GET);
-                conn.setRequestProperty(
-                        HttpProtocolConstants.HEADER_USER_AGENT,
-                        System.getProperty("browser.useragent"));
-                conn.setRequestProperty(
-                        HttpProtocolConstants.HEADER_KEEP_ALIVE, "300");
-                conn.setRequestProperty(
-                        HttpProtocolConstants.HEADER_CONNECTION, "keep-alive");
-                conn.setRequestProperty(
-                        HttpProtocolConstants.HEADER_CONTENT_TYPE,
-                        HttpProtocolConstants.CONTENT_TYPE_IMAGE_STAR);
-
-                // send request and get response
-                int rc = conn.getResponseCode();
-                if (rc != HttpConnection.HTTP_OK) {
-                    throw new IOException("HTTP connection error: " + rc);
-                }
-                in = conn.openDataInputStream();
-                photo = IOUtilities.streamToBytes(in, 64*1024);
-                in.close();
-            }
-            finally {
-                conn.close();
-            }
-        }
-        // local image file
-        else {
-            photo = FileUtils.readFile(url, Connector.READ);
-        }
-        return photo;
-    }
-
-    /**
-     * Saves the contact image to a temporary directory.
-     * @param uid unique contact identifier
-     * @param photo encoded photo image data
-     * @throws IOException
-     */
-    protected void saveImage(final String uid, final byte[] photo) throws IOException {
-        // create a temporary directory to store the contacts photos
-        String contactsDir = "Contacts";
-        String tempDir = FileUtils.getApplicationTempDirPath() + contactsDir;
-        if (!FileUtils.exists(tempDir)) {
-            FileUtils.createTempDirectory(contactsDir);
-        }
-
-        // save the photo image to the temporary directory, overwriting if necessary
-        String photoPath = tempDir + FileUtils.FILE_SEPARATOR + uid + ".png";
-        if (FileUtils.exists(photoPath)) {
-            FileUtils.delete(photoPath);
-        }
-        FileUtils.writeFile(photoPath, photo, 0);
-    }
-
-    /**
-     * Creates a scaled copy of the specified image.
-     * @param photo  Raw image data
-     * @return a scaled-down copy of the image provided
-     * @throws IllegalArgumentException
-     */
-    protected byte[] resizeImage(byte[] data) throws IllegalArgumentException {
-        // create an EncodedImage to make sure the encoding is supported
-        EncodedImage image = EncodedImage.createEncodedImage(data, 0, data.length);
-
-        // we're limited to 64KB encoding size, do we need to scale?
-        if (data.length < MAX_BYTES) {
-            return data;
-        }
-
-        // if so, try to maintain aspect ratio of original image and set max resolution
-        int srcWidth = image.getWidth();
-        int srcHeight = image.getHeight();
-        int dstWidth, dstHeight;
-        int max_rez = 150;
-        if (srcWidth > srcHeight) {
-            dstWidth = max_rez;
-            dstHeight = (dstWidth * srcHeight)/srcWidth;
-        }
-        else if (srcWidth < srcHeight) {
-            dstHeight = max_rez;
-            dstWidth = (dstHeight * srcWidth)/srcHeight;
-        }
-        else {
-            dstWidth = max_rez;
-            dstHeight = max_rez;
-        }
-
-        // calculate scale factors
-        int currentWidthFixed32 = Fixed32.toFP(srcWidth);
-        int currentHeightFixed32 = Fixed32.toFP(srcHeight);
-        int requiredWidthFixed32 = Fixed32.toFP(dstWidth);
-        int requiredHeightFixed32 = Fixed32.toFP(dstHeight);
-        int scaleXFixed32 = Fixed32.div(currentWidthFixed32,
-                requiredWidthFixed32);
-        int scaleYFixed32 = Fixed32.div(currentHeightFixed32,
-                requiredHeightFixed32);
-
-        // scale image (must be redrawn)
-        EncodedImage thumbnail = image.scaleImage32(scaleXFixed32, scaleYFixed32);
-        Bitmap bitmap = thumbnail.getBitmap();
-
-        // convert back to bytes
-        PNGEncodedImage png = PNGEncodedImage.encode(bitmap);
-        byte[] thumbData = png.getData();
-        Logger.log(this.getClass().getName() + ": photo size reduced from " + data.length + " to " + thumbData.length);
-        return thumbData;
-    }
-
-    /**
-     * Returns action to perform.
-     * @param action action to perform
-     * @return action to perform
-     */
-    protected static int getAction(String action) {
-        if ("setPicture".equals(action)) return ACTION_SET_PICTURE;
-        if ("getPicture".equals(action)) return ACTION_GET_PICTURE;
-        return -1;
-    }
-
-    /**
-     * Identifies if action to be executed returns a value and should be run synchronously.
-     *
-     * @param action    The action to execute
-     * @return          T=returns value
-     */
-    public boolean isSynch(String action) {
-        if (getAction(action) == ACTION_GET_PICTURE) {
-            return true;
-        }
-        else {
-            return super.isSynch(action);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/ui/SpacerField.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/ui/SpacerField.java b/bbos/framework/ext/src/org/apache/cordova/ui/SpacerField.java
deleted file mode 100644
index d739617..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/ui/SpacerField.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.ui;
-
-import net.rim.device.api.ui.Field;
-import net.rim.device.api.ui.Graphics;
-
-/**
- * Provides an empty spacer field that can be used to provide custom spacing
- * between UI fields within a UI screen.
- */
-public class SpacerField extends Field {
-
-    int width;      // spacer width in pixels
-    int height;     // space height in pixels
-
-    /**
-     * Constructor.
-     * @param width Width of the spacer in pixels.
-     * @param height Height of the spacer in pixels.
-     */
-    public SpacerField(int width, int height) {
-        super(NON_FOCUSABLE);
-        this.width = width;
-        this.height = height;
-    }
-
-    /**
-     * Sets the extent to the custom width and height of this spacer.
-     */
-    protected void layout(int width, int height) {
-        this.setExtent(this.width, this.height);
-    }
-
-    /**
-     * Paints the field.
-     */
-    protected void paint(Graphics graphics) {
-        // supposed to be empty. don't paint anything.
-    }
-
-    /**
-     * Returns the custom width of this spacer as the preferred field width.
-     */
-    public int getPreferredWidth() {
-        return this.width;
-    }
-
-    /**
-     * Returns the custom height of this spacer as the preferred field height.
-     */
-    public int getPreferredHeight() {
-        return this.height;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/util/ApplicationUtils.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/util/ApplicationUtils.java b/bbos/framework/ext/src/org/apache/cordova/util/ApplicationUtils.java
deleted file mode 100644
index e9ed784..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/util/ApplicationUtils.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.util;
-
-import org.apache.cordova.camera.Camera;
-
-import net.rim.device.api.system.ApplicationDescriptor;
-import net.rim.device.api.system.ApplicationManager;
-import net.rim.device.api.system.Characters;
-import net.rim.device.api.system.CodeModuleManager;
-import net.rim.device.api.system.ControlledAccessException;
-import net.rim.device.api.system.EventInjector;
-import net.rim.device.api.ui.UiApplication;
-
-public class ApplicationUtils {
-    /**
-     * Determines if the specified application is running in the foreground.
-     *
-     * @param handle
-     *            the name of the application handle (e.g., net_rim_bb_camera")
-     * @return <code>true</code> if the application is running and in the
-     *         foreground
-     */
-    public static boolean isApplicationInForeground(String handle) {
-        // determine if the specified application is running in the foreground
-        ApplicationManager manager = ApplicationManager.getApplicationManager();
-        int foregroundProcessId = manager.getForegroundProcessId();
-        ApplicationDescriptor descriptors[] = manager.getVisibleApplications();
-        for (int i = 0; i < descriptors.length; i++) {
-            if (descriptors[i].getModuleName().equals(handle)
-                    && manager.getProcessId(descriptors[i]) == foregroundProcessId) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Determines if the specified application is installed.
-     *
-     * @param handle
-     *            the name of the application handle (e.g., net_rim_bb_camera")
-     * @return <code>true</code> if the application is installed on the device
-     */
-    public static boolean isModuleInstalled(String handle) {
-        return (CodeModuleManager.getModuleHandle(handle) != 0);
-    }
-
-    /**
-     * Use this method when another native application has been launched by this
-     * application, and you would like the application to be closed.
-     * <p>
-     * Unfortunately, the only way to do this programmatically is to simulate
-     * the Escape (back) key being pressed. We do this by injecting key events,
-     * which means the application permissions must have the key injection
-     * permissions enabled for it to work.
-     * <p>
-     * An alternative to closing the applications would be to simply request
-     * that our application be brought to the foreground; however, this just
-     * pushes all the applications we've launched to the background, leaving a
-     * mess for the user to cleanup after this application has been closed.
-     *
-     * @param repeat
-     *            the number of times to press the Esc key
-     */
-    public static void injectEscKeyPress(final int repeat) {
-        // simulate escape characters (back button press)
-        Runnable escKeyPresser = new Runnable() {
-            public void run() {
-                try {
-                    EventInjector.KeyEvent inject = new EventInjector.KeyEvent(
-                            EventInjector.KeyEvent.KEY_DOWN, Characters.ESCAPE,
-                            0);
-                    int count = 0;
-                    while (count < repeat) {
-                        inject.post();
-                        count++;
-                    }
-                }
-                catch (ControlledAccessException e) {
-                    // the application doesn't have key injection
-                    // permissions
-                    Logger.log(Camera.class.getName() + ": "
-                            + ApplicationDescriptor
-                                    .currentApplicationDescriptor().getName()
-                            + " does not have key injection permissions.");
-                }
-            }
-        };
-        UiApplication.getUiApplication().invokeLater(escKeyPresser);
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/util/FileUtils.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/util/FileUtils.java b/bbos/framework/ext/src/org/apache/cordova/util/FileUtils.java
deleted file mode 100644
index 20ef492..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/util/FileUtils.java
+++ /dev/null
@@ -1,730 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.util;
-
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Enumeration;
-import java.util.Random;
-
-import javax.microedition.io.Connector;
-import javax.microedition.io.file.FileConnection;
-import javax.microedition.io.file.FileSystemRegistry;
-
-import org.apache.cordova.CordovaExtension;
-import org.apache.cordova.file.File;
-
-import net.rim.device.api.io.FileNotFoundException;
-import net.rim.device.api.io.IOUtilities;
-import net.rim.device.api.io.MIMETypeAssociations;
-import net.rim.device.api.system.Application;
-import net.rim.device.api.system.ControlledAccessException;
-
-/**
- * Contains file utility methods.
- */
-public class FileUtils {
-
-    public static final String FILE_SEPARATOR = System.getProperty("file.separator");
-    public static final String LOCAL_PROTOCOL = "local://";
-    public static final String FILE_PROTOCOL = "file://";
-
-    private static final String APP_TMP_DIR;
-    
-    // init APP_TMP_DIR with a random value
-    static {
-        Random gen = new Random();
-        APP_TMP_DIR = "tmp" + Math.abs(gen.nextInt());
-    }
-
-    /**
-     * Reads file as byte array.
-     * @param filePath      Full path of the file to be read
-     * @param mode          One of Connector.READ, READ_WRITE, WRITE
-     * @return file content as a byte array
-     */
-    public static byte[] readFile(String filePath, int mode) throws FileNotFoundException, IOException {
-        byte[] blob = null;
-        DataInputStream dis = null;
-        try {
-            dis = openDataInputStream(filePath, mode);
-            blob = IOUtilities.streamToBytes(dis);
-        }
-        finally {
-            try {
-                if (dis != null) dis.close();
-            }
-            catch (IOException ignored) {
-            }
-        }
-        return blob;
-    }
-
-    /**
-     * Utility function to open a DataInputStream from a file path.
-     *
-     * A file can be referenced with the following protocols:
-     *  - System.getProperty("fileconn.dir.*")
-     *  - local:/// references files bundled with the application
-     *
-     * @param filePath The full path to the file to open
-     * @param mode     One of Connector.READ, READ_WRITE, WRITE
-     * @return Handle to the DataInputStream
-     */
-    private static DataInputStream openDataInputStream(final String filePath, int mode) throws FileNotFoundException, IOException {
-        FileConnection fconn = null;
-        DataInputStream dis = null;
-        try {
-            if (filePath.startsWith(LOCAL_PROTOCOL)) {
-                // Remove local:// from filePath but leave a leading /
-                dis = new DataInputStream(Application.class.getResourceAsStream(filePath.substring(8)));
-            }
-            else {
-                fconn = (FileConnection)Connector.open(filePath, mode);
-                if (!fconn.exists()) {
-                    throw new FileNotFoundException(filePath + " not found");
-                }
-                dis = fconn.openDataInputStream();
-            }
-
-            if (dis == null) {
-                throw new FileNotFoundException(filePath + " not found");
-            }
-        }
-        finally {
-            try {
-                if (fconn != null) fconn.close();
-            }
-            catch (IOException ignored) {
-            }
-        }
-
-        return dis;
-    }
-
-    /**
-     * Writes data to the specified file.
-     *
-     * @param filePath
-     *            Full path of file to be written to
-     * @param data
-     *            Data to be written
-     * @param position
-     *            Position at which to begin writing
-     * @return length of data written to file
-     * @throws SecurityException
-     *             if the application does not have write access to the file
-     * @throws IOException
-     *             if directory structure does not exist or an unspecified error
-     *             occurs
-     */
-    public static int writeFile(String filePath, byte[] data, int position)
-            throws SecurityException, IOException {
-        FileConnection fconn = null;
-        OutputStream os = null;
-        try {
-            fconn = (FileConnection) Connector.open(filePath,
-                    Connector.READ_WRITE);
-            if (!fconn.exists()) {
-                fconn.create();
-            } else {
-                // Originally, this did an overwrite in place and did not
-                // truncate.  The truncate was added to match behavior on
-                // other platforms.
-                fconn.truncate(position);
-            }
-            os = fconn.openOutputStream(position);
-            os.write(data);
-        }
-        finally {
-            try {
-                if (os != null)
-                    os.close();
-                if (fconn != null)
-                    fconn.close();
-            }
-            catch (IOException ignored) {
-            }
-        }
-        return data.length;
-    }
-
-    /**
-     * Deletes the specified file or directory from file system. If the
-     * specified path is a directory, the deletion is recursive.
-     *
-     * @param path
-     *            full path of file or directory to be deleted
-     * @throws IOException
-     */
-    public static void delete(String path) throws IOException {
-        FileConnection fconn = null;
-        try {
-            fconn = (FileConnection)Connector.open(path, Connector.READ_WRITE);
-            if (fconn.exists()) {
-                // file
-                if (!fconn.isDirectory()) {
-                    fconn.delete();
-                    Logger.log(FileUtils.class.getName() + ":  " + path + " deleted");
-                }
-                // directory
-                else {
-                    if (!path.endsWith(FILE_SEPARATOR)) {
-                        path += FILE_SEPARATOR;
-                    }
-
-                    // recursively delete directory contents
-                    Enumeration contents = fconn.list("*", true);
-                    if (contents.hasMoreElements()) {
-                        fconn.close();
-                        while (contents.hasMoreElements()) {
-                            delete(path + contents.nextElement().toString());
-                        }
-                        fconn = (FileConnection)Connector.open(path, Connector.READ_WRITE);
-                    }
-                    // now delete this directory
-                    fconn.delete();
-                    Logger.log(FileUtils.class.getName() + ":  " + path + " deleted");
-                }
-            }
-        }
-        finally {
-            try {
-                if (fconn != null) fconn.close();
-            }
-            catch (IOException ignored) {
-            }
-        }
-    }
-
-    /**
-     * Creates a directory. Directories in the specified path are not created
-     * recursively. If the directory already exists, no action is taken.
-     *
-     * @param dirPath
-     *            full path of directory to create
-     * @throws IOException
-     *             if the target file system is not accessible, or an
-     *             unspecified error occurs
-     */
-    public static void mkdir(String dirPath) throws IOException {
-        FileConnection fconn = null;
-        try {
-            fconn = (FileConnection)Connector.open(dirPath);
-            if (fconn.isDirectory()) {
-                // nothing to do
-                return;
-            }
-            fconn.mkdir();
-        } catch (ControlledAccessException e) {
-            Logger.log("ControlledAccessException on dir " + dirPath + ", either directory conflict after reinstall of app, or device is connected via usb, see Cordova Docs File Blackberry Quirks");
-            Logger.log(e.toString());
-        }
-        finally {
-            try {
-                if (fconn != null) fconn.close();
-            }
-            catch (IOException ignored) {
-            }
-        }
-    }
-
-    /**
-     * Determines the size of a file on the file system. Size always represents number of bytes contained in the file; never pre-allocated but empty space
-     * @return size in bytes of the selected file, or -1 if the file does not exist or is inaccessible
-     */
-    public static long fileSize(String path) throws IOException {
-        FileConnection fconn = null;
-        long fsize = -1;
-        try {
-            fconn = (FileConnection)Connector.open(path);
-            fsize = fconn.fileSize();
-        } catch (IOException e) {
-            Logger.log(FileUtils.class.getName() + " fileSize:  " + path + "not found or inaccessible");
-        } finally {
-            try {
-                if (fconn != null) fconn.close();
-            } catch (IOException ignored) {}
-        }
-       return fsize;
-    }
-
-    /**
-     * Copies a file or directory to a new location. If copying a directory, the
-     * entire contents of the directory are copied recursively.
-     *
-     * @param srcPath
-     *            the full path of the file or directory to be copied
-     * @param parent
-     *            the full path of the target directory to which the file or
-     *            directory should be copied
-     * @param newName
-     *            the new name of the file or directory
-     * @throws IllegalArgumentException
-     *             if an invalid source or destination path is provided
-     * @throws FileNotFoundException
-     *             if the source path cannot be found on the file system
-     * @throws SecurityException
-     *             if unable to create the new file or directory specified by
-     *             destination path
-     * @throws IOException
-     *             if an attempt is made to copy the contents of a directory
-     *             into itself, or if the source and destination paths are
-     *             identical, or if a general error occurs
-     */
-    public static void copy(String srcPath, String parent, String newName)
-            throws IllegalArgumentException, FileNotFoundException,
-            SecurityException, IOException {
-
-        FileConnection src = null;
-        FileConnection dst = null;
-        try {
-            src = (FileConnection)Connector.open(srcPath, Connector.READ_WRITE);
-
-            // ensure source exists
-            if (!src.exists()) {
-                throw new FileNotFoundException("Path not found: " + srcPath);
-            }
-
-            // ensure target parent directory exists
-            if (!isDirectory(parent)) {
-                throw new FileNotFoundException("Target directory not found: " + parent);
-            }
-
-            // form full destination path
-            if (!parent.endsWith(FileUtils.FILE_SEPARATOR)) {
-                parent += FileUtils.FILE_SEPARATOR;
-            }
-            String dstPath = parent + newName;
-
-            // source is a directory
-            if (src.isDirectory()) {
-                // target should also be directory; append file separator
-                if (!dstPath.endsWith(FILE_SEPARATOR)) {
-                    dstPath += FILE_SEPARATOR;
-                }
-
-                // can't copy directory into itself
-                // file:///SDCard/tmp/ --> file:///SDCard/tmp/tmp/ ==> NO!
-                // file:///SDCard/tmp/ --> file:///SDCard/tmp/ ==> NO!
-                // file:///SDCard/tmp/ --> file:///SDCard/tmp2/ ==> OK
-                String srcURL = src.getURL();
-                if (dstPath.startsWith(srcURL)) {
-                    throw new IOException("Cannot copy directory into itself.");
-                }
-
-                // create the destination directory
-                mkdir(dstPath);
-
-                // recursively copy directory contents
-                Enumeration contents = src.list("*", true);
-                if (contents.hasMoreElements()) {
-                    src.close();
-                    while (contents.hasMoreElements()) {
-                        String name = contents.nextElement().toString();
-                        copy(srcURL + name, dstPath, name);
-                    }
-                }
-            }
-            // source is a file
-            else {
-                // can't copy file onto itself
-                if (dstPath.equals(srcPath)) {
-                    throw new IOException("Cannot copy file onto itself.");
-                }
-
-                dst = (FileConnection) Connector.open(dstPath, Connector.READ_WRITE);
-
-                // replace existing file, but not directory
-                if (dst.exists()) {
-                    if (dst.isDirectory()) {
-                        throw new IOException(
-                                "Cannot overwrite existing directory.");
-                    }
-                    else {
-                        dst.delete();
-                    }
-                }
-                dst.create();
-
-                // copy the contents - wish there was a better way
-                InputStream is = null;
-                OutputStream os = null;
-                try {
-                    is = src.openInputStream();
-                    os = dst.openOutputStream();
-                    byte[] buf = new byte[1024];
-                    int len;
-                    while ((len = is.read(buf)) > 0) {
-                        os.write(buf, 0, len);
-                    }
-                }
-                finally {
-                    if (is != null) is.close();
-                    if (os != null) os.close();
-                }
-            }
-        }
-        finally {
-            try {
-                if (src != null) src.close();
-                if (dst != null) dst.close();
-            }
-            catch (IOException ignored) {
-            }
-        }
-    }
-
-    /**
-     * Creates an temporary directory for the application. The temporary
-     * directory is created in the following location:
-     * <code>&lt;root&gt;/tmpGUID/</code> where <code>&lt;root&gt;/</code>
-     * is the path of the writable directory on the file system (could be the SD
-     * card, if present, or the root file system on internal storage); and
-     * <code>tmpGUID/</code> is a application temporary directory that is
-     * created using the unique application GUID. If the application temporary
-     * directory does not exist, invoking this method will create it.
-     * <em>NOTE:</em> The <code>&lt;root&gt;/tmpGUID/</code> application
-     * temporary directory and all its contents are deleted upon application
-     * exit.
-     *
-     * @return full path name of the application temporary directory
-     * @throws IOException
-     *             if there are no file systems mounted, or an unspecified error
-     *             occurs
-     */
-    public static String createApplicationTempDirectory() throws IOException {
-        // <root>/tmpGUID/
-        String tmpDir = getApplicationTempDirPath();
-        mkdir(tmpDir);
-
-        return tmpDir;
-    }
-
-    /**
-     * Creates a temporary directory on the writable storage area of the file
-     * system. The temporary directory is created in the following location:
-     * <code>&lt;root&gt;/tmpGUID/dirName/</code> where
-     * <code>&lt;root&gt;/tmpGUID/</code> is an application temporary
-     * directory that is created using the unique application GUID; and
-     * <code>dirName/</code> is an optional directory name to create beneath the
-     * application temporary directory. If the application temporary directory
-     * does not exist, invoking this method will create it. <em>NOTE:</em> The
-     * <code>&lt;root&gt;/tmpGUID/</code> application temporary directory
-     * and all its contents are deleted upon application exit.
-     *
-     * @param dirName
-     *            name of directory to be created beneath the application
-     *            temporary directory
-     * @return full path name of the directory that was created
-     * @throws IOException
-     *             if there are no file systems mounted, or an unspecified error
-     *             occurs
-     */
-    public static String createTempDirectory(String dirName) throws IOException {
-        // create the application temp directory
-        String tmpDir = createApplicationTempDirectory();
-
-        // create specified sub-directory as "<root>/tmpGUID/dirName/"
-        dirName = (dirName == null) ? "" : dirName.trim();
-        if (dirName.length() > 0) {
-            if (!dirName.endsWith(FILE_SEPARATOR)) {
-                dirName += FILE_SEPARATOR;
-            }
-            tmpDir += dirName;
-            mkdir(tmpDir);
-        }
-        return tmpDir;
-    }
-
-    /**
-     * Attempts to delete the application temporary directory and all contents.
-     * The application temporary directory is:
-     * <code>&lt;root&gt;/tmpGUID/</code>, where <code>&lt;root&gt;</code> is
-     * the file system root (could be the SD card or internal storage); and
-     * <code>tmpGUID</code> is the application temporary directory that is
-     * created using the unique application GUID. <em>NOTE:</em> The
-     * <code>tmpGUID</code> application temporary directory and all
-     * sub-directories are deleted upon application exit.
-     *
-     * @throws IOException
-     *             if an unspecified error occurs
-     */
-    public synchronized static void deleteApplicationTempDirectory()
-            throws IOException {
-        String tmpDir = getApplicationTempDirPath();
-        delete(tmpDir);
-    }
-
-    /**
-     * Returns the full path of the application temporary directory. The path
-     * points to the following location: <code>&lt;root&gt;/tmpGUID/</code>
-     * where <code>&lt;root&gt;/</code> is the path of the writable directory on
-     * the file system (could be the SD card, if present, or the root file system
-     * on internal storage); and <code>tmpGUID/</code> is a application temporary
-     * directory that is created using the unique application GUID. The
-     * directory may not exist. Invoke
-     * <code>createApplicationTempDirectory</code> to create it.
-     *
-     * @return the full path name of the application temporary directory
-     */
-    public static String getApplicationTempDirPath() {
-        return getFileSystemRoot() + APP_TMP_DIR + FILE_SEPARATOR;
-    }
-
-    /**
-     * Returns the full path of a root file system. Will return the path of the
-     * SD card first, if it exists, or the root file system located on internal
-     * storage.
-     *
-     * @return full path that can be used to store files
-     */
-    public static String getFileSystemRoot() {
-        String root = null;
-        String sdcard = getSDCardPath();
-
-        // retrieve root list
-        Enumeration e = FileSystemRegistry.listRoots();
-        while (e.hasMoreElements()) {
-            root = "file:///" + (String) e.nextElement();
-            // system directory won't be writable
-            if (root.endsWith("system/")) {
-                continue;
-            }
-            // prefer the SDCard
-            else if (root.equals(sdcard)) {
-                break;
-            }
-        }
-        return root;
-    }
-
-    /**
-     * Returns the full path name to external storage (SD card, e.g.
-     * file:///SDCard/).
-     *
-     * @return full path name to the external storage (SD card)
-     */
-    public static String getSDCardPath() {
-        return System.getProperty("fileconn.dir.memorycard");
-    }
-
-    /**
-     * Returns the full path name of the user directory located on internal
-     * storage (e.g. file:///store/home/user/).
-     *
-     * @return full path name of the user directory
-     */
-    public static String getUserPath() {
-        // grab the music folder
-        String musicDir = System.getProperty("fileconn.dir.music");
-        // ignore trailing '/'
-        int i = musicDir.lastIndexOf('/', musicDir.length() - 2);
-        // strip off the last directory
-        return musicDir.substring(0, i + 1);
-    }
-
-    /**
-     * Returns the available size of the file system that the path resides on.
-     *
-     * @param path
-     *            full path of a file system entry
-     * @return available size, in bytes, of the root file system
-     * @throws IllegalArgumentException
-     *             if path is invalid
-     * @throws IOException
-     *             if an error occurs
-     */
-    public static long availableSize(String path)
-            throws IllegalArgumentException, IOException {
-        long availableSize = 0;
-        FileConnection fconn = null;
-        try {
-            fconn = (FileConnection) Connector.open(path);
-            availableSize = fconn.availableSize();
-        }
-        finally {
-            try {
-                if (fconn != null)
-                    fconn.close();
-            }
-            catch (IOException ignored) {
-            }
-        }
-        return availableSize;
-    }
-
-    /**
-     * Determines if the specified file system path exists.
-     * @param path full path of file or directory
-     * @return true if the file or directory exists
-     */
-    public static boolean exists(String path) {
-        boolean exists = false;
-        FileConnection fconn = null;
-        try {
-            fconn = (FileConnection)Connector.open(path);
-            exists = fconn.exists();
-        }
-        catch (IllegalArgumentException e) {
-            Logger.log(FileUtils.class.getName() + ": " + e);
-        }
-        catch (IOException e) {
-            Logger.log(FileUtils.class.getName() + ": " + e);
-        }
-        finally {
-            try {
-                if (fconn != null) fconn.close();
-            }
-            catch (IOException ignored) {
-            }
-        }
-        return exists;
-    }
-
-    /**
-     * Determines if the specified file system path refers to a directory.
-     * @param path full path of file or directory
-     * @return true if the file path exists, is accessible, and is a directory
-     */
-    public static boolean isDirectory(String path) {
-        boolean isDirectory = false;
-        FileConnection fconn = null;
-        try {
-            fconn = (FileConnection)Connector.open(path);
-            isDirectory = fconn.isDirectory();
-        }
-        catch (IllegalArgumentException e) {
-            Logger.log(FileUtils.class.getName() + ": " + e);
-        }
-        catch (IOException e) {
-            Logger.log(FileUtils.class.getName() + ": " + e);
-        }
-        finally {
-            try {
-                if (fconn != null) fconn.close();
-            }
-            catch (IOException ignored) {
-            }
-        }
-        return isDirectory;
-    }
-
-    /**
-     * Lists the contents of a directory. Lists both files and sub-directories.
-     *
-     * @param path
-     *            full path of the directory to list
-     * @return Enumeration containing names of files and sub-directories.
-     * @throws FileNotFoundException
-     *             if path is not found
-     * @throws IOException
-     *             if an error occurs
-     */
-    public static Enumeration listDirectory(String path)
-            throws FileNotFoundException, IOException {
-        FileConnection fconn = null;
-        Enumeration listing = null;
-        try {
-            fconn = (FileConnection) Connector.open(path);
-            if (!fconn.exists()) {
-                throw new FileNotFoundException(path + " does not exist.");
-            }
-            listing = fconn.list();
-        }
-        finally {
-            try {
-                if (fconn != null)
-                    fconn.close();
-            }
-            catch (IOException ignored) {
-            }
-        }
-        return listing;
-    }
-
-    public static File getFileProperties(String filePath) throws FileNotFoundException {
-        File file = new File(stripSeparator(filePath));
-        FileConnection fconn = null;
-        try {
-            fconn = (FileConnection)Connector.open(filePath);
-            if (!fconn.exists()) {
-                throw new FileNotFoundException();
-            }
-            file.setLastModifiedDate(fconn.lastModified());
-            file.setName(stripSeparator(fconn.getName()));
-            file.setType(MIMETypeAssociations.getMIMEType(filePath));
-            file.setSize(fconn.fileSize());
-        }
-        catch (IllegalArgumentException e) {
-            Logger.log(FileUtils.class.getName() + ": " + e);
-        }
-        catch (IOException e) {
-            Logger.log(FileUtils.class.getName() + ": " + e);
-        }
-        finally {
-            try {
-                if (fconn != null) fconn.close();
-            }
-            catch (IOException ignored) {
-            }
-        }
-        return file;
-    }
-
-    /**
-     * Strips the trailing slash from path names.
-     *
-     * @param path
-     *            full or relative path name
-     * @return formatted path (without trailing slash)
-     */
-    public static String stripSeparator(String path) {
-        int len = FILE_SEPARATOR.length();
-        while (path.endsWith(FILE_SEPARATOR)) {
-            path = path.substring(0, path.length() - len);
-        }
-        return path;
-    }
-
-
-    /**
-     * If the specified file path does not have a URI prefix, prefix it with the
-     * file:/// prefix.
-     *
-     * @param filePath
-     * @return the prefixed URI.
-     */
-    public static String prefixFileURI(String filePath) {
-        if (!filePath.startsWith(LOCAL_PROTOCOL)
-                && !filePath.startsWith(FILE_PROTOCOL)
-                && !filePath.startsWith("http://")
-                && !filePath.startsWith("https://")) {
-            if (filePath.indexOf(FILE_SEPARATOR) != 0) {
-                filePath = FILE_PROTOCOL + FILE_SEPARATOR + filePath;
-            } else {
-                filePath = FILE_PROTOCOL + filePath;
-            }
-        }
-
-        return filePath;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/util/Log.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/util/Log.java b/bbos/framework/ext/src/org/apache/cordova/util/Log.java
deleted file mode 100644
index 54396e7..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/util/Log.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.util;
-
-import net.rim.device.api.script.Scriptable;
-import net.rim.device.api.script.ScriptableFunction;
-
-/**
- * Log provides a mechanism for JavaScript code to utilize the Event Log.
- * Log represents an object in the script engine that can be accessed from the
- * script environment using <code>cordova.Logger</code>.
- *
- * Log provides a function, <code>log(msg)</code>, that logs messages to the
- * BlackBerry Event Log as well as to System.out.
- *
- * To use of the BlackBerry Event Log from JavaScript, you must first
- * invoke the <code>enable()</code> method:
- *
- * <code>cordova.Logger.enable();</code>
- * <code>cordova.Logger.log(msg);</code>
- */
-public final class Log extends Scriptable {
-
-    /**
-     * Field used to log messages.
-     */
-    public static final String FIELD_LOG = "log";
-
-    /**
-     * Field used to enable message logging.
-     */
-    public static final String FIELD_ENABLE = "enable";
-
-    /**
-     * Logs messages to the BlackBerry Event Log and to <code>System.out</code>.
-     */
-    public final LogFunction logFunction; // logs to the Event Log
-
-    /**
-     * Constructor.
-     */
-    public Log() {
-        this.logFunction = new LogFunction();
-    }
-
-    /**
-     * The following fields are supported from the script environment:
-     *
-     *  <code>cordova.Logger.enable</code> - Enables message logging.
-     *  <code>cordova.Logger.log</code> - Logs the specified message.
-     */
-    public Object getField(String name) throws Exception {
-
-        if (name.equals(FIELD_LOG)) {
-            return this.logFunction;
-	    }
-        else if (name.equals(FIELD_ENABLE)) {
-            return new ScriptableFunction() {
-                public Object invoke(Object obj, Object[] oargs) throws Exception {
-                    Logger.enableLogging();
-                    return null;
-                }
-            };
-        }
-        return super.getField(name);
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/util/LogFunction.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/util/LogFunction.java b/bbos/framework/ext/src/org/apache/cordova/util/LogFunction.java
deleted file mode 100644
index 918371d..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/util/LogFunction.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.util;
-
-import net.rim.device.api.script.ScriptableFunction;
-
-/**
- * LogFunction represents a function that can be invoked from the script
- * environment of the widget framework.  Messages are logged to the BlackBerry
- * Event Log.  From JavaScript, invoke
- *
- * <code>cordova.Logger.log(msg);</code>
- */
-public class LogFunction extends ScriptableFunction {
-
-    public Object invoke(Object obj, Object[] oargs) throws Exception {
-
-        if (oargs != null) {
-            String message = (String)oargs[0];
-            Logger.log(message);
-        }
-
-        return null;
-      }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/util/Logger.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/util/Logger.java b/bbos/framework/ext/src/org/apache/cordova/util/Logger.java
deleted file mode 100644
index c5c21ad..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/util/Logger.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.util;
-
-import java.util.Date;
-
-import org.apache.cordova.CordovaExtension;
-
-import net.rim.device.api.i18n.SimpleDateFormat;
-import net.rim.device.api.system.EventLogger;
-
-/**
- * Logger provides a mechanism to log the the BlackBerry Event Log.  It uses
- * the BlackBerry EventLogger class.
- *
- * The Event Log can be viewed on BlackBerry simulators using Tools > Show Event
- * Log, or on physical devices by pressing the <code>Alt</code> key, followed by
- * the <code>LGLG</code> key combination.
- *
- * To enable event logging, you must first call <code>enableLogging</code>.
- *
- * Logger also provides methods to write to <code>System.out</code> and
- * <code>System.err</code>.
- */
-public class Logger {
-
-    /**
-     * Application name
-     */
-    protected static String appName;
-
-    /**
-     *  Application GUID
-     */
-    protected static long appID;
-
-    /**
-     *  Used to format dates into a standard format
-     */
-    private static final SimpleDateFormat dateFormat =
-        new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
-
-    /**
-     * Invoke this method to enable logging to the BlackBerry Event Log.
-     */
-    public static void enableLogging() {
-        appID = CordovaExtension.getAppID();
-        appName = CordovaExtension.getAppName();
-        if (EventLogger.register(appID, appName, EventLogger.VIEWER_STRING)) {
-            log("Logger enabled: " + "GUID=" + appID + ", name=" + appName);
-        }
-        else {
-            log("EventLogger registration failed.");
-        }
-    }
-
-    /**
-     * Sets the minimum logging level.
-     */
-    public static void setMinimumLoggingLevel(int level) {
-        EventLogger.setMinimumLevel(level);
-    }
-
-    /**
-     * Logs formatted message to Event Log with ALWAYS_LOG level.
-     */
-    public static void log(String msg) {
-        logEvent(msg, EventLogger.ALWAYS_LOG);
-    }
-
-    /**
-     * Logs formatted message to Event Log with DEBUG_INFO level.
-     */
-    public static void debug(String msg) {
-        logEvent(msg, EventLogger.DEBUG_INFO);
-    }
-
-    /**
-     * Logs formatted message to Event Log with INFORMATION level.
-     */
-    public static void info(String msg) {
-        logEvent(msg, EventLogger.INFORMATION);
-    }
-
-    /**
-     * Logs formatted message to Event Log with WARNING level.
-     */
-    public static void warn(String msg) {
-        logEvent(msg, EventLogger.WARNING);
-    }
-
-    /**
-     * Logs formatted message to Event Log with ERROR level.
-     */
-    public static void error(String msg) {
-        logEvent(msg, EventLogger.ERROR);
-    }
-
-    /**
-     * Logs formatted message to Event Log with SEVERE_ERROR level.
-     */
-    public static void severe(String msg) {
-        logEvent(msg, EventLogger.SEVERE_ERROR);
-    }
-
-    /**
-     * Prints unformatted message to System.out.
-     */
-    public static void out(String msg) {
-        System.out.println(msg);
-    }
-
-    /**
-     * Prints unformatted message to System.err.
-     */
-    public static void err(String msg, Throwable t) {
-        System.err.println(msg);
-        t.printStackTrace();
-    }
-
-    /**
-     * Logs formatted message to Event Log (if enabled) and System.out.
-     */
-    private static void logEvent(String msg, int level) {
-        String message = formatMessage(msg);
-        EventLogger.logEvent(appID, message.getBytes(), level);
-        out(message);
-    }
-
-    private static String formatMessage(String msg) {
-        StringBuffer sb = new StringBuffer();
-        sb.append(appName);
-        sb.append(" [");
-        sb.append(dateFormat.format(new Date()));
-        sb.append("]: ");
-        sb.append(msg);
-        return sb.toString();
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/util/StringUtils.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/util/StringUtils.java b/bbos/framework/ext/src/org/apache/cordova/util/StringUtils.java
deleted file mode 100644
index 0a4d45d..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/util/StringUtils.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
- * Taken from Research in Motion knowledge base article:
- *
- * DB-00728: "How To - Implement a string splitter based on a given string delimiter", 24 March 2009.
- * http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/832062/How_To_-_Implement_a_string_splitter_based_on_a_given_string_delimiter.html?nodeid=1498848&vernum=0
- */
-package org.apache.cordova.util;
-
-/**
- * Provides various string utility methods.
- */
-public class StringUtils {
-
-    //Identifies the substrings in a given string that are delimited
-    //by one or more characters specified in an array, and then
-    //places the substrings into a String array.
-    public static String[] split(String strString, String strDelimiter) {
-        String[] strArray;
-        int iOccurrences = 0;
-        int iIndexOfInnerString = 0;
-        int iIndexOfDelimiter = 0;
-        int iCounter = 0;
-
-        //Check for null input strings.
-        if (strString == null) {
-            throw new IllegalArgumentException("Input string cannot be null.");
-        }
-        //Check for null or empty delimiter strings.
-        if (strDelimiter.length() <= 0 || strDelimiter == null) {
-            throw new IllegalArgumentException("Delimeter cannot be null or empty.");
-        }
-
-        //strString must be in this format: (without {} )
-        //"{str[0]}{delimiter}str[1]}{delimiter} ...
-        // {str[n-1]}{delimiter}{str[n]}{delimiter}"
-
-        //If strString begins with delimiter then remove it in order
-        //to comply with the desired format.
-
-        if (strString.startsWith(strDelimiter)) {
-            strString = strString.substring(strDelimiter.length());
-        }
-
-        //If strString does not end with the delimiter then add it
-        //to the string in order to comply with the desired format.
-        if (!strString.endsWith(strDelimiter)) {
-            strString += strDelimiter;
-        }
-
-        //Count occurrences of the delimiter in the string.
-        //Occurrences should be the same amount of inner strings.
-        while((iIndexOfDelimiter = strString.indexOf(strDelimiter,
-                iIndexOfInnerString)) != -1) {
-            iOccurrences += 1;
-            iIndexOfInnerString = iIndexOfDelimiter +
-            strDelimiter.length();
-        }
-
-        //Declare the array with the correct size.
-        strArray = new String[iOccurrences];
-
-        //Reset the indices.
-        iIndexOfInnerString = 0;
-        iIndexOfDelimiter = 0;
-
-        //Walk across the string again and this time add the
-        //strings to the array.
-        while((iIndexOfDelimiter = strString.indexOf(strDelimiter,
-                iIndexOfInnerString)) != -1) {
-
-            //Add string to array.
-            strArray[iCounter] = strString.substring(iIndexOfInnerString,iIndexOfDelimiter);
-
-            //Increment the index to the next character after
-            //the next delimiter.
-            iIndexOfInnerString = iIndexOfDelimiter +
-            strDelimiter.length();
-
-            //Inc the counter.
-            iCounter += 1;
-        }
-
-        return strArray;
-    }
-}


[10/15] CB-4228

Posted by lo...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/CordovaExtension.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/CordovaExtension.java b/bbos/framework/ext/src/org/apache/cordova/CordovaExtension.java
deleted file mode 100644
index 62943b4..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/CordovaExtension.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- * Copyright (c) 2011, Research In Motion Limited.
- */
-package org.apache.cordova;
-
-import net.rim.device.api.browser.field2.BrowserField;
-import net.rim.device.api.script.ScriptEngine;
-import net.rim.device.api.system.Application;
-import net.rim.device.api.web.WidgetConfig;
-import net.rim.device.api.web.WidgetExtension;
-import net.rim.device.api.xml.parsers.DocumentBuilderFactory;
-
-import org.apache.cordova.api.PluginManager;
-import org.apache.cordova.api.PluginResult;
-import org.apache.cordova.notification.Notification;
-import org.apache.cordova.util.Log;
-import org.apache.cordova.util.Logger;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import java.lang.ref.WeakReference;
-
-/**
- * CordovaExtension is a BlackBerry WebWorks JavaScript extension.  It
- * represents a single feature that can be used to access device capabilities.
- */
-public final class CordovaExtension implements WidgetExtension {
-
-    // Weak reference encapsulating BrowserField object used to display the application
-    // We use the weak reference because keeping a direct reference can
-    // cause memory leak issues in WebWorks. Original solution described
-    // and suggested by Tim Neil on the BlackBerry support forums.
-    // Thanks Tim!
-    protected static WeakReference browser = null;
-
-    // Browser script engine
-    //
-    protected static ScriptEngine script;
-
-    // Application name
-    //
-    protected static String appName;
-
-    // Application GUID
-    //
-    protected static long appID;
-
-    // Plugin Manager
-    //
-    protected PluginManager pluginManager;
-
-    // Feature ID
-    //
-    private static final String FEATURE_ID ="org.apache.cordova";
-
-    // Called when the BlackBerry Widget references this extension for the first time.
-    // It provides a list of feature IDs exposed by this extension.
-    //
-    public String[] getFeatureList() {
-      return new String[] {FEATURE_ID};
-    }
-
-    // Called whenever a widget loads a resource that requires a feature ID that is supplied
-    // in the getFeatureList
-    //
-    public void loadFeature(String feature, String version, Document doc,
-            ScriptEngine scriptEngine) throws Exception {
-        script = scriptEngine;
-        // Not sure why logger is not already enabled?
-        Logger.enableLogging();
-        if (feature.equals(FEATURE_ID)) {
-            pluginManager = new PluginManager(this);
-
-            // create and parse the plugins.xml
-            Document c = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(Application.class.getResourceAsStream("/plugins.xml"));
-
-            NodeList plugins = c.getElementsByTagName("plugin");
-            if (plugins.getLength() == 0) {
-                Logger.warn("If you are using any Cordova APIs you will need to "+
-                        "specify them in the config.xml using <gap:plugin name=\"MyPlugin\" "+
-                        "value=\"com.example.MyPlugin\"/>");
-            }
-            for(int i=0; i<plugins.getLength() ; i++){
-                Node plugin = plugins.item(i);
-                Logger.log("Found plugin " + plugin.getAttributes().getNamedItem("name").getNodeValue() + " = " +
-                        plugin.getAttributes().getNamedItem("value").getNodeValue());
-                pluginManager.addService(plugin.getAttributes().getNamedItem("name").getNodeValue(),
-                        plugin.getAttributes().getNamedItem("value").getNodeValue());
-            }
-
-            scriptEngine.addExtension("org.apache.cordova.JavaPluginManager",  pluginManager);
-            scriptEngine.addExtension("org.apache.cordova.Logger",         new Log());
-
-            // let Cordova JavaScript know that extensions have been loaded
-            // if this is premature, we at least set the _nativeReady flag to true
-            // so that when the JS side is ready, it knows native side is too
-            Logger.log(this.getClass().getName() + ": invoking Cordova.onNativeReady.fire()");
-            scriptEngine.executeScript("try {cordova.require('cordova/channel').onNativeReady.fire();} catch(e) {_nativeReady = true;}", null);
-        }
-    }
-
-    // Called so that the extension can get a reference to the configuration or browser field object
-    //
-    public void register(WidgetConfig widgetConfig, BrowserField browserField) {
-        browser = new WeakReference(browserField);
-
-        // grab widget application name and use it to generate a unique ID
-        appName = widgetConfig.getName();
-        appID = Long.parseLong(Math.abs(("org.apache.cordova."+appName).hashCode())+"",16);
-
-        // create a notification profile for the application
-        Notification.registerProfile();
-    }
-
-    /**
-     * Called to clean up any features when the extension is unloaded.  This is
-     * invoked by the WebWorks Framework when another URL is loaded.
-     *
-     * @see net.rim.device.api.web.WidgetExtension#unloadFeatures(org.w3c.dom.Document)
-     */
-    public void unloadFeatures(Document doc) {
-        // Cleanup plugin resources.
-        if (pluginManager != null) {
-            pluginManager.destroy();
-        }
-    }
-
-    public static void invokeScript(final String js) {
-        // Use a new thread so that JavaScript is invoked asynchronously.
-        // Otherwise executeScript doesn't return until JavaScript call back
-        // is finished.
-        (new Thread() {
-            public void run() {
-                try {
-                    script.executeScript(js, null);
-                } catch (Exception e) {
-                    // This is likely an IllegalStateException which is thrown
-                    // because the framework is in the process of being shutdown
-                    // so communication to JavaScript side is not allowed.
-                    Logger.log("Caught exception while executing script: "
-                            + e.getMessage());
-                }
-            }
-        }).start();
-    }
-
-    /**
-     * Invokes the Cordova success callback specified by callbackId.
-     * @param callbackId   unique callback ID
-     * @param result       Cordova PluginResult containing result
-     */
-    public static void invokeSuccessCallback(String callbackId, PluginResult result) {
-      invokeScript(result.toSuccessCallbackString(callbackId));
-    }
-
-    /**
-     * Invokes the Cordova error callback specified by callbackId.
-     * @param callbackId   unique callback ID
-     * @param result       Cordova PluginResult containing result
-     */
-    public static void invokeErrorCallback(String callbackId, PluginResult result) {
-      invokeScript(result.toErrorCallbackString(callbackId));
-    }
-
-    /**
-     * Provides access to the browser instance for the application.
-     */
-    public static BrowserField getBrowserField() {
-      Object o = browser.get();
-      if ( o instanceof BrowserField ) {
-        return (BrowserField)o;
-      } else {
-        return null;
-      }
-    }
-
-    /**
-     * Returns the widget application name.
-     */
-    public static String getAppName() {
-        return appName;
-    }
-
-    /**
-     * Returns unique ID of the widget application.
-     */
-    public static long getAppID() {
-        return appID;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/accelerometer/Accelerometer.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/accelerometer/Accelerometer.java b/bbos/framework/ext/src/org/apache/cordova/accelerometer/Accelerometer.java
deleted file mode 100644
index 2088122..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/accelerometer/Accelerometer.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.accelerometer;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Vector;
-
-import net.rim.device.api.system.AccelerometerData;
-import net.rim.device.api.system.AccelerometerListener;
-import net.rim.device.api.system.AccelerometerSensor;
-import net.rim.device.api.system.Application;
-
-import org.apache.cordova.api.Plugin;
-import org.apache.cordova.api.PluginResult;
-import org.apache.cordova.json4j.JSONArray;
-import org.apache.cordova.json4j.JSONException;
-import org.apache.cordova.json4j.JSONObject;
-import org.apache.cordova.util.Logger;
-
-public class Accelerometer extends Plugin implements AccelerometerListener {
-    private static final String LOG_TAG = "Accelerometer: ";
-
-    private static final String ACTION_START = "start";
-    private static final String ACTION_STOP = "stop";
-
-    private static final int STOPPED = 0;
-    private static final int STARTING = 1;
-    private static final int RUNNING = 2;
-    private static final int ERROR_FAILED_TO_START = 3;
-
-    // BlackBerry uses a value of 1000 (AccelerometerSensor.G_FORCE_VALUE) to
-    // represent g force constant. Spec uses m/s^2. This constant is used
-    // to normalize BlackBerry values to the spec.
-    private static final short G_FORCE_NORMALIZE = 981;
-
-    // the single channel to the device sensor
-    private static AccelerometerSensor.Channel _rawDataChannel = null;
-
-    private int state = STOPPED; // state of this listener
-    private long initTime = 0;
-
-    /**
-     * Reference to single start callbackid
-     */
-    private String callbackId;
-
-    public PluginResult execute(String action, JSONArray args, String callbackId) {
-        PluginResult result;
-        if (!AccelerometerSensor.isSupported()) {
-            result = new PluginResult(
-                    PluginResult.Status.ILLEGAL_ACCESS_EXCEPTION,
-                    "Accelerometer sensor not supported");
-        } else if (ACTION_START.equals(action)) {
-            result = start(callbackId);
-        } else if (ACTION_STOP.equals(action)) {
-            result = stop();
-        } else {
-            result = new PluginResult(PluginResult.Status.INVALID_ACTION,
-                    "Accelerometer: Invalid action:" + action);
-        }
-
-        return result;
-    }
-
-    /**
-     * Implements the AccelerometerListener method. We listen for the purpose of
-     * closing the application's accelerometer sensor channel after timeout has
-     * been exceeded.
-     */
-    public void onData(AccelerometerData accelData) {
-        short x = accelData.getLastXAcceleration();
-        short y = accelData.getLastYAcceleration();
-        short z = accelData.getLastZAcceleration();
-
-        // If any value is not zero, assume sensor is now active and set state.
-        if (state == STARTING && (x != 0 || y != 0 || z != 0)) {
-            state = RUNNING;
-        }
-
-        if (state == RUNNING) {
-            // Send the new accelerometer data.
-            JSONObject accel = new JSONObject();
-            try {
-                accel.put("x", normalize(x));
-                accel.put("y", normalize(y));
-                accel.put("z", normalize(z));
-                accel.put("timestamp", accelData.getLastTimestamp());
-                sendResult(true,
-                        new PluginResult(PluginResult.Status.OK, accel), true);
-            } catch (JSONException e) {
-                sendResult(false, new PluginResult(
-                        PluginResult.Status.JSON_EXCEPTION, "JSONException:"
-                                + e.getMessage()), false);
-            }
-        } else if ((System.currentTimeMillis() - initTime) > 2000) {
-            // If the sensor does not become active within 2 seconds of
-            // the request to start it, fail out.
-            stop();
-            state = ERROR_FAILED_TO_START;
-            JSONObject errorObj = new JSONObject();
-            try {
-                errorObj.put("code", ERROR_FAILED_TO_START);
-                errorObj.put("message", "Accelerometer could not be started.");
-            } catch (JSONException e) {
-                Logger.log(LOG_TAG
-                        + "Failed to build JSON object for ERROR_FAILED_TO_START.");
-            }
-            sendResult(false, new PluginResult(PluginResult.Status.ERROR,
-                    errorObj), false);
-        }
-    }
-
-    /**
-     * Called when Plugin is destroyed.
-     */
-    public void onDestroy() {
-        stop();
-    }
-
-    /**
-     * Adds a SystemListener to listen for changes to the battery state. The
-     * listener is only registered if one has not already been added.
-     */
-    private PluginResult start(String callbackId) {
-        this.callbackId = callbackId;
-        if (_rawDataChannel == null || !_rawDataChannel.isOpen()) {
-            _rawDataChannel = AccelerometerSensor
-                    .openRawDataChannel(Application.getApplication());
-            Logger.log(LOG_TAG + "sensor channel opened");
-
-            initTime = System.currentTimeMillis();
-            state = STARTING;
-            _rawDataChannel.setAccelerometerListener(this);
-            Logger.log(LOG_TAG + "sensor listener added");
-        }
-
-        PluginResult result = new PluginResult(PluginResult.Status.NO_RESULT);
-        result.setKeepCallback(true);
-        return result;
-    }
-
-    /**
-     * Normalize the range of values returned by BlackBerry to the agreed upon
-     * cross platform range.
-     *
-     * @param value
-     * @return normalized value
-     */
-    private double normalize(short value) {
-        // Integer multiplication is less troublesome then floating point.
-        StringBuffer buf = new StringBuffer(String.valueOf(value
-                * G_FORCE_NORMALIZE));
-
-        // Manipulate the string to properly insert zeros and decimal point so
-        // something like -708910 becomes -7.08910 and 764 becomes .00764.
-        // Due to the values returned by BlackBerry there will always be 5
-        // decimal precision in the normalized value.
-        int idx = buf.charAt(0) == '-' ? 1 : 0;
-        while (buf.length() < (5 + idx)) {
-            buf.insert(idx, '0');
-        }
-        buf.insert(buf.length() - 5, '.');
-
-        return Double.parseDouble(buf.toString());
-    }
-
-    /**
-     * Helper function to send a PluginResult to the saved call back ID.
-     *
-     * @param issuccess
-     *            true if this is a successful result, false otherwise.
-     * @param result
-     *            the PluginResult to return
-     * @param keepCallback
-     *            Boolean value indicating whether to keep the call back id
-     *            active.
-     */
-    private synchronized void sendResult(boolean issuccess,
-            PluginResult result, boolean keepCallback) {
-
-        if (result != null) {
-            // Must keep the call back active for future watch events.
-            result.setKeepCallback(keepCallback);
-
-            if (issuccess) {
-                success(result, this.callbackId);
-            } else {
-                error(result, this.callbackId);
-            }
-        }
-    }
-
-    /**
-     * Stops accelerometer listener and closes the sensor channel.
-     */
-    private synchronized PluginResult stop() {
-        if (_rawDataChannel != null && _rawDataChannel.isOpen()) {
-
-            // Remove the battery listener.
-            _rawDataChannel.removeAccelerometerListener();
-            _rawDataChannel.close();
-            _rawDataChannel = null;
-
-            Logger.log(LOG_TAG + "sensor channel closed");
-        }
-
-        state = STOPPED;
-
-        return new PluginResult(PluginResult.Status.OK);
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/api/IPlugin.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/api/IPlugin.java b/bbos/framework/ext/src/org/apache/cordova/api/IPlugin.java
deleted file mode 100644
index 7e09d31..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/api/IPlugin.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.api;
-
-import org.apache.cordova.CordovaExtension;
-import org.apache.cordova.json4j.JSONArray;
-
-/**
- * Plugin interface must be implemented by any plugin classes.
- *
- * The execute method is called by the PluginManager.
- */
-public interface IPlugin {
-
-	/**
-	 * Executes the request and returns PluginResult.
-	 *
-	 * @param action 		The action to execute.
-	 * @param args 			JSONArry of arguments for the plugin.
-	 * @param callbackId	The callback id used when calling back into JavaScript.
-	 * @return 				A PluginResult object with a status and message.
-	 */
-	PluginResult execute(String action, JSONArray args, String callbackId);
-
-	/**
-	 * Identifies if action to be executed returns a value and should be run synchronously.
-	 *
-	 * @param action	The action to execute
-	 * @return			T=returns value
-	 */
-	public boolean isSynch(String action);
-
-	/**
-	 * Sets the context of the Plugin. This can then be used to do things like
-	 * get file paths associated with the Activity.
-	 *
-	 * @param ctx The main application class.
-	 */
-	void setContext(CordovaExtension ctx);
-
-    /**
-     * Called when the system is about to start resuming a previous activity.
-     */
-    void onPause();
-
-    /**
-     * Called when the activity will start interacting with the user.
-     */
-    void onResume();
-
-    /**
-     * The final call you receive before your activity is destroyed.
-     */
-    void onDestroy();
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/api/Plugin.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/api/Plugin.java b/bbos/framework/ext/src/org/apache/cordova/api/Plugin.java
deleted file mode 100644
index 6f70b85..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/api/Plugin.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.api;
-
-import org.apache.cordova.CordovaExtension;
-import org.apache.cordova.json4j.JSONArray;
-
-/**
- * Plugin interface must be implemented by any plugin classes.
- *
- * The execute method is called by the PluginManager.
- */
-public abstract class Plugin implements IPlugin {
-
-    public CordovaExtension ctx;					// Main application object
-
-	/**
-	 * Executes the request and returns PluginResult.
-	 *
-	 * @param action 		The action to execute.
-	 * @param args 			JSONArry of arguments for the plugin.
-	 * @param callbackId	The callback id used when calling back into JavaScript.
-	 * @return 				A PluginResult object with a status and message.
-	 */
-	public abstract PluginResult execute(String action, JSONArray args, String callbackId);
-
-	/**
-	 * Identifies if action to be executed returns a value and should be run synchronously.
-	 *
-	 * @param action	The action to execute
-	 * @return			T=returns value
-	 */
-	public boolean isSynch(String action) {
-		return false;
-	}
-
-	/**
-	 * Sets the context of the Plugin. This can then be used to do things like
-	 * get file paths associated with the Activity.
-	 *
-	 * @param ctx The context of the main Activity.
-	 */
-	public void setContext(CordovaExtension ctx) {
-		this.ctx = ctx;
-	}
-
-    /**
-     * Called when Plugin is paused.
-     */
-    public void onPause() {
-    }
-
-    /**
-     * Called when Plugin is resumed.
-     */
-    public void onResume() {
-    }
-
-    /**
-     * Called when Plugin is destroyed.
-     */
-    public void onDestroy() {
-    }
-
-    /**
-     * Send generic JavaScript statement back to JavaScript.
-     * success(...) and error(...) should be used instead where possible.
-     *
-     * @param statement
-     */
-    public void invokeScript(String statement) {
-        CordovaExtension.invokeScript(statement);
-    }
-
-    /**
-     * Call the JavaScript success callback for this plugin.
-     *
-     * This can be used if the execute code for the plugin is asynchronous meaning
-     * that execute should return null and the callback from the async operation can
-     * call success(...) or error(...)
-     *
-     * @param pluginResult		The result to return.
-	 * @param callbackId		The callback id used when calling back into JavaScript.
-     */
-    public static void success(PluginResult pluginResult, String callbackId) {
-        CordovaExtension.invokeSuccessCallback(callbackId, pluginResult);
-    }
-
-    /**
-     * Call the JavaScript error callback for this plugin.
-     *
-     * @param pluginResult		The result to return.
-	 * @param callbackId		The callback id used when calling back into JavaScript.
-     */
-    public static void error(PluginResult pluginResult, String callbackId) {
-        CordovaExtension.invokeErrorCallback(callbackId, pluginResult);
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/api/PluginManager.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/api/PluginManager.java b/bbos/framework/ext/src/org/apache/cordova/api/PluginManager.java
deleted file mode 100644
index a8e5e9b..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/api/PluginManager.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.api;
-
-import java.util.Hashtable;
-
-import org.apache.cordova.CordovaExtension;
-import org.apache.cordova.util.FileUtils;
-import org.apache.cordova.util.Logger;
-
-import net.rim.device.api.script.Scriptable;
-import net.rim.device.api.script.ScriptableFunction;
-
-/**
- * PluginManager represents an object in the script engine. It can be accessed
- * from the script environment using <code>cordova.PluginManager</code>.
- *
- * PluginManager provides a function, <code>exec</code>, that can be invoked
- * from the script environment: <code>cordova.PluginManager.exec(...)</code>.
- * Invoking this function causes the script engine to load the appropriate
- * Cordova Plugin and perform the specified action.
- */
-public final class PluginManager extends Scriptable {
-
-    /**
-     * Field used to invoke Plugin actions.
-     */
-    public static String FIELD_EXEC = "exec";
-
-    /**
-     * Field used to cleanup Plugins.
-     */
-    public static String FIELD_DESTROY = "destroy";
-
-    /**
-     * Field used to indicate application has been brought to foreground.
-     */
-    public static String FIELD_RESUME = "resume";
-
-    /**
-     * Field used to indicate application has been sent to background
-     */
-    public static String FIELD_PAUSE = "pause";
-
-    /**
-     * Field used to register a Plugin.
-     */
-    public static String FIELD_ADD_PLUGIN = "addPlugin";
-
-    /**
-     * Loads the appropriate Cordova Plugins and invokes their actions.
-     */
-    private final PluginManagerFunction pluginManagerFunction;
-
-    /**
-     * Maps available services to Java class names.
-     */
-    private Hashtable services = new Hashtable();
-
-    /**
-     * Constructor.  Adds available Cordova services.
-     * @param ext   The Cordova JavaScript Extension
-     */
-    public PluginManager(CordovaExtension ext) {
-        this.pluginManagerFunction = new PluginManagerFunction(ext, this);
-    }
-
-    /**
-     * The following fields are supported from the script environment:
-     *
-     *  <code>cordova.pluginManager.exec</code> - Loads the appropriate
-     *  Plugin and invokes the specified action.
-     *
-     *  <code>cordova.pluginManager.destroy</code> - Invokes the <code>onDestroy</code>
-     *  method on all Plugins to give them a chance to cleanup before exit.
-     */
-    public Object getField(String name) throws Exception {
-        if (name.equals(FIELD_EXEC)) {
-            return this.pluginManagerFunction;
-        }
-        else if (name.equals(FIELD_DESTROY)) {
-            return new ScriptableFunction() {
-                public Object invoke(Object obj, Object[] oargs) throws Exception {
-                    destroy();
-                    return null;
-                }
-            };
-        }
-        else if (name.equals(FIELD_RESUME)) {
-            final PluginManagerFunction plugin_mgr = this.pluginManagerFunction;
-            return new ScriptableFunction() {
-                public Object invoke(Object obj, Object[] oargs) throws Exception {
-                    plugin_mgr.onResume();
-                    return null;
-                }
-            };
-        }
-        else if (name.equals(FIELD_PAUSE)) {
-            final PluginManagerFunction plugin_mgr = this.pluginManagerFunction;
-            return new ScriptableFunction() {
-                public Object invoke(Object obj, Object[] oargs) throws Exception {
-                    plugin_mgr.onPause();
-                    return null;
-                }
-            };
-        }
-        else if (name.equals(FIELD_ADD_PLUGIN)) {
-            Logger.log("Plugins are now added through the plugins.xml in the application root.");
-        }
-        return super.getField(name);
-    }
-
-    /**
-     * Add a class that implements a service.
-     *
-     * @param serviceName   The service name.
-     * @param className     The Java class name that implements the service.
-     */
-    public void addService(String serviceName, String className) {
-        this.services.put(serviceName, className);
-    }
-
-    /**
-     * Cleanup the plugin resources and delete temporary directory that may have
-     * been created.
-     */
-    public void destroy() {
-        // allow plugins to clean up
-        pluginManagerFunction.onDestroy();
-
-        // delete temporary application directory
-        // NOTE: doing this on a background thread doesn't work because the app
-        // is closing and the thread is killed before it completes.
-        try {
-            FileUtils.deleteApplicationTempDirectory();
-        } catch (Exception e) {
-            Logger.log(this.getClass().getName()
-                    + ": error deleting application temp directory: "
-                    + e.getMessage());
-        }
-    }
-
-    /**
-     * Get the class that implements a service.
-     *
-     * @param serviceName   The service name.
-     * @return The Java class name that implements the service.
-     */
-    public String getClassForService(String serviceName) {
-        return (String)this.services.get(serviceName);
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/api/PluginManagerFunction.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/api/PluginManagerFunction.java b/bbos/framework/ext/src/org/apache/cordova/api/PluginManagerFunction.java
deleted file mode 100644
index 13a0e77..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/api/PluginManagerFunction.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.api;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-
-import net.rim.device.api.script.ScriptableFunction;
-
-import org.apache.cordova.CordovaExtension;
-import org.apache.cordova.json4j.JSONArray;
-import org.apache.cordova.json4j.JSONException;
-import org.apache.cordova.util.Logger;
-
-/**
- * PluginManagerFunction represents a function that can be invoked from the
- * script environment of the widget framework.  It manages the plugins for
- * the Cordova JavaScript Extension.
- *
- * Calling <code>cordova.pluginManager.exec(...)</code> from JavaScript will
- * result in this class' <code>invoke()</code> method being called.
- */
-public class PluginManagerFunction extends ScriptableFunction {
-
-	private final static int ARG_SERVICE = 0;
-	private final static int ARG_ACTION = 1;
-	private final static int ARG_CALLBACK_ID = 2;
-	private final static int ARG_ARGS = 3;
-	private final static int ARG_ASYNC = 4;
-
-	private Hashtable plugins = new Hashtable();
-
-	private final CordovaExtension ext;
-	private final PluginManager pluginManager;
-
-	/**
-	 * Constructor.
-	 * @param ext              The Cordova JavaScript Extension
-	 * @param pluginManager    The PluginManager that exposes the scriptable object.
-	 */
-	public PluginManagerFunction(CordovaExtension ext, PluginManager pluginManager) {
-		this.ext = ext;
-		this.pluginManager = pluginManager;
-	}
-
-	/**
-	 * The invoke method is called when cordova.pluginManager.exec(...) is
-	 * used from the script environment.  It instantiates the appropriate plugin
-	 * and invokes the specified action.  JavaScript arguments are passed in
-	 * as an array of objects.
-	 *
-	 * @param service 		String containing the service to run
-	 * @param action 		String containing the action that the service is supposed to perform. This is
-	 * 						passed to the plugin execute method and it is up to the plugin developer
-	 * 						how to deal with it.
-	 * @param callbackId 	String containing the id of the callback that is executed in JavaScript if
-	 * 						this is an async plugin call.
-	 * @param args 			An Array literal string containing any arguments needed in the
-	 * 						plugin execute method.
-	 * @param async 		Boolean indicating whether the calling JavaScript code is expecting an
-	 * 						immediate return value. If true, either CordovaExtension.callbackSuccess(...) or
-	 * 						CordovaExtension.callbackError(...) is called once the plugin code has executed.
-	 *
-	 * @return 				JSON encoded string with a response message and status.
-	 *
-	 * @see net.rim.device.api.script.ScriptableFunction#invoke(java.lang.Object, java.lang.Object[])
-	 */
-	public Object invoke(Object obj, Object[] oargs) throws Exception {
-		final String service = (String)oargs[ARG_SERVICE];
-		final String action = (String)oargs[ARG_ACTION];
-		final String callbackId = (String)oargs[ARG_CALLBACK_ID];
-		boolean async = (oargs[ARG_ASYNC].toString().equals("true") ? true : false);
-		PluginResult pr = null;
-
-		try {
-			// action arguments
-			final JSONArray args = new JSONArray((String)oargs[ARG_ARGS]);
-
-			// get the class for the specified service
-			String clazz = this.pluginManager.getClassForService(service);
-			Class c = null;
-			if (clazz != null) {
-				c = getClassByName(clazz);
-			}
-
-			if (isCordovaPlugin(c)) {
-				// Create a new instance of the plugin and set the context
-				final Plugin plugin = this.loadPlugin(clazz, c);
-				async = async && !plugin.isSynch(action);
-				if (async) {
-					// Run this async on a background thread so that JavaScript can continue on
-					Thread thread = new Thread(new Runnable() {
-						public void run() {
-							// Call execute on the plugin so that it can do it's thing
-						    final PluginResult result = plugin.execute(action, args, callbackId);
-
-						    if (result != null) {
-						        int status = result.getStatus();
-
-						        // If plugin status is OK,
-						        // or plugin is not going to send an immediate result (NO_RESULT)
-						        if (status == PluginResult.Status.OK.ordinal() ||
-						            status == PluginResult.Status.NO_RESULT.ordinal()) {
-						            CordovaExtension.invokeSuccessCallback(callbackId, result);
-						        }
-						        // error
-						        else {
-						            CordovaExtension.invokeErrorCallback(callbackId, result);
-						        }
-						    }
-						}
-					});
-					thread.start();
-					return "";
-				} else {
-					// Call execute on the plugin so that it can do it's thing
-					pr = plugin.execute(action, args, callbackId);
-				}
-			}
-		} catch (ClassNotFoundException e) {
-		    Logger.log(this.getClass().getName() + ": " + e);
-			pr = new PluginResult(PluginResult.Status.CLASS_NOT_FOUND_EXCEPTION, "ClassNotFoundException: " + e.getMessage());
-		} catch (IllegalAccessException e) {
-            Logger.log(this.getClass().getName() + ": " + e);
-			pr = new PluginResult(PluginResult.Status.ILLEGAL_ACCESS_EXCEPTION, "IllegalAccessException:" + e.getMessage());
-		} catch (InstantiationException e) {
-            Logger.log(this.getClass().getName() + ": " + e);
-			pr = new PluginResult(PluginResult.Status.INSTANTIATION_EXCEPTION, "InstantiationException: " + e.getMessage());
-		} catch (JSONException e) {
-            Logger.log(this.getClass().getName() + ": " + e);
-			pr = new PluginResult(PluginResult.Status.JSON_EXCEPTION, "JSONException: " + e.getMessage());
-		}
-		// if async we have already returned at this point unless there was an error...
-		if (async) {
-			CordovaExtension.invokeErrorCallback(callbackId, pr);
-		}
-		return ( pr != null ? pr.getJSONString() : "{ status: 0, message: 'all good' }" );
-	}
-
-	/**
-	 * Get the class.
-	 *
-	 * @param clazz
-	 * @return
-	 * @throws ClassNotFoundException
-	 */
-	private Class getClassByName(final String clazz) throws ClassNotFoundException {
-		return Class.forName(clazz);
-	}
-
-	/**
-	 * Determines if the class implements org.apache.cordova.api.Plugin interface.
-	 *
-	 * @param c The class to check.
-	 * @return Boolean indicating if the class implements org.apache.cordova.api.Plugin
-	 */
-	private boolean isCordovaPlugin(Class c) {
-		if (c != null) {
-			return org.apache.cordova.api.Plugin.class.isAssignableFrom(c) || org.apache.cordova.api.IPlugin.class.isAssignableFrom(c);
-		}
-		return false;
-	}
-
-    /**
-     * Add plugin to be loaded and cached.
-     * If plugin is already created, then just return it.
-     *
-     * @param className				The class to load
-     * @return						The plugin
-     */
-	public Plugin loadPlugin(String className, Class clazz) throws IllegalAccessException, InstantiationException {
-	    if (this.plugins.containsKey(className)) {
-                return this.getPlugin(className);
-	    }
-        Logger.log(this.getClass().getName() + ": Loading plugin " + clazz);
-        Plugin plugin = (Plugin)clazz.newInstance();
-        this.plugins.put(className, plugin);
-        plugin.setContext(this.ext);
-        return plugin;
-    }
-
-    /**
-     * Get the loaded plugin.
-     *
-     * @param className				The class of the loaded plugin.
-     * @return
-     */
-    public Plugin getPlugin(String className) {
-        return (Plugin)this.plugins.get(className);
-    }
-
-    /**
-     * Called when application is paused.
-     */
-    public void onPause() {
-        Enumeration e = this.plugins.elements();
-        while (e.hasMoreElements()) {
-            Plugin plugin = (Plugin)e.nextElement();
-            plugin.onPause();
-        }
-    }
-
-    /**
-     * Called when application is resumed.
-     */
-    public void onResume() {
-        Enumeration e = this.plugins.elements();
-        while (e.hasMoreElements()) {
-            Plugin plugin = (Plugin)e.nextElement();
-            plugin.onResume();
-        }
-    }
-
-    /**
-     * Called when application is destroyed.
-     */
-    public void onDestroy() {
-        Enumeration e = this.plugins.elements();
-        while (e.hasMoreElements()) {
-            Plugin plugin = (Plugin)e.nextElement();
-            plugin.onDestroy();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/api/PluginResult.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/api/PluginResult.java b/bbos/framework/ext/src/org/apache/cordova/api/PluginResult.java
deleted file mode 100644
index ce84884..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/api/PluginResult.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.api;
-
-import org.apache.cordova.json4j.JSONArray;
-import org.apache.cordova.json4j.JSONObject;
-
-/**
- * This class defines the standard object that should be returned as the
- * result of any Cordova plugin invocation.
- */
-public class PluginResult {
-
-    private final int status;
-    private final String message;
-    private boolean keepCallback = false;
-
-    public PluginResult(Status status) {
-        this.status = status.ordinal();
-        this.message = JSONObject.quote(status.getMessage());
-    }
-
-    public PluginResult(Status status, String message) {
-        this.status = status.ordinal();
-        this.message = JSONObject.quote(message);
-    }
-
-    public PluginResult(Status status, JSONArray message) {
-        this.status = status.ordinal();
-        this.message = message.toString();
-    }
-
-    public PluginResult(Status status, JSONObject message) {
-        this.status = status.ordinal();
-        this.message = (message != null) ? message.toString(): "null";
-    }
-
-    public PluginResult(Status status, int i) {
-        this.status = status.ordinal();
-        this.message = ""+i;
-    }
-
-    public PluginResult(Status status, float f) {
-        this.status = status.ordinal();
-        this.message = ""+f;
-    }
-
-    public PluginResult(Status status, boolean b) {
-        this.status = status.ordinal();
-        this.message = ""+b;
-    }
-
-    public PluginResult(Status status, long l) {
-        this.status = status.ordinal();
-        this.message = ""+l;
-    }
-
-    public int getStatus() {
-        return status;
-    }
-
-    public String getMessage() {
-        return message;
-    }
-
-    public void setKeepCallback(boolean b) {
-        this.keepCallback = b;
-    }
-
-    public boolean getKeepCallback() {
-        return this.keepCallback;
-    }
-
-    public String getJSONString() {
-        return "{\"status\":" + this.status + ",\"message\":" + this.message + ",\"keepCallback\":" + this.keepCallback + "}";
-    }
-
-    /**
-     * Returns the JavaScript string that executes the success callback for the
-     * appropriate Cordova plugin.  The string is intended to be passed to the
-     * JavaScript engine.
-     * @param callbackId Unique id of the callback that is associated with the invoked plugin
-     * @return JavaScript string that invokes the appropriate plugin success callback
-     */
-    public String toSuccessCallbackString(String callbackId) {
-        return "try { cordova.callbackSuccess('"+callbackId+"', " + this.getJSONString() + "); } catch(e) { alert('error in callbackSuccess:' + e.message); }";
-    }
-
-    /**
-     * Returns the JavaScript string that executes the error callback for the
-     * appropriate Cordova plugin.  The string is intended to be passed to the
-     * JavaScript engine.
-     * @param callbackId Unique id of the callback that is associated with the invoked plugin
-     * @return JavaScript string that invokes the appropriate plugin error callback
-     */
-    public String toErrorCallbackString(String callbackId) {
-        return "try { cordova.callbackError('"+callbackId+"', " + this.getJSONString() + "); } catch(e) { alert('error in callbackError:' + e.message); }";
-    }
-
-    public String toErrorString() {
-        return "alert('general error');";
-    }
-
-    /**
-     * Enumerates PluginResult status.
-     */
-    public static class Status
-    {
-        private int val;
-        private String message;
-
-        protected Status(int val, String message) {
-            this.val = val;
-            this.message = message;
-        }
-
-        public int ordinal() {
-            return this.val;
-        }
-
-        public String getMessage() {
-            return this.message;
-        }
-
-        public static final Status NO_RESULT = new Status(0, "No result");
-        public static final Status OK = new Status(1, "OK");
-        public static final Status CLASS_NOT_FOUND_EXCEPTION = new Status(2, "Class not found");
-        public static final Status ILLEGAL_ACCESS_EXCEPTION = new Status(3, "Illegal access");
-        public static final Status INSTANTIATION_EXCEPTION = new Status(4, "Instantiation error");
-        public static final Status MALFORMED_URL_EXCEPTION = new Status(5, "Malformed URL");
-        public static final Status IO_EXCEPTION = new Status(6, "IO error");
-        public static final Status INVALID_ACTION = new Status(7, "Invalid action");
-        public static final Status JSON_EXCEPTION = new Status(8, "JSON error");
-        public static final Status ERROR = new Status(9, "Error");
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/app/App.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/app/App.java b/bbos/framework/ext/src/org/apache/cordova/app/App.java
deleted file mode 100644
index 38ae205..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/app/App.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.app;
-
-import org.apache.cordova.CordovaExtension;
-import org.apache.cordova.api.Plugin;
-import org.apache.cordova.api.PluginResult;
-import org.apache.cordova.json4j.JSONArray;
-
-import net.rim.device.api.browser.field2.BrowserFieldHistory;
-import net.rim.device.api.system.Application;
-import net.rim.device.api.system.SystemListener2;
-
-/**
- * The App plug-in. This class provides access to application specific
- * management. The following actions are supported:
- *
- *      clearHistory    - Clear the browser history.
- *      backHistory     - Navigate back in the browser history.
- *      detectBacklight - Start a system listener for backlight changes.
- *      ignoreBacklight - Stop the system listener for backlight changes.
- */
-public class App extends Plugin {
-
-    private final static String ACTION_CLEAR_HISTORY = "clearHistory";
-    private final static String ACTION_BACK_HISTORY = "backHistory";
-    private final static String ACTION_DETECT_BACKLIGHT = "detectBacklight";
-    private final static String ACTION_IGNORE_BACKLIGHT = "ignoreBacklight";
-
-    private SystemListener2 listener = null;
-    private String callbackId = null;
-
-    /**
-     * Executes the requested action and returns a PluginResult.
-     *
-     * @param action
-     *            The action to execute.
-     * @param callbackId
-     *            The callback ID to be invoked upon action completion
-     * @param args
-     *            JSONArry of arguments for the action.
-     * @return A PluginResult object with a status and message.
-     */
-    public PluginResult execute(String action, JSONArray args,
-            final String callbackId) {
-        PluginResult result = null;
-
-        if (ACTION_CLEAR_HISTORY.equals(action)) {
-            BrowserFieldHistory history = CordovaExtension.getBrowserField()
-                    .getHistory();
-            if (history != null) {
-                history.clearHistory();
-            }
-            result = new PluginResult(PluginResult.Status.OK);
-        } else if (ACTION_BACK_HISTORY.equals(action)) {
-            CordovaExtension.getBrowserField().back();
-            result = new PluginResult(PluginResult.Status.OK);
-        } else if (ACTION_DETECT_BACKLIGHT.equals(action)) {
-            addListener(callbackId);
-            result = new PluginResult(PluginResult.Status.NO_RESULT);
-            result.setKeepCallback(true);
-        } else if (ACTION_IGNORE_BACKLIGHT.equals(action)) {
-            removeListener();
-            result = new PluginResult(PluginResult.Status.OK);
-        } else {
-            result = new PluginResult(PluginResult.Status.INVALID_ACTION,
-                    "App: Invalid action: " + action);
-        }
-
-        return result;
-    }
-
-    /**
-     * Called when Plugin is destroyed.
-     */
-    public void onDestroy() {
-        removeListener();
-    }
-
-    /**
-     * Register a system listener for backlight changes if one has not already
-     * been registered.
-     *
-     * @param callbackId
-     *            the callback ID associated with the system listener
-     */
-    private synchronized void addListener(final String callbackId) {
-        if (listener == null) {
-            listener = new SystemListener2() {
-                public void batteryGood() {}
-                public void batteryLow() {}
-                public void batteryStatusChange(int status) {}
-                public void powerOff() {}
-                public void powerUp() {}
-
-                public void backlightStateChange(boolean on) {
-                    PluginResult result = new PluginResult(
-                            PluginResult.Status.OK, on);
-
-                    // Must keep the call back active for future events.
-                    result.setKeepCallback(true);
-                    success(result, callbackId);
-                }
-
-                public void cradleMismatch(boolean mismatch) {}
-                public void fastReset() {}
-                public void powerOffRequested(int reason) {}
-                public void usbConnectionStateChange(int state) {}
-            };
-
-            this.callbackId = callbackId;
-            Application.getApplication().addSystemListener(listener);
-        }
-    }
-
-    /**
-     * Remove the system listener if it is registered and close out the
-     * callback handler.
-     */
-    private synchronized void removeListener() {
-        if (listener != null) {
-            Application.getApplication().removeSystemListener(listener);
-            listener = null;
-
-            if (callbackId != null) {
-                success(new PluginResult(PluginResult.Status.NO_RESULT),
-                        callbackId);
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/battery/Battery.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/battery/Battery.java b/bbos/framework/ext/src/org/apache/cordova/battery/Battery.java
deleted file mode 100644
index 55356a5..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/battery/Battery.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.battery;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-
-import org.apache.cordova.api.Plugin;
-import org.apache.cordova.api.PluginResult;
-import org.apache.cordova.json4j.JSONArray;
-import org.apache.cordova.json4j.JSONException;
-import org.apache.cordova.json4j.JSONObject;
-import org.apache.cordova.util.Logger;
-
-import net.rim.device.api.system.Application;
-import net.rim.device.api.system.DeviceInfo;
-import net.rim.device.api.system.SystemListener;
-
-/**
- * The Battery plug-in. This class provides information about the state of the
- * battery on the phone. The following actions are supported:
- *
- *      start - Start listening for changes in battery level (%) and batter
- *              charging state.
- *      stop  - Stop listening for changes in battery level and state.
- */
-public class Battery extends Plugin {
-
-    /** Actions to start and stop listening for battery changes. */
-    private final static String ACTION_START = "start";
-    private final static String ACTION_STOP = "stop";
-
-    /** The percentage of battery remaining. */
-    private final static String LEVEL = "level";
-
-    /** Whether the battery is currently charging or not. */
-    private final static String CHARGING = "isPlugged";
-
-    // The set of call back IDs to send results to. Using Hashtable because
-    // BlackBerry does not support Collections. There should only ever be one
-    // call back ID, but this allows multiple.
-    private Hashtable callbackIds = new Hashtable();
-
-    private SystemListener batteryListener = null;
-
-    /**
-     * Executes the requested action and returns a PluginResult.
-     *
-     * @param action
-     *            The action to execute.
-     * @param callbackId
-     *            The callback ID to be invoked upon action completion
-     * @param args
-     *            JSONArry of arguments for the action.
-     * @return A PluginResult object with a status and message.
-     */
-    public PluginResult execute(String action, JSONArray args, String callbackId) {
-        PluginResult result = null;
-
-        if (ACTION_START.equals(action)) {
-            // Register a listener to detect battery changes.
-            addListener(callbackId);
-
-            // Don't return any result now, since battery status results are
-            // sent when listener is notified.
-            result = new PluginResult(PluginResult.Status.NO_RESULT);
-
-            // Must keep the call back active for future events.
-            result.setKeepCallback(true);
-        } else if (ACTION_STOP.equals(action)) {
-            // Remove the battery listener and cleanup call back IDs.
-            removeListener();
-            result = new PluginResult(PluginResult.Status.OK);
-        } else {
-            result = new PluginResult(PluginResult.Status.INVALID_ACTION,
-                    "Battery: Invalid action: " + action);
-        }
-
-        return result;
-    }
-
-    /**
-     * Remove the listener when the application is destroyed. Note that onPause
-     * is not overridden, so the listener will continue if the application is
-     * simply paused instead of destroyed.
-     */
-    public void onDestroy() {
-        removeListener();
-    }
-
-    /**
-     * Adds a SystemListener to listen for changes to the battery state. The
-     * listener is only registered if one has not already been added. If a
-     * listener has already been registered the call back id is simply saved so
-     * that it can be notified upon next battery state change.
-     *
-     * @param callbackId
-     *            The reference point to call back when a listener event occurs.
-     */
-    private synchronized void addListener(String callbackId) {
-        callbackIds.put(callbackId, callbackId);
-
-        // Only register a listener if one has not been registered.
-        if (batteryListener == null) {
-            batteryListener = new SystemListener() {
-                // Initialize the charging state and battery level.
-                private boolean prevChargeState = (DeviceInfo
-                        .getBatteryStatus() & DeviceInfo.BSTAT_CHARGING) != 0;
-                private int prevLevel = DeviceInfo.getBatteryLevel();
-
-                public void batteryGood() { }
-                public void batteryLow() { }
-
-                public void batteryStatusChange(int status) {
-                    // The status bits passed into this method are unreliable
-                    // in determining when the battery level has changed.
-                    // Instead, when any state change occurs, get the current
-                    // battery level and report the change if it is different
-                    // then previous value.
-                    int newLevel = DeviceInfo.getBatteryLevel();
-                    boolean newChargeState = (DeviceInfo.BSTAT_CHARGING & status) != 0;
-
-                    // Report change if level or charge state is different then
-                    // previous values.
-                    if (newLevel != prevLevel || newChargeState != prevChargeState) {
-                        prevChargeState = newChargeState;
-                        prevLevel = newLevel;
-
-                        // Store the retrieved properties in a JSON object.
-                        JSONObject connectionInfo = new JSONObject();
-                        try {
-                            connectionInfo.put(LEVEL, newLevel);
-                            connectionInfo.put(CHARGING, newChargeState);
-                        } catch (JSONException e) {
-                            Logger.error("JSONException: " + e.getMessage());
-                            return;
-                        }
-
-                        PluginResult result = new PluginResult(
-                                PluginResult.Status.OK, connectionInfo);
-
-                        sendSuccessResult(result, true);
-                    }
-                }
-
-                public void powerOff() { }
-                public void powerUp() { }
-            };
-            Application.getApplication().addSystemListener(batteryListener);
-        }
-    }
-
-    /**
-     * Remove the registered battery status listener and cleanup the call back
-     * IDs.
-     */
-    private synchronized void removeListener() {
-        if (batteryListener != null) {
-
-            // Remove the battery listener.
-            Application.getApplication().removeSystemListener(batteryListener);
-            batteryListener = null;
-
-            // Close out the call back IDs.
-            sendSuccessResult(new PluginResult(PluginResult.Status.OK), false);
-            callbackIds.clear();
-        }
-    }
-
-    /**
-     * Helper function to send the PluginResult to the saved call back IDs.
-     *
-     * @param result
-     *            the PluginResult to return
-     * @param keepCallback
-     *            Boolean value indicating whether to keep the call back id
-     *            active.
-     */
-    private void sendSuccessResult(PluginResult result, boolean keepCallback) {
-
-        if (result != null) {
-            // Must keep the call back active for future events.
-            result.setKeepCallback(keepCallback);
-
-            // Iterate through the saved call back IDs. Really should only ever
-            // be one.
-            for (Enumeration callbacks = this.callbackIds.elements(); callbacks
-                    .hasMoreElements();) {
-                success(result, (String) callbacks.nextElement());
-            }
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/camera/Camera.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/camera/Camera.java b/bbos/framework/ext/src/org/apache/cordova/camera/Camera.java
deleted file mode 100644
index d54483f..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/camera/Camera.java
+++ /dev/null
@@ -1,470 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.camera;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Date;
-
-import javax.microedition.io.Connector;
-import javax.microedition.io.file.FileConnection;
-
-import org.apache.cordova.api.Plugin;
-import org.apache.cordova.api.PluginResult;
-import org.apache.cordova.json4j.JSONArray;
-import org.apache.cordova.json4j.JSONException;
-import org.apache.cordova.util.Logger;
-
-import net.rim.blackberry.api.invoke.CameraArguments;
-import net.rim.blackberry.api.invoke.Invoke;
-import net.rim.device.api.io.Base64OutputStream;
-import net.rim.device.api.io.IOUtilities;
-import net.rim.device.api.system.ApplicationDescriptor;
-import net.rim.device.api.system.Bitmap;
-import net.rim.device.api.system.Characters;
-import net.rim.device.api.system.ControlledAccessException;
-import net.rim.device.api.system.EncodedImage;
-import net.rim.device.api.system.EventInjector;
-import net.rim.device.api.system.JPEGEncodedImage;
-import net.rim.device.api.system.PNGEncodedImage;
-import net.rim.device.api.ui.UiApplication;
-
-/**
- * The Camera plugin interface.
- *
- * The Camera class can invoke the following actions:
- *
- *   - takePicture: takes photo and returns base64 encoded image or image file URI
- *
- *   future?
- *   - captureVideo...
- *
- */
-public class Camera extends Plugin
-{
-    /**
-     * Possible actions.
-     */
-    public static final String ACTION_TAKE_PICTURE = "takePicture";
-
-    /**
-     * Maximum image encoding size (in bytes) to allow.  (Obtained unofficially
-     * through trial and error). Anything larger will cause stability issues
-     * when sending back to the browser.
-     */
-    private static final long MAX_ENCODING_SIZE = 1500000L;
-
-    /**
-     * Executes the requested action and returns a PluginResult.
-     *
-     * @param action The action to execute.
-     * @param callbackId The callback ID to be invoked upon action completion
-     * @param args   JSONArry of arguments for the action.
-     * @return A PluginResult object with a status and message.
-     */
-    public PluginResult execute(String action, JSONArray args, String callbackId)
-    {
-        PluginResult result = null;
-
-        // take a picture
-        if (action != null && action.equals(ACTION_TAKE_PICTURE))
-        {
-            // Parse the options specified for the take picture action.
-            CameraOptions options;
-            try {
-                options = CameraOptions.fromJSONArray(args);
-            } catch (NumberFormatException e) {
-                return new PluginResult(PluginResult.Status.JSON_EXCEPTION, "One of the camera options is not a valid number.");
-            } catch (JSONException e) {
-                return new PluginResult(PluginResult.Status.JSON_EXCEPTION, "One of the camera options is not valid JSON.");
-            }
-
-            // launch native camera application
-            launchCamera(new PhotoListener(options, callbackId));
-
-            // The native camera application runs in a separate process, so we
-            // must now wait for the listener to retrieve the photo taken.
-            // Return NO_RESULT status so plugin manager does not invoke a callback,
-            // but keep the callback so the listener can invoke it later.
-            result = new PluginResult(PluginResult.Status.NO_RESULT);
-            result.setKeepCallback(true);
-            return result;
-        }
-        else
-        {
-            result = new PluginResult(PluginResult.Status.INVALID_ACTION, "Camera: Invalid action:" + action);
-        }
-
-        return result;
-    }
-
-    /**
-     * Launches the native camera application.
-     */
-    private static void launchCamera(PhotoListener listener)
-    {
-        // MMAPI interface doesn't use the native Camera application or interface
-        // (we would have to replicate it).  So, we invoke the native Camera application,
-        // which doesn't allow us to set any options.
-        synchronized(UiApplication.getEventLock()) {
-            UiApplication.getUiApplication().addFileSystemJournalListener(listener);
-            Invoke.invokeApplication(Invoke.APP_TYPE_CAMERA, new CameraArguments());
-        }
-    }
-
-    /**
-     * Closes the native camera application.
-     */
-    public static void closeCamera()
-    {
-        // simulate two escape characters to exit native camera application
-        // no, there is no other way to do this
-        UiApplication.getUiApplication().invokeLater(new Runnable() {
-            public void run() {
-                try
-                {
-                    EventInjector.KeyEvent inject = new EventInjector.KeyEvent(
-                            EventInjector.KeyEvent.KEY_DOWN, Characters.ESCAPE, 0);
-                    inject.post();
-                    inject.post();
-                }
-                catch (ControlledAccessException e)
-                {
-                    // the application doesn't have key injection permissions
-                    Logger.log(Camera.class.getName() + ": Unable to close camera.  " +
-                            ApplicationDescriptor.currentApplicationDescriptor().getName() +
-                            " does not have key injection permissions.");
-                }
-            }
-        });
-    }
-
-    /**
-     * Returns the image file URI or the Base64-encoded image.
-     * @param filePath The full path of the image file
-     * @param options Specifies the format of the image and the result
-     * @param callbackId The id of the callback to receive the result
-     */
-    public static void processImage(String filePath, CameraOptions options,
-            String callbackId) {
-        PluginResult result = null;
-        try
-        {
-            // wait for the file to be fully written to the file system
-            // to avoid premature access to it (yes, this has happened)
-            waitForImageFile(filePath);
-
-            // Reformat the image if the specified options require it,
-            // otherwise, get encoded string if base 64 string is output format.
-            String imageURIorData = filePath;
-            
-            // save to file:///store/home/user/ as oppsed to photo album
-            // so it doesn't show up in the camera's photo album viewer
-            if(!options.saveToPhotoAlbum){
-                FileConnection fconnIn = null;
-                FileConnection fconnOut = null;
-                InputStream in = null;
-                OutputStream out = null;
-                String newOutName = "";
-                try
-                {
-                    fconnIn = (FileConnection)Connector.open(filePath);
-                    if (fconnIn.exists())
-                    {
-                        newOutName = "file:///store/home/user/"+fconnIn.getName();
-                        fconnOut = (FileConnection)Connector.open(newOutName);
-                        if (!fconnOut.exists())
-                         {
-                             fconnOut.create();  
-                             in = fconnIn.openInputStream();
-                             out = fconnOut.openOutputStream();
-                             out.write(IOUtilities.streamToBytes(in, 96*1024));
-                             fconnIn.delete();
-                             out.close();
-                             imageURIorData = newOutName;
-                             filePath = newOutName;
-                             waitForImageFile(newOutName);
-                         }
-                    }
-                }
-                finally
-                {
-                    if (in != null) in.close();
-                    if (out != null) out.close();
-                    if (fconnIn != null) fconnIn.close();
-                    if (fconnOut != null) fconnOut.close();
-                }
-                
-            }
-
-            if (options.reformat) {
-                imageURIorData = reformatImage(filePath, options);
-            } else if (options.destinationType == CameraOptions.DESTINATION_DATA_URL) {
-                imageURIorData = encodeImage(filePath);
-            }
-
-            // we have to check the size to avoid memory errors in the browser
-            if (imageURIorData.length() > MAX_ENCODING_SIZE)
-            {
-                // it's a big one.  this is for your own good.
-                String msg = "Encoded image is too large.  Try reducing camera image size.";
-                Logger.log(Camera.class.getName() + ": " + msg);
-                result =  new PluginResult(PluginResult.Status.ERROR, msg);
-            }
-            else
-            {
-                result = new PluginResult(PluginResult.Status.OK, imageURIorData);
-            }
-        }
-        catch (Exception e)
-        {
-            result = new PluginResult(PluginResult.Status.IO_EXCEPTION, e.toString());
-        }
-
-        // send result back to JavaScript
-        sendResult(result, callbackId);
-    }
-
-    /**
-     * Waits for the image file to be fully written to the file system.
-     * @param filePath     Full path of the image file
-     * @throws IOException
-     */
-    private static void waitForImageFile(String filePath) throws IOException
-    {
-        long start = (new Date()).getTime();
-        FileConnection fconn = null;
-        try
-        {
-            fconn = (FileConnection)Connector.open(filePath, Connector.READ);
-            if (fconn.exists())
-            {
-                long fileSize = fconn.fileSize();
-                long size = 0;
-                while (true)
-                {
-                    try { Thread.sleep(100); } catch (InterruptedException e) {}
-                    size = fconn.fileSize();
-                    if (size == fileSize) {
-                        break;
-                    }
-                    fileSize = size;
-                }
-                Logger.log(Camera.class.getName() + ": " + filePath +
-                    " size=" + Long.toString(fileSize) + " bytes");
-            }
-        }
-        finally
-        {
-            if (fconn != null) fconn.close();
-        }
-        long end = (new Date()).getTime();
-        Logger.log(Camera.class.getName() + ": wait time=" + Long.toString(end-start) + " ms");
-    }
-
-    /**
-     * Opens the specified image file and converts its contents to a Base64-encoded string.
-     * @param filePath     Full path of the image file
-     * @return file contents as a Base64-encoded String
-     */
-    private static String encodeImage(String filePath) throws IOException
-    {
-        String imageData = null;
-
-        // open the image file
-        FileConnection fconn = null;
-        InputStream in = null;
-        ByteArrayOutputStream byteArrayOS = null;
-        try
-        {
-            fconn = (FileConnection)Connector.open(filePath);
-            if (fconn.exists())
-            {
-                // encode file contents using BASE64 encoding
-                in = fconn.openInputStream();
-                byteArrayOS = new ByteArrayOutputStream();
-                Base64OutputStream base64OS = new Base64OutputStream(byteArrayOS);
-                base64OS.write(IOUtilities.streamToBytes(in, 96*1024));
-                base64OS.flush();
-                base64OS.close();
-                imageData = byteArrayOS.toString();
-
-                Logger.log(Camera.class.getName() + ": Base64 encoding size=" +
-                        Integer.toString(imageData.length()));
-            }
-        }
-        finally
-        {
-            if (in != null) in.close();
-            if (fconn != null) fconn.close();
-            if (byteArrayOS != null) byteArrayOS.close();
-        }
-
-        return imageData;
-    }
-
-    /**
-     * Reformats the image taken with the camera based on the options specified.
-     *
-     * Unfortunately, reformatting the image will cause EXIF data in the photo
-     * to be lost.  Most importantly the orientation data is lost so the
-     * picture is not auto rotated by software that recognizes EXIF data.
-     *
-     * @param filePath
-     *            The full path of the image file
-     * @param options
-     *            Specifies the format of the image and the result
-     * @return the reformatted image file URI or Base64-encoded image
-     * @throws IOException
-     */
-    private static String reformatImage(String filePath, CameraOptions options)
-            throws IOException {
-        long start = (new Date()).getTime();
-
-        // Open the original image created by the camera application and read
-        // it into an EncodedImage object.
-        FileConnection fconn = null;
-        InputStream in = null;
-        Bitmap originalImage = null;
-        try {
-            fconn = (FileConnection) Connector.open(filePath);
-            in = fconn.openInputStream();
-            originalImage = Bitmap.createBitmapFromBytes(IOUtilities.streamToBytes(in, 96*1024), 0, -1, 1);
-        } finally {
-            if (in != null)
-                in.close();
-            if (fconn != null)
-                fconn.close();
-        }
-
-        int newWidth = options.targetWidth;
-        int newHeight = options.targetHeight;
-        int origWidth = originalImage.getWidth();
-        int origHeight = originalImage.getHeight();
-
-        // If only width or only height was specified, the missing dimension is
-        // set based on the current aspect ratio of the image.
-        if (newWidth > 0 && newHeight <= 0) {
-            newHeight = (newWidth * origHeight) / origWidth;
-        } else if (newWidth <= 0 && newHeight > 0) {
-            newWidth = (newHeight * origWidth) / origHeight;
-        } else if (newWidth <= 0 && newHeight <= 0) {
-            newWidth = origWidth;
-            newHeight = origHeight;
-        } else {
-            // If the user specified both a positive width and height
-            // (potentially different aspect ratio) then the width or height is
-            // scaled so that the image fits while maintaining aspect ratio.
-            // Alternatively, the specified width and height could have been
-            // kept and Bitmap.SCALE_TO_FIT specified when scaling, but this
-            // would result in whitespace in the new image.
-            double newRatio = newWidth / (double)newHeight;
-            double origRatio = origWidth / (double)origHeight;
-
-            if (origRatio > newRatio) {
-                newHeight = (newWidth * origHeight) / origWidth;
-            } else if (origRatio < newRatio) {
-                newWidth = (newHeight * origWidth) / origHeight;
-            }
-        }
-
-        Bitmap newImage = new Bitmap(newWidth, newHeight);
-        originalImage.scaleInto(newImage, options.imageFilter, Bitmap.SCALE_TO_FILL);
-
-        // Convert the image to the appropriate encoding.  PNG does not allow
-        // quality to be specified so the only affect that the quality option
-        // has for a PNG is on the seelction of the image filter.
-        EncodedImage encodedImage;
-        if (options.encoding == CameraOptions.ENCODING_PNG) {
-            encodedImage = PNGEncodedImage.encode(newImage);
-        } else {
-            encodedImage = JPEGEncodedImage.encode(newImage, options.quality);
-        }
-
-        // Rewrite the modified image back out to the same file.  This is done
-        // to ensure that for every picture taken, only one shows up in the
-        // gallery.  If the encoding changed the file extension will differ
-        // from the original.
-        OutputStream out = null;
-        int dirIndex = filePath.lastIndexOf('/');
-        String filename = filePath.substring(dirIndex + 1, filePath.lastIndexOf('.'))
-                + options.fileExtension;
-        try {
-            fconn = (FileConnection) Connector.open(filePath);
-            fconn.truncate(0);
-            out = fconn.openOutputStream();
-            out.write(encodedImage.getData());
-            fconn.rename(filename);
-        } finally {
-            if (out != null)
-                out.close();
-            if (fconn != null)
-                fconn.close();
-        }
-
-        // Return either the Base64-encoded string or the image URI for the
-        // new image.
-        String imageURIorData;
-        if (options.destinationType == CameraOptions.DESTINATION_DATA_URL) {
-            ByteArrayOutputStream byteArrayOS = null;
-
-            try {
-                byteArrayOS = new ByteArrayOutputStream();
-                Base64OutputStream base64OS = new Base64OutputStream(
-                        byteArrayOS);
-                base64OS.write(encodedImage.getData());
-                base64OS.flush();
-                base64OS.close();
-                imageURIorData = byteArrayOS.toString();
-                Logger.log(Camera.class.getName() + ": Base64 encoding size="
-                        + Integer.toString(imageURIorData.length()));
-            } finally {
-                if (byteArrayOS != null) {
-                    byteArrayOS.close();
-                }
-            }
-        } else {
-            imageURIorData = filePath.substring(0, dirIndex + 1) + filename;
-        }
-
-        long end = (new Date()).getTime();
-        Logger.log(Camera.class.getName() + ": reformat time=" + Long.toString(end-start) + " ms");
-
-        return imageURIorData;
-    }
-
-    /**
-     * Sends result back to JavaScript.
-     * @param result PluginResult
-     */
-    private static void sendResult(PluginResult result, String callbackId)
-    {
-        // invoke the appropriate callback
-        if (result.getStatus() == PluginResult.Status.OK.ordinal())
-        {
-            success(result, callbackId);
-        }
-        else
-        {
-            error(result, callbackId);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/camera/CameraOptions.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/camera/CameraOptions.java b/bbos/framework/ext/src/org/apache/cordova/camera/CameraOptions.java
deleted file mode 100644
index 8bfa0df..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/camera/CameraOptions.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.camera;
-
-import org.apache.cordova.json4j.JSONArray;
-import org.apache.cordova.json4j.JSONException;
-
-import net.rim.device.api.system.Bitmap;
-
-/**
- * A helper class to hold all the options specified when using the camera api.
- */
-public class CameraOptions {
-
-    /** Return the result as a Base-64 encoded string. */
-    public static final int DESTINATION_DATA_URL = 0;
-
-    /** Return the result as a file URI. */
-    public static final int DESTINATION_FILE_URI = 1;
-
-    /** JPEG image encoding. */
-    public static final int ENCODING_JPEG = 0;
-
-    /** PNG image encoding. */
-    public static final int ENCODING_PNG = 1;
-
-    /** Select image from picture library. */
-    public static final int SOURCE_PHOTOLIBRARY = 0;
-
-    /** Take picture from camera. */
-    public static final int SOURCE_CAMERA = 1;
-
-    /** Select image from picture library. */
-    public static final int SOURCE_SAVEDPHOTOALBUM = 2;
-
-    // Class members with defaults set.
-    public int quality = 80;
-    public int destinationType = DESTINATION_DATA_URL;
-    public int sourceType = SOURCE_CAMERA;
-    public int targetWidth = -1;
-    public int targetHeight = -1;
-    public int encoding = ENCODING_JPEG;
-    public String fileExtension = ".jpg";
-    public int imageFilter = Bitmap.FILTER_LANCZOS;
-    public boolean reformat = false;
-    public boolean saveToPhotoAlbum = true;
-
-    /**
-     * Defines the order of args in the JSONArray
-     *
-     * [ 80,                                   // quality
-     *   Camera.DestinationType.DATA_URL,      // destinationType
-     *   Camera.PictureSourceType.PHOTOLIBRARY // sourceType (ignored)
-     *   400,                                  // targetWidth
-     *   600,                                  // targetHeight
-     *   Camera.EncodingType.JPEG              // encoding
-     *	 Camera.mediaType
-     *   Camera.allowEdit
-     *   Camera.correctOrientation
-     *	 Camera.saveToPhotoAlbum			   // save to photo album
-     *   Camera.popoverOptions]			   
-     */
-    private static final int ARG_QUALITY = 0;
-    private static final int ARG_DESTINATION_TYPE = 1;
-    private static final int ARG_SOURCE_TYPE = 2;
-    private static final int ARG_TARGET_WIDTH = 3;
-    private static final int ARG_TARGET_HEIGHT = 4;
-    private static final int ARG_ENCODING = 5;
-    private static final int ARG_SAVETOPHOTOALBUM = 9;
-
-    /**
-     * Parse the JSONArray and populate the class members with the values.
-     *
-     * @param args
-     *            a JSON Array of camera options.
-     * @return a new CameraOptions object with values set.
-     * @throws NumberFormatException
-     * @throws JSONException
-     */
-    public static CameraOptions fromJSONArray(JSONArray args)
-            throws NumberFormatException, JSONException {
-        CameraOptions options = new CameraOptions();
-
-        if (args != null && args.length() > 0) {
-            // Use the quality value to determine what image filter to use
-            // if a reformat is necessary.  The possible values in order from
-            // fastest (poorest quality) to slowest (best quality) are:
-            //
-            //     FILTER_BOX -> FILTER_BILINEAR -> FILTER_LANCZOS
-            if (!args.isNull(ARG_QUALITY)) {
-                int quality = Integer.parseInt(args.getString(ARG_QUALITY));
-                if (quality > 0) {
-                    options.quality = quality > 100 ? 100 : quality;
-                    if (options.quality < 30) {
-                        options.imageFilter = Bitmap.FILTER_BOX;
-                    } else if (options.quality < 60) {
-                        options.imageFilter = Bitmap.FILTER_BILINEAR;
-                    }
-                }
-            }
-
-            if (!args.isNull(ARG_DESTINATION_TYPE)) {
-                int destType = Integer.parseInt(args
-                        .getString(ARG_DESTINATION_TYPE));
-                if (destType == DESTINATION_FILE_URI) {
-                    options.destinationType = DESTINATION_FILE_URI;
-                }
-            }
-
-            if (!args.isNull(ARG_SOURCE_TYPE)) {
-                options.sourceType = Integer.parseInt(args
-                        .getString(ARG_SOURCE_TYPE));
-            }
-
-            if (!args.isNull(ARG_TARGET_WIDTH)) {
-                options.targetWidth = Integer.parseInt(args
-                        .getString(ARG_TARGET_WIDTH));
-            }
-
-            if (!args.isNull(ARG_TARGET_HEIGHT)) {
-                options.targetHeight = Integer.parseInt(args
-                        .getString(ARG_TARGET_HEIGHT));
-            }
-
-            if (!args.isNull(ARG_ENCODING)) {
-                int encoding = Integer.parseInt(args.getString(ARG_ENCODING));
-                if (encoding == ENCODING_PNG) {
-                    options.encoding = ENCODING_PNG;
-                    options.fileExtension = ".png";
-                }
-            }
-
-            // A reformat of the picture taken from the camera is only performed
-            // if a custom width or height was specified or the user wants
-            // the output in an encoded form which is not JPEG.
-            if (options.targetWidth > 0 || options.targetHeight > 0
-                    || options.encoding != ENCODING_JPEG) {
-                options.reformat = true;
-            }
-
-            if (!args.isNull(ARG_SAVETOPHOTOALBUM)) {
-                options.saveToPhotoAlbum = parseBoolean(args.getString(ARG_SAVETOPHOTOALBUM));
-            }
-            
-        }
-
-        return options;
-    }
-
-    /**
-     * no parseBoolean in JDK 1.3 :(
-    */
-    public static boolean parseBoolean(String s) {
-        if(s.equals("true")){
-            return true;
-        }else{
-            return false;
-        }
-    }
-
-    /**
-     * @see java.lang.Object#toString()
-     */
-    public String toString() {
-        StringBuffer str = new StringBuffer();
-        str.append("Destination: " + destinationType + "\n");
-        str.append("Source: " + sourceType + "\n");
-        str.append("Quality: " + quality + "\n");
-        str.append("Width:  " + targetWidth + "\n");
-        str.append("Height: " + targetHeight + "\n");
-        str.append("Encoding:    " + encoding + "\n");
-        str.append("Filter: " + imageFilter + "\n");
-        str.append("Reformat: " + reformat);
-        str.append("Save To Photo Album: " + saveToPhotoAlbum);
-        return str.toString();
-    }
-}


[06/15] CB-4228

Posted by lo...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/http/FileUploader.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/http/FileUploader.java b/bbos/framework/ext/src/org/apache/cordova/http/FileUploader.java
deleted file mode 100644
index 75645c7..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/http/FileUploader.java
+++ /dev/null
@@ -1,280 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.http;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Enumeration;
-
-import javax.microedition.io.Connector;
-import javax.microedition.io.HttpConnection;
-import javax.microedition.io.file.FileConnection;
-
-import org.apache.cordova.CordovaExtension;
-import org.apache.cordova.api.PluginResult;
-import org.apache.cordova.json4j.JSONException;
-import org.apache.cordova.json4j.JSONObject;
-import org.apache.cordova.util.Logger;
-
-import net.rim.device.api.io.FileNotFoundException;
-import net.rim.device.api.io.IOUtilities;
-import net.rim.device.api.io.MIMETypeAssociations;
-import net.rim.device.api.io.http.HttpProtocolConstants;
-import net.rim.device.api.ui.UiApplication;
-
-/**
- * The FileUploader uses an HTTP multipart request to upload files on the
- * device to a remote server.  It currently supports a single file per HTTP
- * request.
- */
-public class FileUploader {
-
-    /**
-     * Constants
-     */
-    private static final String BOUNDARY = "----0x2fc1b3ef7cecbf14L";
-    private static final String LINE_END = "\r\n";
-    private static final String TD = "--";
-
-    private Integer responseCode = null;
-
-    /**
-     * Uploads the specified file to the server URL provided using an HTTP
-     * multipart request.
-     * @param filePath      Full path of the file on the file system
-     * @param server        URL of the server to receive the file
-     * @param fileKey       Name of file request parameter
-     * @param fileName      File name to be used on server
-     * @param mimeType      Describes file content type
-     * @param params        key:value pairs of user-defined parameters
-     * @return FileUploadResult containing result of upload request
-     */
-    public FileUploadResult upload(String filePath, String server, String fileKey,
-            String fileName, String mimeType, JSONObject params, JSONObject headers)
-    throws FileNotFoundException, IllegalArgumentException, IOException {
-
-        Logger.log(this.getClass().getName() + ": uploading " + filePath + " to " + server);
-        FileUploadResult result = new FileUploadResult();
-
-        InputStream in = null;
-        OutputStream out = null;
-        FileConnection fconn = null;
-        HttpConnection httpConn = null;
-        try {
-            // open connection to the file
-            try {
-                fconn = (FileConnection)Connector.open(filePath, Connector.READ);
-            } catch (ClassCastException e) {
-                // in case something really funky gets passed in
-                throw new IllegalArgumentException("Invalid file path");
-            } catch (IOException e) {
-                throw new FileNotFoundException("Failed to open source file: " + filePath);
-            }
-            if (!fconn.exists()) {
-                throw new FileNotFoundException(filePath + " not found");
-            }
-
-            // determine mime type by
-            //     1) user-provided type
-            //     2) retrieve from file system
-            //     3) default to JPEG
-            if (mimeType == null) {
-                mimeType = MIMETypeAssociations.getMIMEType(filePath);
-                if (mimeType == null) {
-                    mimeType = HttpProtocolConstants.CONTENT_TYPE_IMAGE_JPEG;
-                }
-            }
-
-            // boundary messages
-            String boundaryMsg = getBoundaryMessage(fileKey, fileName, mimeType);
-            String lastBoundary = getEndBoundary();
-
-            // user-defined request parameters
-            String customParams = (params != null) ? getParameterContent(params) : "";
-            Logger.log(this.getClass().getName() + ": params=" + customParams);
-
-            // determine content length
-            long fileSize = fconn.fileSize();
-            Logger.log(this.getClass().getName() + ": " + filePath + " size=" + fileSize + " bytes");
-            long contentLength = fileSize +
-                (long)boundaryMsg.length() +
-                (long)lastBoundary.length() +
-                (long)customParams.length();
-
-            // get HttpConnection
-            httpConn = HttpUtils.getHttpConnection(server);
-            if (httpConn == null) {
-                throw new IOException("Failed to connect to " + server);
-            }
-            Logger.log(this.getClass().getName() + ": server URL=" + httpConn.getURL());
-
-            // set request headers
-            httpConn.setRequestMethod(HttpConnection.POST);
-            httpConn.setRequestProperty(
-                    HttpProtocolConstants.HEADER_USER_AGENT,
-                    System.getProperty("browser.useragent"));
-            httpConn.setRequestProperty(
-                    HttpProtocolConstants.HEADER_KEEP_ALIVE, "300");
-            httpConn.setRequestProperty(
-                    HttpProtocolConstants.HEADER_CONNECTION, "keep-alive");
-            httpConn.setRequestProperty(
-                    HttpProtocolConstants.HEADER_CONTENT_TYPE,
-                    HttpProtocolConstants.CONTENT_TYPE_MULTIPART_FORM_DATA + "; boundary=" + BOUNDARY);
-            httpConn.setRequestProperty(
-                    HttpProtocolConstants.HEADER_CONTENT_LENGTH,
-                    Long.toString(contentLength));
-
-            if(headers != null){
-                for(Enumeration e = headers.keys(); e.hasMoreElements();){
-                    String key = e.nextElement().toString();
-                    String value = headers.optString(key);
-                    Logger.log(this.getClass().getName() + ": key=" + key + " value=" + value);
-                    httpConn.setRequestProperty(key, value);
-                }    
-            }
-            
-            // set cookie
-            String cookie = HttpUtils.getCookie(server);
-            if (cookie != null) {
-                httpConn.setRequestProperty(HttpProtocolConstants.HEADER_COOKIE, cookie);
-                Logger.log(this.getClass().getName() + ": cookie=" + cookie);
-            }
-
-            // write...
-            out = httpConn.openDataOutputStream();
-
-            // parameters
-            out.write(customParams.getBytes());
-
-            // boundary
-            out.write(boundaryMsg.getBytes());
-
-            // file data
-            in = fconn.openInputStream();
-            byte[] data = IOUtilities.streamToBytes(in);
-            out.write(data);
-            in.close();
-
-            // end boundary
-            out.write(lastBoundary.getBytes());
-
-            // send request and get response
-            in = httpConn.openDataInputStream();
-            //int rc = httpConn.getResponseCode();
-            result.setResponse(new String(IOUtilities.streamToBytes(in)));
-            //result.setResponseCode(rc);
-            result.setBytesSent(contentLength);
-            Logger.log(this.getClass().getName() + ": sent " + contentLength + " bytes");
-        }
-        finally {
-
-            if (httpConn != null) {
-                result.setResponseCode(httpConn.getResponseCode());
-                responseCode = new Integer(httpConn.getResponseCode());
-            }
-
-            try {
-                if (fconn != null) fconn.close();
-                if (in != null) in.close();
-                if (out != null) out.close();
-                if (httpConn != null) httpConn.close();
-            }
-            catch (IOException e) {
-                Logger.log(this.getClass().getName() + ": " + e);
-            }
-        }
-
-        return result;
-    }
-
-    /**
-     * Sends an upload progress notification back to JavaScript engine.
-     * @param result        FileUploadResult containing bytes sent of total
-     * @param callbackId    identifier of callback function to invoke
-     */
-    protected void sendProgress(FileUploadResult result, final String callbackId) {
-        JSONObject o = null;
-        try {
-            o = result.toJSONObject();
-        }
-        catch (JSONException e) {
-            Logger.log(this.getClass().getName() + ": " + e);
-            return;
-        }
-
-        // send a progress result
-        final PluginResult r = new PluginResult(PluginResult.Status.OK, o);
-        r.setKeepCallback(true);
-        UiApplication.getUiApplication().invokeAndWait(
-            new Runnable() {
-                public void run() {
-                    CordovaExtension.invokeSuccessCallback(callbackId, r);
-                }
-            }
-        );
-    }
-
-    /**
-     * Returns the boundary string that represents the beginning of a file
-     * in a multipart HTTP request.
-     * @param fileKey       Name of file request parameter
-     * @param fileName      File name to be used on server
-     * @param mimeType      Describes file content type
-     * @return string representing the boundary message in a multipart HTTP request
-     */
-    protected String getBoundaryMessage(String fileKey, String fileName, String mimeType) {
-        return (new StringBuffer())
-            .append(TD).append(BOUNDARY).append(LINE_END)
-            .append("Content-Disposition: form-data; name=\"").append(fileKey)
-            .append("\"; filename=\"").append(fileName).append("\"").append(LINE_END)
-            .append("Content-Type: ").append(mimeType).append(LINE_END)
-            .append(LINE_END)
-            .toString();
-    }
-
-    /**
-     * Returns the boundary string that represents the end of a file in a
-     * multipart HTTP request.
-     * @return string representing the end boundary message in a multipart HTTP request
-     */
-    protected String getEndBoundary() {
-        return LINE_END + TD + BOUNDARY + TD + LINE_END;
-    }
-
-    /**
-     * Returns HTTP form content containing specified parameters.
-     */
-    protected String getParameterContent(JSONObject params) {
-        StringBuffer buf = new StringBuffer();
-        for (Enumeration e = params.keys(); e.hasMoreElements();) {
-            String key = e.nextElement().toString();
-            String value = params.optString(key);
-            buf.append(TD).append(BOUNDARY).append(LINE_END)
-                .append("Content-Disposition: form-data; name=\"").append(key).append("\"")
-                .append(LINE_END).append(LINE_END)
-                .append(value).append(LINE_END);
-        }
-        return buf.toString();
-    }
-
-    Integer getResponseCode() {
-        return responseCode;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/http/HttpUtils.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/http/HttpUtils.java b/bbos/framework/ext/src/org/apache/cordova/http/HttpUtils.java
deleted file mode 100644
index af6ada6..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/http/HttpUtils.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.http;
-
-import javax.microedition.io.HttpConnection;
-
-import org.apache.cordova.CordovaExtension;
-
-import net.rim.device.api.io.transport.ConnectionDescriptor;
-import net.rim.device.api.io.transport.ConnectionFactory;
-
-/**
- * BlackBerry devices can connect to the network using a variety of transport
- * types, such as: WI-FI, BES/MDS, BIS, WAP (cellular).  A connection URL must
- * have the appropriate suffix to match the transport type.  This class contains
- * utility methods to retrieve the correct URL for the appropriate transport.
- */
-public class HttpUtils
-{
-    /**
-     * This method will open an HTTP connection over the best available transport type.
-     * @param url   Connection URL
-     */
-    public static HttpConnection getHttpConnection(String url)
-    {
-        HttpConnection httpConn = null;
-
-        // Create ConnectionFactory
-        ConnectionFactory factory = new ConnectionFactory();
-
-        // use the factory to get a connection
-        ConnectionDescriptor conDescriptor = factory.getConnection(url);
-
-        if (conDescriptor != null) {
-           // using the connection
-           httpConn = (HttpConnection) conDescriptor.getConnection();
-        }
-
-        return httpConn;
-    }
-
-    /**
-     * Retrieves the cookie from the application browser instance for the specified URL.
-     * @param url   Connection URL
-     */
-    public static String getCookie(String url)
-    {
-        return CordovaExtension.getBrowserField().getCookieManager().getCookie(url);
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/json4j/JSON.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/json4j/JSON.java b/bbos/framework/ext/src/org/apache/cordova/json4j/JSON.java
deleted file mode 100644
index adbe514..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/json4j/JSON.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.json4j;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-
-import org.apache.cordova.json4j.internal.JSON4JPBackReader;
-
-/**
- * Helper class that does generic parsing of a JSON stream and returns the appropriate
- * JSON structure (JSONArray or JSONObject).  Note that it is slightly more efficient to directly
- * parse with the appropriate object than to use this class to do a generalized parse.
- */
-public class JSON {
-
-    /**
-     * A constant for representing null.
-     * In this case, it is just null.
-     */
-    public static final Object NULL = null;
-
-    /**
-     * Parse a Reader of JSON text into a JSONArtifact.
-     * @param reader The character reader to read the JSON data from.
-     * @param order Boolean flag indicating if the order of the JSON data should be preserved.  This parameter only has an effect if the stream is JSON Object { ... } formatted data.
-     * Note:  The provided reader is not closed on completion of read; that is left to the caller.
-     * Note:  This is the same as calling parse(reader, order, false);
-     *
-     * @return Returns an instance of JSONArtifact (JSONObject, OrderedJSONObject, or JSONArray), corrisponding to if the input stream was Object or Array notation.
-     *
-     * @throws JSONException Thrown on errors during parse.
-     * @throws NullPointerException Thrown if reader is null
-     */
-    public static JSONArtifact parse(Reader reader, boolean order) throws JSONException, NullPointerException {
-        return parse(reader,order,false);
-    }
-
-    /**
-     * Parse a Reader of JSON text into a JSONArtifact.
-     * @param reader The character reader to read the JSON data from.
-     * @param order Boolean flag indicating if the order of the JSON data should be preserved.  This parameter only has an effect if the stream is JSON Object { ... } formatted data.
-     * @param strict Boolean flag to indicate if the content should be parsed in strict mode or not, meaning comments and unquoted strings are not allowed.
-     * Note:  The provided reader is not closed on completion of read; that is left to the caller.
-     *
-     * @return Returns an instance of JSONArtifact (JSONObject, OrderedJSONObject, or JSONArray), corrisponding to if the input stream was Object or Array notation.
-     *
-     * @throws JSONException Thrown on errors during parse.
-     * @throws NullPointerException Thrown if reader is null
-     */
-    public static JSONArtifact parse(Reader reader, boolean order, boolean strict) throws JSONException, NullPointerException {
-
-        try {
-            if (reader != null) {
-
-                JSON4JPBackReader pReader = null;
-
-                //Determine if we should buffer-wrap the reader before passing it on
-                //to the appropriate parser.
-                //boolean bufferIt = false;
-
-                Class readerClass = reader.getClass();
-
-               /* if (!StringReader.class.isAssignableFrom(readerClass) &&
-                    !CharArrayReader.class.isAssignableFrom(readerClass) &&
-                    !PushbackReader.class.isAssignableFrom(readerClass) &&
-                    !BufferedReader.class.isAssignableFrom(readerClass)) {
-                    bufferIt = true;
-                } */
-
-                //MSN IMPLEMENT PUSHBACKREADER!!
-                if (JSON4JPBackReader.class.isAssignableFrom(readerClass)) {
-                    pReader = (JSON4JPBackReader) reader;
-                } else {
-                    pReader = new JSON4JPBackReader(reader);
-                }
-
-                Reader rdr = pReader;
-                int ch = pReader.read();
-                while (ch != -1) {
-                    switch (ch) {
-                        case '{':
-                            pReader.unread(ch);
-                           /* if (bufferIt) {
-                                rdr = new BufferedReader(pReader);
-                            } */
-                            return new JSONObject(rdr,strict);
-                        case '[':
-                            pReader.unread(ch);
-                            /*if (bufferIt) {
-                                rdr = new BufferedReader(pReader);
-                            } */
-                            return new JSONArray(rdr, strict);
-                        case ' ':
-                        case '\t':
-                        case '\f':
-                        case '\r':
-                        case '\n':
-                        case '\b':
-                            ch = pReader.read();
-                            break;
-                        default:
-                            throw new JSONException("Unexpected character: [" + (char)ch + "] while scanning JSON String for JSON type.  Invalid JSON.");
-                    }
-                }
-                throw new JSONException("Encountered end of stream before JSON data was read.  Invalid JSON");
-            } else {
-                throw new NullPointerException("reader cannot be null.");
-            }
-        } catch (IOException iox) {
-            JSONException jex = new JSONException("Error occurred during input read.");
-            jex.setCause(iox);
-            throw jex;
-        }
-    }
-
-    /**
-     * Parse a Reader of JSON text into a JSONArtifact.
-     * This call is the same as JSON.parse(reader, false, false).
-     * Note that the provided reader is not closed on completion of read; that is left to the caller.
-     * @param reader The character reader to read the JSON data from.
-     *
-     * @return Returns an instance of JSONArtifact (JSONObject, OrderedJSONObject, or JSONArray), corrisponding to if the input stream was Object or Array notation.
-     *
-     * @throws JSONException Thrown on errors during parse.
-     * @throws NullPointerException Thrown if reader is null
-     */
-    public static JSONArtifact parse(Reader reader) throws JSONException, NullPointerException {
-        return parse(reader,false, false);
-    }
-
-    /**
-     * Parse a InputStream of JSON text into a JSONArtifact.
-     * Note:  The provided InputStream is not closed on completion of read; that is left to the caller.
-     * @param is The input stream to read from.  The content is assumed to be UTF-8 encoded and handled as such.
-     * @param order Boolean flag indicating if the order of the JSON data should be preserved.  This parameter only has an effect if the stream is JSON Object { ... } formatted data.
-     *
-     * @return Returns an instance of JSONArtifact (JSONObject or JSONArray), corrisponding to if the input stream was Object or Array notation.
-     *
-     * @throws JSONException Thrown on errors during parse.
-     * @throws NullPointerException Thrown if reader is null
-     */
-    public static JSONArtifact parse(InputStream is, boolean order) throws JSONException, NullPointerException {
-        return parse(is,order, false);
-    }
-
-    /**
-     * Parse a InputStream of JSON text into a JSONArtifact.
-     * Note that the provided InputStream is not closed on completion of read; that is left to the caller.
-     * @param is The input stream to read from.  The content is assumed to be UTF-8 encoded and handled as such.
-     * @param order Boolean flag indicating if the order of the JSON data should be preserved.  This parameter only has an effect if the stream is JSON Object { ... } formatted data.
-     * @param strict Boolean flag to indicate if the content should be parsed in strict mode or not, meaning comments and unquoted strings are not allowed.
-     *
-     * @return Returns an instance of JSONArtifact (JSONObject or JSONArray), corrisponding to if the input stream was Object or Array notation.
-     *
-     * @throws JSONException Thrown on errors during parse.
-     * @throws NullPointerException Thrown if reader is null
-     */
-    public static JSONArtifact parse(InputStream is, boolean order, boolean strict) throws JSONException, NullPointerException {
-        if (is != null) {
-            //BufferedReader reader = null;
-            InputStreamReader reader = null;
-            try {
-                reader = new InputStreamReader(is, "UTF-8");
-            } catch (Exception ex) {
-                JSONException iox = new JSONException("Could not construct UTF-8 character reader for the InputStream");
-                iox.setCause(ex);
-                throw iox;
-            }
-            return parse(reader,order);
-        } else {
-            throw new NullPointerException("is cannot be null");
-        }
-    }
-
-    /**
-     * Parse an InputStream of JSON text into a JSONArtifact.
-     * This call is the same as JSON.parse(is, false, false).
-     * Note that the provided InputStream is not closed on completion of read; that is left to the caller.
-     * @param is The input stream to read from.  The content is assumed to be UTF-8 encoded and handled as such.
-     *
-     * @return Returns an instance of JSONArtifact (JSONObject, OrderedJSONObject, or JSONArray), corrisponding to if the input stream was Object or Array notation.
-     *
-     * @throws JSONException Thrown on errors during parse.
-     * @throws NullPointerException Thrown if reader is null
-     */
-    public static JSONArtifact parse(InputStream is) throws JSONException, NullPointerException {
-        return parse(is,false, false);
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/json4j/JSONArray.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/json4j/JSONArray.java b/bbos/framework/ext/src/org/apache/cordova/json4j/JSONArray.java
deleted file mode 100644
index 87362c8..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/json4j/JSONArray.java
+++ /dev/null
@@ -1,1123 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.json4j;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Reader;
-import java.io.UnsupportedEncodingException;
-import java.io.Writer;
-import java.util.Vector;
-
-import org.apache.cordova.json4j.internal.JSON4JStringReader;
-import org.apache.cordova.json4j.internal.JSON4JStringWriter;
-import org.apache.cordova.json4j.internal.NumberUtil;
-import org.apache.cordova.json4j.internal.Parser;
-import org.apache.cordova.json4j.internal.Serializer;
-import org.apache.cordova.json4j.internal.SerializerVerbose;
-
-/**
- * Extension of ArrayList that only allows values which are JSON-able.
- * See JSONObject for a list of valid values.
- *
- * Instances of this class are not thread-safe.
- */
-public class JSONArray extends Vector implements JSONArtifact {
-
-    /**
-     * Serial UID for serialization checking.
-     */
-    private static final long serialVersionUID = 9076798781015779954L;
-
-    /**
-     * Create a new instance of this class.
-     */
-    public JSONArray() {
-        super();
-    }
-
-    /**
-     * Create a new instance of this class with the specified initial capacity.
-     * @param initialCapacity The initial size to define the array as.
-     */
-    public JSONArray(int initialCapacity) {
-        super(initialCapacity);
-    }
-
-    /**
-     * Create a new instance of this class based off the contents of the passed object array.
-     * @param elems The strings to add to a new JSONArray
-     * @throws JSONException Thrown when objects in the array are not JSONable.
-     */
-    public JSONArray(Object[] elems) throws JSONException {
-        if(elems != null){
-            for(int i = 0; i < elems.length; i++){
-                this.add(elems[i]);
-            }
-        }
-    }
-
-    /**
-     * Create a new instance of this class based off the contents of the passed object array.
-     * @param elems The strings to add to a new JSONArray
-     * @param includeSuperclass For JavaBeans, include all superclass info.
-     * @throws JSONException Thrown when objects in the array are not JSONable.
-     */
-    public JSONArray(Object[] elems, boolean includeSuperclass) throws JSONException {
-        if(elems != null){
-            for(int i = 0; i < elems.length; i++){
-                this.add(elems[i]);
-            }
-        }
-    }
-
-    /**
-     * Create a new instance of this class from the provided JSON object string.
-     * Note:  This is the same as calling new JSONArray(str, false);  Parsing in non-strict mode.
-     * @param str The JSON array string to parse.
-     * @throws JSONException Thrown when the string passed is null, or malformed JSON..
-     */
-    public JSONArray(String str) throws JSONException {
-        super();
-        JSON4JStringReader reader = new JSON4JStringReader(str);
-        (new Parser(reader)).parse(this);
-    }
-
-    /**
-     * Create a new instance of this class from the provided JSON object string.
-     * @param str The JSON array string to parse.
-     * @param strict Boolean denoting if the JSON should be parsed n strict mode, meaning unquoted strings and comments are not allowed.
-     * @throws JSONException Thrown when the string passed is null, or malformed JSON..
-     */
-    public JSONArray(String str, boolean strict) throws JSONException {
-        super();
-        JSON4JStringReader reader = new JSON4JStringReader(str);
-        (new Parser(reader, strict)).parse(this);
-    }
-
-    /**
-     * Create a new instance of this class from the data provided from the reader.  The reader content must be a JSON array string.
-     * Note:  The reader will not be closed, that is left to the caller.
-     * Note:  This is the same as calling new JSONArray(rdr, false);  Parsing in non-strict mode.
-     * @param rdr The Reader from which to read the JSON array string to parse.
-     * @throws JSONException Thrown when the string passed is null, or malformed JSON..
-     */
-    public JSONArray(Reader rdr) throws JSONException {
-        (new Parser(rdr)).parse(this);
-    }
-
-    /**
-     * Create a new instance of this class from the data provided from the reader.  The reader content must be a JSON array string.
-     * Note:  The reader will not be closed, that is left to the caller.
-     * @param rdr The Reader from which to read the JSON array string to parse.
-     * @param strict Boolean denoting if the JSON should be parsed n strict mode, meaning unquoted strings and comments are not allowed.
-     * @throws JSONException Thrown when the string passed is null, or malformed JSON..
-     */
-    public JSONArray(Reader rdr, boolean strict) throws JSONException {
-        (new Parser(rdr, strict)).parse(this);
-    }
-
-    /**
-     * Create a new instance of this class from the data provided from the input stream.  The stream content must be a JSON array string.
-     * Note:  The input stream content is assumed to be UTF-8 encoded.
-     * Note:  The InputStream will not be closed, that is left to the caller.
-     * @param is The InputStream from which to read the JSON array string to parse.
-     * @throws JSONException Thrown when the string passed is null, or malformed JSON..
-     */
-    public JSONArray(InputStream is) throws JSONException {
-        InputStreamReader isr = null;
-        if (is != null) {
-            try {
-                isr = new InputStreamReader(is, "UTF-8");
-            } catch (Exception ex) {
-                isr = new InputStreamReader(is);
-            }
-        } else {
-            throw new JSONException("Inputstream cannot be null");
-        }
-        (new Parser(isr)).parse(true, this);
-    }
-
-    /**
-     * Create a new instance of this class from the data provided from the input stream.  The stream content must be a JSON array string.
-     * Note:  The input stream content is assumed to be UTF-8 encoded.
-     * Note:  The InputStream will not be closed, that is left to the caller.
-     * @param is The InputStream from which to read the JSON array string to parse.
-     * @param strict Boolean denoting if the JSON should be parsed n strict mode, meaning unquoted strings and comments are not allowed.
-     * @throws JSONException Thrown when the string passed is null, or malformed JSON..
-     */
-    public JSONArray(InputStream is, boolean strict) throws JSONException {
-        InputStreamReader isr = null;
-        if (is != null) {
-            try {
-                isr = new InputStreamReader(is, "UTF-8");
-            } catch (Exception ex) {
-                isr = new InputStreamReader(is);
-            }
-        } else {
-            throw new JSONException("InputStream cannot be null");
-        }
-        (new Parser(isr, strict)).parse(true, this);
-    }
-
-    /**
-     * Function to get a JSONArray entry at a specified index.
-     * @param index The position in the rray to fetch the object from
-     * @throws JSONException Thrown if the index is outside the array bounds.
-     */
-    public Object getIndex(int index) throws JSONException {
-        try{
-            return super.elementAt(index);
-        }catch (Exception ex) {
-            JSONException jex = new JSONException("Error occurred trying to access element at: " + index);
-            jex.setCause(ex);
-            throw jex;
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see java.util.ArrayList#add(int, java.lang.Object)
-     */
-    public void add(int index, Object element) {
-        if(index > this.size() - 1){
-            expandArray(index);
-        }
-        if (!JSONObject.isValidObject(element)) {
-            throw new IllegalArgumentException("Object of type: [" + element.getClass().getName() + "] could not be converted to a JSON representation.");
-        }
-        super.insertElementAt(element, index);
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see java.util.ArrayList#add(java.lang.Object)
-     */
-    public boolean add(Object element, boolean includeSuperclass) {
-        if (!JSONObject.isValidObject(element)) {
-            throw new IllegalArgumentException("Object of type: [" + element.getClass().getName() + "] could not be converted to a JSON representation.");
-        }
-        super.addElement(element);
-        return true;
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see java.util.ArrayList#add(java.lang.Object)
-     */
-    public boolean add(Object element) {
-        return this.add(element, true);
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see java.util.ArrayList#set(int, java.lang.Object)
-     */
-    public Object set(int index, Object element) {
-        if(index > this.size() - 1){
-            expandArray(index);
-        }
-        if (!JSONObject.isValidObject(element)) {
-            throw new IllegalArgumentException("Object of type: [" + element.getClass().getName() + "] could not be converted to a JSON representation.");
-        }
-        Object obj = super.elementAt(index);
-        super.setElementAt(element, index);
-        return obj;
-    }
-
-    /**
-     * Internal function to pad-out the array list
-     * Added to mimic expansion behavior of other JSON models.
-     * @param toIndex Increase the array so that it has up to 'toIndex' as indexable slots.
-     */
-    private void expandArray(int toIndex){
-        int maxIndex = this.size();
-        toIndex = toIndex - maxIndex;
-        if(toIndex > 0){
-            for(int i = 0; i < toIndex; i++){
-                super.addElement(null);
-            }
-        }
-    }
-
-    /**************************************************************/
-    /* Maps of add to put, for API compatibility to other parsers.*/
-    /**************************************************************/
-
-    /**
-     * Map of java.util.ArrayList.add(int, java.lang.Object), for compatibility to other JSON parsers.
-     * @see java.util.ArrayList#add(int, java.lang.Object)
-     * @throws JSONException in the case of index out of bounds, etc.
-     * @return A reference to this array instance.
-     */
-    public JSONArray put(int index, Object element) throws JSONException {
-        if (!JSONObject.isValidObject(element)) {
-            throw new IllegalArgumentException("Object of type: [" + element.getClass().getName() + "] could not be converted to a JSON representation.");
-        }
-        try {
-            super.insertElementAt(element, index);
-        } catch (Exception ex) {
-            JSONException jex = new JSONException("Exception occurred while placing element.");
-            jex.setCause(ex);
-            throw jex;
-        }
-        return this;
-    }
-
-    /**
-     * Map of java.util.ArrayList.add(java.lang.Object), for compatibility to other JSON parsers.
-     * @see java.util.ArrayList#add(java.lang.Object)
-     * @return A reference to this array instance.
-     */
-    public JSONArray put(Object element) throws JSONException {
-        return put(element, true);
-    }
-
-    /**
-     * Map of java.util.ArrayList.add(java.lang.Object), for compatibility to other JSON parsers.
-     * @see java.util.ArrayList#add(java.lang.Object)
-     * @return A reference to this array instance.
-     */
-    public JSONArray put(Object element, boolean includeSuperclass)  throws JSONException {
-        if (!JSONObject.isValidObject(element)) {
-            throw new IllegalArgumentException("Object of type: [" + element.getClass().getName() + "] could not be converted to a JSON representation.");
-
-        }
-        try {
-            super.addElement(element);
-        } catch (Exception ex) {
-            JSONException jex = new JSONException("Exception occurred while placing element.");
-            jex.setCause(ex);
-            throw jex;
-        }
-        return this;
-    }
-
-    /**
-     * Method to place a long into the array.
-     * @param value A long
-     * @return A reference to this array instance.
-     */
-    public JSONArray put(long value) {
-        this.add(new Long(value));
-        return this;
-    }
-
-    /**
-     * Method to place a long into the array.
-     * @param index The position in the array to place the long.
-     * @param value A long
-     * @return A reference to this array instance.
-     */
-    public JSONArray put(int index, long value) {
-        this.add(index, new Long(value));
-        return this;
-    }
-
-    /**
-     * Method to place a int into the array.
-     * @param value An int
-     * @return A reference to this array instance.
-     */
-    public JSONArray put(int value) {
-        this.add(new Integer(value));
-        return this;
-    }
-
-    /**
-     * Method to place an int into the array.
-     * @param index The position in the array to place the int.
-     * @param value An int
-     * @return A reference to this array instance.
-     */
-    public JSONArray put(int index, int value) {
-        this.add(index, new Integer(value));
-        return this;
-    }
-
-    /**
-     * Method to place a short into the array.
-     * @param value A short
-     * @return A reference to this array instance.
-     */
-    public JSONArray put(short value) {
-        this.add(new Short(value));
-        return this;
-    }
-
-    /**
-     * Method to place a short into the array.
-     * @param index The position in the array to place the short.
-     * @param value A short
-     * @return A reference to this array instance.
-     */
-    public JSONArray put(int index, short value) {
-        this.add(index, new Short(value));
-        return this;
-    }
-
-    /**
-     * Method to place a double into the array.
-     * @param value A double
-     * @return A reference to this array instance.
-     */
-    public JSONArray put(double value) {
-        this.add(new Double(value));
-        return this;
-    }
-
-    /**
-     * Method to place a double into the array.
-     * @param index The position in the array to place the double.
-     * @param value A double
-     * @return A reference to this array instance.
-     */
-    public JSONArray put(int index, double value) {
-        this.add(index, new Double(value));
-        return this;
-    }
-
-    /**
-     * Method to place a int into the array.
-     * @param value A boolean
-     * @return A reference to this array instance.
-     */
-    public JSONArray put(boolean value) {
-        this.add(new Boolean(value));
-        return this;
-    }
-
-    /**
-     * Method to place a boolean into the array.
-     * @param index The position in the array to place the int.
-     * @param value A boolean
-     * @return A reference to this array instance.
-     */
-    public JSONArray put(int index, boolean value) {
-        this.add(index, new Boolean(value));
-        return this;
-    }
-
-    /*****************/
-    /* End of mapping*/
-    /*****************/
-
-    /********************/
-    /* Utility functions*/
-    /********************/
-
-    /**
-     * Function to obtain a value at the specified index as a boolean.
-     * @param index The index of the item to retrieve.
-     * @return boolean value.
-     * @throws JSONException if the index is outside the range or if the type at the position was not Boolean or a string of 'true' or 'false'
-     */
-    public boolean getBoolean(int index) throws JSONException {
-        try {
-            Object val = this.elementAt(index);
-            if (val != null) {
-                if (Boolean.class.isAssignableFrom(val.getClass())) {
-                    return((Boolean)val).booleanValue();
-                } else if (NumberUtil.isNumber(val.getClass())) {
-                    throw new JSONException("Value at index: [" + index + "] was not a boolean or string value of 'true' or 'false'.");
-                } else if (String.class.isAssignableFrom(val.getClass())) {
-                    String str = (String)val;
-                    if (str.equals("true")) {
-                        return true;
-                    } else if (str.equals("false")) {
-                        return false;
-                    } else {
-                        throw new JSONException("Value at index: [" + index + "] was not a boolean or string value of 'true' or 'false'.");
-                    }
-                }
-            } else {
-                throw new JSONException("Value at index: [" + index + "] was null");
-            }
-        } catch (java.lang.IndexOutOfBoundsException iobe) {
-            JSONException jex = new JSONException("The specified index was outside of the array boundries");
-            jex.setCause(iobe);
-            throw jex;
-        }
-        return false;
-    }
-
-    /**
-     * Function to obtain a value at the specified index as a double.
-     * @param index The index of the item to retrieve.
-     * @return double value.
-     * @throws JSONException if the index is outside the range or if the type at the position was not Number.
-     */
-    public double getDouble(int index) throws JSONException {
-        try {
-            Object val = this.elementAt(index);
-            if (val != null) {
-                if (NumberUtil.isNumber(val.getClass())) {
-                    return NumberUtil.getDouble(val);
-                }
-                else {
-                    throw new JSONException("Value at index: [" + index + "] was not a number.");
-                }
-            } else {
-                throw new JSONException("Value at index: [" + index + "] was null");
-            }
-
-        } catch (java.lang.IndexOutOfBoundsException iobe) {
-            JSONException jex = new JSONException("The specified index was outside of the array boundries");
-            jex.setCause(iobe);
-            throw jex;
-        }
-    }
-
-    /**
-     * Function to obtain a value at the specified index as a long.
-     * @param index The index of the item to retrieve.
-     * @return long value.
-     * @throws JSONException if the index is outside the range or if the type at the position was not Number.
-     */
-    public long getLong(int index) throws JSONException {
-        try {
-            Object val = this.elementAt(index);
-            if (val != null) {
-                if (NumberUtil.isNumber(val.getClass())) {
-                    return NumberUtil.getLong(val);
-                } else {
-                    throw new JSONException("Value at index: [" + index + "] was not a number.");
-                }
-            } else {
-                throw new JSONException("Value at index: [" + index + "] was null");
-            }
-
-        } catch (java.lang.IndexOutOfBoundsException iobe) {
-            JSONException jex = new JSONException("The specified index was outside of the array boundries");
-            jex.setCause(iobe);
-            throw jex;
-        }
-    }
-
-    /**
-     * Function to obtain a value at the specified index as an int.
-     * @param index The index of the item to retrieve.
-     * @return int value.
-     * @throws JSONException if the index is outside the range or if the type at the position was not Number.
-     */
-    public int getInt(int index) throws JSONException {
-        try {
-            Object val = this.elementAt(index);
-            if (val != null) {
-                if (NumberUtil.isNumber(val.getClass())) {
-                    return NumberUtil.getInt(val);
-                }else {
-                    throw new JSONException("Value at index: [" + index + "] was not a number.");
-                }
-            } else {
-                throw new JSONException("Value at index: [" + index + "] was null");
-            }
-
-        } catch (java.lang.IndexOutOfBoundsException iobe) {
-            JSONException jex = new JSONException("The specified index was outside of the array boundries");
-            jex.setCause(iobe);
-            throw jex;
-        }
-    }
-
-    /**
-     * Function to obtain a value at the specified index as a short.
-     * @param index The index of the item to retrieve.
-     * @return short value.
-     * @throws JSONException if the index is outside the range or if the type at the position was not Number.
-     */
-    public short getShort(int index) throws JSONException {
-        try {
-            Object val = this.elementAt(index);
-            if (val != null) {
-                if (NumberUtil.isNumber(val.getClass())) {
-                    return NumberUtil.getShort(val);
-                }
-                else {
-                    throw new JSONException("Value at index: [" + index + "] was not a number.");
-                }
-            } else {
-                throw new JSONException("Value at index: [" + index + "] was null");
-            }
-        } catch (java.lang.IndexOutOfBoundsException iobe) {
-            JSONException jex = new JSONException("The specified index was outside of the array boundries");
-            jex.setCause(iobe);
-            throw jex;
-        }
-    }
-
-    /**
-     * Function to obtain a value at the specified index as a string.
-     * @param index The index of the item to retrieve.
-     * @return string value.
-     * @throws JSONException if the index is outside the range or if the type at the position was not an object with a toString() function..
-     */
-    public String getString(int index) throws JSONException {
-        try {
-            Object val = this.elementAt(index);
-            if (val != null) {
-                return val.toString();
-            } else {
-                throw new JSONException("The value at index: [" + index + "] was null.");
-            }
-        } catch (java.lang.IndexOutOfBoundsException iobe) {
-            JSONException jex = new JSONException("The specified index was outside of the array boundries");
-            jex.setCause(iobe);
-            throw jex;
-        }
-    }
-
-    /**
-     * Utility method to obtain the specified key as a JSONObject
-     * Only values that are instances of JSONObject will be returned.  A null will generate an exception.
-     * @param index The index to look up.
-     * throws JSONException Thrown when the type returned by get(key) is not a JSONObject instance.
-     * @return A JSONObject value if the value stored for key is an instance or subclass of JSONObject.
-     */
-    public JSONObject getJSONObject(int index) throws JSONException {
-        try {
-            Object val = this.elementAt(index);
-            if (val != null) {
-                if (JSONObject.class.isAssignableFrom(val.getClass())) {
-                    return(JSONObject)val;
-                } else {
-                    throw new JSONException("The value for index: [" + index + "] was not a JSONObject");
-                }
-            } else {
-                throw new JSONException("The value for index: [" + index + "] was null.  Object required.");
-            }
-        } catch (java.lang.IndexOutOfBoundsException iobe) {
-            JSONException jex = new JSONException("The specified index was outside of the array boundries");
-            jex.setCause(iobe);
-            throw jex;
-        }
-    }
-
-    /**
-     * Utility method to obtain the specified index as a JSONArray
-     * Only values that are instances of JSONArray will be returned.  A null will generate an exception.
-     * @param index The index to look up.
-     * throws JSONException Thrown when the type returned by get(key) is not a Long instance, or cannot be converted to a long..
-     * @return A JSONArray value if the value stored for key is an instance or subclass of JSONArray.
-     */
-    public JSONArray getJSONArray(int index) throws JSONException {
-        try {
-            Object val = this.elementAt(index);
-            if (val != null) {
-                if (JSONArray.class.isAssignableFrom(val.getClass())) {
-                    return(JSONArray)val;
-                } else {
-                    throw new JSONException("The value index key: [" + index + "] was not a JSONObject");
-                }
-            } else {
-                throw new JSONException("The value for index: [" + index + "] was null.  Object required.");
-            }
-        } catch (java.lang.IndexOutOfBoundsException iobe) {
-            JSONException jex = new JSONException("The specified index was outside of the array boundries");
-            jex.setCause(iobe);
-            throw jex;
-        }
-    }
-
-    /**
-     * Utility function for testing if an element at index 'idx' is null or not.
-     * @return boolean indicating if an index is null or not.  Will also return true for indexes outside the size of the array.
-     */
-    public boolean isNull(int index) {
-        try {
-            Object obj = this.elementAt(index);
-            return JSONObject.NULL.equals(obj);
-        } catch (java.lang.IndexOutOfBoundsException iobe) {
-            return true;
-        }
-    }
-
-    /**
-     * Utility function that maps ArrayList.size() to length, for compatibility to other JSON parsers.
-     * @return The number of elements in this JSONArray.
-     */
-    public int length() {
-        return this.size();
-    }
-
-    /***************************/
-    /* End of Utility functions*/
-    /***************************/
-
-    /**
-     * Convert this object into a stream of JSON text.  Same as calling write(os,false);
-     * @param os The output stream to write data to.
-     *
-     * @throws JSONException Thrown on IO errors during serialization.
-     */
-    public OutputStream write(OutputStream os) throws JSONException {
-        write(os,false);
-        return os;
-    }
-
-    /**
-     * Convert this object into a stream of JSON text.  Same as calling write(writer,false);
-     * @param os The output stream to write data to.  Output stream characters will be serialized as UTF-8.
-     * @param verbose Whether or not to write the JSON text in a verbose format.
-     *
-     * @throws JSONException Thrown on IO errors during serialization.
-     */
-    public OutputStream write(OutputStream os, boolean verbose) throws JSONException {
-        Writer writer = null;
-        try {
-            //MSN reimplement BUFFERED
-            writer = new OutputStreamWriter(os, "UTF-8");
-        } catch (UnsupportedEncodingException uex) {
-            JSONException jex = new JSONException(uex.toString());
-            jex.setCause(uex);
-            throw jex;
-        }
-        write(writer, verbose);
-        return os;
-    }
-
-    /**
-     * Convert this object into a String of JSON text, specifying how many spaces should
-     * be used for each indent level.  Output stream characters will be serialized as UTF-8.
-     * @param indentDepth How many spaces to use for each indent level.  Should be one to eight.
-     * Less than one means no intending, greater than 8 and it will just use tab.
-     *
-     * @throws JSONException Thrown on IO errors during serialization.
-     */
-    public OutputStream write(OutputStream os, int indentDepth) throws JSONException {
-        Writer writer = null;
-        try {
-            //MSN reimplement BUFFERED
-            writer = new OutputStreamWriter(os, "UTF-8");
-        } catch (UnsupportedEncodingException uex) {
-            JSONException jex = new JSONException(uex.toString());
-            jex.setCause(uex);
-            throw jex;
-        }
-        write(writer, indentDepth);
-        return os;
-    }
-
-    /**
-     * Convert this object into a stream of JSON text.  Same as calling write(writer,false);
-     * @param writer The writer which to write the JSON text to.
-     *
-     * @throws JSONException Thrown on IO errors during serialization.
-     */
-    public Writer write(Writer writer) throws JSONException {
-        write(writer, false);
-        return writer;
-    }
-
-    /**
-     * Convert this object into a stream of JSON text, specifying verbosity.
-     * @param writer The writer which to write the JSON text to.
-     *
-     * @throws JSONException Thrown on IO errors during serialization.
-     */
-    public Writer write(Writer writer, boolean verbose) throws JSONException {
-        Serializer serializer;
-
-        //Try to avoid double-buffering or buffering in-memory
-        //writers.
-        //Class writerClass = writer.getClass();
-        boolean flushIt = false;
-
-       //MSN reimplement BUFFERED
-        /*if (!StringWriter.class.isAssignableFrom(writerClass) &&
-            !CharArrayWriter.class.isAssignableFrom(writerClass) &&
-            !BufferedWriter.class.isAssignableFrom(writerClass)) {
-            writer = new BufferedWriter(writer);
-            flushIt = true;
-        } */
-
-        if (verbose) {
-            serializer = new SerializerVerbose(writer);
-        } else {
-            serializer = new Serializer(writer);
-        }
-
-        try {
-            serializer.writeArray(this);
-        } catch (IOException iox) {
-            JSONException jex = new JSONException("Error occurred during input read.");
-            jex.setCause(iox);
-            throw jex;
-        }
-        if (flushIt) {
-            try {
-                writer.flush();
-            } catch (Exception ex) {
-                JSONException jex = new JSONException("Error during buffer flush");
-                jex.setCause(ex);
-                throw jex;
-            }
-        }
-        return writer;
-    }
-
-    /**
-     * Convert this array into a stream of JSON text, specifying verbosity.
-     * @param writer The writer which to write the JSON text to.
-     * @param indentDepth How many spaces to use for each indent level.  Should be one to eight.
-     *
-     * @throws JSONException Thrown on IO errors during serialization.
-     */
-    public Writer write(Writer writer, int indentDepth) throws JSONException {
-        Serializer serializer;
-
-        if (indentDepth < 1) {
-            indentDepth = 0;
-        } else if (indentDepth > 8) {
-            indentDepth = 9;
-        }
-
-        //Try to avoid double-buffering or buffering in-memory
-        //writers.
-       //MSN reimplement BUFFERED
-//        Class writerClass = writer.getClass();
-//        if (!StringWriter.class.isAssignableFrom(writerClass) &&
-//            !CharArrayWriter.class.isAssignableFrom(writerClass) &&
-//            !BufferedWriter.class.isAssignableFrom(writerClass)) {
-//            writer = new BufferedWriter(writer);
-//        }
-
-        if (indentDepth > 0) {
-            serializer = new SerializerVerbose(writer, indentDepth);
-        } else {
-            serializer = new Serializer(writer);
-        }
-        try {
-            serializer.writeArray(this);
-        } catch (IOException iox) {
-            JSONException jex = new JSONException("Error occurred during input read.");
-            jex.setCause(iox);
-            throw jex;
-        }
-        return writer;
-    }
-
-    /**
-     * Convert this object into a String of JSON text, specifying verbosity.
-     * @param verbose Whether or not to write in compressed for formatted Strings.
-     *
-     * @throws JSONException Thrown on IO errors during serialization.
-     */
-    public String write(boolean verbose) throws JSONException {
-        Serializer serializer;
-        JSON4JStringWriter writer = new JSON4JStringWriter();
-
-        if (verbose) {
-            serializer = new SerializerVerbose(writer);
-        } else {
-            serializer = new Serializer(writer);
-        }
-        try {
-            serializer.writeArray(this).flush();
-        } catch (IOException iox) {
-            JSONException jex = new JSONException("Error occurred during input read.");
-            jex.setCause(iox);
-            throw jex;
-        }
-        return writer.toString();
-    }
-
-    /**
-     * Convert this array into a String of JSON text, specifying verbosity.
-     * @param indentDepth How many spaces to use for each indent level.  Should be one to eight.
-     *
-     * @throws JSONException Thrown on IO errors during serialization.
-     */
-    public String write(int indentDepth) throws JSONException {
-        Serializer serializer;
-        JSON4JStringWriter writer = new JSON4JStringWriter();
-
-        if (indentDepth < 1) {
-            indentDepth = 0;
-        } else if (indentDepth > 8) {
-            indentDepth = 9;
-        }
-
-        if (indentDepth > 0) {
-            serializer = new SerializerVerbose(writer, indentDepth);
-        } else {
-            serializer = new Serializer(writer);
-        }
-        try {
-            serializer.writeArray(this).flush();
-        } catch (IOException iox) {
-            JSONException jex = new JSONException("Error occurred during input read.");
-            jex.setCause(iox);
-            throw jex;
-        }
-        return writer.toString();
-    }
-
-    /**
-     * Convert this object into a String of JSON text.  Same as write(false);
-     *
-     * @throws JSONException Thrown on IO errors during serialization.
-     */
-    public String write() throws JSONException {
-        return write(false);
-    }
-
-    /**
-     * Over-ridden toString() method.  Returns the same value as write(), which is a compact JSON String.
-     * If an error occurs in the serialization, the return will be of format: JSON Generation Error: [<some error>]
-     */
-    public String toString() {
-        String str = null;
-        try {
-            str = write(false);
-        } catch (JSONException jex) {
-            str = "JSON Generation Error: [" + jex.toString() + "]";
-        }
-        return str;
-    }
-
-    /**
-     * Function to return a string of JSON text with specified indention.  Returns the same value as write(indentDepth).
-     * If an error occurs in the serialization, the return will be of format: JSON Generation Error: [<some error>]
-     * @throws JSONException Thrown if an error occurs during JSON generation.
-     */
-    public String toString(int indentDepth) throws JSONException {
-        return write(indentDepth);
-    }
-
-    /**
-     * Method to mimic the behavior of the JavaScript array join function
-     * @param str The string delimiter to place between joined array elements in the output string.
-     * @return A string of all the elements joined together.
-     */
-    public String join(String str) {
-        if (str == null) {
-            str = "";
-        }
-        StringBuffer buf = new StringBuffer();
-        for (int i = 0; i < this.size(); i++) {
-            if (i > 0) {
-                buf.append(str);
-            }
-            Object obj = this.elementAt(i);
-            if (obj == null) {
-                buf.append("null");
-            } else {
-                buf.append(obj.toString());
-            }
-        }
-        return buf.toString();
-    }
-
-    /**
-     * Methods added for compatibility to other models.
-     */
-
-    /**
-     * Method to get the object at that position, or null if outside the array range.
-     * @param index the array index to get
-     * @return - value or null
-     */
-    public Object opt(int index) {
-        try{
-            return elementAt(index);
-        } catch (Throwable th){
-            return null;
-        }
-    }
-
-    /**
-     * Method to get the object at that position, or null if outside the array range.
-     * @param index the array index to get
-     * @param defaultValue the value to return if index is outside the array.
-     * @return - value or defaultValue
-     */
-    public Object opt(int index, Object defaultValue) {
-        try{
-            return elementAt(index);
-        } catch (Throwable th){
-            return defaultValue;
-        }
-    }
-
-    /**
-     * Method to obtain the value at index as an boolean, or 'false' if outside the array.
-     * @param index the array index to get
-     * @return - value or false
-     */
-    public boolean optBoolean(int index) {
-        try{
-            return getBoolean(index);
-        } catch (Throwable th){
-            return false;
-        }
-    }
-
-    /**
-     * Method to obtain the value at index as an boolean, or 'defaultValue' if outside the array.
-     * @param index The array index to get.
-     * @param defaultValue the value to return if index is outside the array.
-     * @return - value or false
-     */
-    public boolean optBoolean(int index, boolean defaultValue) {
-        try{
-            return getBoolean(index);
-        } catch (Throwable th){
-            return defaultValue;
-        }
-    }
-
-    /**
-     * Method to obtain the value at index as an int, or '0' if outside the array.
-     * @param index the array index to get
-     * @return - value or 0
-     */
-    public int optInt(int index) {
-        try{
-            return getInt(index);
-        } catch (Throwable th){
-            return 0;
-        }
-    }
-
-    /**
-     * Method to obtain the value at index as an int, or defaultValue if outside the array.
-     * @param index the array index to get
-     * @param defaultValue the value to return if index is outside the array.
-     * @return - value or 0
-     */
-    public int optInt(int index, int defaultValue) {
-        try{
-            return getInt(index);
-        } catch (Throwable th){
-            return defaultValue;
-        }
-    }
-
-    /**
-     * Method to obtain the value at index as a long, or '0' if outside the array.
-     * @param index the array index to get
-     * @return - value or 0
-     */
-    public long optLong(int index) {
-        try{
-            return getLong(index);
-        } catch (Throwable th){
-            return (long)0;
-        }
-    }
-
-    /**
-     * Method to obtain the value at index as a long, or defaultValue if outside the array.
-     * @param index the array index to get
-     * @param defaultValue the value to return if index is outside the array.
-     v* @return - value or defaultValue
-     */
-    public long optLong(int index, long defaultValue) {
-        try{
-            return getLong(index);
-        } catch (Throwable th){
-            return defaultValue;
-        }
-    }
-
-    /**
-     * Method to obtain the value at index as a short, or '0' if outside the array.
-     * @param index the array index to get
-     * @return - value or 0
-     */
-    public short optShort(int index) {
-        try{
-            return getShort(index);
-        } catch (Throwable th){
-            return (short)0;
-        }
-    }
-
-    /**
-     * Method to obtain the value at index as a short, or '0' if outside the array.
-     * @param index the array index to get
-     * @param defaultValue the value to return if index is outside the array.
-     * @return - value or defaultValue
-     */
-    public short optShort(int index, short defaultValue) {
-        try{
-            return getShort(index);
-        } catch (Throwable th){
-            return defaultValue;
-        }
-    }
-
-    /**
-     * Method to obtain the value at index as a double, or Double.NaN if outside the array.
-     * @param index the array index to get
-     * @return - value or Double.NaN
-     */
-    public double optDouble(int index) {
-        try{
-            return getDouble(index);
-        } catch (Throwable th){
-            return Double.NaN;
-        }
-    }
-
-    /**
-     * Method to obtain the value at index as a double, or Double.NaN if outside the array.
-     * @param index the array index to get
-     * @param defaultValue the value to return if index is outside the array.
-     * @return - value or defaultValue
-     */
-    public double optDouble(int index, double defaultValue) {
-        try{
-            return getDouble(index);
-        } catch (Throwable th){
-            return Double.NaN;
-        }
-    }
-
-    /**
-     * Method to obtain the value at index as a String, or null if outside the array.
-     * @param index the array index to get
-     * @return - value or null
-     */
-    public String optString(int index) {
-        try{
-            return getString(index);
-        } catch (Exception th){
-            return null;
-        }
-    }
-
-    /**
-     * Method to obtain the value at index as a String, or defaultValue if outside the array.
-     * @param index the array index to get
-     * @param defaultValue the value to return if index is outside the array.
-     * @return - value or defaultValue
-     */
-    public String optString(int index, String defaultValue) {
-        try{
-            return getString(index);
-        } catch (Throwable th){
-            return defaultValue;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/json4j/JSONArtifact.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/json4j/JSONArtifact.java b/bbos/framework/ext/src/org/apache/cordova/json4j/JSONArtifact.java
deleted file mode 100644
index 4e8ff0c..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/json4j/JSONArtifact.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.json4j;
-
-import java.io.OutputStream;
-import java.io.Writer;
-
-/**
- * Interface class to define a set of generic APIs both JSONObject and JSONArray implement.
- * This is namely so that functions such as write, which are common between the two, can be easily
- * invoked without knowing the object type.
- */
-public interface JSONArtifact
-{
-    /**
-     * Write this object to the stream as JSON text in UTF-8 encoding.  Same as calling write(os,false);
-     * Note that encoding is always written as UTF-8, as per JSON spec.
-     * @param os The output stream to write data to.
-     * @return The passed in OutputStream.
-     *
-     * @throws JSONException Thrown on errors during serialization.
-     */
-    public OutputStream write(OutputStream os) throws JSONException;
-
-    /**
-     * Write this object to the stream as JSON text in UTF-8 encoding, specifying whether to use verbose (tab-indented) output or not.
-     * Note that encoding is always written as UTF-8, as per JSON spec.
-     * @param os The output stream to write data to.
-     * @param verbose Whether or not to write the JSON text in a verbose format.  If true, will indent via tab.
-     * @return The passed in OutputStream.
-     *
-     * @throws JSONException Thrown on errors during serialization.
-     */
-    public OutputStream write(OutputStream os, boolean verbose) throws JSONException;
-
-    /**
-     * Write this object to the stream as JSON text in UTF-8 encoding, specifying how many spaces should be used for each indent.
-     * This is an alternate indent style to using tabs.
-     * @param indentDepth How many spaces to use for each indent.  The value should be between one to eight.
-     * Less than one means no indenting, greater than 8 and it will just use tab.
-     * @return The passed in OutputStream.
-     *
-     * @throws JSONException Thrown on errors during serialization.
-     */
-    public OutputStream write(OutputStream os, int indentDepth) throws JSONException;
-
-    /**
-     * Write this object to the writer as JSON text.  Same as calling write(writer,false);
-     * @param writer The writer which to write the JSON text to.
-     * @return The passed in writer.
-     *
-     * @throws JSONException Thrown on errors during serialization.
-     */
-    public Writer write(Writer writer) throws JSONException;
-
-    /**
-     * Writer this object to the writer as JSON text, specifying whether to use verbose (tab-indented) output or not.
-     * be used for each indent.  This is an alternate indent style to using tabs.
-     * @param writer The writer which to write the JSON text to.
-     * @return The passed in writer.
-     *
-     * @throws JSONException Thrown on errors during serialization.
-     */
-    public Writer write(Writer writer, boolean verbose) throws JSONException;
-
-    /**
-     * Write this object to the writer as JSON text, specifying how many spaces should be used for each indent.
-     * This is an alternate indent style to using tabs.
-     * @param writer The writer which to write the JSON text to.
-     * @param indentDepth How many spaces to use for each indent.  The value should be between one to eight.
-     * @return The passed in writer.
-     *
-     * @throws JSONException Thrown on errors during serialization.
-     */
-    public Writer write(Writer writer, int indentDepth) throws JSONException;
-
-    /**
-     * Convert this object into a String of JSON text, specifying whether to use verbose (tab-indented) output or not.
-     * @param verbose Whether or not to write in compressed format.
-     * Less than one means no indenting, greater than 8 and it will just use tab.
-     *
-     * @throws JSONException Thrown on errors during serialization.
-     */
-    public String write(boolean verbose) throws JSONException;
-
-    /**
-     * Convert this object into a String of JSON text, specifying how many spaces should be used for each indent.
-     * This is an alternate indent style to using tabs.
-     * @param indentDepth How many spaces to use for each indent.  The value should be between one to eight.
-     * Less than one means no indenting, greater than 8 and it will just use tab.
-     *
-     * @throws JSONException Thrown on errors during serialization.
-     */
-    public String write(int indentDepth) throws JSONException;
-
-    /**
-     * Convert this object into a String of JSON text.  Same as write(false);
-     *
-     * @throws JSONException Thrown on errors during serialization.
-     */
-    public String write() throws JSONException;
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/json4j/JSONException.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/json4j/JSONException.java b/bbos/framework/ext/src/org/apache/cordova/json4j/JSONException.java
deleted file mode 100644
index d79f419..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/json4j/JSONException.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.json4j;
-
-/**
- * Class that implements an exception type thrown by all JSON classes
- * as a common exception when JSON handling errors occur.
- */
-public class JSONException extends Exception {
-
-    private Throwable cause;
-
-    /**
-     * Constructor for JSON Exception
-     * @param message The error that generated the exception.
-     */
-    public JSONException(String message) {
-        super(message);
-    }
-
-    /**
-     * Constructor for JSON Exception
-     * @param t The exception that generated this exception.
-     */
-    public JSONException(Throwable t) {
-        cause = t;
-    }
-
-    public void setCause(Throwable t) {
-        cause = t;
-    }
-
-    /**
-     * Method to get the underlying cause of the JSONException
-     */
-    public Throwable getCause() {
-        return cause;
-    }
-}


[11/15] CB-4228

Posted by lo...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/spec/lib/jasmine-1.2.0/jasmine.js
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/spec/lib/jasmine-1.2.0/jasmine.js b/bbos/bin/templates/project/www/spec/lib/jasmine-1.2.0/jasmine.js
deleted file mode 100644
index 03bf89a..0000000
--- a/bbos/bin/templates/project/www/spec/lib/jasmine-1.2.0/jasmine.js
+++ /dev/null
@@ -1,2529 +0,0 @@
-var isCommonJS = typeof window == "undefined";
-
-/**
- * Top level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework.
- *
- * @namespace
- */
-var jasmine = {};
-if (isCommonJS) exports.jasmine = jasmine;
-/**
- * @private
- */
-jasmine.unimplementedMethod_ = function() {
-  throw new Error("unimplemented method");
-};
-
-/**
- * Use <code>jasmine.undefined</code> instead of <code>undefined</code>, since <code>undefined</code> is just
- * a plain old variable and may be redefined by somebody else.
- *
- * @private
- */
-jasmine.undefined = jasmine.___undefined___;
-
-/**
- * Show diagnostic messages in the console if set to true
- *
- */
-jasmine.VERBOSE = false;
-
-/**
- * Default interval in milliseconds for event loop yields (e.g. to allow network activity or to refresh the screen with the HTML-based runner). Small values here may result in slow test running. Zero means no updates until all tests have completed.
- *
- */
-jasmine.DEFAULT_UPDATE_INTERVAL = 250;
-
-/**
- * Default timeout interval in milliseconds for waitsFor() blocks.
- */
-jasmine.DEFAULT_TIMEOUT_INTERVAL = 5000;
-
-jasmine.getGlobal = function() {
-  function getGlobal() {
-    return this;
-  }
-
-  return getGlobal();
-};
-
-/**
- * Allows for bound functions to be compared.  Internal use only.
- *
- * @ignore
- * @private
- * @param base {Object} bound 'this' for the function
- * @param name {Function} function to find
- */
-jasmine.bindOriginal_ = function(base, name) {
-  var original = base[name];
-  if (original.apply) {
-    return function() {
-      return original.apply(base, arguments);
-    };
-  } else {
-    // IE support
-    return jasmine.getGlobal()[name];
-  }
-};
-
-jasmine.setTimeout = jasmine.bindOriginal_(jasmine.getGlobal(), 'setTimeout');
-jasmine.clearTimeout = jasmine.bindOriginal_(jasmine.getGlobal(), 'clearTimeout');
-jasmine.setInterval = jasmine.bindOriginal_(jasmine.getGlobal(), 'setInterval');
-jasmine.clearInterval = jasmine.bindOriginal_(jasmine.getGlobal(), 'clearInterval');
-
-jasmine.MessageResult = function(values) {
-  this.type = 'log';
-  this.values = values;
-  this.trace = new Error(); // todo: test better
-};
-
-jasmine.MessageResult.prototype.toString = function() {
-  var text = "";
-  for (var i = 0; i < this.values.length; i++) {
-    if (i > 0) text += " ";
-    if (jasmine.isString_(this.values[i])) {
-      text += this.values[i];
-    } else {
-      text += jasmine.pp(this.values[i]);
-    }
-  }
-  return text;
-};
-
-jasmine.ExpectationResult = function(params) {
-  this.type = 'expect';
-  this.matcherName = params.matcherName;
-  this.passed_ = params.passed;
-  this.expected = params.expected;
-  this.actual = params.actual;
-  this.message = this.passed_ ? 'Passed.' : params.message;
-
-  var trace = (params.trace || new Error(this.message));
-  this.trace = this.passed_ ? '' : trace;
-};
-
-jasmine.ExpectationResult.prototype.toString = function () {
-  return this.message;
-};
-
-jasmine.ExpectationResult.prototype.passed = function () {
-  return this.passed_;
-};
-
-/**
- * Getter for the Jasmine environment. Ensures one gets created
- */
-jasmine.getEnv = function() {
-  var env = jasmine.currentEnv_ = jasmine.currentEnv_ || new jasmine.Env();
-  return env;
-};
-
-/**
- * @ignore
- * @private
- * @param value
- * @returns {Boolean}
- */
-jasmine.isArray_ = function(value) {
-  return jasmine.isA_("Array", value);
-};
-
-/**
- * @ignore
- * @private
- * @param value
- * @returns {Boolean}
- */
-jasmine.isString_ = function(value) {
-  return jasmine.isA_("String", value);
-};
-
-/**
- * @ignore
- * @private
- * @param value
- * @returns {Boolean}
- */
-jasmine.isNumber_ = function(value) {
-  return jasmine.isA_("Number", value);
-};
-
-/**
- * @ignore
- * @private
- * @param {String} typeName
- * @param value
- * @returns {Boolean}
- */
-jasmine.isA_ = function(typeName, value) {
-  return Object.prototype.toString.apply(value) === '[object ' + typeName + ']';
-};
-
-/**
- * Pretty printer for expecations.  Takes any object and turns it into a human-readable string.
- *
- * @param value {Object} an object to be outputted
- * @returns {String}
- */
-jasmine.pp = function(value) {
-  var stringPrettyPrinter = new jasmine.StringPrettyPrinter();
-  stringPrettyPrinter.format(value);
-  return stringPrettyPrinter.string;
-};
-
-/**
- * Returns true if the object is a DOM Node.
- *
- * @param {Object} obj object to check
- * @returns {Boolean}
- */
-jasmine.isDomNode = function(obj) {
-  return obj.nodeType > 0;
-};
-
-/**
- * Returns a matchable 'generic' object of the class type.  For use in expecations of type when values don't matter.
- *
- * @example
- * // don't care about which function is passed in, as long as it's a function
- * expect(mySpy).toHaveBeenCalledWith(jasmine.any(Function));
- *
- * @param {Class} clazz
- * @returns matchable object of the type clazz
- */
-jasmine.any = function(clazz) {
-  return new jasmine.Matchers.Any(clazz);
-};
-
-/**
- * Returns a matchable subset of a JSON object. For use in expectations when you don't care about all of the
- * attributes on the object.
- *
- * @example
- * // don't care about any other attributes than foo.
- * expect(mySpy).toHaveBeenCalledWith(jasmine.objectContaining({foo: "bar"});
- *
- * @param sample {Object} sample
- * @returns matchable object for the sample
- */
-jasmine.objectContaining = function (sample) {
-    return new jasmine.Matchers.ObjectContaining(sample);
-};
-
-/**
- * Jasmine Spies are test doubles that can act as stubs, spies, fakes or when used in an expecation, mocks.
- *
- * Spies should be created in test setup, before expectations.  They can then be checked, using the standard Jasmine
- * expectation syntax. Spies can be checked if they were called or not and what the calling params were.
- *
- * A Spy has the following fields: wasCalled, callCount, mostRecentCall, and argsForCall (see docs).
- *
- * Spies are torn down at the end of every spec.
- *
- * Note: Do <b>not</b> call new jasmine.Spy() directly - a spy must be created using spyOn, jasmine.createSpy or jasmine.createSpyObj.
- *
- * @example
- * // a stub
- * var myStub = jasmine.createSpy('myStub');  // can be used anywhere
- *
- * // spy example
- * var foo = {
- *   not: function(bool) { return !bool; }
- * }
- *
- * // actual foo.not will not be called, execution stops
- * spyOn(foo, 'not');
-
- // foo.not spied upon, execution will continue to implementation
- * spyOn(foo, 'not').andCallThrough();
- *
- * // fake example
- * var foo = {
- *   not: function(bool) { return !bool; }
- * }
- *
- * // foo.not(val) will return val
- * spyOn(foo, 'not').andCallFake(function(value) {return value;});
- *
- * // mock example
- * foo.not(7 == 7);
- * expect(foo.not).toHaveBeenCalled();
- * expect(foo.not).toHaveBeenCalledWith(true);
- *
- * @constructor
- * @see spyOn, jasmine.createSpy, jasmine.createSpyObj
- * @param {String} name
- */
-jasmine.Spy = function(name) {
-  /**
-   * The name of the spy, if provided.
-   */
-  this.identity = name || 'unknown';
-  /**
-   *  Is this Object a spy?
-   */
-  this.isSpy = true;
-  /**
-   * The actual function this spy stubs.
-   */
-  this.plan = function() {
-  };
-  /**
-   * Tracking of the most recent call to the spy.
-   * @example
-   * var mySpy = jasmine.createSpy('foo');
-   * mySpy(1, 2);
-   * mySpy.mostRecentCall.args = [1, 2];
-   */
-  this.mostRecentCall = {};
-
-  /**
-   * Holds arguments for each call to the spy, indexed by call count
-   * @example
-   * var mySpy = jasmine.createSpy('foo');
-   * mySpy(1, 2);
-   * mySpy(7, 8);
-   * mySpy.mostRecentCall.args = [7, 8];
-   * mySpy.argsForCall[0] = [1, 2];
-   * mySpy.argsForCall[1] = [7, 8];
-   */
-  this.argsForCall = [];
-  this.calls = [];
-};
-
-/**
- * Tells a spy to call through to the actual implemenatation.
- *
- * @example
- * var foo = {
- *   bar: function() { // do some stuff }
- * }
- *
- * // defining a spy on an existing property: foo.bar
- * spyOn(foo, 'bar').andCallThrough();
- */
-jasmine.Spy.prototype.andCallThrough = function() {
-  this.plan = this.originalValue;
-  return this;
-};
-
-/**
- * For setting the return value of a spy.
- *
- * @example
- * // defining a spy from scratch: foo() returns 'baz'
- * var foo = jasmine.createSpy('spy on foo').andReturn('baz');
- *
- * // defining a spy on an existing property: foo.bar() returns 'baz'
- * spyOn(foo, 'bar').andReturn('baz');
- *
- * @param {Object} value
- */
-jasmine.Spy.prototype.andReturn = function(value) {
-  this.plan = function() {
-    return value;
-  };
-  return this;
-};
-
-/**
- * For throwing an exception when a spy is called.
- *
- * @example
- * // defining a spy from scratch: foo() throws an exception w/ message 'ouch'
- * var foo = jasmine.createSpy('spy on foo').andThrow('baz');
- *
- * // defining a spy on an existing property: foo.bar() throws an exception w/ message 'ouch'
- * spyOn(foo, 'bar').andThrow('baz');
- *
- * @param {String} exceptionMsg
- */
-jasmine.Spy.prototype.andThrow = function(exceptionMsg) {
-  this.plan = function() {
-    throw exceptionMsg;
-  };
-  return this;
-};
-
-/**
- * Calls an alternate implementation when a spy is called.
- *
- * @example
- * var baz = function() {
- *   // do some stuff, return something
- * }
- * // defining a spy from scratch: foo() calls the function baz
- * var foo = jasmine.createSpy('spy on foo').andCall(baz);
- *
- * // defining a spy on an existing property: foo.bar() calls an anonymnous function
- * spyOn(foo, 'bar').andCall(function() { return 'baz';} );
- *
- * @param {Function} fakeFunc
- */
-jasmine.Spy.prototype.andCallFake = function(fakeFunc) {
-  this.plan = fakeFunc;
-  return this;
-};
-
-/**
- * Resets all of a spy's the tracking variables so that it can be used again.
- *
- * @example
- * spyOn(foo, 'bar');
- *
- * foo.bar();
- *
- * expect(foo.bar.callCount).toEqual(1);
- *
- * foo.bar.reset();
- *
- * expect(foo.bar.callCount).toEqual(0);
- */
-jasmine.Spy.prototype.reset = function() {
-  this.wasCalled = false;
-  this.callCount = 0;
-  this.argsForCall = [];
-  this.calls = [];
-  this.mostRecentCall = {};
-};
-
-jasmine.createSpy = function(name) {
-
-  var spyObj = function() {
-    spyObj.wasCalled = true;
-    spyObj.callCount++;
-    var args = jasmine.util.argsToArray(arguments);
-    spyObj.mostRecentCall.object = this;
-    spyObj.mostRecentCall.args = args;
-    spyObj.argsForCall.push(args);
-    spyObj.calls.push({object: this, args: args});
-    return spyObj.plan.apply(this, arguments);
-  };
-
-  var spy = new jasmine.Spy(name);
-
-  for (var prop in spy) {
-    spyObj[prop] = spy[prop];
-  }
-
-  spyObj.reset();
-
-  return spyObj;
-};
-
-/**
- * Determines whether an object is a spy.
- *
- * @param {jasmine.Spy|Object} putativeSpy
- * @returns {Boolean}
- */
-jasmine.isSpy = function(putativeSpy) {
-  return putativeSpy && putativeSpy.isSpy;
-};
-
-/**
- * Creates a more complicated spy: an Object that has every property a function that is a spy.  Used for stubbing something
- * large in one call.
- *
- * @param {String} baseName name of spy class
- * @param {Array} methodNames array of names of methods to make spies
- */
-jasmine.createSpyObj = function(baseName, methodNames) {
-  if (!jasmine.isArray_(methodNames) || methodNames.length === 0) {
-    throw new Error('createSpyObj requires a non-empty array of method names to create spies for');
-  }
-  var obj = {};
-  for (var i = 0; i < methodNames.length; i++) {
-    obj[methodNames[i]] = jasmine.createSpy(baseName + '.' + methodNames[i]);
-  }
-  return obj;
-};
-
-/**
- * All parameters are pretty-printed and concatenated together, then written to the current spec's output.
- *
- * Be careful not to leave calls to <code>jasmine.log</code> in production code.
- */
-jasmine.log = function() {
-  var spec = jasmine.getEnv().currentSpec;
-  spec.log.apply(spec, arguments);
-};
-
-/**
- * Function that installs a spy on an existing object's method name.  Used within a Spec to create a spy.
- *
- * @example
- * // spy example
- * var foo = {
- *   not: function(bool) { return !bool; }
- * }
- * spyOn(foo, 'not'); // actual foo.not will not be called, execution stops
- *
- * @see jasmine.createSpy
- * @param obj
- * @param methodName
- * @returns a Jasmine spy that can be chained with all spy methods
- */
-var spyOn = function(obj, methodName) {
-  return jasmine.getEnv().currentSpec.spyOn(obj, methodName);
-};
-if (isCommonJS) exports.spyOn = spyOn;
-
-/**
- * Creates a Jasmine spec that will be added to the current suite.
- *
- * // TODO: pending tests
- *
- * @example
- * it('should be true', function() {
- *   expect(true).toEqual(true);
- * });
- *
- * @param {String} desc description of this specification
- * @param {Function} func defines the preconditions and expectations of the spec
- */
-var it = function(desc, func) {
-  return jasmine.getEnv().it(desc, func);
-};
-if (isCommonJS) exports.it = it;
-
-/**
- * Creates a <em>disabled</em> Jasmine spec.
- *
- * A convenience method that allows existing specs to be disabled temporarily during development.
- *
- * @param {String} desc description of this specification
- * @param {Function} func defines the preconditions and expectations of the spec
- */
-var xit = function(desc, func) {
-  return jasmine.getEnv().xit(desc, func);
-};
-if (isCommonJS) exports.xit = xit;
-
-/**
- * Starts a chain for a Jasmine expectation.
- *
- * It is passed an Object that is the actual value and should chain to one of the many
- * jasmine.Matchers functions.
- *
- * @param {Object} actual Actual value to test against and expected value
- */
-var expect = function(actual) {
-  return jasmine.getEnv().currentSpec.expect(actual);
-};
-if (isCommonJS) exports.expect = expect;
-
-/**
- * Defines part of a jasmine spec.  Used in cominbination with waits or waitsFor in asynchrnous specs.
- *
- * @param {Function} func Function that defines part of a jasmine spec.
- */
-var runs = function(func) {
-  jasmine.getEnv().currentSpec.runs(func);
-};
-if (isCommonJS) exports.runs = runs;
-
-/**
- * Waits a fixed time period before moving to the next block.
- *
- * @deprecated Use waitsFor() instead
- * @param {Number} timeout milliseconds to wait
- */
-var waits = function(timeout) {
-  jasmine.getEnv().currentSpec.waits(timeout);
-};
-if (isCommonJS) exports.waits = waits;
-
-/**
- * Waits for the latchFunction to return true before proceeding to the next block.
- *
- * @param {Function} latchFunction
- * @param {String} optional_timeoutMessage
- * @param {Number} optional_timeout
- */
-var waitsFor = function(latchFunction, optional_timeoutMessage, optional_timeout) {
-  jasmine.getEnv().currentSpec.waitsFor.apply(jasmine.getEnv().currentSpec, arguments);
-};
-if (isCommonJS) exports.waitsFor = waitsFor;
-
-/**
- * A function that is called before each spec in a suite.
- *
- * Used for spec setup, including validating assumptions.
- *
- * @param {Function} beforeEachFunction
- */
-var beforeEach = function(beforeEachFunction) {
-  jasmine.getEnv().beforeEach(beforeEachFunction);
-};
-if (isCommonJS) exports.beforeEach = beforeEach;
-
-/**
- * A function that is called after each spec in a suite.
- *
- * Used for restoring any state that is hijacked during spec execution.
- *
- * @param {Function} afterEachFunction
- */
-var afterEach = function(afterEachFunction) {
-  jasmine.getEnv().afterEach(afterEachFunction);
-};
-if (isCommonJS) exports.afterEach = afterEach;
-
-/**
- * Defines a suite of specifications.
- *
- * Stores the description and all defined specs in the Jasmine environment as one suite of specs. Variables declared
- * are accessible by calls to beforeEach, it, and afterEach. Describe blocks can be nested, allowing for specialization
- * of setup in some tests.
- *
- * @example
- * // TODO: a simple suite
- *
- * // TODO: a simple suite with a nested describe block
- *
- * @param {String} description A string, usually the class under test.
- * @param {Function} specDefinitions function that defines several specs.
- */
-var describe = function(description, specDefinitions) {
-  return jasmine.getEnv().describe(description, specDefinitions);
-};
-if (isCommonJS) exports.describe = describe;
-
-/**
- * Disables a suite of specifications.  Used to disable some suites in a file, or files, temporarily during development.
- *
- * @param {String} description A string, usually the class under test.
- * @param {Function} specDefinitions function that defines several specs.
- */
-var xdescribe = function(description, specDefinitions) {
-  return jasmine.getEnv().xdescribe(description, specDefinitions);
-};
-if (isCommonJS) exports.xdescribe = xdescribe;
-
-
-// Provide the XMLHttpRequest class for IE 5.x-6.x:
-jasmine.XmlHttpRequest = (typeof XMLHttpRequest == "undefined") ? function() {
-  function tryIt(f) {
-    try {
-      return f();
-    } catch(e) {
-    }
-    return null;
-  }
-
-  var xhr = tryIt(function() {
-    return new ActiveXObject("Msxml2.XMLHTTP.6.0");
-  }) ||
-    tryIt(function() {
-      return new ActiveXObject("Msxml2.XMLHTTP.3.0");
-    }) ||
-    tryIt(function() {
-      return new ActiveXObject("Msxml2.XMLHTTP");
-    }) ||
-    tryIt(function() {
-      return new ActiveXObject("Microsoft.XMLHTTP");
-    });
-
-  if (!xhr) throw new Error("This browser does not support XMLHttpRequest.");
-
-  return xhr;
-} : XMLHttpRequest;
-/**
- * @namespace
- */
-jasmine.util = {};
-
-/**
- * Declare that a child class inherit it's prototype from the parent class.
- *
- * @private
- * @param {Function} childClass
- * @param {Function} parentClass
- */
-jasmine.util.inherit = function(childClass, parentClass) {
-  /**
-   * @private
-   */
-  var subclass = function() {
-  };
-  subclass.prototype = parentClass.prototype;
-  childClass.prototype = new subclass();
-};
-
-jasmine.util.formatException = function(e) {
-  var lineNumber;
-  if (e.line) {
-    lineNumber = e.line;
-  }
-  else if (e.lineNumber) {
-    lineNumber = e.lineNumber;
-  }
-
-  var file;
-
-  if (e.sourceURL) {
-    file = e.sourceURL;
-  }
-  else if (e.fileName) {
-    file = e.fileName;
-  }
-
-  var message = (e.name && e.message) ? (e.name + ': ' + e.message) : e.toString();
-
-  if (file && lineNumber) {
-    message += ' in ' + file + ' (line ' + lineNumber + ')';
-  }
-
-  return message;
-};
-
-jasmine.util.htmlEscape = function(str) {
-  if (!str) return str;
-  return str.replace(/&/g, '&amp;')
-    .replace(/</g, '&lt;')
-    .replace(/>/g, '&gt;');
-};
-
-jasmine.util.argsToArray = function(args) {
-  var arrayOfArgs = [];
-  for (var i = 0; i < args.length; i++) arrayOfArgs.push(args[i]);
-  return arrayOfArgs;
-};
-
-jasmine.util.extend = function(destination, source) {
-  for (var property in source) destination[property] = source[property];
-  return destination;
-};
-
-/**
- * Environment for Jasmine
- *
- * @constructor
- */
-jasmine.Env = function() {
-  this.currentSpec = null;
-  this.currentSuite = null;
-  this.currentRunner_ = new jasmine.Runner(this);
-
-  this.reporter = new jasmine.MultiReporter();
-
-  this.updateInterval = jasmine.DEFAULT_UPDATE_INTERVAL;
-  this.defaultTimeoutInterval = jasmine.DEFAULT_TIMEOUT_INTERVAL;
-  this.lastUpdate = 0;
-  this.specFilter = function() {
-    return true;
-  };
-
-  this.nextSpecId_ = 0;
-  this.nextSuiteId_ = 0;
-  this.equalityTesters_ = [];
-
-  // wrap matchers
-  this.matchersClass = function() {
-    jasmine.Matchers.apply(this, arguments);
-  };
-  jasmine.util.inherit(this.matchersClass, jasmine.Matchers);
-
-  jasmine.Matchers.wrapInto_(jasmine.Matchers.prototype, this.matchersClass);
-};
-
-
-jasmine.Env.prototype.setTimeout = jasmine.setTimeout;
-jasmine.Env.prototype.clearTimeout = jasmine.clearTimeout;
-jasmine.Env.prototype.setInterval = jasmine.setInterval;
-jasmine.Env.prototype.clearInterval = jasmine.clearInterval;
-
-/**
- * @returns an object containing jasmine version build info, if set.
- */
-jasmine.Env.prototype.version = function () {
-  if (jasmine.version_) {
-    return jasmine.version_;
-  } else {
-    throw new Error('Version not set');
-  }
-};
-
-/**
- * @returns string containing jasmine version build info, if set.
- */
-jasmine.Env.prototype.versionString = function() {
-  if (!jasmine.version_) {
-    return "version unknown";
-  }
-
-  var version = this.version();
-  var versionString = version.major + "." + version.minor + "." + version.build;
-  if (version.release_candidate) {
-    versionString += ".rc" + version.release_candidate;
-  }
-  versionString += " revision " + version.revision;
-  return versionString;
-};
-
-/**
- * @returns a sequential integer starting at 0
- */
-jasmine.Env.prototype.nextSpecId = function () {
-  return this.nextSpecId_++;
-};
-
-/**
- * @returns a sequential integer starting at 0
- */
-jasmine.Env.prototype.nextSuiteId = function () {
-  return this.nextSuiteId_++;
-};
-
-/**
- * Register a reporter to receive status updates from Jasmine.
- * @param {jasmine.Reporter} reporter An object which will receive status updates.
- */
-jasmine.Env.prototype.addReporter = function(reporter) {
-  this.reporter.addReporter(reporter);
-};
-
-jasmine.Env.prototype.execute = function() {
-  this.currentRunner_.execute();
-};
-
-jasmine.Env.prototype.describe = function(description, specDefinitions) {
-  var suite = new jasmine.Suite(this, description, specDefinitions, this.currentSuite);
-
-  var parentSuite = this.currentSuite;
-  if (parentSuite) {
-    parentSuite.add(suite);
-  } else {
-    this.currentRunner_.add(suite);
-  }
-
-  this.currentSuite = suite;
-
-  var declarationError = null;
-  try {
-    specDefinitions.call(suite);
-  } catch(e) {
-    declarationError = e;
-  }
-
-  if (declarationError) {
-    this.it("encountered a declaration exception", function() {
-      throw declarationError;
-    });
-  }
-
-  this.currentSuite = parentSuite;
-
-  return suite;
-};
-
-jasmine.Env.prototype.beforeEach = function(beforeEachFunction) {
-  if (this.currentSuite) {
-    this.currentSuite.beforeEach(beforeEachFunction);
-  } else {
-    this.currentRunner_.beforeEach(beforeEachFunction);
-  }
-};
-
-jasmine.Env.prototype.currentRunner = function () {
-  return this.currentRunner_;
-};
-
-jasmine.Env.prototype.afterEach = function(afterEachFunction) {
-  if (this.currentSuite) {
-    this.currentSuite.afterEach(afterEachFunction);
-  } else {
-    this.currentRunner_.afterEach(afterEachFunction);
-  }
-
-};
-
-jasmine.Env.prototype.xdescribe = function(desc, specDefinitions) {
-  return {
-    execute: function() {
-    }
-  };
-};
-
-jasmine.Env.prototype.it = function(description, func) {
-  var spec = new jasmine.Spec(this, this.currentSuite, description);
-  this.currentSuite.add(spec);
-  this.currentSpec = spec;
-
-  if (func) {
-    spec.runs(func);
-  }
-
-  return spec;
-};
-
-jasmine.Env.prototype.xit = function(desc, func) {
-  return {
-    id: this.nextSpecId(),
-    runs: function() {
-    }
-  };
-};
-
-jasmine.Env.prototype.compareObjects_ = function(a, b, mismatchKeys, mismatchValues) {
-  if (a.__Jasmine_been_here_before__ === b && b.__Jasmine_been_here_before__ === a) {
-    return true;
-  }
-
-  a.__Jasmine_been_here_before__ = b;
-  b.__Jasmine_been_here_before__ = a;
-
-  var hasKey = function(obj, keyName) {
-    return obj !== null && obj[keyName] !== jasmine.undefined;
-  };
-
-  for (var property in b) {
-    if (!hasKey(a, property) && hasKey(b, property)) {
-      mismatchKeys.push("expected has key '" + property + "', but missing from actual.");
-    }
-  }
-  for (property in a) {
-    if (!hasKey(b, property) && hasKey(a, property)) {
-      mismatchKeys.push("expected missing key '" + property + "', but present in actual.");
-    }
-  }
-  for (property in b) {
-    if (property == '__Jasmine_been_here_before__') continue;
-    if (!this.equals_(a[property], b[property], mismatchKeys, mismatchValues)) {
-      mismatchValues.push("'" + property + "' was '" + (b[property] ? jasmine.util.htmlEscape(b[property].toString()) : b[property]) + "' in expected, but was '" + (a[property] ? jasmine.util.htmlEscape(a[property].toString()) : a[property]) + "' in actual.");
-    }
-  }
-
-  if (jasmine.isArray_(a) && jasmine.isArray_(b) && a.length != b.length) {
-    mismatchValues.push("arrays were not the same length");
-  }
-
-  delete a.__Jasmine_been_here_before__;
-  delete b.__Jasmine_been_here_before__;
-  return (mismatchKeys.length === 0 && mismatchValues.length === 0);
-};
-
-jasmine.Env.prototype.equals_ = function(a, b, mismatchKeys, mismatchValues) {
-  mismatchKeys = mismatchKeys || [];
-  mismatchValues = mismatchValues || [];
-
-  for (var i = 0; i < this.equalityTesters_.length; i++) {
-    var equalityTester = this.equalityTesters_[i];
-    var result = equalityTester(a, b, this, mismatchKeys, mismatchValues);
-    if (result !== jasmine.undefined) return result;
-  }
-
-  if (a === b) return true;
-
-  if (a === jasmine.undefined || a === null || b === jasmine.undefined || b === null) {
-    return (a == jasmine.undefined && b == jasmine.undefined);
-  }
-
-  if (jasmine.isDomNode(a) && jasmine.isDomNode(b)) {
-    return a === b;
-  }
-
-  if (a instanceof Date && b instanceof Date) {
-    return a.getTime() == b.getTime();
-  }
-
-  if (a.jasmineMatches) {
-    return a.jasmineMatches(b);
-  }
-
-  if (b.jasmineMatches) {
-    return b.jasmineMatches(a);
-  }
-
-  if (a instanceof jasmine.Matchers.ObjectContaining) {
-    return a.matches(b);
-  }
-
-  if (b instanceof jasmine.Matchers.ObjectContaining) {
-    return b.matches(a);
-  }
-
-  if (jasmine.isString_(a) && jasmine.isString_(b)) {
-    return (a == b);
-  }
-
-  if (jasmine.isNumber_(a) && jasmine.isNumber_(b)) {
-    return (a == b);
-  }
-
-  if (typeof a === "object" && typeof b === "object") {
-    return this.compareObjects_(a, b, mismatchKeys, mismatchValues);
-  }
-
-  //Straight check
-  return (a === b);
-};
-
-jasmine.Env.prototype.contains_ = function(haystack, needle) {
-  if (jasmine.isArray_(haystack)) {
-    for (var i = 0; i < haystack.length; i++) {
-      if (this.equals_(haystack[i], needle)) return true;
-    }
-    return false;
-  }
-  return haystack.indexOf(needle) >= 0;
-};
-
-jasmine.Env.prototype.addEqualityTester = function(equalityTester) {
-  this.equalityTesters_.push(equalityTester);
-};
-/** No-op base class for Jasmine reporters.
- *
- * @constructor
- */
-jasmine.Reporter = function() {
-};
-
-//noinspection JSUnusedLocalSymbols
-jasmine.Reporter.prototype.reportRunnerStarting = function(runner) {
-};
-
-//noinspection JSUnusedLocalSymbols
-jasmine.Reporter.prototype.reportRunnerResults = function(runner) {
-};
-
-//noinspection JSUnusedLocalSymbols
-jasmine.Reporter.prototype.reportSuiteResults = function(suite) {
-};
-
-//noinspection JSUnusedLocalSymbols
-jasmine.Reporter.prototype.reportSpecStarting = function(spec) {
-};
-
-//noinspection JSUnusedLocalSymbols
-jasmine.Reporter.prototype.reportSpecResults = function(spec) {
-};
-
-//noinspection JSUnusedLocalSymbols
-jasmine.Reporter.prototype.log = function(str) {
-};
-
-/**
- * Blocks are functions with executable code that make up a spec.
- *
- * @constructor
- * @param {jasmine.Env} env
- * @param {Function} func
- * @param {jasmine.Spec} spec
- */
-jasmine.Block = function(env, func, spec) {
-  this.env = env;
-  this.func = func;
-  this.spec = spec;
-};
-
-jasmine.Block.prototype.execute = function(onComplete) {  
-  try {
-    this.func.apply(this.spec);
-  } catch (e) {
-    this.spec.fail(e);
-  }
-  onComplete();
-};
-/** JavaScript API reporter.
- *
- * @constructor
- */
-jasmine.JsApiReporter = function() {
-  this.started = false;
-  this.finished = false;
-  this.suites_ = [];
-  this.results_ = {};
-};
-
-jasmine.JsApiReporter.prototype.reportRunnerStarting = function(runner) {
-  this.started = true;
-  var suites = runner.topLevelSuites();
-  for (var i = 0; i < suites.length; i++) {
-    var suite = suites[i];
-    this.suites_.push(this.summarize_(suite));
-  }
-};
-
-jasmine.JsApiReporter.prototype.suites = function() {
-  return this.suites_;
-};
-
-jasmine.JsApiReporter.prototype.summarize_ = function(suiteOrSpec) {
-  var isSuite = suiteOrSpec instanceof jasmine.Suite;
-  var summary = {
-    id: suiteOrSpec.id,
-    name: suiteOrSpec.description,
-    type: isSuite ? 'suite' : 'spec',
-    children: []
-  };
-  
-  if (isSuite) {
-    var children = suiteOrSpec.children();
-    for (var i = 0; i < children.length; i++) {
-      summary.children.push(this.summarize_(children[i]));
-    }
-  }
-  return summary;
-};
-
-jasmine.JsApiReporter.prototype.results = function() {
-  return this.results_;
-};
-
-jasmine.JsApiReporter.prototype.resultsForSpec = function(specId) {
-  return this.results_[specId];
-};
-
-//noinspection JSUnusedLocalSymbols
-jasmine.JsApiReporter.prototype.reportRunnerResults = function(runner) {
-  this.finished = true;
-};
-
-//noinspection JSUnusedLocalSymbols
-jasmine.JsApiReporter.prototype.reportSuiteResults = function(suite) {
-};
-
-//noinspection JSUnusedLocalSymbols
-jasmine.JsApiReporter.prototype.reportSpecResults = function(spec) {
-  this.results_[spec.id] = {
-    messages: spec.results().getItems(),
-    result: spec.results().failedCount > 0 ? "failed" : "passed"
-  };
-};
-
-//noinspection JSUnusedLocalSymbols
-jasmine.JsApiReporter.prototype.log = function(str) {
-};
-
-jasmine.JsApiReporter.prototype.resultsForSpecs = function(specIds){
-  var results = {};
-  for (var i = 0; i < specIds.length; i++) {
-    var specId = specIds[i];
-    results[specId] = this.summarizeResult_(this.results_[specId]);
-  }
-  return results;
-};
-
-jasmine.JsApiReporter.prototype.summarizeResult_ = function(result){
-  var summaryMessages = [];
-  var messagesLength = result.messages.length;
-  for (var messageIndex = 0; messageIndex < messagesLength; messageIndex++) {
-    var resultMessage = result.messages[messageIndex];
-    summaryMessages.push({
-      text: resultMessage.type == 'log' ? resultMessage.toString() : jasmine.undefined,
-      passed: resultMessage.passed ? resultMessage.passed() : true,
-      type: resultMessage.type,
-      message: resultMessage.message,
-      trace: {
-        stack: resultMessage.passed && !resultMessage.passed() ? resultMessage.trace.stack : jasmine.undefined
-      }
-    });
-  }
-
-  return {
-    result : result.result,
-    messages : summaryMessages
-  };
-};
-
-/**
- * @constructor
- * @param {jasmine.Env} env
- * @param actual
- * @param {jasmine.Spec} spec
- */
-jasmine.Matchers = function(env, actual, spec, opt_isNot) {
-  this.env = env;
-  this.actual = actual;
-  this.spec = spec;
-  this.isNot = opt_isNot || false;
-  this.reportWasCalled_ = false;
-};
-
-// todo: @deprecated as of Jasmine 0.11, remove soon [xw]
-jasmine.Matchers.pp = function(str) {
-  throw new Error("jasmine.Matchers.pp() is no longer supported, please use jasmine.pp() instead!");
-};
-
-// todo: @deprecated Deprecated as of Jasmine 0.10. Rewrite your custom matchers to return true or false. [xw]
-jasmine.Matchers.prototype.report = function(result, failing_message, details) {
-  throw new Error("As of jasmine 0.11, custom matchers must be implemented differently -- please see jasmine docs");
-};
-
-jasmine.Matchers.wrapInto_ = function(prototype, matchersClass) {
-  for (var methodName in prototype) {
-    if (methodName == 'report') continue;
-    var orig = prototype[methodName];
-    matchersClass.prototype[methodName] = jasmine.Matchers.matcherFn_(methodName, orig);
-  }
-};
-
-jasmine.Matchers.matcherFn_ = function(matcherName, matcherFunction) {
-  return function() {
-    var matcherArgs = jasmine.util.argsToArray(arguments);
-    var result = matcherFunction.apply(this, arguments);
-
-    if (this.isNot) {
-      result = !result;
-    }
-
-    if (this.reportWasCalled_) return result;
-
-    var message;
-    if (!result) {
-      if (this.message) {
-        message = this.message.apply(this, arguments);
-        if (jasmine.isArray_(message)) {
-          message = message[this.isNot ? 1 : 0];
-        }
-      } else {
-        var englishyPredicate = matcherName.replace(/[A-Z]/g, function(s) { return ' ' + s.toLowerCase(); });
-        message = "Expected " + jasmine.pp(this.actual) + (this.isNot ? " not " : " ") + englishyPredicate;
-        if (matcherArgs.length > 0) {
-          for (var i = 0; i < matcherArgs.length; i++) {
-            if (i > 0) message += ",";
-            message += " " + jasmine.pp(matcherArgs[i]);
-          }
-        }
-        message += ".";
-      }
-    }
-    var expectationResult = new jasmine.ExpectationResult({
-      matcherName: matcherName,
-      passed: result,
-      expected: matcherArgs.length > 1 ? matcherArgs : matcherArgs[0],
-      actual: this.actual,
-      message: message
-    });
-    this.spec.addMatcherResult(expectationResult);
-    return jasmine.undefined;
-  };
-};
-
-
-
-
-/**
- * toBe: compares the actual to the expected using ===
- * @param expected
- */
-jasmine.Matchers.prototype.toBe = function(expected) {
-  return this.actual === expected;
-};
-
-/**
- * toNotBe: compares the actual to the expected using !==
- * @param expected
- * @deprecated as of 1.0. Use not.toBe() instead.
- */
-jasmine.Matchers.prototype.toNotBe = function(expected) {
-  return this.actual !== expected;
-};
-
-/**
- * toEqual: compares the actual to the expected using common sense equality. Handles Objects, Arrays, etc.
- *
- * @param expected
- */
-jasmine.Matchers.prototype.toEqual = function(expected) {
-  return this.env.equals_(this.actual, expected);
-};
-
-/**
- * toNotEqual: compares the actual to the expected using the ! of jasmine.Matchers.toEqual
- * @param expected
- * @deprecated as of 1.0. Use not.toEqual() instead.
- */
-jasmine.Matchers.prototype.toNotEqual = function(expected) {
-  return !this.env.equals_(this.actual, expected);
-};
-
-/**
- * Matcher that compares the actual to the expected using a regular expression.  Constructs a RegExp, so takes
- * a pattern or a String.
- *
- * @param expected
- */
-jasmine.Matchers.prototype.toMatch = function(expected) {
-  return new RegExp(expected).test(this.actual);
-};
-
-/**
- * Matcher that compares the actual to the expected using the boolean inverse of jasmine.Matchers.toMatch
- * @param expected
- * @deprecated as of 1.0. Use not.toMatch() instead.
- */
-jasmine.Matchers.prototype.toNotMatch = function(expected) {
-  return !(new RegExp(expected).test(this.actual));
-};
-
-/**
- * Matcher that compares the actual to jasmine.undefined.
- */
-jasmine.Matchers.prototype.toBeDefined = function() {
-  return (this.actual !== jasmine.undefined);
-};
-
-/**
- * Matcher that compares the actual to jasmine.undefined.
- */
-jasmine.Matchers.prototype.toBeUndefined = function() {
-  return (this.actual === jasmine.undefined);
-};
-
-/**
- * Matcher that compares the actual to null.
- */
-jasmine.Matchers.prototype.toBeNull = function() {
-  return (this.actual === null);
-};
-
-/**
- * Matcher that boolean not-nots the actual.
- */
-jasmine.Matchers.prototype.toBeTruthy = function() {
-  return !!this.actual;
-};
-
-
-/**
- * Matcher that boolean nots the actual.
- */
-jasmine.Matchers.prototype.toBeFalsy = function() {
-  return !this.actual;
-};
-
-
-/**
- * Matcher that checks to see if the actual, a Jasmine spy, was called.
- */
-jasmine.Matchers.prototype.toHaveBeenCalled = function() {
-  if (arguments.length > 0) {
-    throw new Error('toHaveBeenCalled does not take arguments, use toHaveBeenCalledWith');
-  }
-
-  if (!jasmine.isSpy(this.actual)) {
-    throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.');
-  }
-
-  this.message = function() {
-    return [
-      "Expected spy " + this.actual.identity + " to have been called.",
-      "Expected spy " + this.actual.identity + " not to have been called."
-    ];
-  };
-
-  return this.actual.wasCalled;
-};
-
-/** @deprecated Use expect(xxx).toHaveBeenCalled() instead */
-jasmine.Matchers.prototype.wasCalled = jasmine.Matchers.prototype.toHaveBeenCalled;
-
-/**
- * Matcher that checks to see if the actual, a Jasmine spy, was not called.
- *
- * @deprecated Use expect(xxx).not.toHaveBeenCalled() instead
- */
-jasmine.Matchers.prototype.wasNotCalled = function() {
-  if (arguments.length > 0) {
-    throw new Error('wasNotCalled does not take arguments');
-  }
-
-  if (!jasmine.isSpy(this.actual)) {
-    throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.');
-  }
-
-  this.message = function() {
-    return [
-      "Expected spy " + this.actual.identity + " to not have been called.",
-      "Expected spy " + this.actual.identity + " to have been called."
-    ];
-  };
-
-  return !this.actual.wasCalled;
-};
-
-/**
- * Matcher that checks to see if the actual, a Jasmine spy, was called with a set of parameters.
- *
- * @example
- *
- */
-jasmine.Matchers.prototype.toHaveBeenCalledWith = function() {
-  var expectedArgs = jasmine.util.argsToArray(arguments);
-  if (!jasmine.isSpy(this.actual)) {
-    throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.');
-  }
-  this.message = function() {
-    if (this.actual.callCount === 0) {
-      // todo: what should the failure message for .not.toHaveBeenCalledWith() be? is this right? test better. [xw]
-      return [
-        "Expected spy " + this.actual.identity + " to have been called with " + jasmine.pp(expectedArgs) + " but it was never called.",
-        "Expected spy " + this.actual.identity + " not to have been called with " + jasmine.pp(expectedArgs) + " but it was."
-      ];
-    } else {
-      return [
-        "Expected spy " + this.actual.identity + " to have been called with " + jasmine.pp(expectedArgs) + " but was called with " + jasmine.pp(this.actual.argsForCall),
-        "Expected spy " + this.actual.identity + " not to have been called with " + jasmine.pp(expectedArgs) + " but was called with " + jasmine.pp(this.actual.argsForCall)
-      ];
-    }
-  };
-
-  return this.env.contains_(this.actual.argsForCall, expectedArgs);
-};
-
-/** @deprecated Use expect(xxx).toHaveBeenCalledWith() instead */
-jasmine.Matchers.prototype.wasCalledWith = jasmine.Matchers.prototype.toHaveBeenCalledWith;
-
-/** @deprecated Use expect(xxx).not.toHaveBeenCalledWith() instead */
-jasmine.Matchers.prototype.wasNotCalledWith = function() {
-  var expectedArgs = jasmine.util.argsToArray(arguments);
-  if (!jasmine.isSpy(this.actual)) {
-    throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.');
-  }
-
-  this.message = function() {
-    return [
-      "Expected spy not to have been called with " + jasmine.pp(expectedArgs) + " but it was",
-      "Expected spy to have been called with " + jasmine.pp(expectedArgs) + " but it was"
-    ];
-  };
-
-  return !this.env.contains_(this.actual.argsForCall, expectedArgs);
-};
-
-/**
- * Matcher that checks that the expected item is an element in the actual Array.
- *
- * @param {Object} expected
- */
-jasmine.Matchers.prototype.toContain = function(expected) {
-  return this.env.contains_(this.actual, expected);
-};
-
-/**
- * Matcher that checks that the expected item is NOT an element in the actual Array.
- *
- * @param {Object} expected
- * @deprecated as of 1.0. Use not.toContain() instead.
- */
-jasmine.Matchers.prototype.toNotContain = function(expected) {
-  return !this.env.contains_(this.actual, expected);
-};
-
-jasmine.Matchers.prototype.toBeLessThan = function(expected) {
-  return this.actual < expected;
-};
-
-jasmine.Matchers.prototype.toBeGreaterThan = function(expected) {
-  return this.actual > expected;
-};
-
-/**
- * Matcher that checks that the expected item is equal to the actual item
- * up to a given level of decimal precision (default 2).
- *
- * @param {Number} expected
- * @param {Number} precision
- */
-jasmine.Matchers.prototype.toBeCloseTo = function(expected, precision) {
-  if (!(precision === 0)) {
-    precision = precision || 2;
-  }
-  var multiplier = Math.pow(10, precision);
-  var actual = Math.round(this.actual * multiplier);
-  expected = Math.round(expected * multiplier);
-  return expected == actual;
-};
-
-/**
- * Matcher that checks that the expected exception was thrown by the actual.
- *
- * @param {String} expected
- */
-jasmine.Matchers.prototype.toThrow = function(expected) {
-  var result = false;
-  var exception;
-  if (typeof this.actual != 'function') {
-    throw new Error('Actual is not a function');
-  }
-  try {
-    this.actual();
-  } catch (e) {
-    exception = e;
-  }
-  if (exception) {
-    result = (expected === jasmine.undefined || this.env.equals_(exception.message || exception, expected.message || expected));
-  }
-
-  var not = this.isNot ? "not " : "";
-
-  this.message = function() {
-    if (exception && (expected === jasmine.undefined || !this.env.equals_(exception.message || exception, expected.message || expected))) {
-      return ["Expected function " + not + "to throw", expected ? expected.message || expected : "an exception", ", but it threw", exception.message || exception].join(' ');
-    } else {
-      return "Expected function to throw an exception.";
-    }
-  };
-
-  return result;
-};
-
-jasmine.Matchers.Any = function(expectedClass) {
-  this.expectedClass = expectedClass;
-};
-
-jasmine.Matchers.Any.prototype.jasmineMatches = function(other) {
-  if (this.expectedClass == String) {
-    return typeof other == 'string' || other instanceof String;
-  }
-
-  if (this.expectedClass == Number) {
-    return typeof other == 'number' || other instanceof Number;
-  }
-
-  if (this.expectedClass == Function) {
-    return typeof other == 'function' || other instanceof Function;
-  }
-
-  if (this.expectedClass == Object) {
-    return typeof other == 'object';
-  }
-
-  return other instanceof this.expectedClass;
-};
-
-jasmine.Matchers.Any.prototype.jasmineToString = function() {
-  return '<jasmine.any(' + this.expectedClass + ')>';
-};
-
-jasmine.Matchers.ObjectContaining = function (sample) {
-  this.sample = sample;
-};
-
-jasmine.Matchers.ObjectContaining.prototype.jasmineMatches = function(other, mismatchKeys, mismatchValues) {
-  mismatchKeys = mismatchKeys || [];
-  mismatchValues = mismatchValues || [];
-
-  var env = jasmine.getEnv();
-
-  var hasKey = function(obj, keyName) {
-    return obj != null && obj[keyName] !== jasmine.undefined;
-  };
-
-  for (var property in this.sample) {
-    if (!hasKey(other, property) && hasKey(this.sample, property)) {
-      mismatchKeys.push("expected has key '" + property + "', but missing from actual.");
-    }
-    else if (!env.equals_(this.sample[property], other[property], mismatchKeys, mismatchValues)) {
-      mismatchValues.push("'" + property + "' was '" + (other[property] ? jasmine.util.htmlEscape(other[property].toString()) : other[property]) + "' in expected, but was '" + (this.sample[property] ? jasmine.util.htmlEscape(this.sample[property].toString()) : this.sample[property]) + "' in actual.");
-    }
-  }
-
-  return (mismatchKeys.length === 0 && mismatchValues.length === 0);
-};
-
-jasmine.Matchers.ObjectContaining.prototype.jasmineToString = function () {
-  return "<jasmine.objectContaining(" + jasmine.pp(this.sample) + ")>";
-};
-// Mock setTimeout, clearTimeout
-// Contributed by Pivotal Computer Systems, www.pivotalsf.com
-
-jasmine.FakeTimer = function() {
-  this.reset();
-
-  var self = this;
-  self.setTimeout = function(funcToCall, millis) {
-    self.timeoutsMade++;
-    self.scheduleFunction(self.timeoutsMade, funcToCall, millis, false);
-    return self.timeoutsMade;
-  };
-
-  self.setInterval = function(funcToCall, millis) {
-    self.timeoutsMade++;
-    self.scheduleFunction(self.timeoutsMade, funcToCall, millis, true);
-    return self.timeoutsMade;
-  };
-
-  self.clearTimeout = function(timeoutKey) {
-    self.scheduledFunctions[timeoutKey] = jasmine.undefined;
-  };
-
-  self.clearInterval = function(timeoutKey) {
-    self.scheduledFunctions[timeoutKey] = jasmine.undefined;
-  };
-
-};
-
-jasmine.FakeTimer.prototype.reset = function() {
-  this.timeoutsMade = 0;
-  this.scheduledFunctions = {};
-  this.nowMillis = 0;
-};
-
-jasmine.FakeTimer.prototype.tick = function(millis) {
-  var oldMillis = this.nowMillis;
-  var newMillis = oldMillis + millis;
-  this.runFunctionsWithinRange(oldMillis, newMillis);
-  this.nowMillis = newMillis;
-};
-
-jasmine.FakeTimer.prototype.runFunctionsWithinRange = function(oldMillis, nowMillis) {
-  var scheduledFunc;
-  var funcsToRun = [];
-  for (var timeoutKey in this.scheduledFunctions) {
-    scheduledFunc = this.scheduledFunctions[timeoutKey];
-    if (scheduledFunc != jasmine.undefined &&
-        scheduledFunc.runAtMillis >= oldMillis &&
-        scheduledFunc.runAtMillis <= nowMillis) {
-      funcsToRun.push(scheduledFunc);
-      this.scheduledFunctions[timeoutKey] = jasmine.undefined;
-    }
-  }
-
-  if (funcsToRun.length > 0) {
-    funcsToRun.sort(function(a, b) {
-      return a.runAtMillis - b.runAtMillis;
-    });
-    for (var i = 0; i < funcsToRun.length; ++i) {
-      try {
-        var funcToRun = funcsToRun[i];
-        this.nowMillis = funcToRun.runAtMillis;
-        funcToRun.funcToCall();
-        if (funcToRun.recurring) {
-          this.scheduleFunction(funcToRun.timeoutKey,
-              funcToRun.funcToCall,
-              funcToRun.millis,
-              true);
-        }
-      } catch(e) {
-      }
-    }
-    this.runFunctionsWithinRange(oldMillis, nowMillis);
-  }
-};
-
-jasmine.FakeTimer.prototype.scheduleFunction = function(timeoutKey, funcToCall, millis, recurring) {
-  this.scheduledFunctions[timeoutKey] = {
-    runAtMillis: this.nowMillis + millis,
-    funcToCall: funcToCall,
-    recurring: recurring,
-    timeoutKey: timeoutKey,
-    millis: millis
-  };
-};
-
-/**
- * @namespace
- */
-jasmine.Clock = {
-  defaultFakeTimer: new jasmine.FakeTimer(),
-
-  reset: function() {
-    jasmine.Clock.assertInstalled();
-    jasmine.Clock.defaultFakeTimer.reset();
-  },
-
-  tick: function(millis) {
-    jasmine.Clock.assertInstalled();
-    jasmine.Clock.defaultFakeTimer.tick(millis);
-  },
-
-  runFunctionsWithinRange: function(oldMillis, nowMillis) {
-    jasmine.Clock.defaultFakeTimer.runFunctionsWithinRange(oldMillis, nowMillis);
-  },
-
-  scheduleFunction: function(timeoutKey, funcToCall, millis, recurring) {
-    jasmine.Clock.defaultFakeTimer.scheduleFunction(timeoutKey, funcToCall, millis, recurring);
-  },
-
-  useMock: function() {
-    if (!jasmine.Clock.isInstalled()) {
-      var spec = jasmine.getEnv().currentSpec;
-      spec.after(jasmine.Clock.uninstallMock);
-
-      jasmine.Clock.installMock();
-    }
-  },
-
-  installMock: function() {
-    jasmine.Clock.installed = jasmine.Clock.defaultFakeTimer;
-  },
-
-  uninstallMock: function() {
-    jasmine.Clock.assertInstalled();
-    jasmine.Clock.installed = jasmine.Clock.real;
-  },
-
-  real: {
-    setTimeout: jasmine.getGlobal().setTimeout,
-    clearTimeout: jasmine.getGlobal().clearTimeout,
-    setInterval: jasmine.getGlobal().setInterval,
-    clearInterval: jasmine.getGlobal().clearInterval
-  },
-
-  assertInstalled: function() {
-    if (!jasmine.Clock.isInstalled()) {
-      throw new Error("Mock clock is not installed, use jasmine.Clock.useMock()");
-    }
-  },
-
-  isInstalled: function() {
-    return jasmine.Clock.installed == jasmine.Clock.defaultFakeTimer;
-  },
-
-  installed: null
-};
-jasmine.Clock.installed = jasmine.Clock.real;
-
-//else for IE support
-jasmine.getGlobal().setTimeout = function(funcToCall, millis) {
-  if (jasmine.Clock.installed.setTimeout.apply) {
-    return jasmine.Clock.installed.setTimeout.apply(this, arguments);
-  } else {
-    return jasmine.Clock.installed.setTimeout(funcToCall, millis);
-  }
-};
-
-jasmine.getGlobal().setInterval = function(funcToCall, millis) {
-  if (jasmine.Clock.installed.setInterval.apply) {
-    return jasmine.Clock.installed.setInterval.apply(this, arguments);
-  } else {
-    return jasmine.Clock.installed.setInterval(funcToCall, millis);
-  }
-};
-
-jasmine.getGlobal().clearTimeout = function(timeoutKey) {
-  if (jasmine.Clock.installed.clearTimeout.apply) {
-    return jasmine.Clock.installed.clearTimeout.apply(this, arguments);
-  } else {
-    return jasmine.Clock.installed.clearTimeout(timeoutKey);
-  }
-};
-
-jasmine.getGlobal().clearInterval = function(timeoutKey) {
-  if (jasmine.Clock.installed.clearTimeout.apply) {
-    return jasmine.Clock.installed.clearInterval.apply(this, arguments);
-  } else {
-    return jasmine.Clock.installed.clearInterval(timeoutKey);
-  }
-};
-
-/**
- * @constructor
- */
-jasmine.MultiReporter = function() {
-  this.subReporters_ = [];
-};
-jasmine.util.inherit(jasmine.MultiReporter, jasmine.Reporter);
-
-jasmine.MultiReporter.prototype.addReporter = function(reporter) {
-  this.subReporters_.push(reporter);
-};
-
-(function() {
-  var functionNames = [
-    "reportRunnerStarting",
-    "reportRunnerResults",
-    "reportSuiteResults",
-    "reportSpecStarting",
-    "reportSpecResults",
-    "log"
-  ];
-  for (var i = 0; i < functionNames.length; i++) {
-    var functionName = functionNames[i];
-    jasmine.MultiReporter.prototype[functionName] = (function(functionName) {
-      return function() {
-        for (var j = 0; j < this.subReporters_.length; j++) {
-          var subReporter = this.subReporters_[j];
-          if (subReporter[functionName]) {
-            subReporter[functionName].apply(subReporter, arguments);
-          }
-        }
-      };
-    })(functionName);
-  }
-})();
-/**
- * Holds results for a set of Jasmine spec. Allows for the results array to hold another jasmine.NestedResults
- *
- * @constructor
- */
-jasmine.NestedResults = function() {
-  /**
-   * The total count of results
-   */
-  this.totalCount = 0;
-  /**
-   * Number of passed results
-   */
-  this.passedCount = 0;
-  /**
-   * Number of failed results
-   */
-  this.failedCount = 0;
-  /**
-   * Was this suite/spec skipped?
-   */
-  this.skipped = false;
-  /**
-   * @ignore
-   */
-  this.items_ = [];
-};
-
-/**
- * Roll up the result counts.
- *
- * @param result
- */
-jasmine.NestedResults.prototype.rollupCounts = function(result) {
-  this.totalCount += result.totalCount;
-  this.passedCount += result.passedCount;
-  this.failedCount += result.failedCount;
-};
-
-/**
- * Adds a log message.
- * @param values Array of message parts which will be concatenated later.
- */
-jasmine.NestedResults.prototype.log = function(values) {
-  this.items_.push(new jasmine.MessageResult(values));
-};
-
-/**
- * Getter for the results: message & results.
- */
-jasmine.NestedResults.prototype.getItems = function() {
-  return this.items_;
-};
-
-/**
- * Adds a result, tracking counts (total, passed, & failed)
- * @param {jasmine.ExpectationResult|jasmine.NestedResults} result
- */
-jasmine.NestedResults.prototype.addResult = function(result) {
-  if (result.type != 'log') {
-    if (result.items_) {
-      this.rollupCounts(result);
-    } else {
-      this.totalCount++;
-      if (result.passed()) {
-        this.passedCount++;
-      } else {
-        this.failedCount++;
-      }
-    }
-  }
-  this.items_.push(result);
-};
-
-/**
- * @returns {Boolean} True if <b>everything</b> below passed
- */
-jasmine.NestedResults.prototype.passed = function() {
-  return this.passedCount === this.totalCount;
-};
-/**
- * Base class for pretty printing for expectation results.
- */
-jasmine.PrettyPrinter = function() {
-  this.ppNestLevel_ = 0;
-};
-
-/**
- * Formats a value in a nice, human-readable string.
- *
- * @param value
- */
-jasmine.PrettyPrinter.prototype.format = function(value) {
-  if (this.ppNestLevel_ > 40) {
-    throw new Error('jasmine.PrettyPrinter: format() nested too deeply!');
-  }
-
-  this.ppNestLevel_++;
-  try {
-    if (value === jasmine.undefined) {
-      this.emitScalar('undefined');
-    } else if (value === null) {
-      this.emitScalar('null');
-    } else if (value === jasmine.getGlobal()) {
-      this.emitScalar('<global>');
-    } else if (value.jasmineToString) {
-      this.emitScalar(value.jasmineToString());
-    } else if (typeof value === 'string') {
-      this.emitString(value);
-    } else if (jasmine.isSpy(value)) {
-      this.emitScalar("spy on " + value.identity);
-    } else if (value instanceof RegExp) {
-      this.emitScalar(value.toString());
-    } else if (typeof value === 'function') {
-      this.emitScalar('Function');
-    } else if (typeof value.nodeType === 'number') {
-      this.emitScalar('HTMLNode');
-    } else if (value instanceof Date) {
-      this.emitScalar('Date(' + value + ')');
-    } else if (value.__Jasmine_been_here_before__) {
-      this.emitScalar('<circular reference: ' + (jasmine.isArray_(value) ? 'Array' : 'Object') + '>');
-    } else if (jasmine.isArray_(value) || typeof value == 'object') {
-      value.__Jasmine_been_here_before__ = true;
-      if (jasmine.isArray_(value)) {
-        this.emitArray(value);
-      } else {
-        this.emitObject(value);
-      }
-      delete value.__Jasmine_been_here_before__;
-    } else {
-      this.emitScalar(value.toString());
-    }
-  } finally {
-    this.ppNestLevel_--;
-  }
-};
-
-jasmine.PrettyPrinter.prototype.iterateObject = function(obj, fn) {
-  for (var property in obj) {
-    if (property == '__Jasmine_been_here_before__') continue;
-    fn(property, obj.__lookupGetter__ ? (obj.__lookupGetter__(property) !== jasmine.undefined && 
-                                         obj.__lookupGetter__(property) !== null) : false);
-  }
-};
-
-jasmine.PrettyPrinter.prototype.emitArray = jasmine.unimplementedMethod_;
-jasmine.PrettyPrinter.prototype.emitObject = jasmine.unimplementedMethod_;
-jasmine.PrettyPrinter.prototype.emitScalar = jasmine.unimplementedMethod_;
-jasmine.PrettyPrinter.prototype.emitString = jasmine.unimplementedMethod_;
-
-jasmine.StringPrettyPrinter = function() {
-  jasmine.PrettyPrinter.call(this);
-
-  this.string = '';
-};
-jasmine.util.inherit(jasmine.StringPrettyPrinter, jasmine.PrettyPrinter);
-
-jasmine.StringPrettyPrinter.prototype.emitScalar = function(value) {
-  this.append(value);
-};
-
-jasmine.StringPrettyPrinter.prototype.emitString = function(value) {
-  this.append("'" + value + "'");
-};
-
-jasmine.StringPrettyPrinter.prototype.emitArray = function(array) {
-  this.append('[ ');
-  for (var i = 0; i < array.length; i++) {
-    if (i > 0) {
-      this.append(', ');
-    }
-    this.format(array[i]);
-  }
-  this.append(' ]');
-};
-
-jasmine.StringPrettyPrinter.prototype.emitObject = function(obj) {
-  var self = this;
-  this.append('{ ');
-  var first = true;
-
-  this.iterateObject(obj, function(property, isGetter) {
-    if (first) {
-      first = false;
-    } else {
-      self.append(', ');
-    }
-
-    self.append(property);
-    self.append(' : ');
-    if (isGetter) {
-      self.append('<getter>');
-    } else {
-      self.format(obj[property]);
-    }
-  });
-
-  this.append(' }');
-};
-
-jasmine.StringPrettyPrinter.prototype.append = function(value) {
-  this.string += value;
-};
-jasmine.Queue = function(env) {
-  this.env = env;
-  this.blocks = [];
-  this.running = false;
-  this.index = 0;
-  this.offset = 0;
-  this.abort = false;
-};
-
-jasmine.Queue.prototype.addBefore = function(block) {
-  this.blocks.unshift(block);
-};
-
-jasmine.Queue.prototype.add = function(block) {
-  this.blocks.push(block);
-};
-
-jasmine.Queue.prototype.insertNext = function(block) {
-  this.blocks.splice((this.index + this.offset + 1), 0, block);
-  this.offset++;
-};
-
-jasmine.Queue.prototype.start = function(onComplete) {
-  this.running = true;
-  this.onComplete = onComplete;
-  this.next_();
-};
-
-jasmine.Queue.prototype.isRunning = function() {
-  return this.running;
-};
-
-jasmine.Queue.LOOP_DONT_RECURSE = true;
-
-jasmine.Queue.prototype.next_ = function() {
-  var self = this;
-  var goAgain = true;
-
-  while (goAgain) {
-    goAgain = false;
-    
-    if (self.index < self.blocks.length && !this.abort) {
-      var calledSynchronously = true;
-      var completedSynchronously = false;
-
-      var onComplete = function () {
-        if (jasmine.Queue.LOOP_DONT_RECURSE && calledSynchronously) {
-          completedSynchronously = true;
-          return;
-        }
-
-        if (self.blocks[self.index].abort) {
-          self.abort = true;
-        }
-
-        self.offset = 0;
-        self.index++;
-
-        var now = new Date().getTime();
-        if (self.env.updateInterval && now - self.env.lastUpdate > self.env.updateInterval) {
-          self.env.lastUpdate = now;
-          self.env.setTimeout(function() {
-            self.next_();
-          }, 0);
-        } else {
-          if (jasmine.Queue.LOOP_DONT_RECURSE && completedSynchronously) {
-            goAgain = true;
-          } else {
-            self.next_();
-          }
-        }
-      };
-      self.blocks[self.index].execute(onComplete);
-
-      calledSynchronously = false;
-      if (completedSynchronously) {
-        onComplete();
-      }
-      
-    } else {
-      self.running = false;
-      if (self.onComplete) {
-        self.onComplete();
-      }
-    }
-  }
-};
-
-jasmine.Queue.prototype.results = function() {
-  var results = new jasmine.NestedResults();
-  for (var i = 0; i < this.blocks.length; i++) {
-    if (this.blocks[i].results) {
-      results.addResult(this.blocks[i].results());
-    }
-  }
-  return results;
-};
-
-
-/**
- * Runner
- *
- * @constructor
- * @param {jasmine.Env} env
- */
-jasmine.Runner = function(env) {
-  var self = this;
-  self.env = env;
-  self.queue = new jasmine.Queue(env);
-  self.before_ = [];
-  self.after_ = [];
-  self.suites_ = [];
-};
-
-jasmine.Runner.prototype.execute = function() {
-  var self = this;
-  if (self.env.reporter.reportRunnerStarting) {
-    self.env.reporter.reportRunnerStarting(this);
-  }
-  self.queue.start(function () {
-    self.finishCallback();
-  });
-};
-
-jasmine.Runner.prototype.beforeEach = function(beforeEachFunction) {
-  beforeEachFunction.typeName = 'beforeEach';
-  this.before_.splice(0,0,beforeEachFunction);
-};
-
-jasmine.Runner.prototype.afterEach = function(afterEachFunction) {
-  afterEachFunction.typeName = 'afterEach';
-  this.after_.splice(0,0,afterEachFunction);
-};
-
-
-jasmine.Runner.prototype.finishCallback = function() {
-  this.env.reporter.reportRunnerResults(this);
-};
-
-jasmine.Runner.prototype.addSuite = function(suite) {
-  this.suites_.push(suite);
-};
-
-jasmine.Runner.prototype.add = function(block) {
-  if (block instanceof jasmine.Suite) {
-    this.addSuite(block);
-  }
-  this.queue.add(block);
-};
-
-jasmine.Runner.prototype.specs = function () {
-  var suites = this.suites();
-  var specs = [];
-  for (var i = 0; i < suites.length; i++) {
-    specs = specs.concat(suites[i].specs());
-  }
-  return specs;
-};
-
-jasmine.Runner.prototype.suites = function() {
-  return this.suites_;
-};
-
-jasmine.Runner.prototype.topLevelSuites = function() {
-  var topLevelSuites = [];
-  for (var i = 0; i < this.suites_.length; i++) {
-    if (!this.suites_[i].parentSuite) {
-      topLevelSuites.push(this.suites_[i]);
-    }
-  }
-  return topLevelSuites;
-};
-
-jasmine.Runner.prototype.results = function() {
-  return this.queue.results();
-};
-/**
- * Internal representation of a Jasmine specification, or test.
- *
- * @constructor
- * @param {jasmine.Env} env
- * @param {jasmine.Suite} suite
- * @param {String} description
- */
-jasmine.Spec = function(env, suite, description) {
-  if (!env) {
-    throw new Error('jasmine.Env() required');
-  }
-  if (!suite) {
-    throw new Error('jasmine.Suite() required');
-  }
-  var spec = this;
-  spec.id = env.nextSpecId ? env.nextSpecId() : null;
-  spec.env = env;
-  spec.suite = suite;
-  spec.description = description;
-  spec.queue = new jasmine.Queue(env);
-
-  spec.afterCallbacks = [];
-  spec.spies_ = [];
-
-  spec.results_ = new jasmine.NestedResults();
-  spec.results_.description = description;
-  spec.matchersClass = null;
-};
-
-jasmine.Spec.prototype.getFullName = function() {
-  return this.suite.getFullName() + ' ' + this.description + '.';
-};
-
-
-jasmine.Spec.prototype.results = function() {
-  return this.results_;
-};
-
-/**
- * All parameters are pretty-printed and concatenated together, then written to the spec's output.
- *
- * Be careful not to leave calls to <code>jasmine.log</code> in production code.
- */
-jasmine.Spec.prototype.log = function() {
-  return this.results_.log(arguments);
-};
-
-jasmine.Spec.prototype.runs = function (func) {
-  var block = new jasmine.Block(this.env, func, this);
-  this.addToQueue(block);
-  return this;
-};
-
-jasmine.Spec.prototype.addToQueue = function (block) {
-  if (this.queue.isRunning()) {
-    this.queue.insertNext(block);
-  } else {
-    this.queue.add(block);
-  }
-};
-
-/**
- * @param {jasmine.ExpectationResult} result
- */
-jasmine.Spec.prototype.addMatcherResult = function(result) {
-  this.results_.addResult(result);
-};
-
-jasmine.Spec.prototype.expect = function(actual) {
-  var positive = new (this.getMatchersClass_())(this.env, actual, this);
-  positive.not = new (this.getMatchersClass_())(this.env, actual, this, true);
-  return positive;
-};
-
-/**
- * Waits a fixed time period before moving to the next block.
- *
- * @deprecated Use waitsFor() instead
- * @param {Number} timeout milliseconds to wait
- */
-jasmine.Spec.prototype.waits = function(timeout) {
-  var waitsFunc = new jasmine.WaitsBlock(this.env, timeout, this);
-  this.addToQueue(waitsFunc);
-  return this;
-};
-
-/**
- * Waits for the latchFunction to return true before proceeding to the next block.
- *
- * @param {Function} latchFunction
- * @param {String} optional_timeoutMessage
- * @param {Number} optional_timeout
- */
-jasmine.Spec.prototype.waitsFor = function(latchFunction, optional_timeoutMessage, optional_timeout) {
-  var latchFunction_ = null;
-  var optional_timeoutMessage_ = null;
-  var optional_timeout_ = null;
-
-  for (var i = 0; i < arguments.length; i++) {
-    var arg = arguments[i];
-    switch (typeof arg) {
-      case 'function':
-        latchFunction_ = arg;
-        break;
-      case 'string':
-        optional_timeoutMessage_ = arg;
-        break;
-      case 'number':
-        optional_timeout_ = arg;
-        break;
-    }
-  }
-
-  var waitsForFunc = new jasmine.WaitsForBlock(this.env, optional_timeout_, latchFunction_, optional_timeoutMessage_, this);
-  this.addToQueue(waitsForFunc);
-  return this;
-};
-
-jasmine.Spec.prototype.fail = function (e) {
-  var expectationResult = new jasmine.ExpectationResult({
-    passed: false,
-    message: e ? jasmine.util.formatException(e) : 'Exception',
-    trace: { stack: e.stack }
-  });
-  this.results_.addResult(expectationResult);
-};
-
-jasmine.Spec.prototype.getMatchersClass_ = function() {
-  return this.matchersClass || this.env.matchersClass;
-};
-
-jasmine.Spec.prototype.addMatchers = function(matchersPrototype) {
-  var parent = this.getMatchersClass_();
-  var newMatchersClass = function() {
-    parent.apply(this, arguments);
-  };
-  jasmine.util.inherit(newMatchersClass, parent);
-  jasmine.Matchers.wrapInto_(matchersPrototype, newMatchersClass);
-  this.matchersClass = newMatchersClass;
-};
-
-jasmine.Spec.prototype.finishCallback = function() {
-  this.env.reporter.reportSpecResults(this);
-};
-
-jasmine.Spec.prototype.finish = function(onComplete) {
-  this.removeAllSpies();
-  this.finishCallback();
-  if (onComplete) {
-    onComplete();
-  }
-};
-
-jasmine.Spec.prototype.after = function(doAfter) {
-  if (this.queue.isRunning()) {
-    this.queue.add(new jasmine.Block(this.env, doAfter, this));
-  } else {
-    this.afterCallbacks.unshift(doAfter);
-  }
-};
-
-jasmine.Spec.prototype.execute = function(onComplete) {
-  var spec = this;
-  if (!spec.env.specFilter(spec)) {
-    spec.results_.skipped = true;
-    spec.finish(onComplete);
-    return;
-  }
-
-  this.env.reporter.reportSpecStarting(this);
-
-  spec.env.currentSpec = spec;
-
-  spec.addBeforesAndAftersToQueue();
-
-  spec.queue.start(function () {
-    spec.finish(onComplete);
-  });
-};
-
-jasmine.Spec.prototype.addBeforesAndAftersToQueue = function() {
-  var runner = this.env.currentRunner();
-  var i;
-
-  for (var suite = this.suite; suite; suite = suite.parentSuite) {
-    for (i = 0; i < suite.before_.length; i++) {
-      this.queue.addBefore(new jasmine.Block(this.env, suite.before_[i], this));
-    }
-  }
-  for (i = 0; i < runner.before_.length; i++) {
-    this.queue.addBefore(new jasmine.Block(this.env, runner.before_[i], this));
-  }
-  for (i = 0; i < this.afterCallbacks.length; i++) {
-    this.queue.add(new jasmine.Block(this.env, this.afterCallbacks[i], this));
-  }
-  for (suite = this.suite; suite; suite = suite.parentSuite) {
-    for (i = 0; i < suite.after_.length; i++) {
-      this.queue.add(new jasmine.Block(this.env, suite.after_[i], this));
-    }
-  }
-  for (i = 0; i < runner.after_.length; i++) {
-    this.queue.add(new jasmine.Block(this.env, runner.after_[i], this));
-  }
-};
-
-jasmine.Spec.prototype.explodes = function() {
-  throw 'explodes function should not have been called';
-};
-
-jasmine.Spec.prototype.spyOn = function(obj, methodName, ignoreMethodDoesntExist) {
-  if (obj == jasmine.undefined) {
-    throw "spyOn could not find an object to spy upon for " + methodName + "()";
-  }
-
-  if (!ignoreMethodDoesntExist && obj[methodName] === jasmine.undefined) {
-    throw methodName + '() method does not exist';
-  }
-
-  if (!ignoreMethodDoesntExist && obj[methodName] && obj[methodName].isSpy) {
-    throw new Error(methodName + ' has already been spied upon');
-  }
-
-  var spyObj = jasmine.createSpy(methodName);
-
-  this.spies_.push(spyObj);
-  spyObj.baseObj = obj;
-  spyObj.methodName = methodName;
-  spyObj.originalValue = obj[methodName];
-
-  obj[methodName] = spyObj;
-
-  return spyObj;
-};
-
-jasmine.Spec.prototype.removeAllSpies = function() {
-  for (var i = 0; i < this.spies_.length; i++) {
-    var spy = this.spies_[i];
-    spy.baseObj[spy.methodName] = spy.originalValue;
-  }
-  this.spies_ = [];
-};
-
-/**
- * Internal representation of a Jasmine suite.
- *
- * @constructor
- * @param {jasmine.Env} env
- * @param {String} description
- * @param {Function} specDefinitions
- * @param {jasmine.Suite} parentSuite
- */
-jasmine.Suite = function(env, description, specDefinitions, parentSuite) {
-  var self = this;
-  self.id = env.nextSuiteId ? env.nextSuiteId() : null;
-  self.description = description;
-  self.queue = new jasmine.Queue(env);
-  self.parentSuite = parentSuite;
-  self.env = env;
-  self.before_ = [];
-  self.after_ = [];
-  self.children_ = [];
-  self.suites_ = [];
-  self.specs_ = [];
-};
-
-jasmine.Suite.prototype.getFullName = function() {
-  var fullName = this.description;
-  for (var parentSuite = this.parentSuite; parentSuite; parentSuite = parentSuite.parentSuite) {
-    fullName = parentSuite.description + ' ' + fullName;
-  }
-  return fullName;
-};
-
-jasmine.Suite.prototype.finish = function(onComplete) {
-  this.env.reporter.reportSuiteResults(this);
-  this.finished = true;
-  if (typeof(onComplete) == 'function') {
-    onComplete();
-  }
-};
-
-jasmine.Suite.prototype.beforeEach = function(beforeEachFunction) {
-  beforeEachFunction.typeName = 'beforeEach';
-  this.before_.unshift(beforeEachFunction);
-};
-
-jasmine.Suite.prototype.afterEach = function(afterEachFunction) {
-  afterEachFunction.typeName = 'afterEach';
-  this.after_.unshift(afterEachFunction);
-};
-
-jasmine.Suite.prototype.results = function() {
-  return this.queue.results();
-};
-
-jasmine.Suite.prototype.add = function(suiteOrSpec) {
-  this.children_.push(suiteOrSpec);
-  if (suiteOrSpec instanceof jasmine.Suite) {
-    this.suites_.push(suiteOrSpec);
-    this.env.currentRunner().addSuite(suiteOrSpec);
-  } else {
-    this.specs_.push(suiteOrSpec);
-  }
-  this.queue.add(suiteOrSpec);
-};
-
-jasmine.Suite.prototype.specs = function() {
-  return this.specs_;
-};
-
-jasmine.Suite.prototype.suites = function() {
-  return this.suites_;
-};
-
-jasmine.Suite.prototype.children = function() {
-  return this.children_;
-};
-
-jasmine.Suite.prototype.execute = function(onComplete) {
-  var self = this;
-  this.queue.start(function () {
-    self.finish(onComplete);
-  });
-};
-jasmine.WaitsBlock = function(env, timeout, spec) {
-  this.timeout = timeout;
-  jasmine.Block.call(this, env, null, spec);
-};
-
-jasmine.util.inherit(jasmine.WaitsBlock, jasmine.Block);
-
-jasmine.WaitsBlock.prototype.execute = function (onComplete) {
-  if (jasmine.VERBOSE) {
-    this.env.reporter.log('>> Jasmine waiting for ' + this.timeout + ' ms...');
-  }
-  this.env.setTimeout(function () {
-    onComplete();
-  }, this.timeout);
-};
-/**
- * A block which waits for some condition to become true, with timeout.
- *
- * @constructor
- * @extends jasmine.Block
- * @param {jasmine.Env} env The Jasmine environment.
- * @param {Number} timeout The maximum time in milliseconds to wait for the condition to become true.
- * @param {Function} latchFunction A function which returns true when the desired condition has been met.
- * @param {String} message The message to display if the desired condition hasn't been met within the given time period.
- * @param {jasmine.Spec} spec The Jasmine spec.
- */
-jasmine.WaitsForBlock = function(env, timeout, latchFunction, message, spec) {
-  this.timeout = timeout || env.defaultTimeoutInterval;
-  this.latchFunction = latchFunction;
-  this.message = message;
-  this.totalTimeSpentWaitingForLatch = 0;
-  jasmine.Block.call(this, env, null, spec);
-};
-jasmine.util.inherit(jasmine.WaitsForBlock, jasmine.Block);
-
-jasmine.WaitsForBlock.TIMEOUT_INCREMENT = 10;
-
-jasmine.WaitsForBlock.prototype.execute = function(onComplete) {
-  if (jasmine.VERBOSE) {
-    this.env.reporter.log('>> Jasmine waiting for ' + (this.message || 'something to happen'));
-  }
-  var latchFunctionResult;
-  try {
-    latchFunctionResult = this.latchFunction.apply(this.spec);
-  } catch (e) {
-    this.spec.fail(e);
-    onComplete();
-    return;
-  }
-
-  if (latchFunctionResult) {
-    onComplete();
-  } else if (this.totalTimeSpentWaitingForLatch >= this.timeout) {
-    var message = 'timed out after ' + this.timeout + ' msec waiting for ' + (this.message || 'something to happen');
-    this.spec.fail({
-      name: 'timeout',
-      message: message
-    });
-
-    this.abort = true;
-    onComplete();
-  } else {
-    this.totalTimeSpentWaitingForLatch += jasmine.WaitsForBlock.TIMEOUT_INCREMENT;
-    var self = this;
-    this.env.setTimeout(function() {
-      self.execute(onComplete);
-    }, jasmine.WaitsForBlock.TIMEOUT_INCREMENT);
-  }
-};
-
-jasmine.version_= {
-  "major": 1,
-  "minor": 2,
-  "build": 0,
-  "revision": 1337005947
-};

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/build.xml
----------------------------------------------------------------------
diff --git a/bbos/build.xml b/bbos/build.xml
deleted file mode 100644
index 714ac02..0000000
--- a/bbos/build.xml
+++ /dev/null
@@ -1,299 +0,0 @@
-<project name="Create &amp; Update a Cordova BlackBerry WebWorks Project" default="help">
-<!--
-   Licensed to the Apache Software Foundation (ASF) under one
-   or more contributor license agreements.  See the NOTICE file
-   distributed with this work for additional information
-   regarding copyright ownership.  The ASF licenses this file
-   to you under the Apache License, Version 2.0 (the
-   "License"); you may not use this file except in compliance
-   with the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing,
-   software distributed under the License is distributed on an
-   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-   KIND, either express or implied.  See the License for the
-   specific language governing permissions and limitations
-   under the License.
--->
-    <!-- LOAD VERSION -->
-
-    <loadfile property="version" srcFile="VERSION">
-        <filterchain>
-            <striplinebreaks/>
-        </filterchain>
-    </loadfile>
-
-    <!-- LOAD PROPERTIES -->
-
-    <property name="template.project.dir" location="bin/templates/project" />
-    <property name="template.dist.dir"    location="bin/templates/dist" />
-
-    <property name="build.dir"            location="build" />
-    <property name="update.dir"           value="lib/cordova.${version}" />
-
-    <property name="dist.path"         location="dist" />
-    <property name="dist.www.path"     location="${dist.path}/www" />
-    <property name="dist.project.path" location="${dist.path}/sample" />
-
-    <property name="jar.src"      location="framework/ext/src" />
-    <property name="jar.path"     value="ext" />
-    <property name="jar.basename" value="cordova.${version}.jar" />
-    <property name="jar.file"     value="${jar.path}/${jar.basename}" />
-
-    <property name="version.file"   value="VERSION" />
-
-    <property name="js.src"          location="javascript" />
-    <property name="js.path"         value="javascript" />
-    <property name="js.basename"     value="cordova.js" />
-    <property name="js.file"         value="${js.path}/${js.basename}" />
-
-    <!-- BUILD JAVASCRIPT -->
-
-    <target name="build-javascript">
-        <!-- BB Javascript -->
-        <mkdir dir="${build.dir}/${js.path}" />
-        <copy file="${js.src}/cordova.blackberry.js" tofile="${build.dir}/${js.file}" />
-    </target>
-
-    <!-- BUILD BLACKBERRY EXTENSION -->
-
-    <target name="build-bb-extension">
-        <mkdir dir="${build.dir}/${jar.path}" />
-
-        <zip destfile="${build.dir}/${jar.file}">
-            <fileset dir="${jar.src}" includes="library.xml" />
-            <fileset dir="${jar.src}" includes="**/*.java" />
-        </zip>
-    </target>
-
-    <!-- CREATE A PROJECT -->
-    <target name="create" depends="clean, build-javascript, build-bb-extension">
-        <fail unless="project.path" message="You must give a project PATH. Use the argument -Dproject.path=&#34;C:\dev\my_project&#34;" />
-
-        <available file="${project.path}" property="project.exists" />
-        <fail if="project.exists" message="The project path must be an empty directory." />
-
-        <!-- create project using template directory -->
-        <mkdir dir="${project.path}" />
-        <copy todir="${project.path}">
-            <fileset dir="${template.project.dir}" />
-        </copy>
-
-        <!-- copy version file -->
-        <copy todir="${project.path}">
-            <fileset file="${version.file}" />
-        </copy>
-
-        <!-- change file permission for cordova scripts because ant copy doesn't preserve file permissions -->
-        <chmod dir="${project.path}/cordova" perm="700" includes="*"/>
-
-        <!-- update project files to reference cordova.x.x.x.js -->
-        <replaceregexp match="cordova\.js" replace="${js.basename}" byline="true">
-            <fileset file="${project.path}/www/index.html" />
-            <fileset file="${project.path}/build.xml" />
-        </replaceregexp>
-
-        <!-- copy cordova.js -->
-        <copy todir="${project.path}/www">
-            <fileset dir="${build.dir}/${js.path}" />
-        </copy>
-
-        <!-- copy ext/ -->
-        <copy todir="${project.path}/www/ext">
-            <fileset dir="${build.dir}/${jar.path}" />
-        </copy>
-
-        <!-- save release -->
-        <mkdir dir="${project.path}/${update.dir}" />
-        <copy todir="${project.path}/${update.dir}">
-            <fileset dir="${build.dir}" />
-        </copy>
-
-        <echo>
-Project Creation Complete!
-==========================
-
-Getting Started:
-----------------
-
-  cd ${project.path}
-
-  ant help
-        </echo>
-    </target>
-
-    <!-- DISTRIBUTION -->
-    <target name="dist" depends="">
-        <!-- create a sample project -->
-        <antcall target="create">
-            <param name="project.path" value="${dist.project.path}" />
-        </antcall>
-
-        <!-- copy dist template (README.md) -->
-        <copy todir="${dist.path}">
-            <fileset dir="${template.dist.dir}" />
-        </copy>
-
-        <!-- change file permission for cordova scripts because ant copy doesn't preserve file permissions -->
-        <chmod dir="${dist.path}/sample/cordova" perm="700" includes="*" />
-
-        <!-- copy cordova.jar -->
-        <copy todir="${dist.www.path}/ext">
-            <fileset dir="${build.dir}/${jar.path}" />
-        </copy>
-
-        <!-- copy cordova.js -->
-        <copy todir="${dist.www.path}">
-            <fileset dir="${build.dir}/${js.path}" />
-        </copy>
-
-        <!-- copy config.xml -->
-        <copy todir="${dist.www.path}">
-            <fileset file="${template.project.dir}/www/config.xml" />
-        </copy>
-
-        <!-- copy plugins.xml -->
-        <copy todir="${dist.www.path}">
-            <fileset file="${template.project.dir}/www/plugins.xml" />
-        </copy>
-
-        <!-- update config.xml to have a default name-->
-        <replace file="${dist.project.path}/www/config.xml" token="__NAME__" value="cordovaExample"/>
-        <replace file="${dist.project.path}/www/config.xml" token="__PACKAGE__" value="org.apache.cordova.example"/>
-        <echo>
-Distribution Complete!
-======================
-
-Version:
---------
-
-  ${version}
-
-Path:
------
-
-  ${dist.path}
-        </echo>
-    </target>
-
-    <target name="version">
-        <replace dir="." token="${version}" value="${value}" />
-
-        <echo>
-Version Update Complete!
-========================
-
-Version:
---------
-
-  Previous: ${version}
-  Current:  ${value}
-
-Remember to:
-------------
-
-  Review and commit the version update.
-
-  $ git diff
-  $ git commit -am "Update to version ${value}"
-  $ git tag ${value}
-        </echo>
-    </target>
-
-    <!-- UPDATE A PROJECT -->
-
-    <target name="update" depends="clean, build-javascript, build-bb-extension">
-        <fail unless="project.path" message="You must give a project PATH. Use the argument -Dproject.path=&#34;C:\dev\my_project&#34;" />
-
-        <available file="${project.path}" property="project.exists" />
-        <fail unless="project.exists" message="The project path cannot be empty." />
-
-        <!-- save release -->
-        <mkdir dir="${project.path}/${update.dir}" />
-        <copy todir="${project.path}/${update.dir}">
-            <fileset dir="${build.dir}" />
-        </copy>
-
-        <echo>
-Update complete!
-================
-
-  Cordova ${version} has been created.
-
-  Update does not alter your project files.
-
-  See below for instructions to install Cordova ${version}.
-
-Where:
-------
-
-  ${project.path}/${update.dir}
-
-Install:
---------
-
-  1. Install the Java Extension:
-
-    - delete /www/${jar.path}/cordova.jar
-
-    - copy /${update.dir}/${jar.file}
-        to /www/${jar.file}
-
-  2. Install the JavaScript library:
-
-    - delete /www/cordova.js
-
-    - copy /${update.dir}/${js.file}
-        to /www/${js.basename}
-
-  3. Update JavaScript references:
-
-    - &#60;script type=&#34;text/javascript&#34; src=&#34;${js.basename}&#34;&#62;&#60;/script&#62;
-        </echo>
-    </target>
-
-    <!-- CLEAN -->
-
-    <target name="clean">
-        <delete dir="${build.dir}" />
-        <delete dir="${dist.path}" />
-    </target>
-
-    <!-- HELP -->
-
-    <target name="help">
-        <echo>
-NAME
-  ${ant.project.name}
-
-SYNOPSIS
-  ant COMMAND [-D&lt;argument&gt;=&lt;value&gt;]...
-
-DESCRIPTION
-  This tool allows you to create and update Cordova-BlackBerry-WebWorks projects.
-  You will want to run update after you have updated the framework source.
-  In other words, when you &lt;git pull origin master&gt;.
-
-COMMANDS
-  help ............ Show this help menu.
-                      ant, ant help
-
-  create .......... Create a new project
-                      ant create PATH
-                      ant create -Dproject.path="C:\dev\my_project"
-
-  update .......... Update an existing project
-                      ant update PATH
-                      ant update -Dproject.path="C:\dev\my_project"
-
-  dist ............ Create a Cordova distribution build
-                      ant dist
-
-  version ......... Update Cordova version
-                      ant version VERSION
-                      ant version -Dvalue="1.0.0"
-        </echo>
-    </target>
-</project>

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/.classpath
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/.classpath b/bbos/framework/ext/.classpath
deleted file mode 100644
index 8d3a567..0000000
--- a/bbos/framework/ext/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="src" path="res"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/net.rim.ejde.BlackBerryVMInstallType/BlackBerry JRE 5.0.0"/>
-	<classpathentry kind="output" path="bin"/>
-</classpath>

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/.project
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/.project b/bbos/framework/ext/.project
deleted file mode 100644
index ecbf8d5..0000000
--- a/bbos/framework/ext/.project
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>CordovaExtension</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>net.rim.ejde.internal.builder.BlackBerryPreprocessBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>net.rim.ejde.internal.builder.BlackBerryResourcesBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>net.rim.ejde.BlackBerryPreProcessNature</nature>
-		<nature>net.rim.ejde.BlackBerryProjectCoreNature</nature>
-		<nature>org.eclipse.jdt.core.javanature</nature>
-	</natures>
-</projectDescription>

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/.settings/net.rim.browser.tools.debug.widget.prefs
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/.settings/net.rim.browser.tools.debug.widget.prefs b/bbos/framework/ext/.settings/net.rim.browser.tools.debug.widget.prefs
deleted file mode 100644
index 524fddd..0000000
--- a/bbos/framework/ext/.settings/net.rim.browser.tools.debug.widget.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Sun May 23 23:01:24 PDT 2010
-eclipse.preferences.version=1
-outputfolder=build

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/.settings/org.eclipse.jdt.core.prefs
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/.settings/org.eclipse.jdt.core.prefs b/bbos/framework/ext/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index be7e57d..0000000
--- a/bbos/framework/ext/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-#Sun May 23 23:00:44 PDT 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore
-org.eclipse.jdt.core.compiler.source=1.3

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/BlackBerry_App_Descriptor.xml
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/BlackBerry_App_Descriptor.xml b/bbos/framework/ext/BlackBerry_App_Descriptor.xml
deleted file mode 100644
index bb973e8..0000000
--- a/bbos/framework/ext/BlackBerry_App_Descriptor.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<Properties ModelVersion="1.1.2">
-<!-- 
-     Licensed to the Apache Software Foundation (ASF) under one
-     or more contributor license agreements.  See the NOTICE file
-     distributed with this work for additional information
-     regarding copyright ownership.  The ASF licenses this file
-     to you under the Apache License, Version 2.0 (the
-     "License"); you may not use this file except in compliance
-     with the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing,
-     software distributed under the License is distributed on an
-     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-     KIND, either express or implied.  See the License for the
-     specific language governing permissions and limitations
-     under the License.
--->
-  <General Title="" Version="1.0.0" Vendor="BlackBerry Developer" Description=""/>
-  <Application Type="BlackBerry Application" MainMIDletName="" MainArgs="" HomeScreenPosition="0" StartupTier="7" IsSystemModule="false" IsAutostartup="false"/>
-  <Resources hasTitleResource="false" TitleResourceBundleName="" TitleResourceBundleRelativePath="" TitleResourceBundleClassName="" TitleResourceBundleKey="" DescriptionId="">
-    <Icons/>
-  </Resources>
-  <Compile OutputCompilerMessages="false" ConvertImages="false" CreateWarningForNoExportedRoutine="true" CompressResources="false" AliasList="">
-    <PreprocessorDefines/>
-  </Compile>
-  <Packaging OutputFileName="Cordova" OutputFolder="deliverables" PreBuildStep="" PostBuildStep="" CleanStep="" GenerateALXFile="false">
-    <AlxFiles/>
-  </Packaging>
-  <HiddenProperties>
-    <ClassProtection/>
-    <PackageProtection/>
-  </HiddenProperties>
-  <AlternateEntryPoints/>
-</Properties>

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/library.xml
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/library.xml b/bbos/framework/ext/src/library.xml
deleted file mode 100644
index d408e9f..0000000
--- a/bbos/framework/ext/src/library.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-       Licensed to the Apache Software Foundation (ASF) under one
-       or more contributor license agreements.  See the NOTICE file
-       distributed with this work for additional information
-       regarding copyright ownership.  The ASF licenses this file
-       to you under the Apache License, Version 2.0 (the
-       "License"); you may not use this file except in compliance
-       with the License.  You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-       Unless required by applicable law or agreed to in writing,
-       software distributed under the License is distributed on an
-       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-       KIND, either express or implied.  See the License for the
-       specific language governing permissions and limitations
-       under the License.
--->
-<library>
-	<extension>
-		<entryClass>org.apache.cordova.CordovaExtension</entryClass>
-	</extension>
-	<features>
-		<feature id="org.apache.cordova" version="1.0.0">Cordova JavaScript Extension</feature>
-		<feature id="blackberry.connection" version="1.0.0">Stub in for backwards bb10 support</feature>
-		<feature id="blackberry.io" version="1.0.0">Stub in for backwards bb10 support</feature>
-		<feature id="blackberry.invoked" version="1.0.0">Stub in for backwards bb10 support</feature>
-		<feature id="blackberry.invoke.card" version="1.0.0">Stub in for backwards bb10 support</feature>
-		<feature id="blackberry.ui.contextmenu" version="1.0.0">Stub in for backwards bb10 support</feature>
-		<feature id="blackberry.io.filetransfer" version="1.0.0">Stub in for backwards bb10 support</feature>
-		<feature id="blackberry.pim.contacts" version="1.0.0">Stub in for backwards bb10 support</feature>
-		<feature id="blackberry.bbm.platform" version="1.0.0">Stub in for backwards bb10 support</feature>
-	</features>
-</library>


[09/15] CB-4228

Posted by lo...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/camera/PhotoListener.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/camera/PhotoListener.java b/bbos/framework/ext/src/org/apache/cordova/camera/PhotoListener.java
deleted file mode 100644
index 8571788..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/camera/PhotoListener.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.camera;
-
-import net.rim.device.api.io.file.FileSystemJournal;
-import net.rim.device.api.io.file.FileSystemJournalEntry;
-import net.rim.device.api.io.file.FileSystemJournalListener;
-import net.rim.device.api.ui.UiApplication;
-
-/**
- * Listens for photo added to file system and invokes the specified callback
- * with the result formatted according the specified destination type.
- */
-public class PhotoListener implements FileSystemJournalListener {
-
-    /**
-     * Image format options specified by the caller.
-     */
-    private CameraOptions options;
-
-    /**
-     * Callback to be invoked with the result.
-     */
-    private String callbackId;
-
-    /**
-     * Used to track file system changes.
-     */
-    private long lastUSN = 0;
-
-    /**
-     * Constructor.
-     * @param options         Specifies the format of the image and result
-     * @param callbackId      The id of the callback to receive the result
-     */
-    public PhotoListener(CameraOptions options, String callbackId)
-    {
-        this.options = options;
-        this.callbackId = callbackId;
-    }
-
-    /**
-     * Listens for file system changes.  When a JPEG file is added, we process
-     * it and send it back.
-     */
-    public void fileJournalChanged()
-    {
-        // next sequence number file system will use
-        long USN = FileSystemJournal.getNextUSN();
-
-        for (long i = USN - 1; i >= lastUSN && i < USN; --i)
-        {
-            FileSystemJournalEntry entry = FileSystemJournal.getEntry(i);
-            if (entry == null)
-            {
-                break;
-            }
-
-            if (entry.getEvent() == FileSystemJournalEntry.FILE_ADDED)
-            {
-                String path = entry.getPath();
-                if (path != null && path.indexOf(".jpg") != -1)
-                {
-                    // we found a new JPEG file
-                    // first, stop listening to avoid processing the file more than once
-                    synchronized(UiApplication.getEventLock()) {
-                        UiApplication.getUiApplication().removeFileSystemJournalListener(this);
-                    }
-
-                    // process the image on a background thread to avoid clogging the event queue
-                    final String filePath = "file://" + path;
-                    Thread thread = new Thread(new Runnable() {
-                        public void run() {
-                            Camera.processImage(filePath, options, callbackId);
-                        }
-                    });
-                    thread.start();
-
-                    // clean up
-                    Camera.closeCamera();
-
-                    break;
-                }
-            }
-        }
-
-        // remember the file journal change number,
-        // so we don't search the same events again and again
-        lastUSN = USN;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/capture/AudioCaptureListener.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/capture/AudioCaptureListener.java b/bbos/framework/ext/src/org/apache/cordova/capture/AudioCaptureListener.java
deleted file mode 100644
index 9267e9b..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/capture/AudioCaptureListener.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.capture;
-
-import net.rim.device.api.io.file.FileSystemJournal;
-import net.rim.device.api.io.file.FileSystemJournalEntry;
-import net.rim.device.api.io.file.FileSystemJournalListener;
-
-/**
- * Listens for audio recording files that are added to file system.
- * <p>
- * Audio recordings are added to the file system when the user stops the
- * recording. The audio recording file extension is '.amr'. Therefore, we listen
- * for the <code>FileSystemJournalEntry.FILE_ADDED</code> event, capturing when
- * the new file is written.
- * <p>
- * The file system notifications will arrive on the application event thread.
- * When it receives a notification, it adds the image file path to a MediaQueue
- * so that the capture thread can process the file.
- */
-public class AudioCaptureListener implements FileSystemJournalListener {
-    /**
-     * Used to track file system changes.
-     */
-    private long lastUSN = 0;
-
-    /**
-     * Queue to send media files to for processing.
-     */
-    private MediaQueue queue = null;
-
-    /**
-     * Constructor.
-     */
-    AudioCaptureListener(MediaQueue queue) {
-        this.queue = queue;
-    }
-
-    public void fileJournalChanged() {
-        // next sequence number file system will use
-        long USN = FileSystemJournal.getNextUSN();
-
-        for (long i = USN - 1; i >= lastUSN && i < USN; --i) {
-            FileSystemJournalEntry entry = FileSystemJournal.getEntry(i);
-            if (entry == null) {
-                break;
-            }
-
-            // has audio recording file has been added to the file system?
-            String path = entry.getPath();
-            if (entry.getEvent() == FileSystemJournalEntry.FILE_ADDED
-                    && path.endsWith(".amr")) {
-                // add file path to the capture queue
-                queue.add("file://" + path);
-
-                break;
-            }
-        }
-
-        // remember the file journal change number,
-        // so we don't search the same events again and again
-        lastUSN = USN;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/capture/AudioCaptureOperation.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/capture/AudioCaptureOperation.java b/bbos/framework/ext/src/org/apache/cordova/capture/AudioCaptureOperation.java
deleted file mode 100644
index f4fd9b4..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/capture/AudioCaptureOperation.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.capture;
-
-import java.io.IOException;
-import java.util.Date;
-
-import javax.microedition.io.Connector;
-import javax.microedition.io.file.FileConnection;
-
-import org.apache.cordova.file.File;
-import org.apache.cordova.util.FileUtils;
-import org.apache.cordova.util.Logger;
-
-import net.rim.device.api.io.MIMETypeAssociations;
-import net.rim.device.api.ui.UiApplication;
-
-public class AudioCaptureOperation extends CaptureOperation {
-
-    // content type
-    public static final String CONTENT_TYPE = "audio/";
-
-    // maximum duration to capture media (milliseconds)
-    private double duration = 0;
-
-    // file system listener
-    private AudioCaptureListener listener = null;
-
-    /**
-     * Creates and starts an audio capture operation.
-     *
-     * @param limit
-     *            maximum number of media files to capture
-     * @param duration
-     *            maximum duration to capture media (milliseconds)
-     * @param callbackId
-     *            the callback to receive the files
-     * @param queue
-     *            the queue from which to retrieve captured media files
-     */
-    public AudioCaptureOperation(long limit, double duration, String callbackId, MediaQueue queue) {
-        super(limit, callbackId, queue);
-
-        if (duration > 0) {
-            this.duration = duration;
-        }
-
-        // listener to capture image files added to file system
-        this.listener = new AudioCaptureListener(queue);
-
-        start();
-    }
-
-    /**
-     * Registers file system listener and launches native voice notes recorder
-     * application.
-     */
-    protected void setup() {
-        // register listener for files being written
-        synchronized(UiApplication.getEventLock()) {
-            UiApplication.getUiApplication().addFileSystemJournalListener(listener);
-        }
-
-        // launch the native voice notes recorder application
-        AudioControl.launchAudioRecorder();
-    }
-
-    /**
-     * Unregisters file system listener and closes native voice notes recorder
-     * application.
-     */
-    protected void teardown() {
-        // remove file system listener
-        synchronized(UiApplication.getEventLock()) {
-            UiApplication.getUiApplication().removeFileSystemJournalListener(listener);
-        }
-
-        // close the native voice notes recorder application
-        AudioControl.closeAudioRecorder();
-    }
-
-    /**
-     * Retrieves the file properties for the captured audio recording.
-     *
-     * @param filePath
-     *            full path of the audio recording file
-     */
-    protected void processFile(String filePath) {
-        Logger.log(this.getClass().getName() + ": processing file: " + filePath);
-
-        // wait for file to finish writing and add it to captured files
-        addCaptureFile(getMediaFile(filePath));
-    }
-
-    /**
-     * Waits for file to be fully written to the file system before retrieving
-     * its file properties.
-     *
-     * @param filePath
-     *            Full path of the image file
-     * @throws IOException
-     */
-    private File getMediaFile(String filePath) {
-        File file = new File(FileUtils.stripSeparator(filePath));
-
-        // time begin waiting for file write
-        long start = (new Date()).getTime();
-
-        // wait for the file to be fully written, then grab its properties
-        FileConnection fconn = null;
-        try {
-            fconn = (FileConnection) Connector.open(filePath, Connector.READ);
-            if (fconn.exists()) {
-                // wait for file to be fully written
-                long fileSize = fconn.fileSize();
-                long size = 0;
-                Thread thisThread = Thread.currentThread();
-                while (myThread == thisThread) {
-                    try {
-                        Thread.sleep(100);
-                    }
-                    catch (InterruptedException e) {
-                        break;
-                    }
-                    size = fconn.fileSize();
-                    if (fileSize != 0 && size == fileSize) {
-                        break;
-                    }
-                    fileSize = size;
-                }
-                Logger.log(this.getClass().getName() + ": " + filePath + " size="
-                        + Long.toString(fileSize) + " bytes");
-
-                // retrieve file properties
-                file.setLastModifiedDate(fconn.lastModified());
-                file.setName(FileUtils.stripSeparator(fconn.getName()));
-                file.setSize(fileSize);
-                file.setType(MIMETypeAssociations.getMIMEType(filePath));
-            }
-        }
-        catch (IOException e) {
-            Logger.log(this.getClass().getName() + ": " + e);
-        }
-        finally {
-            try {
-                if (fconn != null) fconn.close();
-            } catch (IOException ignored) {}
-        }
-
-        // log time it took to write the file
-        long end = (new Date()).getTime();
-        Logger.log(this.getClass().getName() + ": wait time="
-                + Long.toString(end - start) + " ms");
-
-        return file;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/capture/AudioControl.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/capture/AudioControl.java b/bbos/framework/ext/src/org/apache/cordova/capture/AudioControl.java
deleted file mode 100644
index 45e9f9c..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/capture/AudioControl.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.capture;
-
-import org.apache.cordova.util.ApplicationUtils;
-import org.apache.cordova.util.Logger;
-
-import net.rim.device.api.system.ApplicationDescriptor;
-import net.rim.device.api.system.ApplicationManager;
-import net.rim.device.api.system.ApplicationManagerException;
-import net.rim.device.api.system.CodeModuleManager;
-
-public class AudioControl {
-    /**
-     * Determines if the native voice notes recorder application is installed
-     * on the device.
-     *
-     * @return true if native voice notes recorder application is installed
-     */
-    public static boolean hasAudioRecorderApplication() {
-        return ApplicationUtils.isModuleInstalled("net_rim_bb_voicenotesrecorder");
-    }
-
-    /**
-     * Determines if the native voice notes recorder application is running in
-     * the foreground.
-     *
-     * @return true if native voice notes recorder application is running in
-     *         foreground
-     */
-    public static boolean isAudioRecorderActive() {
-        return ApplicationUtils.isApplicationInForeground("net_rim_bb_voicenotesrecorder");
-    }
-
-    /**
-     * Launches the native audio recorder application.
-     */
-    public static void launchAudioRecorder() {
-        int handle = CodeModuleManager.getModuleHandle("net_rim_bb_voicenotesrecorder");
-        ApplicationDescriptor ad = CodeModuleManager.getApplicationDescriptors(handle)[0];
-        ApplicationDescriptor ad2 = new ApplicationDescriptor(ad, null);
-        try {
-            ApplicationManager.getApplicationManager().runApplication(ad2, true);
-        }
-        catch (ApplicationManagerException e) {
-            Logger.log(AudioControl.class.getName() + ": unable to launch net_rim_bb_voicenotesrecorder");
-        }
-    }
-
-    /**
-     * Closes the native audio recorder application.
-     */
-    public static void closeAudioRecorder() {
-        if (!isAudioRecorderActive()) {
-            return;
-        }
-        ApplicationUtils.injectEscKeyPress(1);
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/capture/CameraControl.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/capture/CameraControl.java b/bbos/framework/ext/src/org/apache/cordova/capture/CameraControl.java
deleted file mode 100644
index 2ed9206..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/capture/CameraControl.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.capture;
-
-import org.apache.cordova.util.ApplicationUtils;
-
-import net.rim.blackberry.api.invoke.CameraArguments;
-import net.rim.blackberry.api.invoke.Invoke;
-import net.rim.device.api.ui.UiApplication;
-
-public class CameraControl {
-    /**
-     * Determines if the native camera application is running in the foreground.
-     *
-     * @return true if native camera application is running in foreground
-     */
-    public static boolean isCameraActive() {
-        return ApplicationUtils.isApplicationInForeground("net_rim_bb_camera");
-    }
-
-    /**
-     * Determines if the native video recorder application is running in the
-     * foreground.
-     *
-     * @return true if native video recorder application is running in
-     *         foreground
-     */
-    public static boolean isVideoRecorderActive() {
-        return ApplicationUtils.isApplicationInForeground("net_rim_bb_videorecorder");
-    }
-
-    /**
-     * Launches the native camera application.
-     */
-    public static void launchCamera() {
-        synchronized(UiApplication.getEventLock()) {
-            Invoke.invokeApplication(Invoke.APP_TYPE_CAMERA,
-                    new CameraArguments());
-        }
-    }
-
-    /**
-     * Launches the native video recorder application.
-     */
-    public static void launchVideoRecorder() {
-        synchronized(UiApplication.getEventLock()) {
-            Invoke.invokeApplication(Invoke.APP_TYPE_CAMERA,
-                    new CameraArguments(CameraArguments.ARG_VIDEO_RECORDER));
-        }
-    }
-
-    /**
-     * Closes the native camera application.
-     */
-    public static void closeCamera() {
-        if (!isCameraActive()) {
-            return;
-        }
-        ApplicationUtils.injectEscKeyPress(2);
-    }
-
-    /**
-     * Closes the native video recorder application.
-     */
-    public static void closeVideoRecorder() {
-        if (!isVideoRecorderActive()) {
-            return;
-        }
-        ApplicationUtils.injectEscKeyPress(2);
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/capture/CaptureControl.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/capture/CaptureControl.java b/bbos/framework/ext/src/org/apache/cordova/capture/CaptureControl.java
deleted file mode 100644
index e37dd56..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/capture/CaptureControl.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.capture;
-
-import java.util.Enumeration;
-import java.util.Vector;
-
-public class CaptureControl {
-
-    /**
-     * Pending capture operations.
-     */
-    private Vector pendingOperations = new Vector();
-
-    /**
-     * Singleton.
-     */
-    private CaptureControl() {}
-
-    /**
-     * Holds the singleton for lazy instantiation.
-     */
-    private static class CaptureControlHolder {
-        static final CaptureControl INSTANCE = new CaptureControl();
-    }
-
-    /**
-     * Retrieves a CaptureControl instance.
-     * @return CaptureControl instance.
-     */
-    public static final CaptureControl getCaptureControl() {
-        return CaptureControlHolder.INSTANCE;
-    }
-
-    /**
-     * Add capture operation so we can stop it manually.
-     */
-    public void addCaptureOperation(CaptureOperation operation) {
-        if (operation == null) {
-            return;
-        }
-
-        synchronized (pendingOperations) {
-            pendingOperations.addElement(operation);
-        }
-    }
-
-    /**
-     * Remove capture operation.
-     */
-    public void removeCaptureOperation(CaptureOperation operation) {
-        if (operation == null) {
-            return;
-        }
-
-        synchronized (pendingOperations) {
-            pendingOperations.removeElement(operation);
-        }
-    }
-
-    /**
-     * Starts an image capture operation, during which a user can take multiple
-     * photos. The capture operation runs in the background.
-     *
-     * @param limit
-     *            the maximum number of images to capture during the operation
-     * @param callbackId
-     *            the callback to be invoked with capture file properties
-     */
-    public void startImageCaptureOperation(long limit, String callbackId) {
-        // setup a queue to receive image file paths
-        MediaQueue queue = new MediaQueue();
-
-        // start a capture operation on a background thread
-        CaptureOperation operation = new ImageCaptureOperation(limit,
-                callbackId, queue);
-
-        // track the operation so we can stop or cancel it later
-        addCaptureOperation(operation);
-    }
-
-    /**
-     * Starts a video capture operation, during which a user can record multiple
-     * recordings.  The capture operation runs in the background.
-     *
-     * @param limit
-     *            the maximum number of images to capture during the operation
-     * @param callbackId
-     *            the callback to be invoked with capture file properties
-     */
-    public void startVideoCaptureOperation(long limit, String callbackId) {
-        // setup a queue to receive video recording file paths
-        MediaQueue queue = new MediaQueue();
-
-        // start a capture operation on a background thread
-        CaptureOperation operation = new VideoCaptureOperation(limit,
-                callbackId, queue);
-
-        // track the operation so we can stop or cancel it later
-        addCaptureOperation(operation);
-    }
-
-    /**
-     * Starts an audio capture operation using the native voice notes recorder
-     * application.
-     *
-     * @param limit
-     *            the maximum number of audio clips to capture during the
-     *            operation
-     * @param duration
-     *            the maximum duration of each captured clip
-     * @param callbackId
-     *            the callback to be invoked with the capture results
-     */
-    public void startAudioCaptureOperation(long limit, double duration, String callbackId) {
-        // setup a queue to receive recording file paths
-        MediaQueue queue = new MediaQueue();
-
-        // start a capture operation on a background thread
-        CaptureOperation operation = new AudioCaptureOperation(limit, duration,
-                callbackId, queue);
-
-        // track the operation so we can stop or cancel it later
-        addCaptureOperation(operation);
-    }
-
-    /**
-     * Stops all pending capture operations. If the <code>cancel</code>
-     * parameter is <code>true</code>, no results will be sent via the callback
-     * mechanism and any captured files will be removed from the file system.
-     *
-     * @param cancel
-     *            true if operations should be canceled
-     */
-    public void stopPendingOperations(boolean cancel) {
-        // There are two scenarios where the capture operation would be stopped
-        // manually:
-        // 1- The user stops the capture application, and this application
-        //    returns to the foreground.
-        // 2- It is canceled programmatically.  No results should be sent.
-        synchronized (pendingOperations) {
-            for (Enumeration e = pendingOperations.elements(); e.hasMoreElements(); ) {
-                CaptureOperation operation = (CaptureOperation) e.nextElement();
-                if (cancel) {
-                    operation.cancel();
-                }
-                else {
-                    operation.stop();
-                }
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/capture/CaptureMode.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/capture/CaptureMode.java b/bbos/framework/ext/src/org/apache/cordova/capture/CaptureMode.java
deleted file mode 100644
index 7c71f96..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/capture/CaptureMode.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.capture;
-
-import org.apache.cordova.json4j.JSONException;
-import org.apache.cordova.json4j.JSONObject;
-
-public class CaptureMode {
-
-    private String mimeType = null;
-    private long height = 0;
-    private long width = 0;
-
-    public CaptureMode() {
-    }
-
-    public CaptureMode(String type) {
-        this.mimeType = type;
-    }
-
-    public CaptureMode(String type, long width, long height) {
-        this.mimeType = type;
-        this.height = height;
-        this.width = width;
-    }
-
-    public String getMimeType() {
-        return mimeType;
-    }
-
-    public long getHeight() {
-        return height;
-    }
-
-    public long getWidth() {
-        return width;
-    }
-
-    public JSONObject toJSONObject() {
-        JSONObject o = new JSONObject();
-        try {
-            o.put("type", getMimeType());
-            o.put("height", getHeight());
-            o.put("width", getWidth());
-        }
-        catch (JSONException ignored) {
-        }
-        return o;
-    }
-
-    public boolean equals(Object o) {
-        if (o == this) {
-            return true;
-        }
-        if (!(o instanceof CaptureMode)) {
-            return false;
-        }
-        CaptureMode cm = (CaptureMode)o;
-        return ((mimeType == null ? cm.mimeType == null :
-            mimeType.equals(cm.mimeType))
-            && (width == cm.width)
-            && (height == cm.height));
-    }
-
-    public int hashCode() {
-        int hash = (mimeType != null ? mimeType.hashCode() : 19);
-        hash = 37*hash + (int)width;
-        hash = 37*hash + (int)height;
-        return hash;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/capture/CaptureOperation.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/capture/CaptureOperation.java b/bbos/framework/ext/src/org/apache/cordova/capture/CaptureOperation.java
deleted file mode 100644
index dc85bd8..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/capture/CaptureOperation.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.capture;
-
-import java.io.IOException;
-import java.util.Enumeration;
-import java.util.Vector;
-
-import org.apache.cordova.file.File;
-import org.apache.cordova.util.FileUtils;
-import org.apache.cordova.util.Logger;
-
-public abstract class CaptureOperation implements Runnable {
-    // max number of media files to capture
-    protected long limit = 1;
-
-    // for sending results
-    protected String callbackId = null;
-
-    // list of captured media files
-    protected final Vector captureFiles = new Vector();
-
-    // media file queue
-    protected MediaQueue mediaQueue = null;
-
-    // used to interrupt thread
-    protected volatile Thread myThread;
-
-    // to determine if operation has been canceled
-    protected boolean canceled = false;
-
-    /**
-     * Creates and starts a capture operation on a new thread.
-     *
-     * @param limit
-     *            maximum number of media files to capture
-     * @param callbackId
-     *            the callback to receive the files
-     * @param queue
-     *            the queue from which to retrieve captured media files
-     */
-    public CaptureOperation(long limit, String callbackId, MediaQueue queue) {
-        if (limit > 1) {
-            this.limit = limit;
-        }
-
-        this.callbackId = callbackId;
-        this.mediaQueue = queue;
-        this.myThread = new Thread(this);
-    }
-
-    /**
-     * Waits for media file to be captured.
-     */
-    public void run() {
-        if (myThread == null) {
-            return; // stopped before started
-        }
-
-        Logger.log(this.getClass().getName() + ": " + callbackId + " started");
-
-        // tasks to be run before entering main loop
-        setup();
-
-        // capture until interrupted or we've reached capture limit
-        Thread thisThread = Thread.currentThread();
-        String filePath = null;
-        while (myThread == thisThread && captureFiles.size() < limit) {
-            try {
-                // consume file added to media capture queue
-                filePath = mediaQueue.remove();
-            }
-            catch (InterruptedException e) {
-                Logger.log(this.getClass().getName() + ": " + callbackId + " interrupted");
-                // and we're done
-                break;
-            }
-            processFile(filePath);
-        }
-
-        // perform cleanup tasks
-        teardown();
-
-        // process captured results
-        processResults();
-
-        // unregister the operation from the controller
-        CaptureControl.getCaptureControl().removeCaptureOperation(this);
-
-        Logger.log(this.getClass().getName() + ": " + callbackId + " finished");
-    }
-
-    /**
-     * Starts this capture operation on a new thread.
-     */
-    protected void start() {
-        if (myThread == null) {
-            return; // stopped before started
-        }
-        myThread.start();
-    }
-
-    /**
-     * Stops the operation.
-     */
-    public void stop() {
-        // interrupt capture thread
-        Thread tmpThread = myThread;
-        myThread = null;
-        if (tmpThread != null && tmpThread.isAlive()) {
-            tmpThread.interrupt();
-        }
-    }
-
-    /**
-     * Cancels the operation.
-     */
-    public void cancel() {
-        canceled = true;
-        stop();
-    }
-
-    /**
-     * Processes the results of the capture operation.
-     */
-    protected void processResults() {
-        // process results
-        if (!canceled) {
-            // invoke appropriate callback
-            if (captureFiles.size() > 0) {
-                // send capture files
-                MediaCapture.captureSuccess(captureFiles, callbackId);
-            }
-            else {
-                // error
-                MediaCapture.captureError(callbackId);
-            }
-        }
-        else {
-            removeCaptureFiles();
-        }
-    }
-
-    /**
-     * Adds a media file to list of collected media files for this operation.
-     *
-     * @param file
-     *            object containing media file properties
-     */
-    protected void addCaptureFile(File file) {
-        captureFiles.addElement(file);
-    }
-
-    /**
-     * Removes captured files from the file system.
-     */
-    protected void removeCaptureFiles() {
-        for (Enumeration e = captureFiles.elements(); e.hasMoreElements();) {
-            File file = (File) e.nextElement();
-            try {
-                FileUtils.delete(file.getFullPath());
-            }
-            catch (IOException ignored) {
-            }
-        }
-    }
-
-    /**
-     * Override this method to perform tasks before the operation starts.
-     */
-    protected void setup() {
-    }
-
-    /**
-     * Override this method to perform tasks after the operation has
-     * stopped.
-     */
-    protected void teardown() {
-    }
-
-    /**
-     * Subclasses must implement this method to process a captured media file.
-     * @param filePath the full path of the media file
-     */
-    protected abstract void processFile(final String filePath);
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/capture/ImageCaptureListener.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/capture/ImageCaptureListener.java b/bbos/framework/ext/src/org/apache/cordova/capture/ImageCaptureListener.java
deleted file mode 100644
index 4906ee8..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/capture/ImageCaptureListener.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.capture;
-
-import net.rim.device.api.io.file.FileSystemJournal;
-import net.rim.device.api.io.file.FileSystemJournalEntry;
-import net.rim.device.api.io.file.FileSystemJournalListener;
-
-/**
- * Listens for image files that are added to file system.
- * <p>
- * The file system notifications will arrive on the application event thread.
- * When it receives a notification, it adds the image file path to a MediaQueue
- * so that the capture thread can process the file.
- */
-class ImageCaptureListener implements FileSystemJournalListener {
-
-    /**
-     * Used to track file system changes.
-     */
-    private long lastUSN = 0;
-
-    /**
-     * Collection of media files.
-     */
-    private MediaQueue queue = null;
-
-    /**
-     * Constructor.
-     */
-    ImageCaptureListener(MediaQueue queue) {
-        this.queue = queue;
-    }
-
-    /**
-     * Listens for file system changes.  When a JPEG file is added, we process
-     * it and send it back.
-     */
-    public void fileJournalChanged()
-    {
-        // next sequence number file system will use
-        long USN = FileSystemJournal.getNextUSN();
-
-        for (long i = USN - 1; i >= lastUSN && i < USN; --i)
-        {
-            FileSystemJournalEntry entry = FileSystemJournal.getEntry(i);
-            if (entry == null)
-            {
-                break;
-            }
-
-            if (entry.getEvent() == FileSystemJournalEntry.FILE_ADDED)
-            {
-                String path = entry.getPath();
-                if (path != null && path.indexOf(".jpg") != -1)
-                {
-                    // add file path to the capture queue
-                    queue.add("file://" + path);
-                    break;
-                }
-            }
-        }
-
-        // remember the file journal change number,
-        // so we don't search the same events again and again
-        lastUSN = USN;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/capture/ImageCaptureOperation.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/capture/ImageCaptureOperation.java b/bbos/framework/ext/src/org/apache/cordova/capture/ImageCaptureOperation.java
deleted file mode 100644
index a831dc2..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/capture/ImageCaptureOperation.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.capture;
-
-import java.io.IOException;
-import java.util.Date;
-import javax.microedition.io.Connector;
-import javax.microedition.io.file.FileConnection;
-
-import org.apache.cordova.file.File;
-import org.apache.cordova.util.FileUtils;
-import org.apache.cordova.util.Logger;
-
-import net.rim.device.api.io.MIMETypeAssociations;
-import net.rim.device.api.ui.UiApplication;
-
-public class ImageCaptureOperation extends CaptureOperation {
-    // content type
-    public static String CONTENT_TYPE = "image/";
-
-    // file system listener
-    private ImageCaptureListener listener = null;
-
-    /**
-     * Creates and starts an image capture operation.
-     *
-     * @param limit
-     *            maximum number of media files to capture
-     * @param callbackId
-     *            the callback to receive the files
-     * @param queue
-     *            the queue from which to retrieve captured media files
-     */
-    public ImageCaptureOperation(long limit, String callbackId, MediaQueue queue) {
-        super(limit, callbackId, queue);
-
-        // listener to capture image files added to file system
-        this.listener = new ImageCaptureListener(queue);
-
-        start();
-    }
-
-    /**
-     * Registers file system listener and launches native camera application.
-     */
-    protected void setup() {
-        // register listener for files being written
-        synchronized(UiApplication.getEventLock()) {
-            UiApplication.getUiApplication().addFileSystemJournalListener(listener);
-        }
-
-        // launch the native camera application
-        CameraControl.launchCamera();
-    }
-
-    /**
-     * Unregisters file system listener and closes native camera application.
-     */
-    protected void teardown() {
-        // remove file system listener
-        synchronized(UiApplication.getEventLock()) {
-            UiApplication.getUiApplication().removeFileSystemJournalListener(listener);
-        }
-
-        // close the native camera application
-        CameraControl.closeCamera();
-    }
-
-    /**
-     * Waits for image file to be written to file system and retrieves its file
-     * properties.
-     *
-     * @param filePath
-     *            the full path of the media file
-     */
-    protected void processFile(final String filePath) {
-        Logger.log(this.getClass().getName() + ": processing file: " + filePath);
-
-        // wait for file to finish writing and add it to captured files
-        addCaptureFile(getMediaFile(filePath));
-    }
-
-    /**
-     * Waits for file to be fully written to the file system before retrieving
-     * its file properties.
-     *
-     * @param filePath
-     *            Full path of the image file
-     * @throws IOException
-     */
-    private File getMediaFile(String filePath) {
-        File file = new File(FileUtils.stripSeparator(filePath));
-
-        // time begin waiting for file write
-        long start = (new Date()).getTime();
-
-        // wait for the file to be fully written, then grab its properties
-        FileConnection fconn = null;
-        try {
-            fconn = (FileConnection) Connector.open(filePath, Connector.READ);
-            if (fconn.exists()) {
-                // wait for file to be fully written
-                long fileSize = fconn.fileSize();
-                long size = 0;
-                Thread thisThread = Thread.currentThread();
-                while (myThread == thisThread) {
-                    try {
-                        Thread.sleep(100);
-                    }
-                    catch (InterruptedException e) {
-                        break;
-                    }
-                    size = fconn.fileSize();
-                    if (size == fileSize) {
-                        break;
-                    }
-                    fileSize = size;
-                }
-                Logger.log(this.getClass().getName() + ": " + filePath + " size="
-                        + Long.toString(fileSize) + " bytes");
-
-                // retrieve file properties
-                file.setLastModifiedDate(fconn.lastModified());
-                file.setName(FileUtils.stripSeparator(fconn.getName()));
-                file.setSize(fileSize);
-                file.setType(MIMETypeAssociations.getMIMEType(filePath));
-            }
-        }
-        catch (IOException e) {
-            Logger.log(this.getClass().getName() + ": " + e);
-        }
-        finally {
-            try {
-                if (fconn != null) fconn.close();
-            } catch (IOException ignored) {}
-        }
-
-        // log time it took to write the file
-        long end = (new Date()).getTime();
-        Logger.log(this.getClass().getName() + ": wait time="
-                + Long.toString(end - start) + " ms");
-
-        return file;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/capture/MediaCapture.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/capture/MediaCapture.java b/bbos/framework/ext/src/org/apache/cordova/capture/MediaCapture.java
deleted file mode 100644
index 76b0eac..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/capture/MediaCapture.java
+++ /dev/null
@@ -1,502 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.capture;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Vector;
-
-import javax.microedition.media.Manager;
-
-import org.apache.cordova.api.Plugin;
-import org.apache.cordova.api.PluginResult;
-import org.apache.cordova.file.File;
-import org.apache.cordova.json4j.JSONArray;
-import org.apache.cordova.json4j.JSONException;
-import org.apache.cordova.json4j.JSONObject;
-import org.apache.cordova.util.Logger;
-import org.apache.cordova.util.StringUtils;
-
-/**
- * This plugin provides the ability to capture media from the native media
- * applications. The appropriate media application is launched, and a capture
- * operation is started in the background to identify captured media files and
- * return the file info back to the caller.
- */
-public class MediaCapture extends Plugin {
-
-    public static String PROTOCOL_CAPTURE = "capture";
-
-    private static final String LOG_TAG = "MediaCapture: ";
-
-    /**
-     * Error codes.
-     */
-    // Camera or microphone failed to capture image or sound.
-    private static final int CAPTURE_INTERNAL_ERR = 0;
-    // Camera application or audio capture application is currently serving other capture request.
-    private static final int CAPTURE_APPLICATION_BUSY = 1;
-    // Invalid use of the API (e.g. limit parameter has value less than one).
-    private static final int CAPTURE_INVALID_ARGUMENT = 2;
-    // User exited camera application or audio capture application before capturing anything.
-    private static final int CAPTURE_NO_MEDIA_FILES = 3;
-    // The requested capture operation is not supported.
-    private static final int CAPTURE_NOT_SUPPORTED = 20;
-
-    /**
-     * Possible actions.
-     */
-    protected static final String ACTION_GET_SUPPORTED_MODES = "captureModes";
-    protected static final String ACTION_CAPTURE_AUDIO = "captureAudio";
-    protected static final String ACTION_CAPTURE_IMAGE = "captureImage";
-    protected static final String ACTION_CAPTURE_VIDEO = "captureVideo";
-    protected static final String ACTION_CANCEL_CAPTURES = "stopCaptures";
-
-    /**
-     * Executes the requested action and returns a PluginResult.
-     *
-     * @param action
-     *            The action to execute.
-     * @param callbackId
-     *            The callback ID to be invoked upon action completion
-     * @param args
-     *            JSONArry of arguments for the action.
-     * @return A PluginResult object with a status and message.
-     */
-    public PluginResult execute(String action, JSONArray args, String callbackId) {
-        PluginResult result = null;
-
-        if (ACTION_GET_SUPPORTED_MODES.equals(action)) {
-            result = getCaptureModes();
-        } else if (ACTION_CAPTURE_AUDIO.equals(action)) {
-            result = captureAudio(args, callbackId);
-        } else if (ACTION_CAPTURE_IMAGE.equals(action)) {
-            result = captureImage(args, callbackId);
-        } else if (ACTION_CAPTURE_VIDEO.equals(action)) {
-            result = captureVideo(args, callbackId);
-        } else if (ACTION_CANCEL_CAPTURES.equals(action)) {
-            CaptureControl.getCaptureControl().stopPendingOperations(true);
-            result =  new PluginResult(PluginResult.Status.OK);
-        } else {
-            result = new PluginResult(PluginResult.Status.INVALID_ACTION,
-                "MediaCapture: invalid action " + action);
-        }
-
-        return result;
-    }
-
-    /**
-     * Determines if audio capture is supported.
-     * @return <code>true</code> if audio capture is supported
-     */
-    protected boolean isAudioCaptureSupported() {
-        return (System.getProperty("supports.audio.capture").equals(Boolean.TRUE.toString())
-                && AudioControl.hasAudioRecorderApplication());
-    }
-
-    /**
-     * Determines if video capture is supported.
-     * @return <code>true</code> if video capture is supported
-     */
-    protected boolean isVideoCaptureSupported() {
-        return (System.getProperty("supports.video.capture").equals(Boolean.TRUE.toString()));
-    }
-
-    /**
-     * Return the supported capture modes for audio, image and video.
-     * @return supported capture modes.
-     */
-    private PluginResult getCaptureModes() {
-        JSONArray audioModes = new JSONArray();
-        JSONArray imageModes = new JSONArray();
-        boolean audioSupported = isAudioCaptureSupported();
-
-        // need to get the recording dimensions from supported image encodings
-        String imageEncodings = System.getProperty("video.snapshot.encodings");
-        Logger.log(this.getClass().getName() + ": video.snapshot.encodings="
-                + imageEncodings);
-        String[] encodings = StringUtils.split(imageEncodings, "encoding=");
-        CaptureMode mode = null;
-        Vector list = new Vector();
-
-        // get all supported capture content types for audio and image
-        String[] contentTypes = getCaptureContentTypes();
-        for (int i = 0; i < contentTypes.length; i++) {
-            if (audioSupported
-                    && contentTypes[i]
-                            .startsWith(AudioCaptureOperation.CONTENT_TYPE)) {
-                audioModes.add(new CaptureMode(contentTypes[i]).toJSONObject());
-            } else if (contentTypes[i]
-                    .startsWith(ImageCaptureOperation.CONTENT_TYPE)) {
-                String type = contentTypes[i]
-                        .substring(ImageCaptureOperation.CONTENT_TYPE.length());
-                for (int j = 0; j < encodings.length; j++) {
-                    // format: "jpeg&width=2592&height=1944 "
-                    String enc = encodings[j];
-                    if (enc.startsWith(type)) {
-                        Hashtable parms = parseEncodingString(enc);
-                        // "width="
-                        String w = (String)parms.get("width");
-                        long width = (w == null) ? 0 : Long.parseLong(w);
-                        // "height="
-                        String h = (String)parms.get("height");
-                        long height = (h == null) ? 0 : Long.parseLong(h);
-                        // new capture mode
-                        mode = new CaptureMode(contentTypes[i], width, height);
-                        // don't want duplicates
-                        if (!list.contains(mode)) {
-                            list.addElement(mode);
-                            imageModes.add(mode.toJSONObject());
-                        }
-                    }
-                }
-            }
-        }
-
-        JSONObject captureModes = new JSONObject();
-        try {
-            captureModes.put("supportedAudioModes", audioModes.toString());
-            captureModes.put("supportedImageModes", imageModes.toString());
-            captureModes.put("supportedVideoModes", getVideoCaptureModes().toString());
-        } catch (JSONException e) {
-            Logger.error("JSONException: " + e.getMessage());
-            return new PluginResult(PluginResult.Status.JSON_EXCEPTION,
-                    "Failed to build supported capture modes.");
-        }
-
-        return new PluginResult(PluginResult.Status.OK, captureModes);
-    }
-
-    /**
-     * Retrieves supported video capture modes (content type, width and height).
-     * @return supported video capture modes
-     */
-    protected JSONArray getVideoCaptureModes() {
-        JSONArray videoModes = new JSONArray();
-
-        if (!isVideoCaptureSupported()) {
-            // if the device does not support video capture, return an empty
-            // array of capture modes
-            Logger.log(this.getClass().getName() + ": video capture not supported");
-            return videoModes;
-        }
-
-        /**
-         * DOH! Even if video capture is supported, BlackBerry's API
-         * does not provide any 'video/' content types for the 'capture'
-         * protocol.  So if we looked at only capture content types,
-         * it wouldn't return any results...
-         *
-         * // get all supported capture content types
-         * String[] contentTypes = getCaptureContentTypes();
-         *
-         * A better alternative, and probably not too inaccurate, would be to
-         * send back all supported video modes (not just capture).  This will
-         * at least give the developer an idea of the capabilities.
-         */
-
-        // retrieve ALL supported video encodings
-        String videoEncodings = System.getProperty("video.encodings");
-        Logger.log(this.getClass().getName() + ": video.encodings=" + videoEncodings);
-        String[] encodings = StringUtils.split(videoEncodings, "encoding=");
-
-        // parse them into CaptureModes
-        String enc = null;
-        CaptureMode mode = null;
-        Vector list = new Vector();
-        for (int i = 0; i < encodings.length; i++) {
-            enc = encodings[i];
-            // format: "video/3gpp&width=640&height=480&video_codec=MPEG-4&audio_codec=AAC "
-            if (enc.startsWith(VideoCaptureOperation.CONTENT_TYPE)) {
-                Hashtable parms = parseEncodingString(enc);
-                // type "video/3gpp"
-                String t = (String)parms.get("type");
-                // "width="
-                String w = (String)parms.get("width");
-                long width = (w == null) ? 0 : Long.parseLong(w);
-                // "height="
-                String h = (String)parms.get("height");
-                long height = (h == null) ? 0 : Long.parseLong(h);
-                // new capture mode
-                mode = new CaptureMode(t, width, height);
-                // don't want duplicates
-                if (!list.contains(mode)) {
-                    list.addElement(mode);
-                    videoModes.add(mode.toJSONObject());
-                }
-            }
-        }
-
-        return videoModes;
-    }
-
-    /**
-     * Utility method to parse encoding strings.
-     *
-     * @param encodingString
-     *            encoding string
-     * @return Hashtable containing key:value pairs
-     */
-    protected Hashtable parseEncodingString(final String encodingString) {
-        // format: "video/3gpp&width=640&height=480&video_codec=MPEG-4&audio_codec=AAC "
-        Hashtable props = new Hashtable();
-        String[] parms = StringUtils.split(encodingString, "&");
-        props.put("type", parms[0]);
-        for (int i = 0; i < parms.length; i++) {
-            String parameter = parms[i];
-            if (parameter.indexOf('=') != -1) {
-                String[] pair = StringUtils.split(parameter, "=");
-                props.put(pair[0].trim(), pair[1].trim());
-            }
-        }
-        return props;
-    }
-
-    /**
-     * Returns the content types supported for the <code>capture://</code>
-     * protocol.
-     *
-     * @return list of supported capture content types
-     */
-    protected static String[] getCaptureContentTypes() {
-        // retrieve list of all content types supported for capture protocol
-        return Manager.getSupportedContentTypes(PROTOCOL_CAPTURE);
-    }
-
-    /**
-     * Starts an audio capture operation using the native voice notes recorder
-     * application. If the native voice notes recorder application is already
-     * running, the <code>CAPTURE_APPLICATION_BUSY</code> error is returned.
-     *
-     * @param args
-     *            capture options (e.g., limit)
-     * @param callbackId
-     *            the callback to be invoked with the capture results
-     * @return PluginResult containing captured media file properties
-     */
-    protected PluginResult captureAudio(final JSONArray args, final String callbackId) {
-        PluginResult result = null;
-
-        // if audio is not being recorded, start audio capture
-        if (!AudioControl.hasAudioRecorderApplication()) {
-            result = errorResult(CAPTURE_NOT_SUPPORTED,
-                    "Audio recorder application is not installed.");
-        } else if (AudioControl.isAudioRecorderActive()) {
-            result = errorResult(CAPTURE_APPLICATION_BUSY,
-                    "Audio recorder application is busy.");
-        }
-        else {
-            // optional parameters
-            long limit = 1;
-            double duration = 0.0f;
-
-            try {
-                JSONObject options = args.getJSONObject(0);
-                if (options != null) {
-                    limit = options.optLong("limit", 1);
-                    duration = options.optDouble("duration", 0.0f);
-                }
-            } catch (JSONException e) {
-                // Eat it and use default value of 1.
-                Logger.log(this.getClass().getName()
-                        + ": Invalid captureAudio options format. " + e.getMessage());
-            }
-
-            // start audio capture
-            // start capture operation in the background
-            CaptureControl.getCaptureControl().startAudioCaptureOperation(
-                    limit, duration, callbackId);
-
-            // return NO_RESULT and allow callbacks to be invoked later
-            result = new PluginResult(PluginResult.Status.NO_RESULT);
-            result.setKeepCallback(true);
-        }
-
-        return result;
-    }
-
-    /**
-     * Starts an image capture operation using the native camera application. If
-     * the native camera application is already running, the
-     * <code>CAPTURE_APPLICATION_BUSY</code> error is returned.
-     *
-     * @param args
-     *            capture options (e.g., limit)
-     * @param callbackId
-     *            the callback to be invoked with the capture results
-     * @return PluginResult containing captured media file properties
-     */
-    protected PluginResult captureImage(final JSONArray args,
-            final String callbackId) {
-        PluginResult result = null;
-
-        if (CameraControl.isCameraActive()) {
-            result = errorResult(CAPTURE_APPLICATION_BUSY,
-                    "Camera application is busy.");
-        }
-        else {
-            // optional parameters
-            long limit = 1;
-
-            try {
-                JSONObject options = args.getJSONObject(0);
-                if (options != null) {
-                    limit = options.optLong("limit", 1);
-                }
-            } catch (JSONException e) {
-                // Eat it and use default value of 1.
-                Logger.log(this.getClass().getName()
-                        + ": Invalid captureImage options format. " + e.getMessage());
-            }
-
-            // start capture operation in the background
-            CaptureControl.getCaptureControl().startImageCaptureOperation(
-                    limit, callbackId);
-
-            // return NO_RESULT and allow callbacks to be invoked later
-            result = new PluginResult(PluginResult.Status.NO_RESULT);
-            result.setKeepCallback(true);
-        }
-
-        return result;
-    }
-
-    /**
-     * Starts an video capture operation using the native video recorder
-     * application. If the native video recorder application is already running,
-     * the <code>CAPTURE_APPLICATION_BUSY</code> error is returned.
-     *
-     * @param args
-     *            capture options (e.g., limit)
-     * @param callbackId
-     *            the callback to be invoked with the capture results
-     * @return PluginResult containing captured media file properties
-     */
-    protected PluginResult captureVideo(final JSONArray args,
-            final String callbackId) {
-        PluginResult result = null;
-
-        if (!isVideoCaptureSupported()) {
-            result = errorResult(CAPTURE_NOT_SUPPORTED,
-                    "Video capture is not supported.");
-        } else if (CameraControl.isVideoRecorderActive()) {
-            result = errorResult(CAPTURE_APPLICATION_BUSY,
-                    "Video recorder application is busy.");
-        }
-        else {
-            // optional parameters
-            long limit = 1;
-
-            try {
-                JSONObject options = args.getJSONObject(0);
-                if (options != null) {
-                    limit = options.optLong("limit", 1);
-                }
-            } catch (JSONException e) {
-                // Eat it and use default value of 1.
-                Logger.log(this.getClass().getName()
-                        + ": Invalid captureVideo options format. " + e.getMessage());
-            }
-
-            // start capture operation in the background
-            CaptureControl.getCaptureControl().startVideoCaptureOperation(
-                    limit, callbackId);
-
-            // return NO_RESULT and allow callbacks to be invoked later
-            result = new PluginResult(PluginResult.Status.NO_RESULT);
-            result.setKeepCallback(true);
-        }
-
-        return result;
-    }
-
-    /**
-     * Sends media capture result back to JavaScript.
-     *
-     * @param mediaFiles
-     *            list of File objects describing captured media files
-     * @param callbackId
-     *            the callback to receive the file descriptions
-     */
-    public static void captureSuccess(Vector mediaFiles, String callbackId) {
-        PluginResult result = null;
-        File file = null;
-
-        JSONArray array = new JSONArray();
-        for (Enumeration e = mediaFiles.elements(); e.hasMoreElements();) {
-            file = (File) e.nextElement();
-            array.add(file.toJSONObject());
-        }
-
-        // invoke the appropriate callback
-        result = new PluginResult(PluginResult.Status.OK, array);
-        success(result, callbackId);
-    }
-
-    /**
-     * Sends error back to JavaScript.
-     *
-     * @param callbackId
-     *            the callback to receive the error
-     */
-    public static void captureError(String callbackId) {
-        error(errorResult(CAPTURE_NO_MEDIA_FILES, ""), callbackId);
-    }
-
-    /**
-     * Called when application is resumed.
-     */
-    public void onResume() {
-        // We launch the native media applications for capture operations, which
-        // puts this application in the background.  This application will come
-        // to the foreground when the user closes the native media application.
-        // So we close any running capture operations any time we resume.
-        //
-        // It would be nice if we could catch the EVT_APP_FOREGROUND event that
-        // is supposed to be triggered when the application comes to the
-        // foreground, but have not seen a way to do that on the Java side.
-        // Unfortunately, we have to get notification from the JavaScript side,
-        // which does get the event.  (Argh! Only BlackBerry.)
-        //
-        // In this case, we're just stopping the capture operations, not
-        // canceling them.
-        CaptureControl.getCaptureControl().stopPendingOperations(false);
-    }
-
-    /**
-     * Invoked when this application terminates.
-     */
-    public void onDestroy() {
-        CaptureControl.getCaptureControl().stopPendingOperations(true);
-    }
-
-    private static PluginResult errorResult(int code, String message) {
-        Logger.log(LOG_TAG + message);
-
-        JSONObject obj = new JSONObject();
-        try {
-            obj.put("code", code);
-            obj.put("message", message);
-        } catch (JSONException e) {
-            // This will never happen
-        }
-
-        return new PluginResult(PluginResult.Status.ERROR, obj);
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/capture/MediaQueue.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/capture/MediaQueue.java b/bbos/framework/ext/src/org/apache/cordova/capture/MediaQueue.java
deleted file mode 100644
index 56ffff5..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/capture/MediaQueue.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.capture;
-
-import java.util.Vector;
-
-/**
- * Acts as a container for captured media files.  The media applications will
- * add to the queue when a media file is captured.
- */
-class MediaQueue {
-    private Vector queue = new Vector();
-
-    synchronized void add(final String filePath) {
-        queue.addElement(filePath);
-        notifyAll();
-    }
-
-    synchronized String remove() throws InterruptedException {
-        while (queue.size() == 0) {
-            wait();
-        }
-        String filePath = (String) queue.firstElement();
-        queue.removeElement(filePath);
-        notifyAll();
-        return filePath;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/capture/VideoCaptureListener.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/capture/VideoCaptureListener.java b/bbos/framework/ext/src/org/apache/cordova/capture/VideoCaptureListener.java
deleted file mode 100644
index 361b7ee..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/capture/VideoCaptureListener.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.capture;
-
-import net.rim.device.api.io.file.FileSystemJournal;
-import net.rim.device.api.io.file.FileSystemJournalEntry;
-import net.rim.device.api.io.file.FileSystemJournalListener;
-
-/**
- * Listens for video recording files that are added to file system.
- * <p>
- * Video recordings are added to the file system in a multi-step process. The
- * video recorder application records the video on a background thread. While
- * the recording is in progress, it is added to the file system with a '.lock'
- * extension. When the user stops the recording, the file is renamed to the
- * video recorder extension (e.g. .3GP). Therefore, we listen for the
- * <code>FileSystemJournalEntry.FILE_RENAMED</code> event, capturing when the
- * new path name ends in the video recording file extension.
- * <p>
- * The file system notifications will arrive on the application event thread.
- * When it receives a notification, it adds the image file path to a MediaQueue
- * so that the capture thread can process the file.
- */
-class VideoCaptureListener implements FileSystemJournalListener {
-
-    /**
-     * Used to track file system changes.
-     */
-    private long lastUSN = 0;
-
-    /**
-     * Queue to send media files to for processing.
-     */
-    private MediaQueue queue = null;
-
-    /**
-     * Newly added video recording.
-     */
-    private String newFilePath = null;
-
-    /**
-     * Constructor.
-     */
-    VideoCaptureListener(MediaQueue queue) {
-        this.queue = queue;
-    }
-
-    public void fileJournalChanged() {
-        // next sequence number file system will use
-        long USN = FileSystemJournal.getNextUSN();
-
-        for (long i = USN - 1; i >= lastUSN && i < USN; --i)
-        {
-            FileSystemJournalEntry entry = FileSystemJournal.getEntry(i);
-            if (entry == null)
-            {
-                break;
-            }
-
-            String path = entry.getPath();
-            if (entry.getEvent() == FileSystemJournalEntry.FILE_ADDED
-                    && newFilePath == null) {
-                // a new file has been added to the file system
-                // if it has a video recording extension, store it until
-                // it is renamed, indicating it has finished being written to
-                int index = path.indexOf(".3GP");
-                if (index == -1) {
-                    index = path.indexOf(".MP4");
-                }
-                if (index != -1) {
-                    newFilePath = path.substring(0, index + 4);
-                }
-            }
-            else if (entry.getEvent() == FileSystemJournalEntry.FILE_RENAMED) {
-                if (path != null && path.equals(newFilePath))
-                {
-                    // add file path to the capture queue
-                    queue.add("file://" + path);
-
-                    // get ready for next file
-                    newFilePath = null;
-                    break;
-                }
-            }
-        }
-
-        // remember the file journal change number,
-        // so we don't search the same events again and again
-        lastUSN = USN;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/capture/VideoCaptureOperation.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/capture/VideoCaptureOperation.java b/bbos/framework/ext/src/org/apache/cordova/capture/VideoCaptureOperation.java
deleted file mode 100644
index 589bc68..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/capture/VideoCaptureOperation.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.capture;
-
-import java.io.IOException;
-
-import javax.microedition.io.Connector;
-import javax.microedition.io.file.FileConnection;
-
-import org.apache.cordova.file.File;
-import org.apache.cordova.util.FileUtils;
-import org.apache.cordova.util.Logger;
-
-import net.rim.device.api.io.MIMETypeAssociations;
-import net.rim.device.api.ui.UiApplication;
-
-public class VideoCaptureOperation extends CaptureOperation {
-
-    // content type
-    public static String CONTENT_TYPE = "video/";
-
-    // file system listener
-    private VideoCaptureListener listener = null;
-
-    /**
-     * Creates and starts an image capture operation.
-     *
-     * @param limit
-     *            maximum number of media files to capture
-     * @param callbackId
-     *            the callback to receive the files
-     * @param queue
-     *            the queue from which to retrieve captured media files
-     */
-    public VideoCaptureOperation(long limit, String callbackId, MediaQueue queue) {
-        super(limit, callbackId, queue);
-
-        // listener to capture image files added to file system
-        this.listener = new VideoCaptureListener(queue);
-
-        start();
-    }
-
-    /**
-     * Registers file system listener and launches native video recorder
-     * application.
-     */
-    protected void setup() {
-        // register listener for files being written
-        synchronized(UiApplication.getEventLock()) {
-            UiApplication.getUiApplication().addFileSystemJournalListener(listener);
-        }
-
-        // launch the native video recorder application
-        CameraControl.launchVideoRecorder();
-    }
-
-    /**
-     * Unregisters file system listener and closes native video recorder
-     * application.
-     */
-    protected void teardown() {
-        // remove file system listener
-        synchronized(UiApplication.getEventLock()) {
-            UiApplication.getUiApplication().removeFileSystemJournalListener(listener);
-        }
-
-        // close the native video recorder application
-        CameraControl.closeVideoRecorder();
-    }
-
-    /**
-     * Retrieves the file properties for the captured video recording.
-     *
-     * @param filePath
-     *            full path of the video recording file
-     */
-    protected void processFile(String filePath) {
-        Logger.log(this.getClass().getName() + ": processing file: " + filePath);
-
-        File file = new File(FileUtils.stripSeparator(filePath));
-
-        // grab file properties
-        FileConnection fconn = null;
-        try {
-            fconn = (FileConnection) Connector.open(filePath, Connector.READ);
-            if (fconn.exists()) {
-                long size = fconn.fileSize();
-                Logger.log(this.getClass().getName() + ": " + filePath + " size="
-                        + Long.toString(size) + " bytes");
-                file.setLastModifiedDate(fconn.lastModified());
-                file.setName(FileUtils.stripSeparator(fconn.getName()));
-                file.setSize(size);
-                file.setType(MIMETypeAssociations.getMIMEType(filePath));
-            }
-        }
-        catch (IOException e) {
-            Logger.log(this.getClass().getName() + ": " + e);
-        }
-        finally {
-            try {
-                if (fconn != null) fconn.close();
-            } catch (IOException ignored) {}
-        }
-
-        addCaptureFile(file);
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/device/Device.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/device/Device.java b/bbos/framework/ext/src/org/apache/cordova/device/Device.java
deleted file mode 100644
index 65a7bf5..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/device/Device.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- * Copyright (c) 2011, Research In Motion Limited.
- */
-package org.apache.cordova.device;
-
-import org.apache.cordova.api.Plugin;
-import org.apache.cordova.api.PluginResult;
-import org.apache.cordova.json4j.JSONArray;
-import org.apache.cordova.json4j.JSONException;
-import org.apache.cordova.json4j.JSONObject;
-
-import net.rim.device.api.system.DeviceInfo;
-
-/**
- * Provides device information, including:
- *
- * - Device platform version (e.g. 2.13.0.95). Not to be confused with BlackBerry OS version.
- * - Unique device identifier (UUID).
- * - Cordova software version.
- */
-public final class Device extends Plugin {
-
-	public static final String FIELD_PLATFORM 	= "platform";
-	public static final String FIELD_UUID     	= "uuid";
-	public static final String FIELD_CORDOVA	= "cordova";
-	public static final String FIELD_MODEL 		= "model";
-	public static final String FIELD_NAME 		= "name";
-	public static final String FIELD_VERSION 	= "version";
-
-	public static final String ACTION_GET_DEVICE_INFO = "getDeviceInfo";
-
-	public PluginResult execute(String action, JSONArray args, String callbackId) {
-		PluginResult result = new PluginResult(PluginResult.Status.INVALID_ACTION, "Device: Invalid action:" + action);
-
-		if(action.equals(ACTION_GET_DEVICE_INFO)){
-			try {
-				JSONObject device = new JSONObject();
-				device.put( FIELD_PLATFORM, "BlackBerry");
-				device.put( FIELD_UUID, new Integer( DeviceInfo.getDeviceId()) );
-				device.put( FIELD_CORDOVA, "2.8.0" );
-				device.put( FIELD_MODEL, new String(DeviceInfo.getDeviceName()) );
-				device.put( FIELD_NAME, new String(DeviceInfo.getDeviceName()) );
-				device.put( FIELD_VERSION, new String(DeviceInfo.getSoftwareVersion()) );
-				result = new PluginResult(PluginResult.Status.OK, device);
-			} catch (JSONException e) {
-				result = new PluginResult(PluginResult.Status.JSON_EXCEPTION, e.getMessage());
-			}
-		}
-
-		return result;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/file/Entry.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/file/Entry.java b/bbos/framework/ext/src/org/apache/cordova/file/Entry.java
deleted file mode 100644
index 66fb59b..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/file/Entry.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.file;
-
-import org.apache.cordova.json4j.JSONException;
-import org.apache.cordova.json4j.JSONObject;
-
-public class Entry {
-
-    private boolean isDirectory = false;
-    private String name = null;
-    private String fullPath = null;
-
-    public boolean isDirectory() {
-        return isDirectory;
-    }
-
-    public void setDirectory(boolean isDirectory) {
-        this.isDirectory = isDirectory;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getFullPath() {
-        return fullPath;
-    }
-
-    public void setFullPath(String fullPath) {
-        this.fullPath = fullPath;
-    }
-
-    public JSONObject toJSONObject() {
-        JSONObject o = new JSONObject();
-        try {
-            o.put("isDirectory", isDirectory);
-            o.put("isFile", !isDirectory);
-            o.put("name", name);
-            o.put("fullPath", fullPath);
-        }
-        catch (JSONException ignored) {
-        }
-        return o;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/file/File.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/file/File.java b/bbos/framework/ext/src/org/apache/cordova/file/File.java
deleted file mode 100644
index 3d04041..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/file/File.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.file;
-
-import org.apache.cordova.json4j.JSONException;
-import org.apache.cordova.json4j.JSONObject;
-
-public class File {
-    private String name = null;
-    private String fullPath = null;
-    private String type = null;
-    private long lastModifiedDate;
-    private long size = 0;
-
-    public File(String filePath) {
-        this.fullPath = filePath;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getType() {
-        return type;
-    }
-
-    public void setType(String type) {
-        this.type = type;
-    }
-
-    public long getLastModifiedDate() {
-        return lastModifiedDate;
-    }
-
-    public void setLastModifiedDate(long lastModifiedDate) {
-        this.lastModifiedDate = lastModifiedDate;
-    }
-
-    public long getSize() {
-        return size;
-    }
-
-    public void setSize(long size) {
-        this.size = size;
-    }
-
-    public String getFullPath() {
-        return fullPath;
-    }
-
-    public JSONObject toJSONObject() {
-        JSONObject o = new JSONObject();
-        try {
-            o.put("fullPath", fullPath);
-            o.put("type", type);
-            o.put("name", name);
-            o.put("lastModifiedDate", lastModifiedDate);
-            o.put("size", size);
-        }
-        catch (JSONException ignored) {
-        }
-        return o;
-    }
-}


[13/15] CB-4228

Posted by lo...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/da.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/da.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/da.js.gz
deleted file mode 100644
index ba270ad..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/da.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/da_DK.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/da_DK.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/da_DK.js.gz
deleted file mode 100644
index 0b9dbe2..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/da_DK.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/da_DK_EURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/da_DK_EURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/da_DK_EURO.js.gz
deleted file mode 100644
index 8d52b6a..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/da_DK_EURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/de.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/de.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/de.js.gz
deleted file mode 100644
index a65adda..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/de.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/de_AT.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/de_AT.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/de_AT.js.gz
deleted file mode 100644
index fb693c2..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/de_AT.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/de_AT_PREEURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/de_AT_PREEURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/de_AT_PREEURO.js.gz
deleted file mode 100644
index e61b9d9..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/de_AT_PREEURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/de_CH.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/de_CH.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/de_CH.js.gz
deleted file mode 100644
index 1b906e7..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/de_CH.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/de_DE.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/de_DE.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/de_DE.js.gz
deleted file mode 100644
index dc73b68..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/de_DE.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/de_DE_PREEURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/de_DE_PREEURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/de_DE_PREEURO.js.gz
deleted file mode 100644
index 76e1b0d..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/de_DE_PREEURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/de_LU.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/de_LU.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/de_LU.js.gz
deleted file mode 100644
index f1f85b9..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/de_LU.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/de_LU_PREEURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/de_LU_PREEURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/de_LU_PREEURO.js.gz
deleted file mode 100644
index c00d5de..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/de_LU_PREEURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/el.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/el.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/el.js.gz
deleted file mode 100644
index 0cdbf53..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/el.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/el_CY.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/el_CY.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/el_CY.js.gz
deleted file mode 100644
index 5405116..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/el_CY.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/el_CY_EURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/el_CY_EURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/el_CY_EURO.js.gz
deleted file mode 100644
index 79c2841..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/el_CY_EURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/el_CY_PREEURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/el_CY_PREEURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/el_CY_PREEURO.js.gz
deleted file mode 100644
index 35a134a..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/el_CY_PREEURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/el_GR.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/el_GR.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/el_GR.js.gz
deleted file mode 100644
index 6c30687..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/el_GR.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/el_GR_PREEURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/el_GR_PREEURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/el_GR_PREEURO.js.gz
deleted file mode 100644
index e6f2529..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/el_GR_PREEURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/en.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/en.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/en.js.gz
deleted file mode 100644
index 146dee3..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/en.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/en_AU.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/en_AU.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/en_AU.js.gz
deleted file mode 100644
index 8cb1758..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/en_AU.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/en_BE.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/en_BE.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/en_BE.js.gz
deleted file mode 100644
index e327a14..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/en_BE.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/en_BE_PREEURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/en_BE_PREEURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/en_BE_PREEURO.js.gz
deleted file mode 100644
index eaa6076..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/en_BE_PREEURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/en_CA.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/en_CA.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/en_CA.js.gz
deleted file mode 100644
index 65ce247..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/en_CA.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/en_GB.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/en_GB.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/en_GB.js.gz
deleted file mode 100644
index 9e647a7..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/en_GB.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/en_GB_EURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/en_GB_EURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/en_GB_EURO.js.gz
deleted file mode 100644
index 0e6d09b..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/en_GB_EURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/en_HK.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/en_HK.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/en_HK.js.gz
deleted file mode 100644
index cda0352..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/en_HK.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/en_IE.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/en_IE.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/en_IE.js.gz
deleted file mode 100644
index 91efb10..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/en_IE.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/en_IE_PREEURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/en_IE_PREEURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/en_IE_PREEURO.js.gz
deleted file mode 100644
index 8933e3d..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/en_IE_PREEURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/en_IN.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/en_IN.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/en_IN.js.gz
deleted file mode 100644
index db66e86..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/en_IN.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/en_MT.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/en_MT.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/en_MT.js.gz
deleted file mode 100644
index ea0a479..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/en_MT.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/en_NZ.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/en_NZ.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/en_NZ.js.gz
deleted file mode 100644
index 720baad..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/en_NZ.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/en_PH.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/en_PH.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/en_PH.js.gz
deleted file mode 100644
index 7e860ff..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/en_PH.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/en_SG.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/en_SG.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/en_SG.js.gz
deleted file mode 100644
index 5ffc7ba..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/en_SG.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/en_US.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/en_US.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/en_US.js.gz
deleted file mode 100644
index 5e7ed2f..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/en_US.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/en_ZA.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/en_ZA.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/en_ZA.js.gz
deleted file mode 100644
index c1221b5..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/en_ZA.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/es.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/es.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/es.js.gz
deleted file mode 100644
index f233e90..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/es.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/es_AR.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/es_AR.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/es_AR.js.gz
deleted file mode 100644
index 0ca8ffa..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/es_AR.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/es_BO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/es_BO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/es_BO.js.gz
deleted file mode 100644
index 1b3c306..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/es_BO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/es_CL.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/es_CL.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/es_CL.js.gz
deleted file mode 100644
index 92a324a..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/es_CL.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/es_CO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/es_CO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/es_CO.js.gz
deleted file mode 100644
index 362232d..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/es_CO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/es_CR.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/es_CR.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/es_CR.js.gz
deleted file mode 100644
index 53e9e23..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/es_CR.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/es_DO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/es_DO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/es_DO.js.gz
deleted file mode 100644
index 26c6fff..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/es_DO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/es_EC.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/es_EC.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/es_EC.js.gz
deleted file mode 100644
index 559db9e..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/es_EC.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/es_ES.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/es_ES.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/es_ES.js.gz
deleted file mode 100644
index 819e45d..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/es_ES.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/es_ES_PREEURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/es_ES_PREEURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/es_ES_PREEURO.js.gz
deleted file mode 100644
index 589d775..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/es_ES_PREEURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/es_GT.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/es_GT.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/es_GT.js.gz
deleted file mode 100644
index e1aba86..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/es_GT.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/es_HN.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/es_HN.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/es_HN.js.gz
deleted file mode 100644
index 43ce67a..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/es_HN.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/es_MX.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/es_MX.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/es_MX.js.gz
deleted file mode 100644
index 76a40da..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/es_MX.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/es_NI.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/es_NI.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/es_NI.js.gz
deleted file mode 100644
index 86302a5..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/es_NI.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/es_PA.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/es_PA.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/es_PA.js.gz
deleted file mode 100644
index 5f3a6d2..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/es_PA.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/es_PE.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/es_PE.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/es_PE.js.gz
deleted file mode 100644
index 44a20ec..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/es_PE.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/es_PR.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/es_PR.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/es_PR.js.gz
deleted file mode 100644
index 3d60ce9..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/es_PR.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/es_PY.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/es_PY.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/es_PY.js.gz
deleted file mode 100644
index c928b88..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/es_PY.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/es_SV.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/es_SV.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/es_SV.js.gz
deleted file mode 100644
index 0d3800a..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/es_SV.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/es_US.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/es_US.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/es_US.js.gz
deleted file mode 100644
index 2243584..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/es_US.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/es_UY.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/es_UY.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/es_UY.js.gz
deleted file mode 100644
index db5ce23..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/es_UY.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/es_VE.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/es_VE.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/es_VE.js.gz
deleted file mode 100644
index b57e2e1..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/es_VE.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/et.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/et.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/et.js.gz
deleted file mode 100644
index e685c40..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/et.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/et_EE.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/et_EE.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/et_EE.js.gz
deleted file mode 100644
index 8ceff8f..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/et_EE.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/et_EE_EURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/et_EE_EURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/et_EE_EURO.js.gz
deleted file mode 100644
index 9b4617d..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/et_EE_EURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/et_EE_PREEURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/et_EE_PREEURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/et_EE_PREEURO.js.gz
deleted file mode 100644
index b45e6fe..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/et_EE_PREEURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/fi.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/fi.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/fi.js.gz
deleted file mode 100644
index fff6196..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/fi.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/fi_FI.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/fi_FI.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/fi_FI.js.gz
deleted file mode 100644
index 08c6e67..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/fi_FI.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/fi_FI_PREEURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/fi_FI_PREEURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/fi_FI_PREEURO.js.gz
deleted file mode 100644
index 54e241a..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/fi_FI_PREEURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/fr.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/fr.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/fr.js.gz
deleted file mode 100644
index 9912df3..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/fr.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/fr_BE.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/fr_BE.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/fr_BE.js.gz
deleted file mode 100644
index af1052d..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/fr_BE.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/fr_BE_PREEURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/fr_BE_PREEURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/fr_BE_PREEURO.js.gz
deleted file mode 100644
index 35870dc..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/fr_BE_PREEURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/fr_CA.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/fr_CA.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/fr_CA.js.gz
deleted file mode 100644
index 3c3a9b4..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/fr_CA.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/fr_CH.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/fr_CH.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/fr_CH.js.gz
deleted file mode 100644
index a2136b7..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/fr_CH.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/fr_FR.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/fr_FR.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/fr_FR.js.gz
deleted file mode 100644
index aa47e36..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/fr_FR.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/fr_FR_PREEURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/fr_FR_PREEURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/fr_FR_PREEURO.js.gz
deleted file mode 100644
index ffb547d..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/fr_FR_PREEURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/fr_LU.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/fr_LU.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/fr_LU.js.gz
deleted file mode 100644
index c664df2..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/fr_LU.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/fr_LU_PREEURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/fr_LU_PREEURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/fr_LU_PREEURO.js.gz
deleted file mode 100644
index 6b9d6b5..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/fr_LU_PREEURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ga.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ga.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ga.js.gz
deleted file mode 100644
index d7d24e7..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ga.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ga_IE.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ga_IE.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ga_IE.js.gz
deleted file mode 100644
index 7d3c880..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ga_IE.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/gu.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/gu.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/gu.js.gz
deleted file mode 100644
index 66416b2..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/gu.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/gu_IN.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/gu_IN.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/gu_IN.js.gz
deleted file mode 100644
index 4d0608c..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/gu_IN.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/hi_IN.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/hi_IN.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/hi_IN.js.gz
deleted file mode 100644
index 6b07571..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/hi_IN.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/hr.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/hr.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/hr.js.gz
deleted file mode 100644
index cbfb8a6..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/hr.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/hr_HR.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/hr_HR.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/hr_HR.js.gz
deleted file mode 100644
index 61c88c4..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/hr_HR.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/hu.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/hu.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/hu.js.gz
deleted file mode 100644
index 61e3c8c..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/hu.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/hu_HU.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/hu_HU.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/hu_HU.js.gz
deleted file mode 100644
index cabecb1..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/hu_HU.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/hu_HU_EURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/hu_HU_EURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/hu_HU_EURO.js.gz
deleted file mode 100644
index 4d3edc6..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/hu_HU_EURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/hu_HU_PREEURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/hu_HU_PREEURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/hu_HU_PREEURO.js.gz
deleted file mode 100644
index 4c914db..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/hu_HU_PREEURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/in.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/in.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/in.js.gz
deleted file mode 100644
index 5005d70..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/in.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/in_ID.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/in_ID.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/in_ID.js.gz
deleted file mode 100644
index 3f982c4..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/in_ID.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/is.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/is.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/is.js.gz
deleted file mode 100644
index 903b3f2..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/is.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/is_IS.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/is_IS.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/is_IS.js.gz
deleted file mode 100644
index 5a7a4cf..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/is_IS.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/it.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/it.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/it.js.gz
deleted file mode 100644
index f9ffdb8..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/it.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/it_CH.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/it_CH.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/it_CH.js.gz
deleted file mode 100644
index 0c474dd..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/it_CH.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/it_IT.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/it_IT.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/it_IT.js.gz
deleted file mode 100644
index fc88b58..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/it_IT.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/it_IT_PREEURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/it_IT_PREEURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/it_IT_PREEURO.js.gz
deleted file mode 100644
index ef6be7a..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/it_IT_PREEURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/iw.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/iw.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/iw.js.gz
deleted file mode 100644
index 956a656..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/iw.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/iw_IL.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/iw_IL.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/iw_IL.js.gz
deleted file mode 100644
index e51daa1..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/iw_IL.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ja.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ja.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ja.js.gz
deleted file mode 100644
index 5d604b3..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ja.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ja_JP.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ja_JP.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ja_JP.js.gz
deleted file mode 100644
index ef1956f..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ja_JP.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ja_JP_JP.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ja_JP_JP.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ja_JP_JP.js.gz
deleted file mode 100644
index 358b709..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ja_JP_JP.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/kk.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/kk.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/kk.js.gz
deleted file mode 100644
index d1bc61a..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/kk.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/kk_KZ.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/kk_KZ.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/kk_KZ.js.gz
deleted file mode 100644
index 40a1732..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/kk_KZ.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/kn.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/kn.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/kn.js.gz
deleted file mode 100644
index 4a668ab..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/kn.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/kn_IN.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/kn_IN.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/kn_IN.js.gz
deleted file mode 100644
index f813453..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/kn_IN.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ko.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ko.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ko.js.gz
deleted file mode 100644
index a3752b4..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ko.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ko_KR.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ko_KR.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ko_KR.js.gz
deleted file mode 100644
index a1d6b83..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ko_KR.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/lt.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/lt.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/lt.js.gz
deleted file mode 100644
index 959e78f..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/lt.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/lt_LT.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/lt_LT.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/lt_LT.js.gz
deleted file mode 100644
index d981980..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/lt_LT.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/lt_LT_EURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/lt_LT_EURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/lt_LT_EURO.js.gz
deleted file mode 100644
index cf11515..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/lt_LT_EURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/lt_LT_PREEURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/lt_LT_PREEURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/lt_LT_PREEURO.js.gz
deleted file mode 100644
index c438a65..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/lt_LT_PREEURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/lv.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/lv.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/lv.js.gz
deleted file mode 100644
index a768a43..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/lv.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/lv_LV.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/lv_LV.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/lv_LV.js.gz
deleted file mode 100644
index b877f68..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/lv_LV.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/lv_LV_EURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/lv_LV_EURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/lv_LV_EURO.js.gz
deleted file mode 100644
index 9a4fa57..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/lv_LV_EURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/lv_LV_PREEURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/lv_LV_PREEURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/lv_LV_PREEURO.js.gz
deleted file mode 100644
index 757c861..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/lv_LV_PREEURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/mk.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/mk.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/mk.js.gz
deleted file mode 100644
index b437e2b..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/mk.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/mk_MK.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/mk_MK.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/mk_MK.js.gz
deleted file mode 100644
index 9dba801..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/mk_MK.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ml_IN.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ml_IN.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ml_IN.js.gz
deleted file mode 100644
index f0553f1..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ml_IN.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/mr.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/mr.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/mr.js.gz
deleted file mode 100644
index 3f00081..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/mr.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/mr_IN.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/mr_IN.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/mr_IN.js.gz
deleted file mode 100644
index 3f4e42f..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/mr_IN.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ms.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ms.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ms.js.gz
deleted file mode 100644
index 47b15ab..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ms.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ms_MY.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ms_MY.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ms_MY.js.gz
deleted file mode 100644
index d4b42f4..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ms_MY.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/mt.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/mt.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/mt.js.gz
deleted file mode 100644
index f46acdf..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/mt.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/mt_MT.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/mt_MT.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/mt_MT.js.gz
deleted file mode 100644
index 65bd5d4..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/mt_MT.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/mt_MT_EURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/mt_MT_EURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/mt_MT_EURO.js.gz
deleted file mode 100644
index c371c5a..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/mt_MT_EURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/mt_MT_PREEURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/mt_MT_PREEURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/mt_MT_PREEURO.js.gz
deleted file mode 100644
index 272ed07..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/mt_MT_PREEURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/nb_NO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/nb_NO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/nb_NO.js.gz
deleted file mode 100644
index 953b051..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/nb_NO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/nl.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/nl.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/nl.js.gz
deleted file mode 100644
index 1fc0521..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/nl.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/nl_BE.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/nl_BE.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/nl_BE.js.gz
deleted file mode 100644
index 4ea4bd5..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/nl_BE.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/nl_BE_PREEURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/nl_BE_PREEURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/nl_BE_PREEURO.js.gz
deleted file mode 100644
index b69f55a..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/nl_BE_PREEURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/nl_NL.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/nl_NL.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/nl_NL.js.gz
deleted file mode 100644
index f10c527..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/nl_NL.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/nl_NL_PREEURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/nl_NL_PREEURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/nl_NL_PREEURO.js.gz
deleted file mode 100644
index a36a696..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/nl_NL_PREEURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/no.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/no.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/no.js.gz
deleted file mode 100644
index 2828495..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/no.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/no_NO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/no_NO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/no_NO.js.gz
deleted file mode 100644
index f027493..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/no_NO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/no_NO_NY.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/no_NO_NY.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/no_NO_NY.js.gz
deleted file mode 100644
index 71e5b02..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/no_NO_NY.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/or_IN.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/or_IN.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/or_IN.js.gz
deleted file mode 100644
index fcec744..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/or_IN.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/pa.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/pa.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/pa.js.gz
deleted file mode 100644
index a818414..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/pa.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/pa_IN.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/pa_IN.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/pa_IN.js.gz
deleted file mode 100644
index e86fc9d..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/pa_IN.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/pl.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/pl.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/pl.js.gz
deleted file mode 100644
index 92a36df..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/pl.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/pl_PL.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/pl_PL.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/pl_PL.js.gz
deleted file mode 100644
index be45a80..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/pl_PL.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/pl_PL_EURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/pl_PL_EURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/pl_PL_EURO.js.gz
deleted file mode 100644
index ad0dd65..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/pl_PL_EURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/pl_PL_PREEURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/pl_PL_PREEURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/pl_PL_PREEURO.js.gz
deleted file mode 100644
index a0c6116..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/pl_PL_PREEURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/pt.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/pt.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/pt.js.gz
deleted file mode 100644
index 1a02bc1..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/pt.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/pt_BR.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/pt_BR.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/pt_BR.js.gz
deleted file mode 100644
index 89adc5e..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/pt_BR.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/pt_PT.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/pt_PT.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/pt_PT.js.gz
deleted file mode 100644
index 9f38787..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/pt_PT.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/pt_PT_PREEURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/pt_PT_PREEURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/pt_PT_PREEURO.js.gz
deleted file mode 100644
index 5adb184..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/pt_PT_PREEURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ro.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ro.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ro.js.gz
deleted file mode 100644
index 3e04e6e..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ro.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ro_RO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ro_RO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ro_RO.js.gz
deleted file mode 100644
index 1ef6e7d..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ro_RO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ru.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ru.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ru.js.gz
deleted file mode 100644
index 664de07..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ru.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ru_RU.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ru_RU.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ru_RU.js.gz
deleted file mode 100644
index 49bc219..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ru_RU.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/sh.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/sh.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/sh.js.gz
deleted file mode 100644
index 3db9b20..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/sh.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/sh_CS.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/sh_CS.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/sh_CS.js.gz
deleted file mode 100644
index 0f62a17..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/sh_CS.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/sk.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/sk.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/sk.js.gz
deleted file mode 100644
index 8636208..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/sk.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/sk_SK.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/sk_SK.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/sk_SK.js.gz
deleted file mode 100644
index dfb2908..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/sk_SK.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/sk_SK_EURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/sk_SK_EURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/sk_SK_EURO.js.gz
deleted file mode 100644
index baddfcf..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/sk_SK_EURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/sk_SK_PREEURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/sk_SK_PREEURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/sk_SK_PREEURO.js.gz
deleted file mode 100644
index e1cc9e0..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/sk_SK_PREEURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/sl.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/sl.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/sl.js.gz
deleted file mode 100644
index ac93f3e..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/sl.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/sl_SI.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/sl_SI.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/sl_SI.js.gz
deleted file mode 100644
index 7286da1..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/sl_SI.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/sl_SI_PREEURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/sl_SI_PREEURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/sl_SI_PREEURO.js.gz
deleted file mode 100644
index 1eabc09..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/sl_SI_PREEURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/sq.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/sq.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/sq.js.gz
deleted file mode 100644
index 0a5f716..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/sq.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/sq_AL.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/sq_AL.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/sq_AL.js.gz
deleted file mode 100644
index 2969ca7..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/sq_AL.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/sr.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/sr.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/sr.js.gz
deleted file mode 100644
index 45a8f4b..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/sr.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/sr_BA.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/sr_BA.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/sr_BA.js.gz
deleted file mode 100644
index 89f8484..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/sr_BA.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/sr_CS.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/sr_CS.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/sr_CS.js.gz
deleted file mode 100644
index 9d3d758..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/sr_CS.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/sr_ME.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/sr_ME.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/sr_ME.js.gz
deleted file mode 100644
index d50466e..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/sr_ME.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/sr_RS.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/sr_RS.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/sr_RS.js.gz
deleted file mode 100644
index 66e041f..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/sr_RS.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/sr_RS_Cyrl.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/sr_RS_Cyrl.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/sr_RS_Cyrl.js.gz
deleted file mode 100644
index 9cc15d6..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/sr_RS_Cyrl.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/sr_RS_Latn.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/sr_RS_Latn.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/sr_RS_Latn.js.gz
deleted file mode 100644
index a3a9a93..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/sr_RS_Latn.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/sv.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/sv.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/sv.js.gz
deleted file mode 100644
index eec6524..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/sv.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/sv_SE.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/sv_SE.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/sv_SE.js.gz
deleted file mode 100644
index ec4b9a7..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/sv_SE.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/sv_SE_EURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/sv_SE_EURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/sv_SE_EURO.js.gz
deleted file mode 100644
index 2f860b9..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/sv_SE_EURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/sv_SE_PREEURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/sv_SE_PREEURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/sv_SE_PREEURO.js.gz
deleted file mode 100644
index 1bfce15..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/sv_SE_PREEURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ta.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ta.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ta.js.gz
deleted file mode 100644
index d7581ea..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ta.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ta_IN.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ta_IN.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ta_IN.js.gz
deleted file mode 100644
index d94fe66..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ta_IN.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/te.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/te.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/te.js.gz
deleted file mode 100644
index c69b725..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/te.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/te_IN.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/te_IN.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/te_IN.js.gz
deleted file mode 100644
index 2f21145..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/te_IN.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/th.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/th.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/th.js.gz
deleted file mode 100644
index 13b44cc..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/th.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/th_TH.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/th_TH.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/th_TH.js.gz
deleted file mode 100644
index 9a44dfe..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/th_TH.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/th_TH_TH.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/th_TH_TH.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/th_TH_TH.js.gz
deleted file mode 100644
index cfd9252..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/th_TH_TH.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/tr.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/tr.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/tr.js.gz
deleted file mode 100644
index f54579f..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/tr.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/tr_TR.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/tr_TR.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/tr_TR.js.gz
deleted file mode 100644
index 27e9cd3..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/tr_TR.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/uk.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/uk.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/uk.js.gz
deleted file mode 100644
index 246525c..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/uk.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/uk_UA.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/uk_UA.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/uk_UA.js.gz
deleted file mode 100644
index f73c575..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/uk_UA.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/vi.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/vi.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/vi.js.gz
deleted file mode 100644
index 7a47737..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/vi.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/vi_VN.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/vi_VN.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/vi_VN.js.gz
deleted file mode 100644
index 9cdd564..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/vi_VN.js.gz and /dev/null differ


[05/15] CB-4228

Posted by lo...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/json4j/JSONObject.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/json4j/JSONObject.java b/bbos/framework/ext/src/org/apache/cordova/json4j/JSONObject.java
deleted file mode 100644
index 28c6216..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/json4j/JSONObject.java
+++ /dev/null
@@ -1,1367 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.json4j;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Reader;
-import java.io.UnsupportedEncodingException;
-import java.io.Writer;
-import java.util.Enumeration;
-import java.util.Hashtable;
-
-import org.apache.cordova.json4j.internal.JSON4JStringReader;
-import org.apache.cordova.json4j.internal.JSON4JStringWriter;
-import org.apache.cordova.json4j.internal.NumberUtil;
-import org.apache.cordova.json4j.internal.Parser;
-import org.apache.cordova.json4j.internal.Serializer;
-import org.apache.cordova.json4j.internal.SerializerVerbose;
-
-/**
- * Models a JSON Object.
- *
- * Extension of Hashtable that only allows String keys, and values which are JSON-able (such as a Java Bean).
- * <BR><BR>
- * JSON-able values are: null, and instances of String, Boolean, Number, JSONObject and JSONArray.
- * <BR><BR>
- * Instances of this class are not thread-safe.
- */
-public class JSONObject extends Hashtable implements JSONArtifact {
-
-    private static final long serialVersionUID = -3269263069889337298L;
-
-    /**
-     * A constant definition reference to Java null.
-     * Provided for API compatibility with other JSON parsers.
-     */
-    public static final Object NULL = new Null();
-
-    /**
-     * Return whether the object is a valid value for a property.
-     * @param object The object to check for validity as a JSON property value.
-     * @return boolean indicating if the provided object is directly convertable to JSON.
-     */
-    public static boolean isValidObject(Object object) {
-        if (null == object) return true;
-        return isValidType(object.getClass());
-    }
-
-    /**
-     * Return whether the class is a valid type of value for a property.
-     * @param clazz The class type to check for validity as a JSON object type.
-     * @return boolean indicating if the provided class is directly convertable to JSON.
-     */
-    public static boolean isValidType(Class clazz) {
-        if (null == clazz) throw new IllegalArgumentException();
-
-        if (String.class  == clazz) return true;
-        if (Boolean.class == clazz) return true;
-        if (JSONObject.class.isAssignableFrom(clazz)) return true;
-        if (JSONArray.class == clazz) return true;
-        if (NumberUtil.isNumber(clazz)) return true;
-        if (JSONObject.NULL == clazz) return true;
-        if (JSONString.class.isAssignableFrom(clazz)) return true;
-
-        return false;
-    }
-
-    /**
-     * Create a new instance of this class.
-     */
-    public JSONObject() {
-        super();
-    }
-
-    /**
-     * Create a new instance of this class taking selected values from the underlying one.
-     * @param obj The JSONObject to extract values from.
-     * @param keys The keys to take from the JSONObject and apply to this instance.
-     * @throws JSONException Thrown if a key is duplicated in the string[] keys
-     */
-    public JSONObject(JSONObject obj, String[] keys) throws JSONException{
-        super();
-        if (keys != null && keys.length > 0) {
-            for (int i = 0; i < keys.length; i++) {
-                if (this.containsKey(keys[i])) {
-                    throw new JSONException("Duplicate key: " + keys[i]);
-                }
-                try {
-                    this.put(keys[i], obj.get(keys[i]));
-                } catch (Exception ex) {
-                    JSONException jex = new JSONException("Error occurred during JSONObject creation");
-                    jex.setCause(ex);
-                    throw jex;
-                }
-            }
-        }
-    }
-
-    /**
-     * Create a new instance of this class from the provided JSON object string.
-     * Note:  This is the same as new JSONObject(str, false);  Parsing in non-strict mode.
-     * @param str The JSON string to parse.
-     * @throws JSONException Thrown when the string passed is null, or malformed JSON..
-     */
-    public JSONObject(String str) throws JSONException {
-        super();
-        JSON4JStringReader reader = new JSON4JStringReader(str);
-        (new Parser(reader)).parse(this);
-    }
-
-    /**
-     * Create a new instance of this class from the provided JSON object string.
-     * @param str The JSON string to parse.
-     * @param strict Whether or not to parse in 'strict' mode, meaning all strings must be quoted (including identifiers), and comments are not allowed.
-     * @throws JSONException Thrown when the string passed is null, or malformed JSON..
-     */
-    public JSONObject(String str, boolean strict) throws JSONException {
-        super();
-        JSON4JStringReader reader = new JSON4JStringReader(str);
-        (new Parser(reader, strict)).parse(this);
-    }
-
-    /**
-     * Create a new instance of this class from the data provided from the reader.  The reader content must be a JSON object string.
-     * Note:  The reader will not be closed, that is left to the caller.
-     * Note:  This is the same as new JSONObject(rdr, false);  Parsing in non-strict mode.
-     * @throws JSONException Thrown when the string passed is null, or malformed JSON..
-     */
-    public JSONObject(Reader rdr) throws JSONException {
-        (new Parser(rdr)).parse(this);
-    }
-
-    /**
-     * Create a new instance of this class from the data provided from the reader.  The reader content must be a JSON object string.
-     * Note:  The reader will not be closed, that is left to the caller.
-     * @param rdr The reader from which to read the JSON.
-     * @param strict Whether or not to parse in 'strict' mode, meaning all strings must be quoted (including identifiers), and comments are not allowed.
-     * @throws JSONException Thrown when the string passed is null, or malformed JSON..
-     */
-    public JSONObject(Reader rdr, boolean strict) throws JSONException {
-        (new Parser(rdr, strict)).parse(this);
-    }
-
-    /**
-     * Create a new instance of this class from the data provided from the input stream.  The stream content must be a JSON object string.
-     * Note:  The input stream content is assumed to be UTF-8 encoded.
-     * Note:  The InputStream will not be closed, that is left to the caller.
-     * Note:  This is the same as new JSONObject(is, false);  Parsing in non-strict mode.
-     * @param is The InputStream from which to read the JSON.
-     * @throws JSONException Thrown when the string passed is null, or malformed JSON..
-     */
-    public JSONObject (InputStream is) throws JSONException {
-        InputStreamReader isr = null;
-        if (is != null) {
-            try {
-                isr = new InputStreamReader(is, "UTF-8");
-            } catch (Exception ex) {
-                isr = new InputStreamReader(is);
-            }
-        } else {
-            throw new JSONException("InputStream cannot be null");
-        }
-        (new Parser(isr)).parse(true, this);
-    }
-
-    /**
-     * Create a new instance of this class from the data provided from the input stream.  The stream content must be a JSON object string.
-     * Note:  The input stream content is assumed to be UTF-8 encoded.
-     * Note:  The InputStream will not be closed, that is left to the caller.
-     * @param is The InputStream from which to read the JSON.
-     * @param strict Whether or not to parse in 'strict' mode, meaning all strings must be quoted (including identifiers), and comments are not allowed.
-     * @throws JSONException Thrown when the string passed is null, or malformed JSON..
-     */
-    public JSONObject (InputStream is, boolean strict) throws JSONException {
-        InputStreamReader isr = null;
-        if (is != null) {
-            try {
-                isr = new InputStreamReader(is, "UTF-8");
-            } catch (Exception ex) {
-                isr = new InputStreamReader(is);
-            }
-        } else {
-            throw new JSONException("InputStream cannot be null");
-        }
-        (new Parser(isr, strict)).parse(true, this);
-    }
-
-    /**
-     * Write this object to the stream as JSON text in UTF-8 encoding.  Same as calling write(os,false);
-     * Note that encoding is always written as UTF-8, as per JSON spec.
-     * @param os The output stream to write data to.
-     *
-     * @throws JSONException Thrown on IO errors during serialization.
-     */
-    public OutputStream write(OutputStream os) throws JSONException {
-        write(os,false);
-        return os;
-    }
-
-    /**
-     * Convert this object into a stream of JSON text.  Same as calling write(writer,false);
-     * Note that encoding is always written as UTF-8, as per JSON spec.
-     * @param os The output stream to write data to.
-     * @param verbose Whether or not to write the JSON text in a verbose format.
-     *
-     * @throws JSONException Thrown on IO errors during serialization.
-     */
-    public OutputStream write(OutputStream os, boolean verbose) throws JSONException {
-        Writer writer = null;
-        try {
-            //MSN BUFFERED
-            writer = new OutputStreamWriter(os, "UTF-8");
-        } catch (UnsupportedEncodingException uex) {
-            JSONException jex = new JSONException(uex.toString());
-            jex.setCause(uex);
-            throw jex;
-        }
-        write(writer, verbose);
-        try {
-            writer.flush();
-        } catch (Exception ex) {
-            JSONException jex = new JSONException("Error during buffer flush");
-            jex.setCause(ex);
-            throw jex;
-        }
-        return os;
-    }
-
-    /**
-     * Write this object to the stream as JSON text in UTF-8 encoding, specifying how many spaces should be used for each indent.
-     * @param indentDepth How many spaces to use for each indent level.  Should be one to eight.
-     * Less than one means no intending, greater than 8 and it will just use tab.
-     *
-     * @throws JSONException Thrown on IO errors during serialization.
-     */
-    public OutputStream write(OutputStream os, int indentDepth) throws JSONException {
-        Writer writer = null;
-        try {
-            //MSN BUFFERED
-            writer = new OutputStreamWriter(os, "UTF-8");
-        } catch (UnsupportedEncodingException uex) {
-            JSONException jex = new JSONException(uex.toString());
-            jex.setCause(uex);
-            throw jex;
-        }
-        write(writer, indentDepth);
-        try {
-            writer.flush();
-        } catch (Exception ex) {
-            JSONException jex = new JSONException("Error during buffer flush");
-            jex.setCause(ex);
-            throw jex;
-        }
-        return os;
-    }
-
-    /**
-     * Write this object to the writer as JSON text. Same as calling write(writer,false);
-     * @param writer The writer which to write the JSON text to.
-     *
-     * @throws JSONException Thrown on IO errors during serialization.
-     */
-    public Writer write(Writer writer) throws JSONException {
-        write(writer, false);
-        return writer;
-    }
-
-    /**
-     * Write this object to the writer as JSON text in UTF-8 encoding, specifying whether to use verbose (tab-indented) output or not.
-     * @param writer The writer which to write the JSON text to.
-     *
-     * @throws JSONException Thrown on IO errors during serialization.
-     */
-    public Writer write(Writer writer, boolean verbose) throws JSONException {
-        Serializer serializer;
-
-        //Try to avoid double-buffering or buffering in-memory
-        //writers.
-//        Class writerClass = writer.getClass();
-        boolean flushIt = false;
-//        if (!StringWriter.class.isAssignableFrom(writerClass) &&
-//            !CharArrayWriter.class.isAssignableFrom(writerClass) &&
-//            !BufferedWriter.class.isAssignableFrom(writerClass)) {
-//            writer = new BufferedWriter(writer);
-//            flushIt = true;
-//        }
-
-        if (verbose) {
-            serializer = new SerializerVerbose(writer);
-        } else {
-            serializer = new Serializer(writer);
-        }
-
-        try {
-            serializer.writeObject(this);
-        } catch (IOException iox) {
-            JSONException jex = new JSONException("Error occurred during input read.");
-            jex.setCause(iox);
-            throw jex;
-        }
-        if (flushIt) {
-            try {
-                writer.flush();
-            } catch (Exception ex) {
-                JSONException jex = new JSONException("Error during buffer flush");
-                jex.setCause(ex);
-                throw jex;
-            }
-        }
-        return writer;
-    }
-
-    /**
-     * Write this object to the writer as JSON text, specifying how many spaces should be used for each indent.
-     * This is an alternate indent style to using tabs.
-     * @param writer The writer which to write the JSON text to.
-     * @param indentDepth How many spaces to use for each indent.  The value should be between one to eight.
-     */
-    public Writer write(Writer writer, int indentDepth) throws JSONException {
-        Serializer serializer;
-
-        if (indentDepth < 1) {
-            indentDepth = 0;
-        } else if (indentDepth > 8) {
-            indentDepth = 9;
-        }
-
-        //Try to avoid double-buffering or buffering in-memory
-        //writers.
-//        Class writerClass = writer.getClass();
-        boolean flushIt = false;
-//        if (!StringWriter.class.isAssignableFrom(writerClass) &&
-//            !CharArrayWriter.class.isAssignableFrom(writerClass) &&
-//            !BufferedWriter.class.isAssignableFrom(writerClass)) {
-//            writer = new BufferedWriter(writer);
-//            flushIt = true;
-//        }
-
-        if (indentDepth > 0) {
-            serializer = new SerializerVerbose(writer, indentDepth);
-        } else {
-            serializer = new Serializer(writer);
-        }
-        try {
-            serializer.writeObject(this);
-        } catch (IOException iox) {
-            JSONException jex = new JSONException("Error occurred during input read.");
-            jex.setCause(iox);
-            throw jex;
-        }
-        if (flushIt) {
-            try {
-                writer.flush();
-            } catch (Exception ex) {
-                JSONException jex = new JSONException("Error during buffer flush");
-                jex.setCause(ex);
-                throw jex;
-            }
-        }
-        return writer;
-    }
-
-    /**
-     * Convert this object into a String of JSON text, specifying how many spaces should be used for each indent.
-     * This is an alternate indent style to using tabs.
-     * @param indentDepth How many spaces to use for each indent.  The value should be between one to eight.
-     * Less than one means no indenting, greater than 8 and it will just use tab.
-     *
-     * @throws JSONException Thrown on errors during serialization.
-     */
-    public String write(int indentDepth) throws JSONException {
-        Serializer serializer;
-        JSON4JStringWriter writer = new JSON4JStringWriter();
-
-        if (indentDepth < 1) {
-            indentDepth = 0;
-        } else if (indentDepth > 8) {
-            indentDepth = 9;
-        }
-
-        if (indentDepth > 0) {
-            serializer = new SerializerVerbose(writer, indentDepth);
-        } else {
-            serializer = new Serializer(writer);
-        }
-        try {
-            serializer.writeObject(this).flush();
-        } catch (IOException iox) {
-            JSONException jex = new JSONException("Error occurred during write.");
-            jex.setCause(iox);
-            throw jex;
-        }
-        return writer.toString();
-    }
-
-    /**
-     * Convert this object into a String of JSON text, specifying whether to use verbose (tab-indented) output or not.
-     * @param verbose Whether or not to write in compressed format.
-     *
-     * @throws JSONException Thrown on errors during serialization.
-     */
-    public String write(boolean verbose) throws JSONException {
-        Serializer serializer;
-        JSON4JStringWriter writer = new JSON4JStringWriter();
-
-        if (verbose) {
-            serializer = new SerializerVerbose(writer);
-        } else {
-            serializer = new Serializer(writer);
-        }
-        try {
-            serializer.writeObject(this).flush();
-        } catch (IOException iox) {
-            JSONException jex = new JSONException("Error occurred during write.");
-            jex.setCause(iox);
-            throw jex;
-        }
-        return writer.toString();
-    }
-
-    /**
-     * Convert this object into a String of JSON text.  Same as write(false);
-     *
-     * @throws JSONException Thrown on IO errors during serialization.
-     */
-    public String write() throws JSONException {
-        return write(false);
-    }
-
-    /**
-     * Method to obtain the object value for a key.
-     * This string-based method is provided for API compatibility to other JSON models.
-     * @param key The key  (attribute) name to obtain the value for.
-     * @throws JSONException Thrown if the noted key is not in the map of key/value pairs.
-     */
-    public Object get(String key) throws JSONException {
-        Object val = this.get((Object)key);
-        if (val == null) {
-            if (!this.containsKey(key)) {
-                throw new JSONException("The key [" + key + "] was not in the map");
-            }
-        }
-        return val;
-    }
-
-    /**
-     * Method to obtain the object value for a key.  If the key is not in the map, null is returned.
-     * This string-based method is provided for API compatibility to other JSON models.
-     * @param key The key  (attribute) name to obtain the value for.
-     */
-    public Object opt(String key) {
-        return this.get((Object)key);
-    }
-
-    /**
-     * (non-Javadoc)
-     * @see java.util.HashMap#put(java.lang.Object, java.lang.Object)
-     * @param key The key to put in the JSONObject
-     * @param value The value to put in the JSONObject
-     * @param includeSuperclass Boolean indicating that if the object is a JavaBean, include superclass getter properties.
-     * @throws JSONException.  Thrown if key is null, not a string, or the value could not be converted.
-     */
-    public Object put(Object key, Object value, boolean includeSuperclass) throws JSONException{
-        if (null == key) throw new JSONException("key must not be null");
-        if (!(key instanceof String)) throw new JSONException("key must be a String");
-        if (!isValidObject(value)) {
-            throw new JSONException("Invalid type of value.  Could not convert type: [" + value.getClass().getName() + "]");
-        }
-        if (null == value) {
-            value = NULL;
-        }
-        return super.put(key, value);
-    }
-
-    /**
-     * (non-Javadoc)
-     * @see java.util.HashMap#put(java.lang.Object, java.lang.Object)
-     * This is the same as calling put(key, value, true);
-     */
-    public Object put(Object key, Object value) {
-        try {
-            return put(key, value, true);
-        } catch (Exception e) {
-            IllegalArgumentException iae = new IllegalArgumentException("Error occurred during JSON conversion");
-           //MSN iae.setCause(e);
-            throw iae;
-        }
-    }
-
-    /**
-     * Convenience functions, to help map from other JSON parsers.
-     */
-
-    /**
-     * Similar to default HashMap put, except it returns JSONObject instead of Object.
-     * @see java.util.HashMap#put(java.lang.Object, java.lang.Object)
-     * @return A reference to this object instance.
-     * @throws JSONException.  Thrown if key is null, not a string, or the value could not be converted to JSON.
-     */
-    public JSONObject put(String key, Object value) throws JSONException{
-        this.put((Object)key, value);
-        return this;
-    }
-
-    /**
-     * Method to add an atomic boolean to the JSONObject.
-     * param key The key/attribute name to set the boolean at.
-     * @param value The boolean value.
-     * @throws JSONException.  Thrown if key is null or not a string.
-     * @return A reference to this object instance.
-     */
-    public JSONObject put(String key, boolean value) throws JSONException{
-        this.put(key,new Boolean(value));
-        return this;
-    }
-
-    /**
-     * Method to add an atomic double to the JSONObject.
-     * param key The key/attribute name to set the double at.
-     * @param value The double value.
-     * @throws JSONException.  Thrown if key is null or not a string.
-     * @return A reference to this object instance.
-     */
-    public JSONObject put(String key, double value) throws JSONException{
-        this.put(key, new Double(value));
-        return this;
-    }
-
-    /**
-     * Method to add an atomic integer to the JSONObject.
-     * param key The key/attribute name to set the integer at.
-     * @param value The integer value.
-     * @throws JSONException.  Thrown if key is null or not a string.
-     * @return A reference to this object instance.
-     */
-    public JSONObject put(String key, int value) throws JSONException{
-        this.put(key, new Integer(value));
-        return this;
-    }
-
-    /**
-     * Method to add an atomic short to the JSONObject.
-     * param key The key/attribute name to set the integer at.
-     * @param value The integer value.
-     * @throws JSONException.  Thrown if key is null or not a string.
-     * @return A reference to this object instance.
-     */
-    public JSONObject put(String key, short value) throws JSONException{
-        this.put(key, new Short(value));
-        return this;
-    }
-
-    /**
-     * Method to add an atomic long to the JSONObject.
-     * @param key The key/attribute name to set the long to.
-     * @param value The long value.
-     * @throws JSONException.  Thrown if key is null or not a string.
-     * @return A reference to this object instance.
-     */
-    public JSONObject put(String key, long value) throws JSONException{
-        this.put(key, new Long(value));
-        return this;
-    }
-
-    /**
-     * Method to add an Object array as a new JSONArray contained in this JSONObject
-     * @param key The key/attribute name to set the collection to.
-     * @param value The Object array to convert to a JSONArray and store.
-     * @throws JSONException Thrown when contents in the Collection cannot be converted to something JSONable.
-     * @return A reference to this object instance.
-     */
-     public JSONObject put(String key, Object[] value) throws JSONException {
-         return put (key, new JSONArray(value));
-     }
-
-     /**
-      * Method to add an Object array as a new JSONArray contained in this JSONObject
-      * @param key The key/attribute name to set the collection to.
-      * @param value The Object array to convert to a JSONArray and store.
-      * @param includeSuperclass For values of the Object array which are JavaBeans and are converted, include superclass getter properties.
-      * @throws JSONException Thrown when contents in the Collection cannot be converted to something JSONable.
-      * @return A reference to this object instance.
-      *
-      public JSONObject put(String key, Object[] value, boolean includeSuperclass) throws JSONException {
-          return put (key, new JSONArray(value), includeSuperclass);
-      } */
-
-    /**
-     * Utility method to obtain the specified key as a 'boolean' value
-     * Only boolean true, false, and the String true and false will return.  In this case null, the number 0, and empty string should be treated as false.
-     * everything else is true.
-     * Provided for compatibility to other JSON models.
-     * @param key The key to look up.
-     * throws JSONException Thrown when the type returned by get(key) is not a boolean instance, or the strings 'true' or 'false'.
-     * @return A boolean value (true or false), if the value stored for key is a Boolean, or the strings 'true' or 'false'.
-     */
-    public boolean getBoolean(String key) throws JSONException {
-        Object val = this.opt(key);
-        if (val != null) {
-            if (val instanceof Boolean) {
-                return((Boolean)val).booleanValue();
-            } else if (NumberUtil.isNumber(val.getClass())) {
-                throw new JSONException("Value at key: [" + key + "] was not a boolean or string value of 'true' or 'false'.");
-            } else if (String.class.isAssignableFrom(val.getClass())) {
-                String str = (String)val;
-                if (str.equals("true")) {
-                    return true;
-                } else if (str.equals("false")) {
-                    return false;
-                } else {
-                    throw new JSONException("The value for key: [" + key + "]: [" + str + "] was not 'true' or 'false'");
-                }
-            } else {
-                throw new JSONException("The value for key: [" + key + "] was not a type that can be converted to boolean");
-            }
-        } else {
-            throw new JSONException("The value for key: [" + key + "] was null");
-        }
-    }
-
-    /**
-     * Utility method to obtain the specified key as a 'boolean' value
-     * Only returns true if the value is boolean true or the string 'true'.  All other values return false.
-     * Provided for compatibility to other JSON models.
-     * @param key The key to look up.
-     * @return A boolean value (true or false), if the value stored for key is a Boolean, or the strings 'true' or 'false'.
-     */
-    public boolean optBoolean(String key) {
-        Object val = this.opt(key);
-        if (val != null) {
-            if (val instanceof Boolean) {
-                return((Boolean)val).booleanValue();
-            } else if (NumberUtil.isNumber(val.getClass())) {
-                return false;
-            } else if (String.class.isAssignableFrom(val.getClass())) {
-                String str = (String)val;
-                if (str.equals("true")) {
-                    return true;
-                } else {
-                    return false;
-                }
-            } else {
-                return false;
-            }
-        } else {
-            return false;
-        }
-    }
-
-    /**
-     * Utility method to obtain the specified key as a 'boolean' value
-     * Only returns true if the value is boolean true or the string 'true'.  All other values return false.
-     * Provided for compatibility to other JSON models.
-     * @param key The key to look up.
-     * @param defaultValue The default value to return.
-     * @return A boolean value (true or false), if the value stored for key is a Boolean, or the strings 'true' or 'false'.
-     */
-    public boolean optBoolean(String key, boolean defaultValue) {
-        Object val = this.opt(key);
-        if (val != null) {
-            if (val instanceof Boolean) {
-                return((Boolean)val).booleanValue();
-            } else if (NumberUtil.isNumber(val.getClass())) {
-                return false;
-            } else if (String.class.isAssignableFrom(val.getClass())) {
-                String str = (String)val;
-                if (str.equals("true")) {
-                    return true;
-                } else if (str.equals("false")) {
-                    return false;
-                } else {
-                    return defaultValue;
-                }
-            } else {
-                return defaultValue;
-            }
-        } else {
-            return defaultValue;
-        }
-    }
-
-    /**
-     * Utility method to obtain the specified key as a 'double' value
-     * Only values of Number will be converted to double, all other types will generate an exception
-     * Provided for compatibility to other JSON models.
-     * @param key The key to look up.
-     * throws JSONException Thrown when the type returned by get(key) is not a Double instance, or cannot be converted to a double.
-     * @return A double value if the value stored for key is an instance of Number.
-     */
-    public double getDouble(String key) throws JSONException {
-        Object val = this.opt(key);
-        if (val != null) {
-            if (NumberUtil.isNumber(val.getClass())) {
-                return NumberUtil.getDouble(val);
-            }
-            else {
-                throw new JSONException("The value for key: [" + key + "] was not a type that can be converted to double");
-            }
-        } else {
-            throw new JSONException("The value for key: [" + key + "] was null.  Number required.");
-        }
-    }
-
-    /**
-     * Utility method to obtain the specified key as a 'double' value
-     * Only values of Number will be converted to double.  all other values will return Double.NaN.
-     * Provided for compatibility to other JSON models.
-     * @param key The key to look up.
-     * @return A double value if the value stored for key is an instance of Number.
-     */
-    public double optDouble(String key) {
-        Object val = this.opt(key);
-        if (val != null) {
-            if (NumberUtil.isNumber(val.getClass())) {
-                return NumberUtil.getDouble(val);
-            }
-        }
-        return Double.NaN;
-    }
-
-    /**
-     * Utility method to obtain the specified key as a 'double' value
-     * Only values of Number will be converted to double.  all other values will return Double.NaN.
-     * Provided for compatibility to other JSON models.
-     * @param key The key to look up.
-     * @param defaultValue The default double value to return in case of NaN/null values in map.
-     * @return A double value if the value stored for key is an instance of Number.
-     */
-    public double optDouble(String key, double defaultValue) {
-        Object val = this.opt(key);
-        if (val != null) {
-            if (NumberUtil.isNumber(val.getClass())) {
-                return NumberUtil.getDouble(val);
-            }
-        }
-        return defaultValue;
-    }
-
-    /**
-     * Utility method to obtain the specified key as a 'short' value
-     * Only values of Number will be converted to short, all other types will generate an exception.
-     * Provided for compatibility to other JSON models.
-     * @param key The key to look up.
-     * throws JSONException Thrown when the type returned by get(key) is not a Short instance, or cannot be converted to a short.
-     * @return A short value if the value stored for key is an instance of Number.
-     */
-    public short getShort(String key) throws JSONException {
-        Object val = this.opt(key);
-        if (val != null) {
-            if (NumberUtil.isNumber(val.getClass())) {
-                return NumberUtil.getShort(val);
-            } else {
-                throw new JSONException("The value for key: [" + key + "] was not a type that can be converted to short");
-            }
-        } else {
-            throw new JSONException("The value for key: [" + key + "] was null.  Number required.");
-        }
-    }
-
-    /**
-     * Utility method to obtain the specified key as a 'short' value
-     * Only values of Number will be converted to short.  All other types return 0.
-     * Provided for compatibility to other JSON models.
-     * @param key The key to look up.
-     * @return A short value if the value stored for key is an instance of Number.  0 otherwise.
-     */
-    public short optShort(String key) {
-        Object val = this.opt(key);
-        if (val != null) {
-            if (NumberUtil.isNumber(val.getClass())) {
-                return NumberUtil.getShort(val);
-            }
-        }
-        return(short)0;
-    }
-
-    /**
-     * Utility method to obtain the specified key as a 'short' value
-     * Only values of Number will be converted to short.
-     * Provided for compatibility to other JSON models.
-     * @param key The key to look up.
-     * @param defaultValue The default value to return in the case of null/nonNumber values in the map.
-     * @return A short value if the value stored for key is an instance of Number.  0 otherwise.
-     */
-    public short optShort(String key, short defaultValue) {
-        Object val = this.opt(key);
-        if (val != null) {
-            if (NumberUtil.isNumber(val.getClass())) {
-                return NumberUtil.getShort(val);
-            }
-        }
-        return defaultValue;
-    }
-
-    /**
-     * Utility method to obtain the specified key as a 'int' value
-     * Only values of Number will be converted to integer, all other types will generate an exception.
-     * Provided for compatibility to other JSON models.
-     * @param key The key to look up.
-     * throws JSONException Thrown when the type returned by get(key) is not a Double instance, or cannot be converted to a double.
-     * @return A int value if the value stored for key is an instance of Number.
-     */
-    public int getInt(String key) throws JSONException {
-        Object val = this.opt(key);
-        if (val != null) {
-            if (NumberUtil.isNumber(val.getClass())) {
-                return NumberUtil.getInt(val);
-            } else {
-                throw new JSONException("The value for key: [" + key + "] was not a type that can be converted to integer");
-            }
-        } else {
-            throw new JSONException("The value for key: [" + key + "] was null.  Number required.");
-        }
-    }
-
-    /**
-     * Utility method to obtain the specified key as a 'int' value
-     * Provided for compatibility to other JSON models.
-     * Only values of Number will be converted to integer, all other types will return 0.
-     * @param key The key to look up.
-     * @return A int value if the value stored for key is an instance of Number.  0 otherwise.
-     */
-    public int optInt(String key) {
-        Object val = this.opt(key);
-        if (val != null) {
-            if (NumberUtil.isNumber(val.getClass())) {
-                return NumberUtil.getInt(val);
-            }
-        }
-        return 0;
-    }
-
-    /**
-     * Utility method to obtain the specified key as a 'int' value
-     * Provided for compatibility to other JSON models.
-     * Only values of Number will be converted to integer
-     * @param key The key to look up.
-     * @param defaultValue The default int value to return in case of null/non-number values in the map.
-     * @return A int value if the value stored for key is an instance of Number.
-     */
-    public int optInt(String key, int defaultValue) {
-        Object val = this.opt(key);
-        if (val != null) {
-            if (NumberUtil.isNumber(val.getClass())) {
-                return NumberUtil.getInt(val);
-            }
-        }
-        return defaultValue;
-    }
-
-    /**
-     * Utility method to obtain the specified key as a 'long' value
-     * Only values of Number will be converted to long, all other types will generate an exception.
-     * Provided for compatibility to other JSON models.
-     * @param key The key to look up.
-     * throws JSONException Thrown when the type returned by get(key) is not a Long instance, or cannot be converted to a long..
-     * @return A long value if the value stored for key is an instance of Number.
-     */
-    public long getLong(String key) throws JSONException {
-        Object val = this.opt(key);
-        if (val != null) {
-            if (NumberUtil.isNumber(val.getClass())) {
-                return NumberUtil.getLong(val);
-            } else {
-                throw new JSONException("The value for key: [" + key + "] was not a type that can be converted to long");
-            }
-        } else {
-            throw new JSONException("The value for key: [" + key + "] was null.  Number required.");
-        }
-    }
-
-    /**
-     * Utility method to obtain the specified key as a 'long' value
-     * Only values of Number will be converted to long.  all other types return 0.
-     * Provided for compatibility to other JSON models.
-     * @param key The key to look up.
-     * @return A long value if the value stored for key is an instance of Number, 0 otherwise.
-     */
-    public long optLong(String key) throws JSONException {
-        Object val = this.opt(key);
-        if (val != null) {
-            if (NumberUtil.isNumber(val.getClass())) {
-                return NumberUtil.getLong(val);
-            }
-        }
-        return(long)0;
-    }
-
-    /**
-     * Utility method to obtain the specified key as a 'long' value
-     * Only values of Number will be converted to long.  all other types return 0.
-     * Provided for compatibility to other JSON models.
-     * @param key The key to look up.
-     * @param defaultValue The default long value to return in case of null/non Number values in the map.
-     * @return A long value if the value stored for key is an instance of Number, defaultValue otherwise.
-     */
-    public long optLong(String key, long defaultValue) throws JSONException {
-        Object val = this.opt(key);
-        if (val != null) {
-            if (NumberUtil.isNumber(val.getClass())) {
-                return NumberUtil.getLong(val);
-            }
-        }
-        return defaultValue;
-    }
-
-    /**
-     * Utility method to obtain the specified key as a 'string' value
-     * Only values that can be easily converted to string will be returned.  A null will generate an exception.
-     * Provided for compatibility to other JSON models.
-     * @param key The key to look up.
-     * throws JSONException Thrown when the type returned by get(key) is null.
-     * @return A string value if the value if the value stored for key is not null.
-     */
-    public String getString(String key) throws JSONException {
-        Object val = this.opt(key);
-        if (val != null) {
-            return val.toString();
-        } else {
-            throw new JSONException("The value for key: [" + key + "] was null.  Object required.");
-        }
-    }
-
-    /**
-     * Utility method to obtain the specified key as a 'string' value
-     * Only values that can be easily converted to string will be returned.  A null will generate an exception.
-     * Provided for compatibility to other JSON models.
-     * @param key The key to look up.
-     * throws JSONException Thrown when the type returned by get(key) is null.
-     * @return A string value if the value if the value stored for key is not null.
-     */
-    public String optString(String key) {
-        Object val = this.opt(key);
-        if (val != null) {
-            return val.toString();
-        }
-        return null;
-    }
-
-    /**
-     * Utility method to obtain the specified key as a 'string' value
-     * Only values that can be easily converted to string will be returned.  A null will generate an exception.
-     * Provided for compatibility to other JSON models.
-     * @param key The key to look up.
-     * @param defaultValue The default String value to return in the case of null values in the map.
-     * @return A string value if the value if the value stored for key is not null, defaultValue otherwise.
-     */
-    public String optString(String key, String defaultValue) {
-        Object val = this.opt(key);
-        if (val != null) {
-            return val.toString();
-        }
-        return defaultValue;
-    }
-
-    /**
-     * Utility method to obtain the specified key as a JSONObject
-     * Only values that are instances of JSONObject will be returned.  A null will generate an exception.
-     * Provided for compatibility to other JSON models.
-     * @param key The key to look up.
-     * throws JSONException Thrown when the type returned by get(key) is not a JSONObject instance.
-     * @return A JSONObject value if the value stored for key is an instance or subclass of JSONObject.
-     */
-    public JSONObject getJSONObject(String key) throws JSONException {
-        Object val = this.opt(key);
-        if (val != null) {
-            if (JSONObject.class.isAssignableFrom(val.getClass())) {
-                return(JSONObject)val;
-            } else {
-                throw new JSONException("The value for key: [" + key + "] was not a JSONObject");
-            }
-        } else {
-            throw new JSONException("The value for key: [" + key + "] was null.  Object required.");
-        }
-    }
-
-    /**
-     * Utility method to obtain the specified key as a JSONObject
-     * Only values that are instances of JSONObject will be returned.  A null will generate an exception.
-     * Provided for compatibility to other JSON models.
-     * @param key The key to look up.
-     * @return A JSONObject value if the value stored for key is an instance or subclass of JSONObject, null otherwise.
-     */
-    public JSONObject optJSONObject(String key) {
-        Object val = this.opt(key);
-        if (val != null) {
-            if (JSONObject.class.isAssignableFrom(val.getClass())) {
-                return(JSONObject)val;
-            }
-        }
-        return null;
-    }
-
-    /**
-     * Utility method to obtain the specified key as a JSONObject
-     * Only values that are instances of JSONObject will be returned.  A null will generate an exception.
-     * Provided for compatibility to other JSON models.
-     * @param key The key to look up.
-     * @param defaultValue The default JSONObject to return in the case of null/non JSONObject values in the map.
-     * @return A JSONObject value if the value stored for key is an instance or subclass of JSONObject, defaultValue otherwise.
-     */
-    public JSONObject optJSONObject(String key, JSONObject defaultValue) {
-        Object val = this.opt(key);
-        if (val != null) {
-            if (JSONObject.class.isAssignableFrom(val.getClass())) {
-                return(JSONObject)val;
-            }
-        }
-        return defaultValue;
-    }
-
-    /**
-     * Utility method to obtain the specified key as a JSONArray
-     * Only values that are instances of JSONArray will be returned.  A null will generate an exception.
-     * Provided for compatibility to other JSON models.
-     * @param key The key to look up.
-     * throws JSONException Thrown when the type returned by get(key) is not a Long instance, or cannot be converted to a long..
-     * @return A JSONArray value if the value stored for key is an instance or subclass of JSONArray.
-     */
-    public JSONArray getJSONArray(String key) throws JSONException {
-        Object val = this.opt(key);
-        if (val != null) {
-            if (JSONArray.class.isAssignableFrom(val.getClass())) {
-                return(JSONArray)val;
-            } else {
-                throw new JSONException("The value for key: [" + key + "] was not a JSONObject");
-            }
-        } else {
-            throw new JSONException("The value for key: [" + key + "] was null.  Object required.");
-        }
-    }
-
-    /**
-     * Utility method to obtain the specified key as a JSONArray
-     * Only values that are instances of JSONArray will be returned.  A null will generate an exception.
-     * Provided for compatibility to other JSON models.
-     * @param key The key to look up.
-     * @return A JSONArray value if the value stored for key is an instance or subclass of JSONArray, null otherwise.
-     */
-    public JSONArray optJSONArray(String key) throws JSONException {
-        Object val = this.opt(key);
-        if (val != null) {
-            if (JSONArray.class.isAssignableFrom(val.getClass())) {
-                return(JSONArray)val;
-            }
-        }
-        return null;
-    }
-
-    /**
-     * Utility method to obtain the specified key as a JSONArray
-     * Only values that are instances of JSONArray will be returned.  A null will generate an exception.
-     * Provided for compatibility to other JSON models.
-     * @param key The key to look up.
-     * @param defaultValue The default value to return if the value in the map is null/not a JSONArray.
-     * @return A JSONArray value if the value stored for key is an instance or subclass of JSONArray, defaultValue otherwise.
-     */
-    public JSONArray optJSONArray(String key, JSONArray defaultValue) throws JSONException {
-        Object val = this.opt(key);
-        if (val != null) {
-            if (JSONArray.class.isAssignableFrom(val.getClass())) {
-                return(JSONArray)val;
-            }
-        }
-        return defaultValue;
-    }
-
-    /**
-     * Put a key/value pair into the JSONObject, but only if key/value are both not null, and only if the key is not present already.
-     * Provided for compatibility to existing models.
-     * @param key The ket to place in the array
-     * @param value The value to place in the array
-     * @return Reference to the current JSONObject.
-     * @throws JSONException - Thrown if the key already exists or if key or value is null
-     */
-    public JSONObject putOnce(String key, Object value) throws JSONException {
-        if (key == null) {
-            throw new JSONException("Key cannot be null");
-        }
-        if (value == null) {
-            throw new JSONException("Value cannot be null");
-        }
-        if (this.containsKey(key)) {
-            throw new JSONException("Key [" + key + "] already exists in the map");
-        }
-        this.put(key,value);
-        return this;
-    }
-
-    /**
-     * Put a key/value pair into the JSONObject, but only if the key and value are non-null.
-     * @param key The keey (attribute) name to assign to the value.
-     * @param value The value to put into the JSONObject.
-     * @return Reference to the current JSONObject.
-     * @throws JSONException - if the value is a non-finite number
-     */
-    public JSONObject putOpt(String key, Object value) throws JSONException {
-        if (key == null) {
-            throw new JSONException("Key cannot be null");
-        }
-        if (value == null) {
-            throw new JSONException("Value cannot be null");
-        }
-        this.put(key,value);
-        return this;
-    }
-
-    /**
-     * Method to return the number of keys in this JSONObject.
-     * This function merely maps to HashMap.size().  Provided for API compatibility.
-     * @return returns the number of keys in the JSONObject.
-     */
-    public int length() {
-        return this.size();
-    }
-
-    /**
-     * Method to append the 'value' object to the element at entry 'key'.
-     * If JSONObject.has(key) returns false, a new array is created and the value is appended to it.
-     * If the object as position key is not an array, then a new JSONArray is created
-     * and both current and new values are appended to it, then the value of the attribute is set to the new
-     * array.  If the current value is already an array, then 'value' is added to it.
-     *
-     * @param key The key/attribute name to append to.
-     * @param value The value to append to it.
-     *
-     * @throws JSONException Thrown if the value to append is not JSONAble.
-     * @return A reference to this object instance.
-     */
-    public JSONObject append(String key, Object value) throws JSONException {
-        JSONArray array = null;
-        if (!this.has(key)) {
-            array = new JSONArray();
-        }
-        else {
-            Object oldVal = this.get(key);
-            array = new JSONArray();
-            if (oldVal == null) {
-                // Add a null if the key was actually there, but just
-                // had value of null.
-                array.add(null);
-            }
-            else  if (JSONArray.class.isAssignableFrom(oldVal.getClass())) {
-                array = (JSONArray)oldVal;
-            } else {
-                array = new JSONArray();
-                array.add(oldVal);
-            }
-        }
-        array.add(value);
-        return put(key,array);
-    }
-
-    /**
-     * Produce a JSONArray containing the values of the members of this JSONObject
-     * @param names - A JSONArray containing the a list of key strings.  This determines the sequence of values in the result.
-     * @return A JSONArray of the values found for the names provided.
-     * @throws JSONException - if errors occur during storing the values in a JSONArray
-     */
-    public JSONArray toJSONArray(JSONArray names) throws JSONException {
-        Enumeration itr = names.elements();
-        JSONArray array = new JSONArray();
-        //MSN WAS IF, SHOULD BE WHILE?
-        while (itr != null && itr.hasMoreElements()) {
-            array.put(this.get(itr.nextElement()));
-        }
-        return array;
-    }
-
-
-    /**
-     * Method to test if a key exists in the JSONObject.
-     * @param key The key to test.
-     * @return true if the key is defined in the JSONObject (regardless of value), or false if the key is not in the JSONObject
-     */
-    public boolean has(String key) {
-        if (key != null) {
-            return this.containsKey(key);
-        }
-        return false;
-    }
-
-  /**
-   * Method to test if a key is mapped to null. This method will also return
-   * true if the key has not been put in the JSONObject yet,
-   *
-   * @param key   The key to test for null.
-   * @return true if the key is not in the map or if the value referenced by the
-   *         key is null, or if the value is the JSONObject.NULL object.
-   */
-    public boolean isNull(String key) {
-        Object obj = this.opt(key);
-        return JSONObject.NULL.equals(obj);
-    }
-
-    /**
-     * Utility function that returns an iterator of all the keys (attributes) of this JSONObject
-     * @return An iterator of all keys in the object.
-     *
-    public Enumeration keys() {
-        return this.keys();
-
-    } */
-
-    /**
-     * Utility function that returns a JSONArray of all the names of the keys (attributes) of this JSONObject
-     * @return All the keys in the JSONObject as a JSONArray.
-     */
-    public JSONArray names() {
-        Enumeration itr = this.keys();
-        if (itr != null) {
-            JSONArray array = new JSONArray();
-            while (itr.hasMoreElements()) {
-                array.add(itr.nextElement());
-            }
-            return array;
-        }
-        return null;
-    }
-
-    /**
-     * Utility function that returns a String[] of all the names of the keys (attributes) of this JSONObject
-     * @return All the keys in the JSONObject as a String[].
-     */
-    public static String[] getNames(JSONObject obj) {
-        String[] array = null;
-        if (obj != null) {
-            if (obj.size() > 0) {
-                array = new String[obj.size()];
-                int pos = 0;
-                Enumeration itr = obj.keys();
-                if (itr != null) {
-                    while (itr.hasMoreElements()) {
-                        array[pos] = (String)itr.nextElement();
-                        pos++;
-                    }
-                }
-            }
-        }
-        return array;
-    }
-
-//    /**
-//     * Utility function that returns an iterator of all the keys (attributes) of this JSONObject sorted in lexicographic manner (String.compareTo).
-//     * @return An iterator of all keys in the object in lexicographic (character code) sorted order.
-//     */
-//    public Enumeration sortedKeys() {
-//        Enumeration itr = this.keys();
-//        if (itr != null && itr.hasMoreElements()) {
-//            Vector vect = new Vector();
-//            while (itr.hasMoreElements()) {
-//                vect.addElement(itr.nextElement());
-//            }
-//            String[] strs = new String[vect.size()];
-//            vect.copyInto(strs);
-//           // java.util.Arrays.sort(strs);
-//            vect.clear();
-//            for (int i = 0; i < strs.length; i++) {
-//                vect.add(strs[i]);
-//            }
-//            return vect.iterator();
-//        }
-//        return null;
-//    }
-
-    /**
-     * End of convenience methods.
-     */
-
-    /**
-     * Over-ridden toString() method.  Returns the same value as write(), which is a compact JSON String.
-     * If an error occurs in the serialization, the return will be of format: JSON Generation Error: [<some error>]
-     * @return A string of JSON text, if possible.
-     */
-    public String toString() {
-        return toString(false);
-    }
-
-    /**
-     * Verbose capable toString method.
-     * If an error occurs in the serialization, the return will be of format: JSON Generation Error: [<some error>]
-     * @param verbose Whether or not to tab-indent the output.
-     * @return A string of JSON text, if possible.
-     */
-    public String toString(boolean verbose) {
-        String str = null;
-        try {
-            str = write(verbose);
-        } catch (JSONException jex) {
-            str = "JSON Generation Error: [" + jex.toString() + "]";
-        }
-        return str;
-    }
-
-    /**
-     * Function to return a string of JSON text with specified indention.  Returns the same value as write(indentDepth).
-     * If an error occurs in the serialization, a JSONException is thrown.
-     * @return A string of JSON text, if possible.
-     */
-    public String toString(int indentDepth) throws JSONException {
-        return write(indentDepth);
-    }
-
-    public static String quote(String string) {
-        return Serializer.quote(string);
-    }
-
-    /**
-     * An simple class provided for API compatibility to other JSON models that 'represents'
-     * 'null' in an actual object.
-     */
-    private static class Null implements JSONString {
-
-        /**
-         * Equals function that returns true for comparisons to null.
-         */
-        public boolean equals(Object obj) {
-            if (obj == null || obj == this) {
-                return true;
-            }
-            else {
-                return false;
-            }
-        }
-
-        /**
-         * Ensure only one Null object.
-         */
-        protected Object clone() {
-            return this;
-        }
-
-        /**
-         * toString method that just returns 'null' as the string.
-         */
-        public String toString() {
-            return "null";
-        }
-
-        /**
-         * Method to return a JSON compliant representation of this object.
-         * @return a JSON formatted string.
-         */
-        public String toJSONString() {
-            return this.toString();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/json4j/JSONString.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/json4j/JSONString.java b/bbos/framework/ext/src/org/apache/cordova/json4j/JSONString.java
deleted file mode 100644
index b887adb..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/json4j/JSONString.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.json4j;
-
-/**
- * An interface that can be implemented to make a
- * particular object have an easy to use JSON representation.  Objects that implement this
- * can be inserted into JSONObject and JSONArray and serialized.
- */
-public interface JSONString {
-    /**
-     * Method to return a JSON compliant representation of this object.
-     * @return a JSON formatted string.
-     */
-    public String toJSONString();
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/json4j/JSONStringer.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/json4j/JSONStringer.java b/bbos/framework/ext/src/org/apache/cordova/json4j/JSONStringer.java
deleted file mode 100644
index 10fb7a8..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/json4j/JSONStringer.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.json4j;
-
-import java.io.IOException;
-
-import org.apache.cordova.json4j.internal.JSON4JStringWriter;
-
-/**
- * This class implements a JSONSringer, a basic convenience subclass of JSONWriter to allow for
- * generating JSON strings quickly.   This class exists for API compatibility to other popular
- * JSON parsers.
- */
-public class JSONStringer extends JSONWriter {
-
-    public JSONStringer() {
-        super(new JSON4JStringWriter());
-    }
-
-    /**
-     * Return a string of the stringer contents.  This also terminates the
-     * Stringer and it cannot be used again.  If any errors occur while trying to generate the JSON
-     * it returns an empty string.
-     */
-    public String toString() {
-        try {
-            super.flush();
-            super.close();
-            return ((JSON4JStringWriter)writer).toString();
-        } catch (Exception ex) {
-            /* Squelch */
-            return "";
-        }
-    }
-
-    /**
-     * Over-ride to do nothing for the stringer.  Only toString() terminates the stringer object.
-     */
-    public void close() throws IOException, IllegalStateException {
-        // Do nothing.
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/json4j/JSONWriter.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/json4j/JSONWriter.java b/bbos/framework/ext/src/org/apache/cordova/json4j/JSONWriter.java
deleted file mode 100644
index 1914f58..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/json4j/JSONWriter.java
+++ /dev/null
@@ -1,586 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.json4j;
-
-import java.io.IOException;
-import java.io.Writer;
-import java.util.Stack;
-
-import org.apache.cordova.json4j.internal.NumberUtil;
-
-/**
- * This class implements a JSONWrier, a convenience function for writing out JSON
- * to a writer or underlying stream.
- */
-public class JSONWriter {
-
-    /**
-     * The writer to use to output JSON in a semi-streaming fashion.
-     */
-    protected Writer writer = null;
-
-    /**
-     * Flag to denote that the writer is in an object.
-     */
-    private boolean inObject = false;
-
-    /**
-     * Flag to denote that the writer is in an array.
-     */
-    private boolean inArray = false;
-
-    /**
-     * Flag for state checking that a key was placed (if inside an object)
-     * Required to be true for a value to be placed in that situation
-     */
-    private boolean keyPlaced = false;
-
-    /**
-     * Flag denoting if in an array or object, if the first entry has been placed or not.
-     */
-    private boolean firstEntry = false;
-
-    /**
-     * A stack to keep track of all the closures.
-     */
-    private Stack closures = null;
-
-    /**
-     * Flag used to check the state of this writer, if it has been closed, all
-     * operations will throw an IllegalStateException.
-     */
-    private boolean closed = false;
-
-    /**
-     * Constructor.
-     * @param writer The writer to use to do 'streaming' JSON writing.
-     * @throws NullPointerException Thrown if writer is null.
-     */
-    public JSONWriter(Writer writer) throws NullPointerException {
-        //Try to avoid double-buffering or buffering in-memory writers.
-//        Class writerClass = writer.getClass();
-//        if (!StringWriter.class.isAssignableFrom(writerClass) &&
-//            !CharArrayWriter.class.isAssignableFrom(writerClass) &&
-//            !BufferedWriter.class.isAssignableFrom(writerClass)) {
-//            writer = new BufferedWriter(writer);
-//        }
-        this.writer = writer;
-        this.closures = new Stack();
-    }
-
-    /**
-     * Open a new JSON Array in the output stream.
-     * @throws IOException Thrown if an error occurs on the underlying writer.
-     * @throws IllegalstateException Thrown if the current writer position does not permit an array.
-     * @return A reference to this writer.
-     */
-    public JSONWriter array() throws IOException, IllegalStateException {
-        if (closed) {
-            throw new IllegalStateException("The writer has been closed.  No further operations allowed.");
-        }
-        if (inObject) {
-            if (!keyPlaced) {
-                throw new IllegalStateException("Current containment is a JSONObject, but a key has not been specified to contain a new array");
-            }
-        } else if (inArray) {
-            if (!firstEntry) {
-                writer.write(",");
-            }
-        }
-        writer.write("[");
-        inArray = true;
-        inObject = false;
-        keyPlaced = false;
-        firstEntry = true;
-        closures.push("]");
-        return this;
-    }
-
-    /**
-     * Method to close the current JSON Array in the stream.
-     * @throws IOException Thrown if an IO error occurs on the underlying writer.
-     * @throws IllegalStateException Thrown if the writer position is not inside an array.
-     * @return A reference to this writer.
-     */
-    public JSONWriter endArray() throws IOException {
-        if (closed) {
-            throw new IllegalStateException("The writer has been closed.  No further operations allowed.");
-        }
-        if (!inArray) {
-            throw new IllegalStateException("Current writer position is not within a JSON array");
-        } else {
-            writer.write(((String)closures.pop()));
-            // Set our current positional/control state.
-            if (!closures.isEmpty()) {
-                String nextClosure = (String)closures.peek();
-                if (nextClosure.equals("}")) {
-                    inObject = true;
-                    inArray = false;
-                } else {
-                    inObject = false;
-                    inArray = true;
-                }
-                firstEntry = false;
-            } else {
-                inArray = false;
-                inObject = false;
-                firstEntry = true;
-            }
-        }
-        return this;
-    }
-
-    /**
-     * Method to close a current JSON object in the stream.
-     * @throws IOException Thrown if an IO error occurs on the underlying writer.
-     * @throws IllegalStateException Thrown if the writer position is not inside an object, or if the object has a key placed, but no value.
-     * @return A reference to this writer.
-     */
-    public JSONWriter endObject() throws IOException, IllegalStateException {
-        if (closed) {
-            throw new IllegalStateException("The writer has been closed.  No further operations allowed.");
-        }
-        if (!inObject) {
-            throw new IllegalStateException("Current writer position is not within a JSON object");
-        } else {
-            if (keyPlaced) {
-                throw new IllegalStateException("Current writer position in an object and has a key placed, but no value has been assigned to the key.  Cannot end.");
-            } else {
-                writer.write((String)closures.pop());
-                // Set our current positional/control state.
-                if (!closures.isEmpty()) {
-                    String nextClosure = (String)closures.peek();
-                    if (nextClosure.equals("}")) {
-                        inObject = true;
-                        inArray = false;
-                    } else {
-                        inObject = false;
-                        inArray = true;
-                    }
-                    firstEntry = false;
-                } else {
-                    inArray = false;
-                    inObject = false;
-                    firstEntry = true;
-                }
-            }
-        }
-        return this;
-    }
-
-    /**
-     * Place a key in the current JSON Object.
-     * @throws IOException Thrown if an IO error occurs on the underlying writer.
-     * @throws IllegalStateException Thrown if the current writer position is not within an object.
-     * @return A reference to this writer.
-     */
-    public JSONWriter key(String s) throws IOException, IllegalStateException, NullPointerException {
-        if (closed) {
-            throw new IllegalStateException("The writer has been closed.  No further operations allowed.");
-        }
-        if (s == null) {
-            throw new NullPointerException("Key cannot be null");
-        } else {
-            if (!inObject) {
-                throw new IllegalStateException("Current writer position is not inside a JSON Object, a key cannot be placed.");
-            } else {
-                if (!keyPlaced) {
-                    if (firstEntry) {
-                        firstEntry = false;
-                    } else {
-                        writer.write(",");
-                    }
-                    keyPlaced = true;
-                    writeString(s);
-                    writer.write(":");
-                } else {
-                    throw new IllegalStateException("Current writer position is inside a JSON Object an with an open key waiting for a value.  Another key cannot be placed.");
-                }
-            }
-        }
-        return this;
-    }
-
-    /**
-     * Open a new JSON Object in the output stream.
-     * @throws IllegalStateException Thrown if an object cannot currently be created in the stream.
-     * @throws IOException Thrown if an IO error occurs in the underlying writer.
-     * @return A reference to this writer.
-     */
-    public JSONWriter object() throws IOException, IllegalStateException {
-        if (closed) {
-            throw new IllegalStateException("The writer has been closed.  No further operations allowed.");
-        }
-        if (inObject) {
-            if (!keyPlaced) {
-                throw new IllegalStateException("Current containment is a JSONObject, but a key has not been specified to contain a new object");
-            }
-        } else if (inArray) {
-            if (!firstEntry) {
-                writer.write(",");
-            }
-        }
-        writer.write("{");
-        inObject = true;
-        inArray = false;
-        keyPlaced = false;
-        firstEntry = true;
-        closures.push("}");
-        return this;
-    }
-
-    /**
-     * Method to write a boolean to the current writer position.
-     * @throws IOException Thrown if an IO error occurs on the underlying writer.
-     * @throws IllegalStateException Thrown if the current writer position will not accept a boolean value.
-     * @return A reference to this writer.
-     */
-    public JSONWriter value(boolean b) throws IOException, IllegalStateException {
-        if (closed) {
-            throw new IllegalStateException("The writer has been closed.  No further operations allowed.");
-        }
-        if (inArray) {
-            if (firstEntry) {
-                firstEntry = false;
-            } else {
-                writer.write(",");
-            }
-            if (b)
-                writer.write("true");
-            else
-                writer.write("false");
-
-        } else if (inObject) {
-            if (keyPlaced) {
-                if (b)
-                    writer.write("true");
-                else
-                    writer.write("false");
-                keyPlaced = false;
-            } else {
-                throw new IllegalStateException("Current containment is a JSONObject, but a key has not been specified for the boolean value.");
-            }
-        } else {
-            throw new IllegalStateException("Writer is currently not in an array or object, cannot write value");
-        }
-        return this;
-    }
-
-    /**
-     * Method to write a double to the current writer position.
-     * @param d The Double to write.
-     * @throws IOException Thrown if an IO error occurs on the underlying writer.
-     * @throws IllegalStateException Thrown if the current writer position will not accept a double value.
-     * @return A reference to this writer.
-     */
-    public JSONWriter value(double d) throws IOException, IllegalStateException {
-        if (closed) {
-            throw new IllegalStateException("The writer has been closed.  No further operations allowed.");
-        }
-        if (inArray) {
-            if (firstEntry) {
-                firstEntry = false;
-            } else {
-                writer.write(",");
-            }
-            writer.write(Double.toString(d));
-        } else if (inObject) {
-            if (keyPlaced) {
-                writer.write(Double.toString(d));
-                keyPlaced = false;
-            } else {
-                throw new IllegalStateException("Current containment is a JSONObject, but a key has not been specified for the double value.");
-            }
-        } else {
-            throw new IllegalStateException("Writer is currently not in an array or object, cannot write value");
-        }
-        return this;
-    }
-
-    /**
-     * Method to write a double to the current writer position.
-     * @param l The long to write.
-     * @throws IOException Thrown if an IO error occurs on the underlying writer.
-     * @throws IllegalStateException Thrown if the current writer position will not accept a double value.
-     * @return A reference to this writer.
-     */
-    public JSONWriter value(long l) throws IOException, IllegalStateException {
-        if (closed) {
-            throw new IllegalStateException("The writer has been closed.  No further operations allowed.");
-        }
-        if (inArray) {
-            if (firstEntry) {
-                firstEntry = false;
-            } else {
-                writer.write(",");
-            }
-            writer.write(Long.toString(l));
-        } else if (inObject) {
-            if (keyPlaced) {
-                writer.write(Long.toString(l));
-                keyPlaced = false;
-            } else {
-                throw new IllegalStateException("Current containment is a JSONObject, but a key has not been specified for the long value.");
-            }
-        } else {
-            throw new IllegalStateException("Writer is currently not in an array or object, cannot write value");
-        }
-        return this;
-    }
-
-    /**
-     * Method to write an int to the current writer position.
-     * @param i The int to write.
-     * @throws IOException Thrown if an IO error occurs on the underlying writer.
-     * @throws IllegalStateException Thrown if the current writer position will not accept a double value.
-     * @return A reference to this writer.
-     */
-    public JSONWriter value(int i) throws IOException, IllegalStateException {
-        if (closed) {
-            throw new IllegalStateException("The writer has been closed.  No further operations allowed.");
-        }
-        if (inArray) {
-            if (firstEntry) {
-                firstEntry = false;
-            } else {
-                writer.write(",");
-            }
-            writer.write(Integer.toString(i));
-        } else if (inObject) {
-            if (keyPlaced) {
-                writer.write(Integer.toString(i));
-                keyPlaced = false;
-            } else {
-                throw new IllegalStateException("Current containment is a JSONObject, but a key has not been specified for the int value.");
-            }
-        } else {
-            throw new IllegalStateException("Writer is currently not in an array or object, cannot write value");
-        }
-        return this;
-    }
-
-    /**
-     * Method to write a short to the current writer position.
-     * @param s The short to write.
-     * @throws IOException Thrown if an IO error occurs on the underlying writer.
-     * @throws IllegalStateException Thrown if the current writer position will not accept a double value.
-     * @return A reference to this writer.
-     */
-    public JSONWriter value(short s) throws IOException, IllegalStateException {
-        if (closed) {
-            throw new IllegalStateException("The writer has been closed.  No further operations allowed.");
-        }
-        if (inArray) {
-            if (firstEntry) {
-                firstEntry = false;
-            } else {
-                writer.write(",");
-            }
-            writer.write(Integer.toString(s));
-        } else if (inObject) {
-            if (keyPlaced) {
-                writer.write(Integer.toString(s));
-                keyPlaced = false;
-            } else {
-                throw new IllegalStateException("Current containment is a JSONObject, but a key has not been specified for the short value.");
-            }
-        } else {
-            throw new IllegalStateException("Writer is currently not in an array or object, cannot write value");
-        }
-        return this;
-    }
-
-    /**
-     * Method to write an Object to the current writer position.
-     * @param o The object to write.
-     * @throws IOException Thrown if an IO error occurs on the underlying writer.
-     * @throws JSONException Thrown if the object is not JSONAble.
-     * @return A reference to this writer.
-     */
-    public JSONWriter value(Object o) throws IOException, IllegalStateException, JSONException {
-        if (closed) {
-            throw new IllegalStateException("The writer has been closed.  No further operations allowed.");
-        }
-        if (inArray) {
-            if (firstEntry) {
-                firstEntry = false;
-            } else {
-                writer.write(",");
-            }
-            writeObject(o);
-        } else if (inObject) {
-            if (keyPlaced) {
-                writeObject(o);
-                keyPlaced = false;
-            } else {
-                throw new IllegalStateException("Current containment is a JSONObject, but a key has not been specified for the boolean value.");
-            }
-        } else {
-            throw new IllegalStateException("Writer is currently not in an array or object, cannot write value");
-        }
-        return this;
-    }
-
-    /**
-     * Method to close the JSON Writer.  All current object depths will be closed out and the writer closed.
-     * @throws IOException Thrown if an IO error occurs on the underlying writer.
-     * @throws IllegalStateException Thrown if the writer position is in an object and a key has been placed, but a value has not been assigned or if the writer was already closed.
-     */
-    public void close() throws IOException, IllegalStateException {
-        if (!closed) {
-            if (inObject && keyPlaced) {
-                throw new IllegalStateException("Object has key without value.  Cannot close.");
-            } else {
-                while (!closures.isEmpty()) {
-                    writer.write((String)closures.pop());
-                }
-                writer.flush();
-                writer.close();
-                closed = true;
-            }
-        }
-    }
-
-    /**
-     * Method to flush the underlying writer so that all buffered content, if any, is written out.
-     * @return A reference to this writer.
-     */
-    public JSONWriter flush() throws IOException {
-        writer.flush();
-        return this;
-    }
-
-    /**
-     * Method to write a String out to the writer, encoding special characters and unicode characters properly.
-     * @param value The string to write out.
-     * @throws IOException Thrown if an error occurs during write.
-     */
-    private void writeString(String value) throws IOException {
-        writer.write('"');
-        char[] chars = value.toCharArray();
-        for (int i=0; i<chars.length; i++) {
-            char c = chars[i];
-            switch (c) {
-                case  '"': writer.write("\\\""); break;
-                case '\\': writer.write("\\\\"); break;
-                case    0: writer.write("\\0"); break;
-                case '\b': writer.write("\\b"); break;
-                case '\t': writer.write("\\t"); break;
-                case '\n': writer.write("\\n"); break;
-                case '\f': writer.write("\\f"); break;
-                case '\r': writer.write("\\r"); break;
-                case '/': writer.write("\\/"); break;
-                default:
-                    if ((c >= 32) && (c <= 126)) {
-                        writer.write(c);
-                    } else {
-                        writer.write("\\u");
-                        writer.write(rightAlignedZero(Integer.toHexString(c),4));
-                    }
-            }
-        }
-        writer.write('"');
-    }
-
-    /**
-     * Method to generate a string with a particular width.  Alignment is done using zeroes if it does not meet the width requirements.
-     * @param s The string to write
-     * @param len The minimum length it should be, and to align with zeroes if length is smaller.
-     * @return A string properly aligned/correct width.
-     */
-    private String rightAlignedZero(String s, int len) {
-        if (len == s.length()) return s;
-        StringBuffer sb = new StringBuffer(s);
-        while (sb.length() < len) {
-            sb.insert(0, '0');
-        }
-        return sb.toString();
-    }
-
-    /**
-     * Method to write a number to the current writer.
-     * @param value The number to write to the JSON output string.
-     * @throws IOException Thrown if an error occurs during write.
-     */
-    private void writeNumber(Object value) throws IOException {
-        if (null == value) {
-            writeNull();
-        }
-        if (value instanceof Float) {
-            if (((Float)value).isNaN()) {
-                writeNull();
-            }
-            if (Float.NEGATIVE_INFINITY == ((Float)value).floatValue()) {
-                writeNull();
-            }
-            if (Float.POSITIVE_INFINITY == ((Float)value).floatValue()) {
-                writeNull();
-            }
-        }
-        if (value instanceof Double) {
-            if (((Double)value).isNaN()) {
-                writeNull();
-            }
-            if (Double.NEGATIVE_INFINITY == ((Double)value).doubleValue()) {
-                writeNull();
-            }
-            if (Double.POSITIVE_INFINITY == ((Double)value).doubleValue()) {
-                writeNull();
-            }
-        }
-        writer.write(value.toString());
-    }
-
-    /**
-     * Method to write an object to the current writer.
-     * @param o The object to write.
-     * @throws IOException Thrown if an IO error occurs on the underlying writer.
-     * @throws JSONException Thrown if the specified object is not JSONAble.
-     */
-    private void writeObject(Object o) throws IOException, JSONException {
-        // Handle the object!
-        if (o == null) {
-            writeNull();
-        } else {
-            Class clazz = o.getClass();
-            if (JSONArtifact.class.isAssignableFrom(clazz)) {
-                writer.write(((JSONArtifact)o).toString());
-            } else if (NumberUtil.isNumber(clazz)) {
-                writeNumber(o);
-            } else if (Boolean.class.isAssignableFrom(clazz)) {
-                writer.write(((Boolean)o).toString());
-            } else if (String.class.isAssignableFrom(clazz)) {
-                writeString((String)o);
-            } else if (JSONString.class.isAssignableFrom(clazz)) {
-                writer.write(((JSONString)o).toJSONString());
-            }// else {
-             //   // Unknown type, we'll just try to serialize it like a Java Bean.
-             //   writer.write(BeanSerializer.toJson(o, true).write());
-           // }
-        }
-    }
-
-    /**
-     * Method to write the text string 'null' to the output stream (null JSON object).
-     * @throws IOException Thrown if an error occurs during write.
-     */
-    private void writeNull() throws IOException {
-        writer.write("null");
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/json4j/internal/JSON4JNumber.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/json4j/internal/JSON4JNumber.java b/bbos/framework/ext/src/org/apache/cordova/json4j/internal/JSON4JNumber.java
deleted file mode 100644
index 99d244c..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/json4j/internal/JSON4JNumber.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.json4j.internal;
-
-public class JSON4JNumber {
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/json4j/internal/JSON4JPBackReader.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/json4j/internal/JSON4JPBackReader.java b/bbos/framework/ext/src/org/apache/cordova/json4j/internal/JSON4JPBackReader.java
deleted file mode 100644
index a2ed87b..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/json4j/internal/JSON4JPBackReader.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.json4j.internal;
-
-import java.io.IOException;
-import java.io.Reader;
-
-public class JSON4JPBackReader extends Reader {
-
-    private Reader _reader = null;
-
-    private int _lastChar = 0;
-
-    public JSON4JPBackReader(Reader reader) {
-        _reader = reader;
-    }
-
-    public void close() throws IOException {
-        _reader.close();
-    }
-
-    public void unread(int c) {
-    }
-
-    public int read(char[] cbuf, int off, int len) throws IOException {
-        cbuf[off] = (char)_lastChar;
-        _reader.read(cbuf, off + 1, len -1);
-        _lastChar = cbuf[off + len];
-        return 0;
-    }
-}


[08/15] CB-4228

Posted by lo...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/file/FileManager.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/file/FileManager.java b/bbos/framework/ext/src/org/apache/cordova/file/FileManager.java
deleted file mode 100644
index 55ea436..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/file/FileManager.java
+++ /dev/null
@@ -1,1051 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.file;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.util.Enumeration;
-
-import javax.microedition.io.Connector;
-import javax.microedition.io.file.FileConnection;
-import javax.microedition.io.file.FileSystemRegistry;
-
-import org.apache.cordova.api.Plugin;
-import org.apache.cordova.api.PluginResult;
-import org.apache.cordova.json4j.JSONArray;
-import org.apache.cordova.json4j.JSONException;
-import org.apache.cordova.json4j.JSONObject;
-import org.apache.cordova.util.FileUtils;
-import org.apache.cordova.util.Logger;
-
-import net.rim.device.api.io.Base64OutputStream;
-import net.rim.device.api.io.FileNotFoundException;
-import net.rim.device.api.io.MIMETypeAssociations;
-import net.rim.device.api.system.Application;
-
-public class FileManager extends Plugin {
-
-    /**
-     * File related errors.
-     */
-    public static int NOT_FOUND_ERR = 1;
-    public static int SECURITY_ERR = 2;
-    public static int ABORT_ERR = 3;
-    public static int NOT_READABLE_ERR = 4;
-    public static int ENCODING_ERR = 5;
-    public static int NO_MODIFICATION_ALLOWED_ERR = 6;
-    public static int INVALID_STATE_ERR = 7;
-    public static int SYNTAX_ERR = 8;
-    public static int INVALID_MODIFICATION_ERR = 9;
-    public static int QUOTA_EXCEEDED_ERR = 10;
-    public static int TYPE_MISMATCH_ERR = 11;
-    public static int PATH_EXISTS_ERR = 12;
-
-    /**
-     * File system for storing information on a temporary basis (no guaranteed persistence).
-     */
-    public static final short FS_TEMPORARY = 0;
-
-    /**
-     * File system for storing information on a permanent basis.
-     */
-    public static final short FS_PERSISTENT = 1;
-
-    /**
-     * Possible actions.
-     */
-    protected static String ACTION_READ_AS_TEXT = "readAsText";
-    protected static String ACTION_READ_AS_DATA_URL = "readAsDataURL";
-    protected static String ACTION_WRITE = "write";
-    protected static String ACTION_TRUNCATE = "truncate";
-    protected static String ACTION_REQUEST_FILE_SYSTEM = "requestFileSystem";
-    protected static String ACTION_RESOLVE_FILE_SYSTEM_URI = "resolveLocalFileSystemURI";
-    protected static String ACTION_GET_METADATA = "getMetadata";
-    protected static String ACTION_GET_FILE_METADATA = "getFileMetadata";
-    protected static String ACTION_LIST_DIRECTORY = "readEntries";
-    protected static String ACTION_COPY_TO = "copyTo";
-    protected static String ACTION_MOVE_TO = "moveTo";
-    protected static String ACTION_IS_FILE_SYSTEM_ROOT = "isFileSystemRoot";
-
-    /**
-     * Executes the requested action and returns a PluginResult.
-     *
-     * @param action
-     *            The action to execute.
-     * @param callbackId
-     *            The callback ID to be invoked upon action completion
-     * @param args
-     *            JSONArry of arguments for the action.
-     * @return A PluginResult object with a status and message.
-     */
-    public PluginResult execute(String action, JSONArray args, String callbackId) {
-        // perform specified action
-        if (ACTION_READ_AS_TEXT.equals(action)) {
-            // get file path
-            String filePath = null;
-            try {
-                filePath = args.getString(0);
-            }
-            catch (JSONException e) {
-                Logger.log(this.getClass().getName()
-                        + ": Invalid or missing path: " + e);
-                return new PluginResult(PluginResult.Status.JSON_EXCEPTION,
-                        SYNTAX_ERR);
-            }
-            return readAsText(filePath, args.optString(1));
-        }
-        else if (ACTION_READ_AS_DATA_URL.equals(action)) {
-            // get file path
-            String filePath = null;
-            try {
-                filePath = args.getString(0);
-            }
-            catch (JSONException e) {
-                Logger.log(this.getClass().getName()
-                        + ": Invalid or missing path: " + e);
-                return new PluginResult(PluginResult.Status.JSON_EXCEPTION,
-                        SYNTAX_ERR);
-            }
-            return readAsDataURL(filePath);
-        }
-        else if (ACTION_WRITE.equals(action)) {
-            // file path
-            String filePath = null;
-            try {
-                filePath = args.getString(0);
-            }
-            catch (JSONException e) {
-                Logger.log(this.getClass().getName()
-                        + ": Invalid or missing path: " + e);
-                return new PluginResult(PluginResult.Status.JSON_EXCEPTION,
-                        SYNTAX_ERR);
-            }
-
-            // file data
-            String data = null;
-            try {
-                data = args.getString(1);
-            }
-            catch (JSONException e) {
-                Logger.log(this.getClass().getName()
-                        + ": Unable to parse file data: " + e);
-                return new PluginResult(PluginResult.Status.JSON_EXCEPTION,
-                        SYNTAX_ERR);
-            }
-
-            // position
-            int position = 0;
-            try {
-                position = Integer.parseInt(args.optString(2));
-            }
-            catch (NumberFormatException e) {
-                Logger.log(this.getClass().getName()
-                        + ": Invalid position parameter: " + e);
-                return new PluginResult(
-                        PluginResult.Status.JSON_EXCEPTION,
-                        SYNTAX_ERR);
-            }
-            return writeFile(filePath, data, position);
-        }
-        else if (ACTION_TRUNCATE.equals(action)) {
-            // file path
-            String filePath = null;
-            try {
-                filePath = args.getString(0);
-            }
-            catch (JSONException e) {
-                Logger.log(this.getClass().getName()
-                        + ": Invalid or missing path: " + e);
-                return new PluginResult(PluginResult.Status.JSON_EXCEPTION,
-                        SYNTAX_ERR);
-            }
-
-            // file size
-            long fileSize = 0;
-            try {
-                // retrieve new file size
-                fileSize = Long.parseLong(args.getString(1));
-            }
-            catch (Exception e) {
-                Logger.log(this.getClass().getName()
-                        + ": Invalid file size parameter: " + e);
-                return new PluginResult(
-                        PluginResult.Status.JSON_EXCEPTION,
-                        SYNTAX_ERR);
-            }
-            return truncateFile(filePath, fileSize);
-        }
-        else if (ACTION_REQUEST_FILE_SYSTEM.equals(action)) {
-            int fileSystemType = -1;
-            long fileSystemSize = 0;
-            try {
-                fileSystemType = args.getInt(0);
-                fileSystemSize = (args.isNull(1) == true) ? 0 : args.getLong(1);
-            }
-            catch (JSONException e) {
-                Logger.log(this.getClass().getName()
-                        + ": Invalid file system type: " + e);
-                return new PluginResult(PluginResult.Status.JSON_EXCEPTION,
-                        SYNTAX_ERR);
-            }
-            return requestFileSystem(fileSystemType, fileSystemSize);
-        }
-        else if (ACTION_RESOLVE_FILE_SYSTEM_URI.equals(action)) {
-            String uri = null;
-            try {
-                uri = args.getString(0);
-            }
-            catch (JSONException e) {
-                Logger.log(this.getClass().getName()
-                        + ": Invalid or missing file URI: " + e);
-                return new PluginResult(PluginResult.Status.JSON_EXCEPTION,
-                        SYNTAX_ERR);
-            }
-            return resolveFileSystemURI(uri);
-        }
-        else if (ACTION_GET_METADATA.equals(action) || ACTION_GET_FILE_METADATA.equals(action)) {
-            String path = null;
-            try {
-                path = args.getString(0);
-            }
-            catch (JSONException e) {
-                Logger.log(this.getClass().getName()
-                        + ": Invalid or missing file URI: " + e);
-                return new PluginResult(PluginResult.Status.JSON_EXCEPTION,
-                        SYNTAX_ERR);
-            }
-            return getMetadata(path, ACTION_GET_FILE_METADATA.equals(action));
-        }
-        else if (ACTION_LIST_DIRECTORY.equals(action)) {
-            String path = null;
-            try {
-                path = args.getString(0);
-            }
-            catch (JSONException e) {
-                Logger.log(this.getClass().getName()
-                        + ": Invalid or missing path: " + e);
-                return new PluginResult(PluginResult.Status.JSON_EXCEPTION,
-                        SYNTAX_ERR);
-            }
-            return listDirectory(path);
-        }
-        else if (ACTION_COPY_TO.equals(action)) {
-            String srcPath = null;
-            String parent = null;
-            String newName = null;
-            try {
-                srcPath = args.getString(0);
-                parent = args.getString(1);
-                newName = args.getString(2);
-            }
-            catch (JSONException e) {
-                Logger.log(this.getClass().getName()
-                        + ": Invalid or missing path: " + e);
-                return new PluginResult(PluginResult.Status.JSON_EXCEPTION,
-                        SYNTAX_ERR);
-            }
-            return copyTo(srcPath, parent, newName);
-        }
-        else if (ACTION_MOVE_TO.equals(action)) {
-            String srcPath = null;
-            String parent = null;
-            String newName = null;
-            try {
-                srcPath = args.getString(0);
-                parent = args.getString(1);
-                newName = args.getString(2);
-            }
-            catch (JSONException e) {
-                Logger.log(this.getClass().getName()
-                        + ": Invalid or missing path: " + e);
-                return new PluginResult(PluginResult.Status.JSON_EXCEPTION,
-                        SYNTAX_ERR);
-            }
-            return moveTo(srcPath, parent, newName);
-        }
-        else if (ACTION_IS_FILE_SYSTEM_ROOT.equals(action)) {
-            return new PluginResult(PluginResult.Status.OK,
-                    isFileSystemRoot(args.optString(0)));
-        }
-
-        // invalid action
-        return new PluginResult(PluginResult.Status.INVALID_ACTION,
-                "File: invalid action " + action);
-    }
-
-    /**
-     * Reads a file and encodes the contents using the specified encoding.
-     *
-     * @param filePath
-     *            Full path of the file to be read
-     * @param encoding
-     *            Encoding to use for the file contents
-     * @return PluginResult containing encoded file contents or error code if
-     *         unable to read or encode file
-     */
-    protected static PluginResult readAsText(String filePath, String encoding) {
-        PluginResult result = null;
-        String logMsg = ": encoding file contents using " + encoding;
-
-        // read the file
-        try {
-            // return encoded file contents
-            byte[] blob = FileUtils.readFile(filePath, Connector.READ);
-            result = new PluginResult(PluginResult.Status.OK,
-                    new String(blob, encoding));
-        }
-        catch (FileNotFoundException e) {
-            logMsg = e.toString();
-            result = new PluginResult(PluginResult.Status.IO_EXCEPTION,
-                    NOT_FOUND_ERR);
-        }
-        catch (UnsupportedEncodingException e) {
-            logMsg = e.toString();
-            result = new PluginResult(PluginResult.Status.IO_EXCEPTION,
-                    ENCODING_ERR);
-        }
-        catch (IOException e) {
-            logMsg = e.toString();
-            result = new PluginResult(PluginResult.Status.IO_EXCEPTION,
-                    NOT_READABLE_ERR);
-        }
-        finally {
-            Logger.log(FileManager.class.getName() + ": " + logMsg);
-        }
-
-        return result;
-    }
-
-    /**
-     * Read file and return data as a base64 encoded data url. A data url is of
-     * the form: data:[<mediatype>][;base64],<data>
-     *
-     * @param filePath
-     *            Full path of the file to be read
-     * @return PluginResult containing the encoded file contents or an error
-     *         code if unable to read the file
-     */
-    protected static PluginResult readAsDataURL(String filePath) {
-        String data = null;
-        try {
-            // read file
-            byte[] blob = FileUtils.readFile(filePath, Connector.READ);
-
-            // encode file contents using BASE64 encoding
-            ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
-            Base64OutputStream base64OutputStream = new Base64OutputStream(
-                    byteArrayOutputStream);
-            base64OutputStream.write(blob);
-            base64OutputStream.flush();
-            base64OutputStream.close();
-            data = byteArrayOutputStream.toString();
-        }
-        catch (FileNotFoundException e) {
-            Logger.log(FileManager.class.getName() + ": " + e);
-            return new PluginResult(PluginResult.Status.IO_EXCEPTION,
-                    NOT_FOUND_ERR);
-        }
-        catch (IOException e) {
-            Logger.log(FileManager.class.getName() + ": " + e);
-            return new PluginResult(PluginResult.Status.IO_EXCEPTION,
-                    NOT_READABLE_ERR);
-        }
-
-        // put result in proper form
-        String mediaType = MIMETypeAssociations.getMIMEType(filePath);
-        if (mediaType == null) {
-            mediaType = "";
-        }
-        data = "data:" + mediaType + ";base64," + data;
-
-        return new PluginResult(PluginResult.Status.OK, data);
-    }
-
-    /**
-     * Writes data to the specified file.
-     *
-     * @param filePath
-     *            Full path of file to be written to
-     * @param data
-     *            Data to be written
-     * @param position
-     *            Position at which to begin writing
-     * @return PluginResult containing the number of bytes written or error code
-     *         if unable to write file
-     */
-    protected static PluginResult writeFile(String filePath, String data, int position) {
-        PluginResult result = null;
-        int bytesWritten = 0;
-        try {
-            // write file data
-            // The default String encoding on BB is ISO-8859-1 which causes
-            // issues with extended characters.  Force to UTF-8 to provide
-            // greater character support and match other platforms.
-            bytesWritten = FileUtils.writeFile(filePath, data.getBytes("UTF-8"), position);
-            result = new PluginResult(PluginResult.Status.OK, bytesWritten);
-        }
-        catch (SecurityException e) {
-            Logger.log(FileManager.class.getName() + ": " + e);
-            result = new PluginResult(PluginResult.Status.IO_EXCEPTION,
-                    NO_MODIFICATION_ALLOWED_ERR);
-        }
-        catch (IOException e) {
-            // it's not a security issue, so the directory path is either
-            // not fully created or a general error occurred
-            Logger.log(FileManager.class.getName() + ": " + e);
-            result = new PluginResult(PluginResult.Status.IO_EXCEPTION,
-                    NOT_FOUND_ERR);
-        }
-
-        return result;
-    }
-
-    /**
-     * Changes the length of the specified file. If shortening, data beyond new
-     * length is discarded.
-     *
-     * @param fileName
-     *            The full path of the file to truncate
-     * @param size
-     *            The size to which the length of the file is to be adjusted
-     * @return PluginResult containing new file size or an error code if an
-     *         error occurred
-     */
-    protected static PluginResult truncateFile(String filePath, long size) {
-        long fileSize = 0;
-        FileConnection fconn = null;
-        try {
-            fconn = (FileConnection) Connector.open(filePath,
-                    Connector.READ_WRITE);
-            if (!fconn.exists()) {
-                Logger.log(FileManager.class.getName() + ": path not found "
-                        + filePath);
-                return new PluginResult(PluginResult.Status.IO_EXCEPTION,
-                        NOT_FOUND_ERR);
-            }
-            if (size >= 0) {
-                fconn.truncate(size);
-            }
-            fileSize = fconn.fileSize();
-        }
-        catch (IOException e) {
-            Logger.log(FileManager.class.getName() + ": " + e);
-            return new PluginResult(PluginResult.Status.IO_EXCEPTION,
-                    NO_MODIFICATION_ALLOWED_ERR);
-        }
-        finally {
-            try {
-                if (fconn != null)
-                    fconn.close();
-            }
-            catch (IOException e) {
-                Logger.log(FileManager.class.getName() + ": " + e);
-            }
-        }
-        return new PluginResult(PluginResult.Status.OK, fileSize);
-    }
-
-    /**
-     * Returns a directory entry that represents the specified file system. The
-     * directory entry does not represent the root of the file system, but a
-     * directory within the file system that is writable. Users must provide the
-     * file system type, which can be one of FS_TEMPORARY or FS_PERSISTENT.
-     *
-     * @param type
-     *            The type of file system desired.
-     * @param size
-     *            The minimum size, in bytes, of space required
-     * @return a PluginResult containing a file system object for the specified
-     *         file system
-     */
-    protected static PluginResult requestFileSystem(int type, long size) {
-        if (!isValidFileSystemType(type)) {
-            Logger.log(FileManager.class.getName()
-                    + ": Invalid file system type: " + Integer.toString(type));
-            return new PluginResult(
-                    PluginResult.Status.JSON_EXCEPTION,
-                    SYNTAX_ERR);
-        }
-
-        PluginResult result = null;
-        String filePath = null;
-        switch (type) {
-        case FS_TEMPORARY:
-            // create application-specific temp directory
-            try {
-                filePath = FileUtils.createApplicationTempDirectory();
-            }
-            catch (IOException e) {
-                Logger.log(FileManager.class.getName() + ": " + e);
-                return new PluginResult(PluginResult.Status.IO_EXCEPTION,
-                        NO_MODIFICATION_ALLOWED_ERR);
-            }
-            break;
-        case FS_PERSISTENT:
-            // get a path to SD card (if present) or user directory (internal)
-            filePath = FileUtils.getFileSystemRoot();
-            break;
-        }
-
-        // create a file system entry from the path
-        Entry entry = null;
-        try {
-            // check the file system size
-            if (size > FileUtils.availableSize(filePath)) {
-                return new PluginResult(
-                        PluginResult.Status.IO_EXCEPTION,
-                        QUOTA_EXCEEDED_ERR);
-            }
-
-            entry = getEntryFromURI(filePath);
-        }
-        catch (Exception e) {
-            // bad path (not likely)
-            return new PluginResult(PluginResult.Status.IO_EXCEPTION,
-                    ENCODING_ERR);
-        }
-
-        try {
-            JSONObject fileSystem = new JSONObject();
-            fileSystem.put("name", getFileSystemName(type));
-            fileSystem.put("root", entry.toJSONObject());
-            result = new PluginResult(PluginResult.Status.OK, fileSystem);
-        }
-        catch (JSONException e) {
-            return new PluginResult(PluginResult.Status.JSON_EXCEPTION,
-                    "File system entry JSON conversion failed.");
-        }
-
-        return result;
-    }
-
-    /**
-     * Creates a file system entry object from the specified file system URI.
-     *
-     * @param uri
-     *            the full path to the file or directory on the file system
-     * @return a PluginResult containing the file system entry
-     */
-    protected static PluginResult resolveFileSystemURI(String uri) {
-        PluginResult result = null;
-        Entry entry = null;
-        try {
-            entry = getEntryFromURI(uri);
-        }
-        catch (IllegalArgumentException e) {
-            Logger.log(e.toString());
-            return new PluginResult(
-                    PluginResult.Status.JSON_EXCEPTION,
-                    ENCODING_ERR);
-        }
-
-        if (entry == null) {
-            result = new PluginResult(PluginResult.Status.IO_EXCEPTION,
-                    NOT_FOUND_ERR);
-        }
-        else {
-            result = new PluginResult(PluginResult.Status.OK,
-                    entry.toJSONObject());
-        }
-
-        return result;
-    }
-
-    /**
-     * Retrieve metadata for file or directory specified by path.
-     *
-     * @param path
-     *            full path name of the file or directory
-     * @param full
-     *            return full or partial meta data.
-     * @return PluginResult containing metadata for file system entry or an
-     *         error code if unable to retrieve metadata
-     */
-    protected static PluginResult getMetadata(String path, boolean full) {
-        PluginResult result = null;
-        FileConnection fconn = null;
-        try {
-            fconn = (FileConnection)Connector.open(path);
-            if (fconn.exists()) {
-                if (full) {
-                    JSONObject metadata = new JSONObject();
-                    metadata.put("size", fconn.fileSize());
-                    metadata.put("type",
-                            MIMETypeAssociations.getMIMEType(fconn.getURL()));
-                    metadata.put("name", fconn.getName());
-                    metadata.put("fullPath", fconn.getURL());
-                    metadata.put("lastModifiedDate", fconn.lastModified());
-                    result = new PluginResult(PluginResult.Status.OK, metadata);
-                } else {
-                    result = new PluginResult(PluginResult.Status.OK,
-                            fconn.lastModified());
-                }
-            }
-            else {
-                result = new PluginResult(PluginResult.Status.IO_EXCEPTION,
-                        NOT_FOUND_ERR);
-            }
-        }
-        catch (IllegalArgumentException e) {
-            // bad path
-            Logger.log(FileUtils.class.getName() + ": " + e);
-            result = new PluginResult(PluginResult.Status.IO_EXCEPTION,
-                    NOT_FOUND_ERR);
-        }
-        catch (IOException e) {
-            Logger.log(FileUtils.class.getName() + ": " + e);
-            result = new PluginResult(PluginResult.Status.IO_EXCEPTION,
-                    NOT_READABLE_ERR);
-        }
-        catch (JSONException e) {
-            result = new PluginResult(PluginResult.Status.JSON_EXCEPTION,
-                    "File system entry JSON conversion failed.");
-        }
-        finally {
-            try {
-                if (fconn != null) fconn.close();
-            }
-            catch (IOException ignored) {
-            }
-        }
-        return result;
-    }
-
-    private static JSONObject buildEntry(String dirPath, String filePath) throws JSONException {
-        JSONObject entry = new JSONObject();
-        boolean isDir = filePath.endsWith(FileUtils.FILE_SEPARATOR);
-
-        entry.put("isFile", !isDir);
-        entry.put("isDirectory", isDir);
-        entry.put("name", isDir ? filePath.substring(0, filePath.length()-1) : filePath);
-        entry.put("fullPath", dirPath + filePath);
-
-        return entry;
-    }
-
-    /**
-     * Returns a listing of the specified directory contents. Names of both
-     * files and directories are returned.
-     *
-     * @param path
-     *            full path name of directory
-     * @return PluginResult containing list of file and directory names
-     *         corresponding to directory contents
-     */
-    protected static PluginResult listDirectory(String path) {
-        Enumeration listing = null;
-        try {
-            listing = FileUtils.listDirectory(path);
-        }
-        catch (Exception e) {
-            // bad path
-            Logger.log(FileUtils.class.getName() + ": " + e);
-            return new PluginResult(PluginResult.Status.IO_EXCEPTION,
-                    NOT_FOUND_ERR);
-        }
-
-        try {
-            // pass directory contents back as an array of JSONObjects (entries)
-            JSONArray array = new JSONArray();
-            while (listing.hasMoreElements()) {
-                array.add(buildEntry(path, (String) listing.nextElement()));
-            }
-
-            return new PluginResult(PluginResult.Status.OK, array);
-        } catch (JSONException e) {
-            return new PluginResult(PluginResult.Status.JSON_EXCEPTION,
-                    "File system entry JSON conversion failed.");
-        }
-    }
-
-    /**
-     * Copies a file or directory to a new location. If copying a directory, the
-     * entire contents of the directory are copied recursively.
-     *
-     * @param srcPath
-     *            the full path of the file or directory to be copied
-     * @param parent
-     *            the full path of the target directory to which the file or
-     *            directory should be copied
-     * @param newName
-     *            the new name of the file or directory
-     * @return PluginResult containing an Entry object representing the new
-     *         entry, or an error code if an error occurs
-     */
-    protected static PluginResult copyTo(String srcPath, String parent, String newName) {
-        try {
-            FileUtils.copy(srcPath, parent, newName);
-        }
-        catch (IllegalArgumentException e) {
-            Logger.log(FileManager.class.getName() + ": " + e.getMessage());
-            return new PluginResult(
-                    PluginResult.Status.JSON_EXCEPTION, ENCODING_ERR);
-        }
-        catch (FileNotFoundException e) {
-            Logger.log(FileManager.class.getName() + ": " + e.getMessage());
-            return new PluginResult(
-                    PluginResult.Status.IO_EXCEPTION, NOT_FOUND_ERR);
-        }
-        catch (SecurityException e) {
-            Logger.log(FileManager.class.getName() + ": " + e.getMessage());
-            return new PluginResult(
-                    PluginResult.Status.IO_EXCEPTION, SECURITY_ERR);
-        }
-        catch (IOException e) {
-            Logger.log(FileManager.class.getName() + ": " + e.getMessage());
-            return new PluginResult(
-                    PluginResult.Status.IO_EXCEPTION, INVALID_MODIFICATION_ERR);
-        }
-
-        return resolveFileSystemURI(getFullPath(parent, newName));
-    }
-
-    /**
-     * Moves a file or directory to a new location. If moving a directory, the
-     * entire contents of the directory are moved recursively.
-     * <p>
-     * It is an error to try to: move a directory inside itself; move a
-     * directory into its parent unless the name has changed; move a file to a
-     * path occupied by a directory; move a directory to a path occupied by a
-     * file; move any element to a path occupied by a directory that is not
-     * empty.
-     * </p>
-     * <p>
-     * A move of a file on top of an existing file must attempt to delete and
-     * replace that file. A move of a directory on top of an existing empty
-     * directory must attempt to delete and replace that directory.
-     * </p>
-     *
-     * @param srcPath
-     *            the full path of the file or directory to be moved
-     * @param parent
-     *            the full path of the target directory to which the file or
-     *            directory should be copied
-     * @param newName
-     *            the new name of the file or directory
-     * @return PluginResult containing an Entry object representing the new
-     *         entry, or an error code if an error occurs
-     */
-    protected static PluginResult moveTo(String srcPath, String parent, String newName) {
-
-        // check paths
-        if (parent == null || newName == null) {
-            Logger.log(FileManager.class.getName() + ": Parameter cannot be null.");
-            return new PluginResult(
-                    PluginResult.Status.IO_EXCEPTION, NOT_FOUND_ERR);
-        }
-        else if (!parent.endsWith(FileUtils.FILE_SEPARATOR)) {
-            parent += FileUtils.FILE_SEPARATOR;
-        }
-
-        // Rules:
-        // 1 - file replace existing file ==> OK
-        // 2 - directory replace existing EMPTY directory ==> OK
-        // 3 - file replace existing directory ==> NO!
-        // 4 - directory replace existing file ==> NO!
-        // 5 - ANYTHING replace non-empty directory ==> NO!
-        //
-        // The file-to-directory and directory-to-file checks are performed in
-        // the copy operation (below). In addition, we check the destination
-        // path to see if it is a directory that is not empty. Also, if the
-        // source and target paths have the same parent directory, it is far
-        // more efficient to rename the source.
-        //
-        FileConnection src = null;
-        FileConnection dst = null;
-        try {
-            src = (FileConnection)Connector.open(srcPath, Connector.READ_WRITE);
-            if (!src.exists()) {
-                Logger.log(FileManager.class.getName() + ": Path not found: " + srcPath);
-                return new PluginResult(
-                        PluginResult.Status.IO_EXCEPTION, NOT_FOUND_ERR);
-            }
-
-            if (src.isDirectory() && !srcPath.endsWith(FileUtils.FILE_SEPARATOR)) {
-                // Rename of a directory on OS 7+ is quirky in that it requires
-                // the opened file path to have a trailing slash.
-                src.close();
-                src = (FileConnection)Connector.open(srcPath + '/', Connector.READ_WRITE);
-            }
-
-            // cannot delete the destination path if it is a directory that is
-            // not empty
-            dst = (FileConnection) Connector.open(parent + newName, Connector.READ_WRITE);
-            if (dst.isDirectory() && dst.list("*", true).hasMoreElements()) {
-                return new PluginResult(
-                        PluginResult.Status.IO_EXCEPTION, INVALID_MODIFICATION_ERR);
-            }
-
-            // simply rename if source path and parent are same directory
-            String srcURL = src.getURL();
-            String srcName = src.getName();
-            String srcDir = srcURL.substring(0, srcURL.length() - srcName.length());
-            if (srcDir.equals(parent)) {
-                // rename to itself is an error
-                if (FileUtils.stripSeparator(srcName).equals(
-                        FileUtils.stripSeparator(newName))) {
-                    return new PluginResult(PluginResult.Status.IO_EXCEPTION,
-                            INVALID_MODIFICATION_ERR);
-                }
-
-                // file replace file || directory replace directory ==> OK
-                // delete the existing entry
-                if (dst.exists() &&
-                        ( (src.isDirectory() && dst.isDirectory()) ||
-                          (!src.isDirectory() && !dst.isDirectory()) )) {
-                    dst.delete();
-                }
-
-                // rename
-                src.rename(newName);
-                Entry entry = getEntryFromURI(parent + newName);
-                return new PluginResult(PluginResult.Status.OK, entry.toJSONObject());
-            }
-        }
-        catch (IllegalArgumentException e) {
-            Logger.log(FileManager.class.getName() + ": " + e);
-            return new PluginResult(
-                    PluginResult.Status.JSON_EXCEPTION,
-                    ENCODING_ERR);
-        }
-        catch (IOException e) {
-            // rename failed
-            Logger.log(FileManager.class.getName() + ": " + e);
-            return new PluginResult(
-                    PluginResult.Status.IO_EXCEPTION,
-                    INVALID_MODIFICATION_ERR);
-        }
-        finally {
-            try {
-                if (src != null) src.close();
-                if (dst != null) dst.close();
-            }
-            catch (IOException ignored) {
-            }
-        }
-
-        // There is no FileConnection API to move files and directories, so
-        // the move is a copy operation from source to destination, followed by
-        // a delete operation of the source.
-        //
-        // The following checks are made in the copy operation:
-        //   * moving a directory into itself,
-        //   * moving a file to an existing directory, and
-        //   * moving a directory to an existing file
-        //
-        // copy source to destination
-        PluginResult result = copyTo(srcPath, parent, newName);
-
-        // if copy succeeded, delete source
-        if (result.getStatus() == PluginResult.Status.OK.ordinal()) {
-            try {
-                FileUtils.delete(srcPath);
-            }
-            catch (IOException e) {
-                // FIXME: half of move failed, but deleting either source or
-                // destination to compensate seems risky
-                Logger.log(FileManager.class.getName()
-                        + ": Failed to delete source directory during move operation.");
-            }
-        }
-        return result;
-    }
-
-    /**
-     * Creates a file system entry for the file or directory located at the
-     * specified path.
-     *
-     * @param filePath
-     *            full path name of an entry on the file system
-     * @return a file system entry corresponding to the file path, or
-     *         <code>null</code> if the path is invalid or does not exist on the
-     *         file system
-     * @throws IllegalArgumentException
-     *             is the file path is invalid
-     * @throws IOException
-     */
-    protected static Entry getEntryFromURI(String filePath)
-            throws IllegalArgumentException {
-        // check for bogus path
-        String path = (filePath == null) ? null : filePath.trim();
-        if (path == null || path.length() < 1) {
-            throw new IllegalArgumentException("Invalid URI.");
-        }
-
-        //check for query string
-        int queryIndex = filePath.indexOf('?');
-        if (queryIndex > 0) {
-            path = filePath.substring(0, queryIndex); // discard the query string
-            Logger.log(FileManager.class.getName() + ": found query string when resolving URI = " + filePath.substring(queryIndex));
-        }
-
-        // create a file system entry
-        Entry entry = null;
-        if (path.startsWith(FileUtils.LOCAL_PROTOCOL)) {
-            entry = getEntryFromLocalURI(filePath);
-        }
-        else {
-            FileConnection fconn = null;
-            try {
-                fconn = (FileConnection) Connector.open(path);
-                if (fconn.exists()) {
-                    // create a new Entry
-                    entry = new Entry();
-                    entry.setDirectory(fconn.isDirectory());
-                    entry.setName(FileUtils.stripSeparator(fconn.getName()));
-                    entry.setFullPath(FileUtils.stripSeparator(path));
-                }
-            }
-            catch (IOException e) {
-                Logger.log(FileManager.class.getName() + ": " + e.getMessage());
-            }
-            finally {
-                try {
-                    if (fconn != null) fconn.close();
-                }
-                catch (IOException ignored) {
-                }
-            }
-        }
-
-        return entry;
-    }
-
-    /**
-     * Creates a file system entry for a resource contained in the packaged
-     * application. Use this method if the specified path begins with
-     * <code>local:///</code> protocol.
-     *
-     * @param localPath
-     *            the path of the application resource
-     * @return a file system entry corresponding to the local path, or
-     *         <code>null</code> if a resource does not exist at the specified
-     *         path
-     */
-    private static Entry getEntryFromLocalURI(String localPath) {
-        // Remove local:// from filePath but leave a leading /
-        String path = localPath.substring(8);
-        Entry entry = null;
-        if (FileUtils.FILE_SEPARATOR.equals(path)
-                || Application.class.getResourceAsStream(path) != null) {
-            entry = new Entry();
-            entry.setName(path.substring(1));
-            entry.setFullPath(localPath);
-        }
-        return entry;
-    }
-
-    /**
-     * Tests whether the specified file system type is valid.
-     *
-     * @param type
-     *            file system type
-     * @return true if file system type is valid
-     */
-    protected static boolean isValidFileSystemType(int type) {
-        return (type == FS_TEMPORARY || type == FS_PERSISTENT);
-    }
-
-    /**
-     * Determines if the specified path is the root path of a file system.
-     *
-     * @param path
-     *            full path
-     * @return true if the path is the root path of a file system
-     */
-    protected static boolean isFileSystemRoot(String path) {
-        if (path == null) {
-            return false;
-        }
-
-        if (!path.endsWith(FileUtils.FILE_SEPARATOR)) {
-            path += FileUtils.FILE_SEPARATOR;
-        }
-
-        boolean isRoot = false;
-        Enumeration e = FileSystemRegistry.listRoots();
-        while (e.hasMoreElements()) {
-            String root = "file:///" + (String) e.nextElement();
-            if (root.equals(path)) {
-                isRoot = true;
-                break;
-            }
-        }
-
-        return (isRoot || path.equals(FileUtils.getApplicationTempDirPath()));
-    }
-
-    /**
-     * Retrieves the name for the specified file system type.
-     *
-     * @param type
-     *            file system type
-     * @return file system name
-     */
-    protected static String getFileSystemName(int type) {
-        String name = null;
-        switch (type) {
-        case FS_TEMPORARY:
-            name = "temporary";
-            break;
-        case FS_PERSISTENT:
-            name = "persistent";
-            break;
-        }
-        return name;
-    }
-
-    /**
-     * Returns full path from the directory and name specified.
-     *
-     * @param parent
-     *            full path of the parent directory
-     * @param name
-     *            name of the directory entry (can be <code>null</code>)
-     * @return full path of the file system entry
-     * @throws IllegalArgumentException
-     *             if <code>parent</code> is <code>null</code>
-     */
-    public static String getFullPath(String parent, String name)
-            throws IllegalArgumentException {
-        if (parent == null) {
-            throw new IllegalArgumentException("Directory cannot be null.");
-        }
-
-        if (!parent.endsWith(FileUtils.FILE_SEPARATOR)) {
-            parent += FileUtils.FILE_SEPARATOR;
-        }
-        return (name == null) ? parent : parent + name;
-    }
-
-    /**
-     * Determines if the specified action should be run synchronously.
-     *
-     * @param action
-     *            the action to perform
-     * @return true if the action should be synchronous
-     */
-    public boolean isSynch(String action) {
-        if (ACTION_IS_FILE_SYSTEM_ROOT.equals(action)) {
-            return true;
-        }
-        return super.isSynch(action);
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/geolocation/Geolocation.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/geolocation/Geolocation.java b/bbos/framework/ext/src/org/apache/cordova/geolocation/Geolocation.java
deleted file mode 100644
index 1226f48..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/geolocation/Geolocation.java
+++ /dev/null
@@ -1,372 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.geolocation;
-
-import java.util.Date;
-import java.util.Enumeration;
-import java.util.Hashtable;
-
-import javax.microedition.location.Criteria;
-import javax.microedition.location.Location;
-import javax.microedition.location.LocationException;
-import javax.microedition.location.LocationProvider;
-
-import org.apache.cordova.CordovaExtension;
-import org.apache.cordova.api.Plugin;
-import org.apache.cordova.api.PluginResult;
-import org.apache.cordova.json4j.JSONArray;
-import org.apache.cordova.json4j.JSONException;
-import org.apache.cordova.json4j.JSONObject;
-import org.apache.cordova.util.Logger;
-
-import net.rim.device.api.gps.BlackBerryCriteria;
-import net.rim.device.api.gps.BlackBerryLocationProvider;
-import net.rim.device.api.gps.GPSInfo;
-
-public class Geolocation extends Plugin {
-
-	/**
-	 * Possible actions.
-	 */
-	protected static final int ACTION_WATCH = 0;
-	protected static final int ACTION_CLEAR_WATCH = 1;
-	protected static final int ACTION_GET_POSITION = 2;
-	protected static final int ACTION_SHUTDOWN = 3;
-
-	/**
-	 * Callback ID argument index.
-	 */
-	protected static final int ARG_CALLBACK_ID = 0;
-
-	/**
-	 * Minimum GPS accuracy (meters).
-	 */
-	protected static final float MIN_GPS_ACCURACY = 10F; // meters
-
-	/**
-	 * Hash of all the listeners created, keyed on callback ids.
-	 */
-	protected final Hashtable geoListeners;
-
-	/**
-	 * Constructor.
-	 */
-	public Geolocation() {
-		this.geoListeners = new Hashtable();
-	}
-
-	/**
-	 * Executes the specified geolocation action.
-	 *
-	 * @param action
-	 * 	  "getCurrentPosition" - Retrieves current location.
-	 * 	  "watchPosition"      - Establishes a location provider that is keyed on specified position options
-	 *                           and attaches a listener that notifies registered callbacks of location updates.
-	 *    "stop"               - Clears the watch identified by the watch ID that must be specified in args.
-	 *    "shutdown"           - Stops all listeners and resets all location providers.
-	 * @param callbackId callback managed by the plugin manager (ignored)
-	 * @param args contains the callback id and position options
-	 */
-	public PluginResult execute(String action, JSONArray args,  String callbackId) {
-
-		/*
-		 * The geolocation plugin bypasses the plugin callback framework for
-		 * success callbacks because the current implementation of the framework
-		 * deletes the callbacks after they have been called.  The geolocation
-		 * listener callbacks need to continue listening for location changes,
-		 * and are therefore managed separately from the plugin framework.
-		 *
-		 * This means the invoking script must pass the listener callback ID in
-		 * the args parameter (along with the position options).  The callbackId
-		 * parameter (used by the plugin framework) is ignored.
-		 *
-		 * The invoking script should still provide a failure callback so the
-		 * plugin framework can handle general error reporting.
-		 */
-		String listenerCallbackId;
-		try {
-			listenerCallbackId = args.getString(ARG_CALLBACK_ID);
-		} catch (JSONException e) {
-			return new PluginResult(PluginResult.Status.JSON_EXCEPTION, "Callback ID argument is not valid.");
-		}
-
-		if (!GPSInfo.isGPSModeAvailable(GPSInfo.GPS_DEVICE_INTERNAL)){
-			return new PluginResult(GeolocationStatus.GPS_NOT_AVAILABLE);
-		}
-
-		PositionOptions options;
-		switch (getAction(action)) {
-			case ACTION_CLEAR_WATCH:
-				clearWatch(listenerCallbackId);
-				return null;
-
-			case ACTION_WATCH:
-
-				try {
-					options = PositionOptions.fromJSONArray(args);
-				} catch (NumberFormatException e) {
-					return new PluginResult(PluginResult.Status.JSON_EXCEPTION, "One of the position options is not a valid number.");
-				} catch (JSONException e) {
-					return new PluginResult(PluginResult.Status.JSON_EXCEPTION, "One of the position options is not valid JSON.");
-				}
-
-				this.watchPosition(listenerCallbackId, options);
-				return null;
-
-			case ACTION_GET_POSITION:
-
-				try {
-					options = PositionOptions.fromJSONArray(args);
-				} catch (NumberFormatException e) {
-					return new PluginResult(PluginResult.Status.JSON_EXCEPTION, "One of the position options is not a valid number.");
-				} catch (JSONException e) {
-					return new PluginResult(PluginResult.Status.JSON_EXCEPTION, "One of the position options is not valid JSON.");
-				}
-
-				this.getCurrentPosition(listenerCallbackId, options);
-				return null;
-
-			case ACTION_SHUTDOWN:
-				this.shutdown();
-				return null;
-		}
-
-		return new PluginResult(PluginResult.Status.INVALID_ACTION, "Geolocation: invalid action " + action);
-	}
-
-	/**
-	 * Checks if the provided location is valid.
-	 * @param location
-	 * @return true if the location is valid
-	 */
-	protected boolean isLocationValid(Location location) {
-		return location != null && location.isValid();
-	}
-
-	/**
-	 * Checks if the provided location is fresh or not.
-	 * @param po           position options containing maximum location age allowed
-	 * @param location     location object
-	 * @return true if the location is newer than maximum age allowed
-	 */
-	protected boolean isLocationFresh(PositionOptions po, Location location) {
-		return new Date().getTime() - location.getTimestamp() < po.maxAge;
-	}
-
-	/**
-	 * Checks if the accuracy of the location is high enough.
-	 * @param po           position options containing high accuracy flag
-	 * @param location     location object
-	 * @return true if the location accuracy is lower than MIN_GPS_ACCURACY
-	 */
-	protected boolean isLocationAccurate(PositionOptions po, Location location) {
-		return po.enableHighAccuracy && location.getQualifiedCoordinates().getHorizontalAccuracy() < MIN_GPS_ACCURACY;
-	}
-
-	/**
-	 * Retrieves a location provider with some criteria.
-	 * @param po position options
-	 */
-	protected static LocationProvider getLocationProvider(PositionOptions po) {
-		// configure criteria for location provider
-		// Note: being too restrictive will make it less likely that one will be returned
-		BlackBerryCriteria criteria = new BlackBerryCriteria();
-
-		// can we get GPS info from the wifi network?
-		if (GPSInfo.isGPSModeAvailable(GPSInfo.GPS_MODE_ASSIST))
-			criteria.setMode(GPSInfo.GPS_MODE_ASSIST);
-		// relies on device GPS receiver - not good indoors or if obstructed
-		else if (GPSInfo.isGPSModeAvailable(GPSInfo.GPS_MODE_AUTONOMOUS))
-			criteria.setMode(GPSInfo.GPS_MODE_AUTONOMOUS);
-
-		criteria.setAltitudeRequired(true);
-
-		// enable full power usage to increase location accuracy
-		if (po.enableHighAccuracy) {
-			criteria.setPreferredPowerConsumption(Criteria.POWER_USAGE_HIGH);
-		}
-
-		// Attempt to get a location provider
-		BlackBerryLocationProvider provider;
-		try {
-			// Note: this could return an existing provider that meets above criteria
-			provider  = (BlackBerryLocationProvider) LocationProvider.getInstance(criteria);
-		} catch (LocationException e) {
-			// all LocationProviders are currently permanently unavailable :(
-			provider = null;
-		}
-
-		return provider;
-	}
-
-    /**
-     * Gets the current location, then creates a location listener to receive
-     * updates. Registers the specified callback with the listener.
-     * @param callbackId   callback to receive location updates
-     * @param options      position options
-     */
-    protected void watchPosition(String callbackId, PositionOptions options) {
-
-        // attempt to retrieve a location provider
-        LocationProvider provider = getLocationProvider(options);
-        if (provider == null) {
-            CordovaExtension.invokeErrorCallback(callbackId,
-                    new GeolocationResult(GeolocationStatus.GPS_NOT_AVAILABLE));
-            return;
-        }
-
-        // create a listener for location updates
-        GeolocationListener listener;
-        try {
-            listener = new GeolocationListener(provider, callbackId, options);
-        } catch (IllegalArgumentException e) {
-            // if 	interval < -1, or
-            // if 	(interval != -1) and
-            //		(timeout > interval or maxAge > interval or
-            //			(timeout < 1 and timeout != -1) or
-            //			(maxAge < 1 and maxAge != -1)
-            //		)
-            CordovaExtension.invokeErrorCallback(callbackId,
-                    new GeolocationResult(GeolocationStatus.GPS_JSON_EXCEPTION, e.getMessage()));
-            return;
-        }
-
-        // store the listener
-        addListener(callbackId, listener);
-    }
-
-    /**
-     * Shuts down all location listeners.
-     */
-    protected synchronized void shutdown() {
-        for (Enumeration listeners = this.geoListeners.elements(); listeners.hasMoreElements(); ) {
-            GeolocationListener listener = (GeolocationListener) listeners.nextElement();
-            listener.shutdown();
-        }
-        this.geoListeners.clear();
-    }
-
-	/**
-	 * Clears the watch for the specified callback id.
-	 * If no more watches exist for the location provider, it is shut down.
-	 * @param callbackId   identifer of the listener to shutdown
-	 */
-    protected void clearWatch(String callbackId) {
-        synchronized(this.geoListeners) {
-            GeolocationListener listener = (GeolocationListener) this.geoListeners.get(callbackId);
-            listener.shutdown();
-            this.geoListeners.remove(callbackId);
-        }
-    }
-
-    /**
-     * Returns a PluginResult with status OK and a JSON object representing the coords
-     * @param callbackId   callback to receive the the result
-     * @param po           position options
-     */
-    protected void getCurrentPosition(String callbackId, PositionOptions options) {
-
-        // Check the device for its last known location (may have come from
-        // another app on the device that has already requested a location).
-        // If it is invalid, old, or inaccurate, attempt to get a new one.
-        Location location = LocationProvider.getLastKnownLocation();
-        if (!isLocationValid(location) || !isLocationFresh(options, location) || !isLocationAccurate(options, location)) {
-            // attempt to retrieve a location provider
-            LocationProvider provider = getLocationProvider(options);
-            if (provider == null) {
-                CordovaExtension.invokeErrorCallback(callbackId,
-                        new GeolocationResult(GeolocationStatus.GPS_NOT_AVAILABLE));
-                return;
-            }
-
-            try {
-                // convert timeout from millis
-                int timeout = (options.timeout > 0) ? options.timeout/1000 : -1;
-                Logger.log(this.getClass().getName() + ": retrieving location with timeout=" + timeout);
-                location = provider.getLocation(timeout);
-            } catch(LocationException e) {
-                Logger.log(this.getClass().getName() + ": " + e.getMessage());
-                provider.reset();
-                CordovaExtension.invokeErrorCallback(callbackId,
-                        new GeolocationResult(GeolocationStatus.GPS_TIMEOUT));
-                return;
-            } catch (InterruptedException e) {
-                Logger.log(this.getClass().getName() + ": " + e.getMessage());
-                provider.reset();
-                CordovaExtension.invokeErrorCallback(callbackId,
-                        new GeolocationResult(GeolocationStatus.GPS_INTERUPTED_EXCEPTION));
-                return;
-            }
-        }
-
-        // send the location back
-        sendLocation(callbackId, location);
-    }
-
-    /**
-     * Converts the location to a geo position and sends result to JavaScript.
-     * @param callbackId   callback to receive position
-     * @param location     location to send
-     */
-    protected void sendLocation(String callbackId, Location location) {
-        // convert the location to a JSON object and return it in the PluginResult
-        JSONObject position = null;
-        try {
-            position = Position.fromLocation(location).toJSONObject();
-        } catch (JSONException e) {
-            CordovaExtension.invokeErrorCallback(callbackId,
-                    new GeolocationResult(PluginResult.Status.JSON_EXCEPTION,
-                    "Converting the location to a JSON object failed"));
-            return;
-        }
-
-        // invoke the geolocation callback
-        CordovaExtension.invokeSuccessCallback(callbackId,
-                new GeolocationResult(GeolocationResult.Status.OK, position));
-    }
-
-	/**
-	 * Returns action to perform.
-	 * @param action
-	 * @return action to perform
-	 */
-	protected static int getAction(String action) {
-		if ("watchPosition".equals(action)) return ACTION_WATCH;
-		if ("stop".equals(action)) return ACTION_CLEAR_WATCH;
-		if ("getCurrentPosition".equals(action)) return ACTION_GET_POSITION;
-		if ("shutdown".endsWith(action)) return ACTION_SHUTDOWN;
-		return -1;
-	}
-
-    /**
-     * Adds a location listener.
-     * @param callbackId    callback to receive listener updates
-     * @param listener      location listener
-     */
-    protected synchronized void addListener(String callbackId, GeolocationListener listener) {
-        this.geoListeners.put(callbackId, listener);
-    }
-
-    /**
-     * Called when Plugin is destroyed.
-     */
-    public void onDestroy() {
-        this.shutdown();
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/geolocation/GeolocationListener.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/geolocation/GeolocationListener.java b/bbos/framework/ext/src/org/apache/cordova/geolocation/GeolocationListener.java
deleted file mode 100644
index 58ef4f0..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/geolocation/GeolocationListener.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.geolocation;
-
-import javax.microedition.location.Location;
-import javax.microedition.location.LocationListener;
-import javax.microedition.location.LocationProvider;
-
-import org.apache.cordova.CordovaExtension;
-import org.apache.cordova.api.PluginResult;
-import org.apache.cordova.json4j.JSONException;
-import org.apache.cordova.json4j.JSONObject;
-import org.apache.cordova.util.Logger;
-
-/**
- * GeolocationListener listens for update notifications from a LocationProvider.
- * Provides location update notifications to registered callback.
- */
-public final class GeolocationListener implements LocationListener {
-
-	private LocationProvider locationProvider;  // location provider the listener listens to
-	private String callbackId;                  // callback that is to be notified on location updates
-
-	/**
-	 * Creates a new listener that attaches itself to the specified LocationProvider.
-	 * @param locationProvider location provider that listener will attach to
-	 * @param callbackId       callback to receive location updates
-	 * @param options          position options
-	 */
-	public GeolocationListener(LocationProvider locationProvider, String callbackId, PositionOptions options) {
-	    this.locationProvider = locationProvider;
-	    this.callbackId = callbackId;
-
-	    // Add this as a location listener to the provider.  Updates are received
-	    // at the specified interval.  This is where it gets confusing:
-	    // the setLocationListener method takes three parameters: interval, timeout,
-	    // and maxAge.  The listener only seems to work if all three are the same
-	    // value, which is probably best, since neither timeout nor maxAge can be
-	    // larger than interval.  Also, the actual timeout to wait for a valid
-	    // location is [interval + timeout]. (I told you it was confusing).
-	    // So, we do the only thing we can do, which is to divide the user timeout
-	    // in half, and set it to the interval and timeout values.  This will give
-	    // us the correct timeout value. BTW, this is exactly what RIM does in
-	    // their HTML5 implementation in the 6.0 browser.  Try it :)
-        int seconds = (options.timeout > 0) ? options.timeout/2000 : 1; // half and convert to millis
-	    this.locationProvider.setLocationListener(this,
-	            seconds,     // interval - seconds between location updates
-	            seconds,     // timeout - additional time to wait for update
-	            seconds);    // maxage - maximum age of location
-	}
-
-    /**
-     * Updated when location changes.
-     */
-    public void locationUpdated(LocationProvider provider, Location location) {
-        if (location.isValid()) {
-            Logger.log(this.getClass().getName() + ": updated with valid location");
-            this.updateLocation(location);
-        } else {
-            // This just means we couldn't get a valid location within the listener interval.
-            Logger.log(this.getClass().getName() + ": updated with invalid location");
-            CordovaExtension.invokeErrorCallback(callbackId,
-                    new GeolocationResult(GeolocationStatus.GPS_TIMEOUT));
-        }
-    }
-
-	/**
-	 * Updated when provider state changes.
-	 */
-    public void providerStateChanged(LocationProvider provider, int newState) {
-        switch (newState) {
-        case LocationProvider.AVAILABLE:
-            Logger.log(this.getClass().getName() + ": provider state changed to AVAILABLE");
-            break;
-        case LocationProvider.OUT_OF_SERVICE:
-            Logger.log(this.getClass().getName() + ": provider state changed to OUT_OF_SERVICE");
-            CordovaExtension.invokeErrorCallback(callbackId,
-                    new GeolocationResult(GeolocationStatus.GPS_OUT_OF_SERVICE));
-            this.shutdown();
-            break;
-        case LocationProvider.TEMPORARILY_UNAVAILABLE:
-            Logger.log(this.getClass().getName() + ": provider state changed to TEMPORARILY_UNAVAILABLE");
-            // This is what happens when you are inside
-            // TODO: explore possible ways to recover
-            CordovaExtension.invokeErrorCallback(callbackId,
-                    new GeolocationResult(GeolocationStatus.GPS_TEMPORARILY_UNAVAILABLE));
-            this.shutdown();
-            break;
-        }
-    }
-
-    /**
-     * Shuts down the listener by resetting the location provider.
-     */
-	public void shutdown() {
-		Logger.log(this.getClass().getName() + ": resetting location provider for callback '" + callbackId + "'");
-		this.locationProvider.setLocationListener(null, 0, 0, 0);
-		this.locationProvider.reset();
-	}
-
-	/**
-	 * Notifies callbacks of location updates.
-	 * @param location updated location
-	 */
-	protected void updateLocation(Location location) {
-		JSONObject position = null;
-		try {
-			position = Position.fromLocation(location).toJSONObject();
-		} catch (JSONException e) {
-			CordovaExtension.invokeErrorCallback(callbackId,
-				new GeolocationResult(PluginResult.Status.JSON_EXCEPTION, "Converting the location to a JSON object failed"));
-		}
-
-		CordovaExtension.invokeSuccessCallback(callbackId,
-			new GeolocationResult(GeolocationStatus.OK, position));
-	}
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/geolocation/GeolocationResult.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/geolocation/GeolocationResult.java b/bbos/framework/ext/src/org/apache/cordova/geolocation/GeolocationResult.java
deleted file mode 100644
index 9969701..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/geolocation/GeolocationResult.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.geolocation;
-
-import org.apache.cordova.api.PluginResult;
-import org.apache.cordova.json4j.JSONObject;
-import org.apache.cordova.util.Logger;
-
-/**
- * Extends PluginResult for the purposes of overriding the success and error
- * callback invocations.
- */
-public class GeolocationResult extends PluginResult {
-
-	/**
-	 * Constructor.
-	 * @param status
-	 */
-	public GeolocationResult(Status status) {
-		super(status);
-	}
-
-	/**
-	 * Constructor.
-	 * @param status
-	 * @param message
-	 */
-	public GeolocationResult(Status status, String message) {
-		super(status, message);
-	}
-
-	/**
-	 * Constructor.
-	 * @param status
-	 * @param message
-	 */
-	public GeolocationResult(Status status, JSONObject message) {
-		super(status, message);
-	}
-
-	/**
-	 * Produces the invocation string for the specified geolocation success callback.
-	 * @param callbackId callback identifier
-	 */
-	public String toSuccessCallbackString(String callbackId) {
-		Logger.log(this.getClass().getName() + ": invoking success callback: " + callbackId + ", with args: " + this.getJSONString());
-		return "try { navigator.geolocation.success('"+callbackId+"', " + this.getJSONString() + "); } catch(e) { alert('error in success callback:' + e.message); }";
-	}
-
-	/**
-	 * Produces the invocation string for the specified geolocation error callback.
-	 * @param callbackId callback identifier
-	 */
-	public String toErrorCallbackString(String callbackId) {
-		return "try { navigator.geolocation.fail('"+callbackId+"', " + this.getJSONString() + "); } catch(e) { alert('error in error callback:' + e.message); }";
-	}
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/geolocation/GeolocationStatus.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/geolocation/GeolocationStatus.java b/bbos/framework/ext/src/org/apache/cordova/geolocation/GeolocationStatus.java
deleted file mode 100644
index 4c70a10..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/geolocation/GeolocationStatus.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.geolocation;
-
-import org.apache.cordova.api.PluginResult;
-
-public class GeolocationStatus extends PluginResult.Status {
-
-	protected GeolocationStatus(int status, String message) {
-		super(status, message);
-	}
-
-	public static final GeolocationStatus GPS_NOT_AVAILABLE = new GeolocationStatus(101, "GPS not available");
-	public static final GeolocationStatus GPS_OUT_OF_SERVICE = new GeolocationStatus(102, "GPS out of service");
-	public static final GeolocationStatus GPS_TEMPORARILY_UNAVAILABLE = new GeolocationStatus(103, "GPS temporarily unavailable");
-	public static final GeolocationStatus GPS_TIMEOUT = new GeolocationStatus(104, "GPS location acquisition timed out");
-	public static final GeolocationStatus GPS_INTERUPTED_EXCEPTION = new GeolocationStatus(105, "GPS location acquisition interrupted");
-	public static final GeolocationStatus GPS_INVALID_LOCATION = new GeolocationStatus(106, "GPS returned an invalid location");
-	public static final GeolocationStatus GPS_JSON_EXCEPTION = new GeolocationStatus(107, "An illegal argument was passed to the location listener");
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/geolocation/Position.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/geolocation/Position.java b/bbos/framework/ext/src/org/apache/cordova/geolocation/Position.java
deleted file mode 100644
index 6ce490e..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/geolocation/Position.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.geolocation;
-
-import javax.microedition.location.Location;
-
-import org.apache.cordova.json4j.JSONException;
-import org.apache.cordova.json4j.JSONObject;
-
-/**
- * Stores geo location variables.
- */
-public class Position {
-
-	private double _lat = 0;
-    private double _lng = 0;
-	private float altitude = 0;
-	private float accuracy = 0;
-	private float alt_accuracy = 0;
-    private float heading = 0;
-	private float velocity = 0;
-	private long timestamp = 0;
-
-	public Position(double lat, double lng, float altitude, float accuracy, float alt_accuracy,
-			float heading, float speed, long timestamp) {
-		this._lat = lat;
-		this._lng = lng;
-		this.altitude = altitude;
-		this.accuracy = accuracy;
-		this.alt_accuracy = alt_accuracy;
-		this.heading = heading;
-		this.velocity = speed;
-		this.timestamp = timestamp;
-	}
-
-	public static Position fromLocation(Location location) {
-		double latitude = location.getQualifiedCoordinates().getLatitude();
-        double longitude = location.getQualifiedCoordinates().getLongitude();
-        float altitude = location.getQualifiedCoordinates().getAltitude();
-        float accuracy = location.getQualifiedCoordinates().getHorizontalAccuracy();
-        float alt_accuracy = location.getQualifiedCoordinates().getVerticalAccuracy();
-        float heading = location.getCourse();
-        float speed = location.getSpeed();
-        long time = location.getTimestamp();
-
-		return new Position(latitude, longitude, altitude, accuracy, alt_accuracy, heading, speed, time);
-	}
-
-    public double getLatitude() {
-		return _lat;
-	}
-
-	public void setLatitude(double _lat) {
-		this._lat = _lat;
-	}
-
-	public double getLongitude() {
-		return _lng;
-	}
-
-	public void setLongitude(double _lng) {
-		this._lng = _lng;
-	}
-
-	public float getAltitude() {
-		return altitude;
-	}
-
-	public void setAltitude(float altitude) {
-		this.altitude = altitude;
-	}
-
-	public float getAccuracy() {
-		return accuracy;
-	}
-
-	public void setAccuracy(float accuracy) {
-		this.accuracy = accuracy;
-	}
-
-	public float getAltitudeAccuracy() {
-		return alt_accuracy;
-	}
-
-	public void setAltitudeAccuracy(float alt_accuracy) {
-		this.alt_accuracy = alt_accuracy;
-	}
-
-	public float getHeading() {
-		return heading;
-	}
-
-	public void setHeading(float heading) {
-		this.heading = heading;
-	}
-
-	public float getVelocity() {
-		return velocity;
-	}
-
-	public void setVelocity(float velocity) {
-		this.velocity = velocity;
-	}
-
-	public long getTimestamp() {
-		return timestamp;
-	}
-
-	public void setTimestamp(long timestamp) {
-		this.timestamp = timestamp;
-	}
-
-	public JSONObject toJSONObject() throws JSONException {
-		return new JSONObject("{latitude:" + String.valueOf(_lat) + ", longitude:" + String.valueOf(_lng) + ", altitude:" + altitude + ", accuracy:" + accuracy + ", heading:" + heading + ", speed:" + velocity + ", alt_accuracy:" + alt_accuracy + ", timestamp:" + timestamp + "}");
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/geolocation/PositionOptions.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/geolocation/PositionOptions.java b/bbos/framework/ext/src/org/apache/cordova/geolocation/PositionOptions.java
deleted file mode 100644
index 85d5853..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/geolocation/PositionOptions.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.geolocation;
-
-import org.apache.cordova.json4j.JSONArray;
-import org.apache.cordova.json4j.JSONException;
-
-public class PositionOptions {
-	private static final int START_ARG_MAX_AGE = 1;
-	private static final int START_ARG_TIMEOUT = 2;
-	private static final int START_ARG_HIGH_ACCURACY = 3;
-
-	public int maxAge;
-	public int timeout;
-	public boolean enableHighAccuracy;
-
-	public static PositionOptions fromJSONArray(JSONArray args) throws NumberFormatException, JSONException {
-		PositionOptions po = new PositionOptions();
-
-		po.maxAge = Integer.parseInt(args.getString(START_ARG_MAX_AGE));
-		po.timeout = Integer.parseInt(args.getString(START_ARG_TIMEOUT));
-		po.enableHighAccuracy = args.getBoolean(START_ARG_HIGH_ACCURACY);
-
-		return po;
-	}
-}


[03/15] CB-4228

Posted by lo...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/media/AudioPlayer.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/media/AudioPlayer.java b/bbos/framework/ext/src/org/apache/cordova/media/AudioPlayer.java
deleted file mode 100644
index 9958cf0..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/media/AudioPlayer.java
+++ /dev/null
@@ -1,654 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.media;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import javax.microedition.io.Connector;
-import javax.microedition.io.file.FileConnection;
-import javax.microedition.media.Manager;
-import javax.microedition.media.MediaException;
-import javax.microedition.media.Player;
-import javax.microedition.media.PlayerListener;
-import javax.microedition.media.control.RecordControl;
-import javax.microedition.media.control.VolumeControl;
-import javax.microedition.media.protocol.DataSource;
-
-import net.rim.device.api.media.protocol.ByteArrayInputStreamDataSource;
-
-import org.apache.cordova.util.FileUtils;
-import org.apache.cordova.util.Logger;
-
-/**
- * This class implements the audio playback and recording capabilities used by
- * Cordova. It is called by the Media Cordova class. Only one file can be played
- * or recorded per class instance.
- *
- * Supports playing audio locally and remotely. Files located within the
- * application package must be prefixed with "local:///". If no URI prefix
- * (file, http, local) is found, file is assumed to be on device and "file:///"
- * prefix added.
- */
-public class AudioPlayer implements PlayerListener {
-
-    private static final String LOG_TAG = "AudioPlayer: ";
-
-    // Media states
-    public static final int MEDIA_NONE = 0;
-    public static final int MEDIA_STARTING = 1;
-    public static final int MEDIA_RUNNING = 2;
-    public static final int MEDIA_PAUSED = 3;
-    public static final int MEDIA_STOPPED = 4;
-
-    // Media message ids
-    private static final int MEDIA_STATE = 1;
-    private static final int MEDIA_DURATION = 2;
-    private static final int MEDIA_POSITION = 3;
-    private static final int MEDIA_ERROR = 9;
-
-    // Media error codes
-    private static final int MEDIA_ERR_NONE_ACTIVE = 0;
-    private static final int MEDIA_ERR_ABORTED = 1;
-    private static final int MEDIA_ERR_NETWORK = 2;
-    private static final int MEDIA_ERR_DECODE = 3;
-    private static final int MEDIA_ERR_NONE_SUPPORTED = 4;
-
-    private final Media handler;
-    private final String id;
-    private int state = MEDIA_NONE; // State of recording or playback
-    private String audioFile = null; // File name to play or record to
-    private float duration = -1; // Duration of audio
-
-    private Player recorder = null; // Audio recording object
-    private RecordControl recorderControl = null;
-    private ByteArrayOutputStream recorderOutput = null;
-
-    private Player player = null; // Audio player object
-    private boolean prepareOnly = false;
-
-    private long prevPos = 0;
-    private long adjustTime = 0;
-    private long previousTime = 0;
-
-    private long lastPlay = System.currentTimeMillis();
-
-    private boolean buffering = false;
-
-    /**
-     * Constructor.
-     *
-     * @param handler
-     *            The audio handler object
-     * @param id
-     *            The id of this audio player
-     */
-    public AudioPlayer(Media handler, String id) {
-        this.handler = handler;
-        this.id = id;
-    }
-
-    /**
-     * Destroy stop audio playing or recording and free resources.
-     */
-    public synchronized void destroy() {
-        // Stop any play or record
-        destroyPlayer();
-        if (recorder != null) {
-            stopRecording();
-        }
-    }
-
-    /**
-     * Stop and free the player.
-     */
-    private void destroyPlayer() {
-        if (player != null) {
-            if (state == MEDIA_RUNNING || state == MEDIA_PAUSED) {
-                stopPlaying();
-            }
-            player.removePlayerListener(this);
-            player.close();
-            player = null;
-        }
-    }
-
-    /**
-     * Get current position of playback.
-     *
-     * @return position as a floating point number indicating number of seconds
-     *         or -1 if not playing
-     */
-    public synchronized float getCurrentPosition() {
-        // Current position is only valid when running, paused or buffering.
-        if (state == MEDIA_RUNNING || state == MEDIA_PAUSED || buffering) {
-            // The time returned by getMediaTime() is only updated every second.
-            // Keep track of time between updates in order to provide
-            // millisecond granularity.
-            long curPos = player.getMediaTime();
-
-            // Media time is within the 1 second granularity window so add time
-            // since last update.
-            if (curPos == prevPos && state == MEDIA_RUNNING) {
-                if (previousTime == 0) {
-                    previousTime = System.currentTimeMillis();
-                } else {
-                    long newTime = System.currentTimeMillis();
-                    // Convert from milliseconds to microseconds.
-                    adjustTime += ((newTime - previousTime) * 1000);
-                    previousTime = newTime;
-                    curPos += adjustTime;
-                }
-            } else {
-                prevPos = curPos;
-                previousTime = System.currentTimeMillis();
-                adjustTime = 0;
-            }
-
-            // Convert from microseconds to floating point seconds.
-            float time = curPos / 1000000.0f;
-            sendStatus(MEDIA_POSITION, time);
-            return time;
-        } else {
-            return -1;
-        }
-    }
-
-    /**
-     * Get the duration of the audio file.
-     *
-     * @param file
-     *            The name of the audio file.
-     * @return duration as a floating point number indicating number of seconds
-     *         or -1 = can't be determined or -2 = not allowed
-     */
-    public synchronized float getDuration(String file) {
-        // Can't get duration of recording
-        if (recorder != null) {
-            return (-2); // not allowed
-        }
-
-        // If audio file already loaded and started, then return duration
-        if (player != null) {
-            return duration;
-        }
-
-        // If no player yet, then create one
-        else {
-            prepareOnly = true;
-            startPlaying(file);
-            // This will only return value for local, since streaming
-            // file hasn't been read yet.
-            return duration;
-        }
-    }
-
-    /**
-     * Get the audio state.
-     *
-     * @return int
-     */
-    public synchronized int getState() {
-        return state;
-    }
-
-    /**
-     * Pause playing.
-     */
-    public synchronized void pausePlaying() {
-        // If playing, then pause
-        if (state == MEDIA_RUNNING) {
-            try {
-                player.stop();
-                setState(MEDIA_PAUSED);
-            } catch (MediaException e) {
-                Logger.log(LOG_TAG + "pausePlaying() Error: " + e.getMessage());
-                sendError(MEDIA_ERR_ABORTED);
-            }
-        } else {
-            Logger.log(LOG_TAG
-                    + "pausePlaying() Error: called during invalid state: "
-                    + state);
-            sendError(MEDIA_ERR_NONE_ACTIVE);
-        }
-    }
-
-    /**
-     * PlayerListener interface callback when an event occurs in the player.
-     *
-     * @see javax.microedition.media.PlayerListener#playerUpdate(javax.microedition.media.Player,
-     *      java.lang.String, java.lang.Object)
-     */
-    public void playerUpdate(Player player, String event, Object eventData) {
-        if (BUFFERING_STARTED.equals(event)) {
-            buffering = true;
-        } else if (BUFFERING_STOPPED.equals(event)) {
-            buffering = false;
-            setState(MEDIA_RUNNING);
-        } else if (DURATION_UPDATED.equals(event)) {
-            if (eventData != null && eventData instanceof Long) {
-                // Convert duration from microseconds to seconds.
-                duration = ((Long) eventData).longValue() / 1000000.0f;
-                sendStatus(MEDIA_DURATION, duration);
-            }
-        } else if (END_OF_MEDIA.equals(event)) {
-            // Update the final position before stopping the player.
-            if (eventData != null && eventData instanceof Long) {
-                sendStatus(MEDIA_POSITION,
-                        ((Long) eventData).longValue() / 1000000.0f);
-            }
-            stopPlaying();
-        } else if (ERROR.equals(event)) {
-            // Send error notification to JavaScript
-            if (eventData != null && eventData instanceof String) {
-                try {
-                    int code = Integer.parseInt((String) eventData);
-                    sendError(code);
-                } catch (NumberFormatException ne) {
-                    Logger.log(LOG_TAG + "playerUpdate(): Player id(" + id + ") received error: "
-                            + eventData);
-                }
-            } else {
-                Logger.log(LOG_TAG + "playerUpdate(): Player id(" + id + ") received error: " + eventData);
-            }
-            destroy();
-        }
-    }
-
-    /**
-     * Seek or jump to a new time in the track.
-     *
-     * @throws MediaException
-     */
-    public synchronized void seekToPlaying(int milliseconds) {
-        if (player != null) {
-            try {
-                // Convert milliseconds to microseconds.
-                player.setMediaTime(milliseconds > 0 ? milliseconds * 1000
-                        : milliseconds);
-                sendStatus(MEDIA_POSITION, milliseconds / 1000.0f);
-            } catch (MediaException e) {
-                Logger.log(LOG_TAG + "seekToPlaying() Error: " + e.getMessage());
-                sendError(MEDIA_ERR_ABORTED);
-            }
-        }
-    }
-
-    /**
-     * Set the volume for audio player
-     *
-     * @param volume
-     *            volume level 0.0-1.0
-     */
-    public synchronized void setVolume(float volume) {
-        if (player != null) {
-            if (player.getState() >= Player.REALIZED) {
-                VolumeControl vc = (VolumeControl) player
-                        .getControl("VolumeControl");
-                // Native volume level range is 0-100
-                vc.setLevel((int) (volume * 100));
-            }
-        }
-    }
-
-    /**
-     * Start or resume playing audio file.
-     *
-     * @param file
-     *            The name of the audio file.
-     */
-    public synchronized void startPlaying(String file) {
-        try {
-            if (recorder != null) {
-                Logger.log(LOG_TAG
-                        + "startPlaying() Error: Can't play in record mode.");
-                sendError(MEDIA_ERR_ABORTED);
-            }
-
-            // If this is a new request to play audio, or stopped
-            else if (player == null || state == MEDIA_STOPPED) {
-                setState(MEDIA_STARTING);
-
-                if (file == null || file.length() == 0) {
-                    Logger.log(LOG_TAG
-                            + "startPlaying(): Input file not specified.");
-                    sendError(MEDIA_ERR_ABORTED);
-                    setState(MEDIA_NONE);
-                    destroy();
-                    return;
-                }
-
-                // If the player was previously used, need to check if it needs
-                // recreated to pick up file changes. Cases when the player
-                // needs recreated:
-                //     1. New source file was specified.
-                //     2. File is local and has been modified since last play.
-                if (player != null) {
-                    if (!file.equals(audioFile)) {
-                        destroyPlayer();
-                    } else if (!isStreaming(file)) {
-                        // File needs to follow the local or file URI protocol
-                        // so if neither prefix exists assume a file URI and add
-                        // the "file:///" prefix.
-                        file = FileUtils.prefixFileURI(file);
-                        FileConnection fconn = null;
-                        try {
-                            fconn = (FileConnection) Connector.open(file,
-                                    Connector.READ);
-                            if (fconn.exists()) {
-                                if (fconn.lastModified() > lastPlay) {
-                                    destroyPlayer();
-                                }
-                            }
-                        } catch (Exception e) {
-                            // Ignore
-                        } finally {
-                            try {
-                                if (fconn != null) {
-                                    fconn.close();
-                                }
-                            } catch (IOException ignored) {
-                            }
-                        }
-                    }
-                }
-
-                // At this point if player is not null then the file previously
-                // played is still valid so just reset the current position.
-                if (player != null) {
-                    player.setMediaTime(0);
-                }
-                // Otherwise, create a new one
-                else {
-                    // If streaming file
-                    if (isStreaming(file)) {
-                        player = Manager.createPlayer(file);
-                    } else {
-                        // File needs to follow the local or file URI protocol
-                        // so if neither prefix exists assume a file URI and add
-                        // the "file:///" prefix.
-                        file = FileUtils.prefixFileURI(file);
-
-                        String contentType = "audio/mp3";
-                        if (file.endsWith(".amr")) {
-                            contentType = "audio/amr";
-                        } else if (file.endsWith(".wav")) {
-                            contentType = "audio/wav";
-                        }
-
-                        DataSource dataSource = new ByteArrayInputStreamDataSource(
-                                new ByteArrayInputStream(FileUtils.readFile(
-                                        file, Connector.READ)), contentType);
-                        player = Manager.createPlayer(dataSource);
-                    }
-                    audioFile = file;
-                    player.addPlayerListener(this);
-                }
-
-                lastPlay = System.currentTimeMillis();
-                player.realize();
-                player.prefetch();
-
-                // Get duration as floating point seconds.
-                duration = player.getDuration() == Player.TIME_UNKNOWN ? Player.TIME_UNKNOWN
-                        : player.getDuration() / 1000000.0f;
-
-                sendStatus(MEDIA_DURATION, duration);
-
-                if (!prepareOnly) {
-                    player.start();
-                }
-                prepareOnly = false;
-            }
-
-            // If previously existing player is still valid.
-            else {
-                // If player has been paused, then resume playback
-                if (state == MEDIA_PAUSED || state == MEDIA_STARTING) {
-                    player.start();
-                    setState(MEDIA_RUNNING);
-                } else {
-                    Logger.log(LOG_TAG
-                            + "Error: startPlaying() called during invalid state: "
-                            + state);
-                    sendError(MEDIA_ERR_ABORTED);
-                }
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-            Logger.log(LOG_TAG + "startPlaying() Error: " + e.getMessage());
-            sendError(MEDIA_ERR_ABORTED);
-        }
-    }
-
-    /**
-     * Start recording the specified file.
-     *
-     * @param file
-     *            The name of the file
-     */
-    public synchronized void startRecording(String file) {
-        try {
-            if (player != null) {
-                Logger.log(LOG_TAG
-                        + "startRecording() Error: Can't record in play mode.");
-                sendError(MEDIA_ERR_ABORTED);
-            } else if (recorder == null) {
-
-                if (file == null || file.length() == 0) {
-                    Logger.log(LOG_TAG
-                            + "startRecording() Error: Output file not specified.");
-                    sendError(MEDIA_ERR_ABORTED);
-                    return;
-                }
-                setState(MEDIA_STARTING);
-                file = FileUtils.prefixFileURI(file);
-
-                recorder = Manager.createPlayer("capture://audio");
-                recorder.addPlayerListener(this);
-                recorder.realize();
-                recorderControl = (RecordControl) recorder
-                        .getControl("RecordControl");
-                recorderOutput = new ByteArrayOutputStream();
-                recorderControl.setRecordStream(recorderOutput);
-                recorderControl.startRecord();
-                recorder.start();
-                audioFile = file;
-                setState(MEDIA_RUNNING);
-
-            } else {
-                Logger.log(LOG_TAG
-                        + "startRecording() Error: Already recording.");
-                sendError(MEDIA_ERR_ABORTED);
-            }
-        } catch (Exception e) {
-            Logger.log(LOG_TAG
-                    + "startRecording() Error: Failed to start recording. "
-                    + e.getMessage());
-            if (recorder != null) {
-                recorder.removePlayerListener(this);
-                recorder.close();
-                recorder = null;
-            }
-            if (recorderControl != null) {
-                try {
-                    recorderControl.reset();
-                } catch (IOException e1) {
-                    // Ignore
-                }
-                recorderControl = null;
-            }
-            if (recorderOutput != null) {
-                try {
-                    recorderOutput.close();
-                } catch (IOException e1) {
-                    // Ignore
-                }
-                recorderOutput = null;
-            }
-
-            setState(MEDIA_NONE);
-        }
-    }
-
-    /**
-     * Stop playing the audio file.
-     */
-    public synchronized void stopPlaying() {
-        if (state == MEDIA_RUNNING || state == MEDIA_PAUSED) {
-            try {
-                player.stop();
-                player.setMediaTime(0);
-            } catch (MediaException e) {
-                Logger.log(LOG_TAG + "stopPlaying() Error: " + e.getMessage());
-                sendError(MEDIA_ERR_ABORTED);
-            }
-            setState(MEDIA_STOPPED);
-        } else {
-            Logger.log(LOG_TAG + "stopPlaying() called during invalid state: "
-                    + state);
-            sendError(MEDIA_ERR_NONE_ACTIVE);
-        }
-    }
-
-    /**
-     * Stop recording and save to the file specified when recording started.
-     */
-    public synchronized void stopRecording() {
-        DataOutputStream output = null;
-        FileConnection conn = null;
-
-        try {
-            if (recorder != null) {
-                if (state == MEDIA_RUNNING) {
-                    recorderControl.commit();
-                    byte data[] = recorderOutput.toByteArray();
-
-                    conn = (FileConnection) Connector.open(audioFile,
-                            Connector.READ_WRITE);
-                    if (conn.exists()) {
-                        conn.delete();
-                        conn.close();
-                        conn = (FileConnection) Connector.open(audioFile,
-                                Connector.READ_WRITE);
-                    }
-                    conn.create();
-                    output = conn.openDataOutputStream();
-                    output.write(data);
-                    output.flush();
-                }
-            }
-        } catch (IOException e) {
-            // Ignore
-            Logger.log(LOG_TAG + "stopRecording() Error: " + e.getMessage());
-        } finally {
-            if (recorderOutput != null) {
-                try {
-                    recorderOutput.close();
-                } catch (IOException e) {
-                    // Ignore
-                    Logger.log(LOG_TAG
-                            + "stopRecording() Failed to close recorder output. "
-                            + e.getMessage());
-                }
-                recorderOutput = null;
-            }
-            if (recorder != null) {
-                recorder.removePlayerListener(this);
-                recorder.close();
-                recorder = null;
-            }
-
-            if (recorderControl != null) {
-                recorderControl.stopRecord();
-                recorderControl = null;
-            }
-
-            if (output != null) {
-                try {
-                    output.close();
-                } catch (IOException e) {
-                    // Ignore
-                    Logger.log(LOG_TAG
-                            + "stopRecording() Failed to close output file. "
-                            + e.getMessage());
-                }
-                output = null;
-            }
-
-            if (conn != null) {
-                try {
-                    conn.close();
-                } catch (IOException e) {
-                    // Ignore
-                    Logger.log(LOG_TAG
-                            + "stopRecording() Failed to close connection. "
-                            + e.getMessage());
-                }
-            }
-            setState(MEDIA_STOPPED);
-        }
-    }
-
-    /**
-     * Determine if playback file is streaming or local. It is streaming if file
-     * name starts with "http://"
-     *
-     * @param file
-     *            The file name
-     * @return T=streaming, F=local
-     */
-    private boolean isStreaming(String file) {
-        if (file.startsWith("http://") || file.startsWith("https://")) {
-            return true;
-        }
-        return false;
-    }
-
-    private void sendError(int code) {
-        handler.invokeScript("cordova.require('cordova/plugin/Media').onStatus('"
-                + id + "', " + MEDIA_ERROR + ", { \"code\":" + code + "});");
-    }
-
-    private void sendStatus(int msg, float value) {
-        handler.invokeScript("cordova.require('cordova/plugin/Media').onStatus('"
-                + id + "', " + msg + ", " + value + ");");
-    }
-
-    private void sendStatus(int msg, int value) {
-        handler.invokeScript("cordova.require('cordova/plugin/Media').onStatus('"
-                + id + "', " + msg + ", " + value + ");");
-    }
-
-    /**
-     * Set the state and send it to JavaScript.
-     *
-     * @param state
-     */
-    private synchronized void setState(int state) {
-        // Only send state back to JavaScript if it has changed.
-        if (this.state != state) {
-            sendStatus(MEDIA_STATE, state);
-        }
-
-        this.state = state;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/media/Media.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/media/Media.java b/bbos/framework/ext/src/org/apache/cordova/media/Media.java
deleted file mode 100644
index f1e2b27..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/media/Media.java
+++ /dev/null
@@ -1,344 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.media;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-
-import org.apache.cordova.api.Plugin;
-import org.apache.cordova.api.PluginResult;
-import org.apache.cordova.json4j.JSONArray;
-import org.apache.cordova.json4j.JSONException;
-import org.apache.cordova.util.Logger;
-
-/**
- * This plugin provides the ability to play and record audio. The file can be
- * local or over a network using http.
- *
- * Audio formats supported (tested): .mp3, .wav, .amr
- *
- * Supports playing audio locally and remotely. Files located within the
- * application package must be prefixed with "local:///". If no URI prefix
- * (file, http, local) is found, file is assumed to be on device and "file:///"
- * prefix added.
- */
-public class Media extends Plugin {
-
-    private static final String LOG_TAG = "Media: ";
-    private final Hashtable players = new Hashtable();
-
-    // Cross-platform defined actions
-    private static final String CREATE = "create";
-    private static final String START_RECORDING = "startRecordingAudio";
-    private static final String STOP_RECORDING = "stopRecordingAudio";
-    private static final String START_PLAYING = "startPlayingAudio";
-    private static final String STOP_PLAYING = "stopPlayingAudio";
-    private static final String SEEK_TO = "seekToAudio";
-    private static final String PAUSE_PLAYING = "pausePlayingAudio";
-    private static final String SET_VOLUME = "setVolume";
-    private static final String GET_POSITION = "getCurrentPositionAudio";
-    private static final String GET_DURATION = "getDurationAudio";
-    private static final String RELEASE = "release";
-
-    /**
-     * Executes the request and returns PluginResult.
-     *
-     * @param action
-     *            The action to execute.
-     * @param args
-     *            JSONArry of arguments for the plugin.
-     * @param callbackId
-     *            The callback id used when calling back into JavaScript.
-     * @return A PluginResult object with a status and message.
-     */
-    public PluginResult execute(String action, JSONArray args, String callbackId) {
-        PluginResult.Status status = PluginResult.Status.NO_RESULT;
-
-        try {
-            if (CREATE.equals(action)) {
-                createMedia(args.getString(0), args.getString(1));
-                return new PluginResult(PluginResult.Status.OK, "");
-            } else if (START_RECORDING.equals(action)) {
-                startRecordingAudio(args.getString(0), args.getString(1));
-            } else if (STOP_RECORDING.equals(action)) {
-                stopRecordingAudio(args.getString(0));
-            } else if (START_PLAYING.equals(action)) {
-                startPlayingAudio(args.getString(0), args.getString(1));
-            } else if (SEEK_TO.equals(action)) {
-                seekToAudio(args.getString(0), args.getInt(1));
-            } else if (PAUSE_PLAYING.equals(action)) {
-                pausePlayingAudio(args.getString(0));
-            } else if (STOP_PLAYING.equals(action)) {
-                stopPlayingAudio(args.getString(0));
-            } else if (SET_VOLUME.equals(action)) {
-                try {
-                    float level = Float.parseFloat(args.getString(1));
-                    setVolume(args.getString(0), level);
-                } catch (NumberFormatException nfe) {
-                    Logger.log(LOG_TAG + "execute(): Failed to convert volume level: "
-                            + args.getString(1) + " " + nfe.getMessage());
-                    return new PluginResult(PluginResult.Status.JSON_EXCEPTION);
-                }
-            } else if (GET_POSITION.equals(action)) {
-                float f = getCurrentPositionAudio(args.getString(0));
-                return new PluginResult(PluginResult.Status.OK, f);
-            } else if (GET_DURATION.equals(action)) {
-                float f = getDurationAudio(args.getString(0), args.getString(1));
-                return new PluginResult(PluginResult.Status.OK, f);
-            } else if (RELEASE.equals(action)) {
-                boolean b = release(args.getString(0));
-                return new PluginResult(PluginResult.Status.OK, b);
-            } else {
-                Logger.log(LOG_TAG + "execute(): Invalid action: " + action);
-                return new PluginResult(PluginResult.Status.INVALID_ACTION,
-                        "Invalid action: " + action);
-            }
-            return new PluginResult(status, "");
-        } catch (JSONException e) {
-            Logger.log(LOG_TAG + "execute() Error: " + e.getMessage());
-            return new PluginResult(PluginResult.Status.JSON_EXCEPTION);
-        }
-    }
-
-    /**
-     * Identifies if action to be executed returns a value and should be run
-     * synchronously.
-     *
-     * @param action
-     *            The action to execute
-     * @return T=returns value
-     */
-    public boolean isSynch(String action) {
-        if (CREATE.equals(action) || GET_POSITION.equals(action)
-                || GET_DURATION.equals(action) || RELEASE.equals(action)) {
-            return true;
-        }
-        return false;
-    }
-
-    /**
-     * Stop all audio players and recorders.
-     */
-    public void onDestroy() {
-        Enumeration keys = players.keys();
-        while (keys.hasMoreElements()) {
-            AudioPlayer audio = (AudioPlayer) players.get(keys.nextElement());
-            if (audio != null) {
-                audio.destroy();
-            }
-        }
-
-        players.clear();
-    }
-
-    /**
-     * Start or resume playing audio file.
-     *
-     * @param id
-     *            The id of the audio player
-     * @param file
-     *            The name of the audio file.
-     */
-    private void createMedia(String id, String file) {
-        AudioPlayer audio = (AudioPlayer) players.get(id);
-        if (audio == null) {
-            audio = new AudioPlayer(this, id);
-            players.put(id, audio);
-        }
-    }
-
-    /**
-     * Get current position of playback.
-     *
-     * @param id
-     *            The id of the audio player
-     * @return position in msec
-     */
-    private float getCurrentPositionAudio(String id) {
-        AudioPlayer audio = (AudioPlayer) players.get(id);
-        if (audio != null) {
-            return (audio.getCurrentPosition());
-        }
-        return -1;
-    }
-
-    /**
-     * Get the duration of the audio file.
-     *
-     * @param id
-     *            The id of the audio player
-     * @param file
-     *            The name of the audio file.
-     * @return The duration in msec.
-     */
-    private float getDurationAudio(String id, String file) {
-        // Get audio file
-        AudioPlayer audio = (AudioPlayer) players.get(id);
-        if (audio != null) {
-            return (audio.getDuration(file));
-        }
-
-        // If not already open, then open the file
-        audio = new AudioPlayer(this, id);
-        players.put(id, audio);
-        return (audio.getDuration(file));
-    }
-
-    /**
-     * Pause playing.
-     *
-     * @param id
-     *            The id of the audio player
-     */
-    private void pausePlayingAudio(String id) {
-        AudioPlayer audio = (AudioPlayer) players.get(id);
-        if (audio != null) {
-            audio.pausePlaying();
-        } else {
-            Logger.log(LOG_TAG
-                    + "pausePlayingAudio() Error: Unknown Audio Player " + id);
-        }
-    }
-
-    /**
-     * Release the audio player instance to save memory.
-     *
-     * @param id
-     *            The id of the audio player
-     */
-    private boolean release(String id) {
-        if (!players.containsKey(id)) {
-            Logger.log(LOG_TAG + "release() Error: Unknown Audio Player " + id);
-            return false;
-        }
-
-        AudioPlayer audio = (AudioPlayer) players.get(id);
-        players.remove(id);
-        audio.destroy();
-        return true;
-    }
-
-    /**
-     * Seek to a location.
-     *
-     * @param id
-     *            The id of the audio player
-     * @param miliseconds
-     *            int: number of milliseconds to skip 1000 = 1 second
-     */
-    private void seekToAudio(String id, int milliseconds) {
-        AudioPlayer audio = (AudioPlayer) players.get(id);
-        if (audio != null) {
-            audio.seekToPlaying(milliseconds);
-        } else {
-            Logger.log(LOG_TAG + "seekToAudio() Error: Unknown Audio Player "
-                    + id);
-        }
-    }
-
-    /**
-     * Set the volume for an audio device
-     *
-     * @param id
-     *            The id of the audio player
-     * @param volume
-     *            Volume to adjust to 0 - 1
-     */
-    private void setVolume(String id, float volume) {
-        AudioPlayer audio = (AudioPlayer) players.get(id);
-        if (audio != null) {
-            audio.setVolume(volume);
-        } else {
-            Logger.log(LOG_TAG + "setVolume() Error: Unknown Audio Player "
-                    + id);
-        }
-    }
-
-    /**
-     * Start or resume playing audio file.
-     *
-     * @param id
-     *            The id of the audio player
-     * @param file
-     *            The name of the audio file.
-     */
-    private void startPlayingAudio(String id, String file) {
-        AudioPlayer audio = (AudioPlayer) players.get(id);
-        if (audio == null) {
-            audio = new AudioPlayer(this, id);
-            players.put(id, audio);
-        }
-        audio.startPlaying(file);
-    }
-
-    /**
-     * Start recording and save the specified file.
-     *
-     * @param id
-     *            The id of the audio player
-     * @param file
-     *            The name of the file
-     */
-    private void startRecordingAudio(String id, String file) {
-        AudioPlayer audio = (AudioPlayer) players.get(id);
-        if (audio == null) {
-            audio = new AudioPlayer(this, id);
-            players.put(id, audio);
-        }
-
-        int state = audio.getState();
-        if (state == AudioPlayer.MEDIA_NONE
-                || state == AudioPlayer.MEDIA_STOPPED) {
-            audio.startRecording(file);
-        }
-    }
-
-    /**
-     * Stop playing the audio file.
-     *
-     * @param id
-     *            The id of the audio player
-     */
-    private void stopPlayingAudio(String id) {
-        AudioPlayer audio = (AudioPlayer) players.get(id);
-        if (audio != null) {
-            audio.stopPlaying();
-        } else {
-            Logger.log(LOG_TAG
-                    + "stopPlayingAudio() Error: Unknown Audio Player " + id);
-        }
-    }
-
-    /**
-     * Stop recording and save to the file specified when recording started.
-     *
-     * @param id
-     *            The id of the audio player
-     */
-    private void stopRecordingAudio(String id) {
-        AudioPlayer audio = (AudioPlayer) players.get(id);
-        if (audio != null) {
-            audio.stopRecording();
-            players.remove(id);
-        } else {
-            Logger.log(LOG_TAG
-                    + "stopRecordingAudio() Error: Unknown Audio Player " + id);
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/network/ConnectionInfoAction.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/network/ConnectionInfoAction.java b/bbos/framework/ext/src/org/apache/cordova/network/ConnectionInfoAction.java
deleted file mode 100644
index 2a280e6..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/network/ConnectionInfoAction.java
+++ /dev/null
@@ -1,355 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.network;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-
-import org.apache.cordova.CordovaExtension;
-import org.apache.cordova.api.PluginResult;
-import org.apache.cordova.util.Logger;
-
-import net.rim.device.api.system.Application;
-import net.rim.device.api.system.CoverageInfo;
-import net.rim.device.api.system.CoverageStatusListener;
-import net.rim.device.api.system.RadioInfo;
-import net.rim.device.api.system.RadioStatusListener;
-import net.rim.device.api.system.WLANConnectionListener;
-import net.rim.device.api.system.WLANInfo;
-
-/**
- * Determines the current network data connection type and listens for changes
- * to network coverage. This class is intended for use through the Network
- * plug-in.
- */
-public class ConnectionInfoAction {
-    // Return types
-    private static final String TYPE_UNKNOWN = "unknown";
-    private static final String TYPE_ETHERNET = "ethernet";
-    private static final String TYPE_WIFI = "wifi";
-    private static final String TYPE_2G = "2g";
-    private static final String TYPE_3G = "3g";
-    private static final String TYPE_4G = "4g";
-    private static final String TYPE_NONE = "none";
-
-    // Network status event values
-    private static final String OFFLINE = "offline";
-    private static final String ONLINE = "online";
-
-    // Network service support constants
-    private static final int DATA = RadioInfo.NETWORK_SERVICE_DATA;
-    private static final int TWO_G = RadioInfo.NETWORK_SERVICE_DATA
-            | RadioInfo.NETWORK_SERVICE_EDGE;
-    private static final int THREE_G = RadioInfo.NETWORK_SERVICE_EVDO_REV0
-            | RadioInfo.NETWORK_SERVICE_EVDO_REV0_ONLY
-            | RadioInfo.NETWORK_SERVICE_EVDO_REVA
-            | RadioInfo.NETWORK_SERVICE_EVDO_REVA_ONLY
-            | RadioInfo.NETWORK_SERVICE_UMTS;
-
-    // Listeners used to detect network changes
-    private RadioStatusListener radioListener = null;
-    private WLANConnectionListener wlanListener = null;
-    private CoverageStatusListener coverageListener = null;
-
-    // Variable indicating whether the user has disabled mobile data
-    private Boolean dataDisabled = Boolean.FALSE;
-
-    // The set of call back IDs to send results to. Using Hashtable because
-    // BlackBerry does not support Collections. There should only ever be one
-    // call back ID, but this allows multiple.
-    private Hashtable callbackIds = new Hashtable();
-
-    private String prevType = TYPE_NONE;
-    private String prevEvent = OFFLINE;
-
-    /**
-     * Determines the current network data connection type. Listeners are
-     * registered to return additional results when network state changes.
-     *
-     * @param callbackId
-     *            The success call back ID to receive network type results.
-     * @return A PluginResult object with the success or failure result of the
-     *         operation. A success result includes information about the
-     *         currently active network type.
-     */
-    protected PluginResult getConnectionInfo(String callbackId) {
-
-        // Ensure that the dataDisabled variable is initialized.
-        setDataDisabled(CoverageInfo.getCoverageStatus(), false);
-
-        // Add the network change listeners if they have not been added.
-        addListeners(callbackId);
-
-        // Retrieve the current active connection type and build the return
-        // result.
-        PluginResult result = new PluginResult(PluginResult.Status.OK,
-                getConnectionType(true, true));
-
-        // Need to keep the call back since listeners have been registered to
-        // fire events on the specified call back ID.
-        result.setKeepCallback(true);
-
-        return result;
-    }
-
-    /**
-     * Removes all coverage listeners and clears the list of call back IDs. This
-     * method should be invoked when the Network plug-in's onDestroy is called.
-     */
-    protected synchronized void shutdown() {
-        if (radioListener != null) {
-            Application.getApplication().removeRadioListener(radioListener);
-            radioListener = null;
-        }
-
-        if (wlanListener != null) {
-            WLANInfo.removeListener(wlanListener);
-            wlanListener = null;
-        }
-
-        if (coverageListener != null) {
-            CoverageInfo.removeListener(coverageListener);
-            coverageListener = null;
-        }
-
-        callbackIds.clear();
-    }
-
-    /**
-     * Adds a RadioStatusListener, WLANConnectionListener and
-     * CoverageStatusListener to listen for various network change events. The
-     * listeners are only registered if they have not already been added. Each
-     * listener is used to detect different types of network change events.
-     *
-     * RadioStatusListener - Detects changes in cellular data coverage.
-     * WLANConnectionListener - Detects changes in wifi coverage.
-     * CoverageStatusListener - Used to detect changes in the mobile data config
-     *
-     * @param callbackId
-     *            The reference point to call back when a listener event occurs.
-     */
-    private synchronized void addListeners(String callbackId) {
-        callbackIds.put(callbackId, callbackId);
-
-        if (radioListener == null) {
-            radioListener = new RadioStatusListener() {
-                public void baseStationChange() {}
-                public void networkScanComplete(boolean success) {}
-
-                public void networkServiceChange(int networkId, int service) {
-                    // Cellular data change detected. If the user hasn't
-                    // disabled mobile data and wifi is not currently in use
-                    // return a result indicating the cellular data coverage
-                    // change.
-                    if (dataDisabled == Boolean.FALSE
-                            && WLANInfo.getWLANState() != WLANInfo.WLAN_STATE_CONNECTED) {
-                        if ((service & DATA) == 0) {
-                            sendResult(TYPE_NONE, OFFLINE);
-                        } else {
-                            // In the case where cell data and wifi was turned
-                            // off and then the user disabled mobile data
-                            // configuration, the mobile data config disablement
-                            // by the user isn't detected by the coverage status
-                            // listener so dataDisabled may not be accurate.
-                            // When service data is activated, have to make sure
-                            // that dataDisabled is properly set.
-                            setDataDisabled(CoverageInfo.getCoverageStatus(),
-                                    false);
-                            if (dataDisabled == Boolean.FALSE) {
-                                sendResult(getConnectionType(false, true),
-                                        ONLINE);
-                            }
-                        }
-                    }
-                }
-
-                public void networkStarted(int networkId, int service) {}
-                public void networkStateChange(int state) {}
-                public void pdpStateChange(int apn, int state, int cause) {}
-                public void radioTurnedOff() {}
-                public void signalLevel(int level) {}
-            };
-            Application.getApplication().addRadioListener(radioListener);
-        }
-
-        if (wlanListener == null) {
-            wlanListener = new WLANConnectionListener() {
-                public void networkConnected() {
-                    if (dataDisabled == Boolean.FALSE) {
-                        sendResult(TYPE_WIFI, ONLINE);
-                    }
-                }
-
-                public void networkDisconnected(int reason) {
-                    // Wifi was disconnected, if the user hasn't disabled mobile
-                    // data, check if cellular data coverage exists.
-                    if (dataDisabled == Boolean.FALSE) {
-                        String type = getConnectionType(false, true);
-                        String event = OFFLINE;
-                        if (!TYPE_NONE.equals(type)) {
-                            event = ONLINE;
-                        }
-                        sendResult(type, event);
-                    }
-                }
-            };
-            WLANInfo.addListener(wlanListener);
-        }
-
-        if (coverageListener == null) {
-            coverageListener = new CoverageStatusListener() {
-                public void coverageStatusChanged(int newCoverage) {
-                    // When coverage changes, check to determine if it is due
-                    // to the user disabling mobile data through configuration
-                    // flag.
-                    setDataDisabled(newCoverage, true);
-                }
-            };
-            CoverageInfo.addListener(coverageListener);
-        }
-    }
-
-    /**
-     * Determine the type of connection currently being used for data
-     * transmission on the device. If the user has disabled mobile data then
-     * TYPE_NONE is returned regardless of cellular or wifi radio state as this
-     * is the way the browser behaves. Otherwise, wifi and/or cellular radios
-     * are queried for state based on the passed in parameters.
-     *
-     * @param checkWLAN
-     *            Determines whether wifi radio state is queried or not.
-     * @param checkCell
-     *            Determines whether cellular radio state is queried or not.
-     * @return A string indicating one of the defined network connections types.
-     */
-    private String getConnectionType(boolean checkWLAN, boolean checkCell) {
-        String networkType = TYPE_NONE;
-
-        if (dataDisabled == Boolean.FALSE) {
-            // Detect if wifi is active and connected. If wifi is active it
-            // takes precedence over cellular data transmission.
-            if (checkWLAN
-                    && WLANInfo.getWLANState() == WLANInfo.WLAN_STATE_CONNECTED) {
-                networkType = TYPE_WIFI;
-            }
-
-            if (checkCell && TYPE_NONE.equals(networkType)
-                    && RadioInfo.isDataServiceOperational()) {
-
-                int activeServices = RadioInfo.getNetworkService();
-                networkType = TYPE_UNKNOWN;
-                if ((activeServices & THREE_G) != 0) {
-                    networkType = TYPE_3G;
-                } else if ((activeServices & TWO_G) != 0) {
-                    networkType = TYPE_2G;
-                }
-            }
-        }
-
-        return networkType;
-    }
-
-    /**
-     * Helper function to build and send the PluginResult to the saved call back
-     * IDs.
-     *
-     * @param type
-     *            The network connection type. This value should be null if the
-     *            specified event is "offline".
-     * @param event
-     *            The network event.
-     */
-    private void sendResult(String type, String event) {
-
-        // Only send the event if it is different then the last sent event.
-        synchronized (prevType) {
-            if (prevType != null && prevEvent != null && prevType.equals(type)
-                    && prevEvent.equals(event)) {
-                return;
-            } else {
-                prevType = type;
-                prevEvent = event;
-            }
-        }
-
-        PluginResult result = new PluginResult(PluginResult.Status.OK,
-                type);
-
-        // Must keep the call back active for future events.
-        result.setKeepCallback(true);
-
-        // Iterate through the saved call back IDs. Really should only ever be
-        // one.
-        for (Enumeration callbacks = this.callbackIds.elements(); callbacks
-                .hasMoreElements();) {
-            String callbackId = (String) callbacks.nextElement();
-            CordovaExtension.invokeSuccessCallback(callbackId, result);
-        }
-
-    }
-
-    /**
-     * Determines if the user has disabled mobile data through the user level
-     * configuration panels and optionally returns an "online" or "offline"
-     * result.
-     *
-     * @param newCoverage
-     *            A bit mask of CoverageInfo.COVERAGE_* flags indicating the
-     *            current coverage.
-     * @param returnResult
-     *            If true, return a result based on the value of the mobile data
-     *            configuration.
-     */
-    private void setDataDisabled(int newCoverage, boolean returnResult) {
-
-        boolean isRadioData = (RadioInfo.getNetworkService() & DATA) != 0;
-        boolean wlanConnected = WLANInfo.getWLANState() == WLANInfo.WLAN_STATE_CONNECTED;
-        boolean eventDetected = false;
-        String event = OFFLINE;
-
-        // Note: To detect that mobile data has been disabled through
-        // configuration, determine if the current coverage is
-        // CoverageInfo.COVERAGE_NONE AND that either cellular or wifi radios
-        // are currently connected. This is because the low level radio routines
-        // will return a connected state even when mobile data is disabled
-        // through configuration.
-        synchronized (dataDisabled) {
-            if (newCoverage == CoverageInfo.COVERAGE_NONE
-                    && (isRadioData || wlanConnected)) {
-                if (dataDisabled == Boolean.FALSE) {
-                    Logger.log("Mobile data was disabled by the user through configuration.");
-                    dataDisabled = Boolean.TRUE;
-                    eventDetected = true;
-                }
-            } else if (dataDisabled == Boolean.TRUE) {
-                Logger.log("Mobile data was enabled by the user.");
-                dataDisabled = Boolean.FALSE;
-                event = ONLINE;
-                eventDetected = true;
-            }
-        }
-
-        if (returnResult && eventDetected) {
-            // The user has enabled/disabled mobile data. Return a result
-            // indicating the current network state.
-            String type = getConnectionType(true, true);
-            sendResult(type, event);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/network/Network.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/network/Network.java b/bbos/framework/ext/src/org/apache/cordova/network/Network.java
deleted file mode 100644
index 86e5ac6..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/network/Network.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.network;
-
-import org.apache.cordova.api.Plugin;
-import org.apache.cordova.api.PluginResult;
-import org.apache.cordova.json4j.JSONArray;
-
-/**
- * The Network command interface.
- *
- * The Network class can invoke the following actions:
- *
- *   - getConnectionInfo(callback)
- *
- */
-public class Network extends Plugin {
-	// Supported actions
-	public static final String ACTION_CONNECTION_INFO = "getConnectionInfo";
-
-	private ConnectionInfoAction connectionInfo = new ConnectionInfoAction();
-
-	/**
-	 * Executes the request and returns CommandResult.
-	 *
-	 * @param action The command to execute.
-	 * @param callbackId The callback ID to be invoked upon action completion
-	 * @param args   JSONArry of arguments for the command.
-	 * @return A CommandResult object with a status and message.
-	 */
-	public PluginResult execute(String action, JSONArray args, String callbackId) {
-		PluginResult result = null;
-
-		if (action.equals(ACTION_CONNECTION_INFO)) {
-			result = connectionInfo.getConnectionInfo(callbackId);
-		}
-		else {
-			result = new PluginResult(PluginResult.Status.INVALID_ACTION, "Network: Invalid action: " + action);
-		}
-
-		return result;
-	}
-
-	/**
-	 * Called when Plugin is destroyed.
-	 */
-	public void onDestroy() {
-		connectionInfo.shutdown();
-	}
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/notification/ActivityDialog.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/notification/ActivityDialog.java b/bbos/framework/ext/src/org/apache/cordova/notification/ActivityDialog.java
deleted file mode 100644
index 710f61e..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/notification/ActivityDialog.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.notification;
-
-import org.apache.cordova.api.PluginResult;
-import org.apache.cordova.json4j.JSONArray;
-import org.apache.cordova.json4j.JSONException;
-import org.apache.cordova.ui.SpacerField;
-
-import net.rim.device.api.system.Bitmap;
-import net.rim.device.api.system.Characters;
-import net.rim.device.api.ui.UiApplication;
-import net.rim.device.api.ui.component.BitmapField;
-import net.rim.device.api.ui.component.LabelField;
-import net.rim.device.api.ui.component.SeparatorField;
-import net.rim.device.api.ui.container.HorizontalFieldManager;
-import net.rim.device.api.ui.container.PopupScreen;
-import net.rim.device.api.ui.container.VerticalFieldManager;
-
-/**
- * A Popup activity dialog box with an optional title and message.
- */
-public final class ActivityDialog extends PopupScreen {
-    private static ActivityDialog dialog = null;
-
-    /**
-     * Construct an activity dialog, with customizable title and message.
-     *
-     * @param title
-     *            Title of the activity dialog
-     * @param message
-     *            Message to print in the body of the dialog
-     */
-    private ActivityDialog(String title, String message) {
-        super(new VerticalFieldManager());
-
-        if (title != null && title.length() > 0) {
-            add(new LabelField(title));
-            add(new SeparatorField(SeparatorField.LINE_HORIZONTAL));
-        }
-        add(new SpacerField(0, 20));
-
-        HorizontalFieldManager hfm = new HorizontalFieldManager();
-
-        Bitmap hourglass = Bitmap.getPredefinedBitmap(Bitmap.HOURGLASS);
-
-        BitmapField bitmap = new BitmapField(hourglass);
-        hfm.add(bitmap);
-
-        if (message != null && message.length() > 0) {
-            hfm.add(new LabelField(message, FIELD_HCENTER | FIELD_VCENTER));
-        }
-
-        add(hfm);
-        add(new SpacerField(0, 20));
-    }
-
-    /**
-     * Creates and displays the activity dialog.
-     *
-     * @param args
-     *            JSONArray of arguments.
-     * @return a PluginResult indicating success or error.
-     */
-    static synchronized PluginResult start(JSONArray args) {
-        if (dialog == null) {
-            String message = null;
-            String title = null;
-
-            // Title and message are optional, grab the strings from the args
-            // if they are there.
-            if (args != null && args.length() > 0) {
-                try {
-                    if (!args.isNull(0)) {
-                        title = args.getString(0);
-                    }
-                    if (args.length() > 1 && !args.isNull(1)) {
-                        message = args.getString(1);
-                    }
-                } catch (JSONException e) {
-                    return new PluginResult(PluginResult.Status.JSON_EXCEPTION,
-                            "JSONException: " + e.getMessage());
-                }
-            }
-
-            dialog = new ActivityDialog(title, message);
-            final UiApplication uiApp = UiApplication.getUiApplication();
-            uiApp.invokeLater(new Runnable() {
-                public void run() {
-                    uiApp.pushModalScreen(dialog);
-                }
-            });
-        }
-
-        return new PluginResult(PluginResult.Status.OK, "");
-    }
-
-    /**
-     * Closes the activity dialog.
-     *
-     * @return a PluginResult indicating success or error.
-     */
-    static synchronized PluginResult stop() {
-        if (dialog != null) {
-            final UiApplication uiApp = UiApplication.getUiApplication();
-            final ActivityDialog tmpDialog = dialog;
-            uiApp.invokeLater(new Runnable() {
-                public void run() {
-                    uiApp.popScreen(tmpDialog);
-                }
-            });
-            dialog = null;
-        }
-
-        return new PluginResult(PluginResult.Status.OK, "");
-    }
-
-    /**
-     * @see net.rim.device.api.ui.Screen#keyChar(char, int, int)
-     */
-    protected boolean keyChar(char key, int status, int time) {
-        // If the user clicks back key while progress dialog is displayed, close
-        // the progress dialog.
-        if (key == Characters.ESCAPE) {
-            stop();
-        }
-
-        return super.keyChar(key, status, time);
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/notification/AlertAction.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/notification/AlertAction.java b/bbos/framework/ext/src/org/apache/cordova/notification/AlertAction.java
deleted file mode 100644
index c04a3cb..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/notification/AlertAction.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.notification;
-
-import org.apache.cordova.api.PluginResult;
-import org.apache.cordova.json4j.JSONArray;
-import org.apache.cordova.json4j.JSONException;
-
-import net.rim.device.api.ui.UiApplication;
-
-/**
- * Alert Action
- *
- * Displays and interacts with a dialog box.
- *
- */
-public class AlertAction {
-
-    private static final String DEFAULT_MESSAGE = "";
-    private static final String DEFAULT_TITLE   = "Alert";
-    private static final String DEFAULT_BUTTON  = "OK";
-
-    /**
-     * Displays a custom alert.
-     *
-     * @param args JSONArray formatted as [ message, title, buttonLabel ]
-     *             message:     the message to display in the dialog body (default: "").
-     *             title:       the title to display at the top of the dialog (default: "Alert").
-     *             buttonLabel: the button text (default: "OK").
-     * @return A PluginResult object with the success or failure state for displaying the dialog box.
-     */
-    public static PluginResult execute(JSONArray args) {
-
-        PluginResult result = null;
-
-        try {
-            String message = DEFAULT_MESSAGE;
-            String title = DEFAULT_TITLE;
-            String buttonLabel = DEFAULT_BUTTON;
-            if (args.length() > 0 && !args.isNull(0))
-                message = args.getString(0);
-            if (args.length() > 1 && !args.isNull(1))
-                title = args.getString(1);
-            if (args.length() > 2 && !args.isNull(2))
-                buttonLabel = args.getString(2);
-
-            // construct the dialog
-            final AlertDialog dialog = new AlertDialog(message, title, buttonLabel);
-
-            // ask the event dispatch thread to show dialog
-            Runnable runnable = new Runnable() {
-                public void run() {
-                    UiApplication ui = UiApplication.getUiApplication();
-                    ui.pushModalScreen(dialog);
-                }
-            };
-            UiApplication.getUiApplication().invokeAndWait(runnable);
-
-            result = new PluginResult(PluginResult.Status.OK);
-        }
-        catch (JSONException e) {
-            result = new PluginResult(PluginResult.Status.JSON_EXCEPTION, "JSONException: " + e.getMessage());
-        }
-
-        return result;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/notification/AlertDialog.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/notification/AlertDialog.java b/bbos/framework/ext/src/org/apache/cordova/notification/AlertDialog.java
deleted file mode 100644
index a32666b..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/notification/AlertDialog.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.notification;
-
-import org.apache.cordova.ui.SpacerField;
-
-import net.rim.device.api.ui.Field;
-import net.rim.device.api.ui.FieldChangeListener;
-import net.rim.device.api.ui.component.ButtonField;
-import net.rim.device.api.ui.component.LabelField;
-import net.rim.device.api.ui.component.SeparatorField;
-import net.rim.device.api.ui.container.PopupScreen;
-import net.rim.device.api.ui.container.VerticalFieldManager;
-
-public final class AlertDialog extends PopupScreen implements FieldChangeListener {
-
-    private ButtonField button;
-
-    /**
-     * Open a custom alert dialog, with a customizable title and button text.
-     *
-     * @param {String} message Message to print in the body of the alert
-     * @param {String} title Title of the alert dialog (default: 'Alert')
-     * @param {String} buttonLabel Label of the close button (default: 'OK')
-     */
-    public AlertDialog(String message, String title, String buttonLabel) {
-
-        super(new VerticalFieldManager());
-
-        // title
-        add(new LabelField(title));
-
-        // separator
-        add(new SeparatorField(SeparatorField.LINE_HORIZONTAL));
-
-        // message
-        add(new SpacerField(0, 20));
-        add(new LabelField(message, FIELD_HCENTER | FIELD_VCENTER));
-        add(new SpacerField(0, 20));
-
-        // button
-        button = new ButtonField(buttonLabel, ButtonField.CONSUME_CLICK | FIELD_HCENTER);
-        button.setChangeListener(this);
-        add(button);
-    }
-
-    public void fieldChanged(Field field, int context) {
-        if (button == field) {
-            close();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/notification/BeepAction.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/notification/BeepAction.java b/bbos/framework/ext/src/org/apache/cordova/notification/BeepAction.java
deleted file mode 100644
index b1c3658..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/notification/BeepAction.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.notification;
-
-import java.io.IOException;
-
-import javax.microedition.media.Control;
-import javax.microedition.media.Manager;
-import javax.microedition.media.MediaException;
-import javax.microedition.media.Player;
-import javax.microedition.media.control.ToneControl;
-import javax.microedition.media.control.VolumeControl;
-
-import org.apache.cordova.CordovaExtension;
-import org.apache.cordova.api.PluginResult;
-import org.apache.cordova.json4j.JSONArray;
-import org.apache.cordova.json4j.JSONException;
-import org.apache.cordova.util.Logger;
-
-import net.rim.device.api.media.control.AudioPathControl;
-import net.rim.device.api.notification.NotificationsManager;
-import net.rim.device.api.system.Alert;
-
-/**
- * Beep Action plays a device tone.
- */
-public class BeepAction {
-
-    private static final int BEEP_VOLUME = 100;
-    private static final byte NOTE = 76;                // E5
-    private static final byte D = 16;                   // quarter note
-    private static final byte tempo = 30;               // 120 bpm
-
-    private static final byte[] TONE_SEQUENCE_START = {
-            ToneControl.VERSION, 1,
-            ToneControl.TEMPO, tempo
-    };
-
-    private static final byte[] TONE = {
-        NOTE,D, ToneControl.SILENCE,D/2
-	};
-
-    /**
-     * Beeps the device for a given number of times.  By default, it will beep
-     * once.  If the user explicitly sets the beep count to zero, it will play
-     * the applications notification profile.  The application profile playback
-     * sequence is controlled by the user.
-     *
-     * @param args JSONArray formatted as [ count ]
-     *             count: specifies the number of times to beep the device (default: 1).
-     * @return A CommandResult object with the success or failure
-     *         state for beeping the device.
-     */
-    public static PluginResult execute(JSONArray args) {
-        PluginResult result = null;
-
-        if (Alert.isAudioSupported()) {
-
-            try {
-                int repeatCount = 1;
-                if (args.length() > 0 && !args.isNull(0)) {
-                    repeatCount = args.getInt(0);
-                }
-
-                // play tone n times
-                if (repeatCount > 0) {
-                    playTone(repeatCount);
-                }
-                // FIXME: unsupported on other platforms
-                // send notification event to application profile
-                else {
-                    NotificationsManager.triggerImmediateEvent(
-                            CordovaExtension.getAppID(), 0, null, null);
-                }
-            }
-            catch (JSONException e) {
-                Logger.log(BeepAction.class.getName() + ": " + e);
-                result = new PluginResult(PluginResult.Status.JSON_EXCEPTION, e.getMessage());
-            }
-            catch (Exception e) {
-                Logger.log(BeepAction.class.getName() + ": " + e);
-                result = new PluginResult(PluginResult.Status.IO_EXCEPTION, e.getMessage());
-            }
-
-            result = new PluginResult(PluginResult.Status.OK);
-        }
-        else {
-            result = new PluginResult(PluginResult.Status.ILLEGAL_ACCESS_EXCEPTION, "Audio not supported");
-        }
-
-        return result;
-    }
-
-    /**
-     * Plays a tone the specified number of times on the device audio system.
-     * @param repeatCount number of times to play tone
-     */
-    private static void playTone(int repeatCount) throws MediaException, IOException {
-
-        // get tone player
-        Player p = Manager.createPlayer(Manager.TONE_DEVICE_LOCATOR);
-        p.realize();
-
-        // set tone sequence
-        ToneControl tc = (ToneControl)p.getControl("ToneControl");
-        tc.setSequence(getToneSequence(repeatCount));
-
-        // crank up the volume
-        VolumeControl vc = (VolumeControl)p.getControl("VolumeControl");
-        vc.setLevel(BEEP_VOLUME);
-
-        // route audio to speaker phone
-        p.prefetch();
-        Control[] c = p.getControls();
-        for(int i=c.length-1; i>=0; --i) {
-            if(c[i] instanceof AudioPathControl) {
-                AudioPathControl apc = (AudioPathControl)c[i];
-                apc.setAudioPath(AudioPathControl.AUDIO_PATH_HANDSFREE);
-                break;
-            }
-        }
-
-        // play
-        p.start();
-    }
-
-    /**
-     * Creates a tone sequence to play.
-     * @param repeatCount number of times to play tone
-     * @return tone sequence
-     */
-    private static byte[] getToneSequence(int repeatCount) {
-        // we have to build the sequence dynamically because
-        // ToneControl.REPEAT, repeatCount, TONE, DURATION
-        // doesn't seem to work
-        byte[] sequence = new byte[TONE_SEQUENCE_START.length + TONE.length * repeatCount];
-        System.arraycopy(TONE_SEQUENCE_START, 0, sequence, 0, TONE_SEQUENCE_START.length);
-        for (int i = 0; i < repeatCount; i++) {
-            System.arraycopy(TONE, 0, sequence, (TONE_SEQUENCE_START.length+TONE.length*i), TONE.length);
-        }
-
-        return sequence;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/notification/ConfirmAction.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/notification/ConfirmAction.java b/bbos/framework/ext/src/org/apache/cordova/notification/ConfirmAction.java
deleted file mode 100644
index 881ca0e..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/notification/ConfirmAction.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.notification;
-
-import org.apache.cordova.api.PluginResult;
-import org.apache.cordova.json4j.JSONArray;
-import org.apache.cordova.json4j.JSONException;
-import org.apache.cordova.util.Logger;
-
-import net.rim.device.api.ui.UiApplication;
-
-/**
- * Displays a confirmation dialog with customizable title, message, and button
- * fields.
- */
-public class ConfirmAction {
-
-    private static final String DEFAULT_MESSAGE = "";
-    private static final String DEFAULT_TITLE   = "Confirm";
-    private static final String DEFAULT_BUTTONS = "OK,Cancel";
-
-    /**
-     * Displays a custom confirmation dialog.
-     *
-     * @param args JSONArray formatted as [ message, title, buttonLabels ]
-     *             message:     the message to display in the dialog body (default: "").
-     *             title:       the title to display at the top of the dialog (default: "Confirm").
-     *             buttonLabel: the button text (default: "OK,Cancel").
-     * @return A PluginResult object with index of dialog button pressed (1,2,3...).
-     */
-    public static PluginResult execute(JSONArray args) {
-
-        PluginResult result = null;
-
-        try {
-            String message = DEFAULT_MESSAGE;
-            String title = DEFAULT_TITLE;
-            String buttonLabels = DEFAULT_BUTTONS;
-            if (args.length() > 0 && !args.isNull(0))
-                message = args.getString(0);
-            if (args.length() > 1 && !args.isNull(1))
-                title = args.getString(1);
-            if (args.length() > 2 && !args.isNull(2))
-                buttonLabels = args.getString(2);
-
-            // construct the dialog
-            final ConfirmDialog dialog = new ConfirmDialog(message, title, buttonLabels);
-
-            // ask the event dispatch thread to show it
-            Runnable runnable = new Runnable() {
-                public void run() {
-                    UiApplication ui = UiApplication.getUiApplication();
-                    ui.pushModalScreen(dialog);
-                }
-            };
-            Logger.log(ConfirmAction.class.getName() + ": showing confirm dialog: '" + title + "'");
-            UiApplication.getUiApplication().invokeAndWait(runnable);
-
-            // add +1 to the button index to match the JavaScript API (which starts at 1)
-            int button = dialog.getSelectedValue() + 1;
-            result = new PluginResult(PluginResult.Status.OK, Integer.toString(button));
-        }
-        catch (JSONException e) {
-            result = new PluginResult(PluginResult.Status.JSON_EXCEPTION, "JSONException: " + e.getMessage());
-        }
-
-        return result;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/notification/ConfirmDialog.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/notification/ConfirmDialog.java b/bbos/framework/ext/src/org/apache/cordova/notification/ConfirmDialog.java
deleted file mode 100644
index d19003c..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/notification/ConfirmDialog.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.notification;
-
-import org.apache.cordova.ui.SpacerField;
-import org.apache.cordova.util.StringUtils;
-
-import net.rim.device.api.ui.Field;
-import net.rim.device.api.ui.FieldChangeListener;
-import net.rim.device.api.ui.component.ButtonField;
-import net.rim.device.api.ui.component.LabelField;
-import net.rim.device.api.ui.component.SeparatorField;
-import net.rim.device.api.ui.container.PopupScreen;
-import net.rim.device.api.ui.container.VerticalFieldManager;
-
-/**
- * Creates a dialog box in which the title, message, and button labels are all
- * customizable.
- */
-public final class ConfirmDialog extends PopupScreen implements FieldChangeListener {
-
-    private ButtonField[] buttons;              // the button fields
-    private int           selectedValue = -1;   // the selected button
-
-    /**
-     * Construct a confirmation dialog, with customizable title and button text.
-     *
-     * @param {String} message Message to print in the body of the alert
-     * @param {String} title Title of the alert dialog (default: 'Confirm')
-     * @param {String} buttonLabels Labels of the buttons (default: 'OK,Cancel')
-     */
-    public ConfirmDialog(String message, String title, String buttonLabels) {
-        super(new VerticalFieldManager());
-
-        // title
-        add(new LabelField(title));
-
-        // separator
-        add(new SeparatorField(SeparatorField.LINE_HORIZONTAL));
-
-        // message
-        add(new SpacerField(0, 20));
-        add(new LabelField(message, FIELD_HCENTER | FIELD_VCENTER));
-        add(new SpacerField(0, 20));
-
-        // parse the button labels
-        String[] labels = StringUtils.split(buttonLabels, ",");
-        buttons = new ButtonField[labels.length];
-
-        // add buttons
-        for (int i = 0; i < labels.length; i++) {
-            buttons[i] = new ButtonField(labels[i], ButtonField.CONSUME_CLICK | FIELD_HCENTER);
-            buttons[i].setChangeListener(this);
-            add(new SpacerField(0, 5));
-            add(buttons[i]);
-        }
-    }
-
-    /**
-     * Returns the index of the button pressed.
-     *
-     * @return The index of the button pressed (0,1,2...).
-     */
-    public int getSelectedValue() {
-        return this.selectedValue;
-    }
-
-    /**
-     * Invoked when a button is pressed.
-     */
-    public void fieldChanged(Field field, int context) {
-
-        // figure out which button was pressed
-        for (int i = 0; i < buttons.length; i++) {
-            if (buttons[i] == field) {
-                this.selectedValue = i;
-                break;
-            }
-        }
-
-        // close the dialog
-        close();
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/notification/Notification.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/notification/Notification.java b/bbos/framework/ext/src/org/apache/cordova/notification/Notification.java
deleted file mode 100644
index 4183987..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/notification/Notification.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.notification;
-
-import org.apache.cordova.CordovaExtension;
-import org.apache.cordova.api.Plugin;
-import org.apache.cordova.api.PluginResult;
-import org.apache.cordova.json4j.JSONArray;
-
-import net.rim.device.api.notification.NotificationsConstants;
-import net.rim.device.api.notification.NotificationsManager;
-
-/**
- * Cordova Notification plugin.
- *
- * The Notification plugin can invoke the following actions:
- *
- *   - alert(message, title, buttonLabel)
- *   - confirm(message, title, button1,button2,button3...)
- *   - beep(count)
- *   - vibrate(duration)
- *   - progressStart(title, message)
- *   - progressStop()
- *   - progressValue(value)
- *   - activityStart(title, message)
- *   - activityStop()
- */
-public class Notification extends Plugin {
-
-    /**
-     * Possible actions
-     */
-    private static final String ACTION_ALERT = "alert";
-    private static final String ACTION_BEEP = "beep";
-    private static final String ACTION_CONFIRM = "confirm";
-    private static final String ACTION_VIBRATE = "vibrate";
-    private static final String ACTION_PROGRESS_START = "progressStart";
-    private static final String ACTION_PROGRESS_STOP = "progressStop";
-    private static final String ACTION_PROGRESS_VALUE = "progressValue";
-    private static final String ACTION_ACTIVITY_START = "activityStart";
-    private static final String ACTION_ACTIVITY_STOP = "activityStop";
-
-    /**
-     * Creates a notification profile for the application on the device. The
-     * application can trigger a notification event that will play the profile.
-     * The profile settings are set by the user.
-     */
-    public static void registerProfile() {
-        // Register with the NotificationsManager to create a notification
-        // profile for this application and enable notifications to be
-        // controlled by the user
-        Object object = new Object() {
-            private String appName = CordovaExtension.getAppName();
-
-            public String toString() {
-                return appName;
-            }
-        };
-        NotificationsManager.registerSource(CordovaExtension.getAppID(),
-                object, NotificationsConstants.IMPORTANT);
-    }
-
-    /**
-     * Executes the request and returns CommandResult.
-     *
-     * @param action
-     *            The action to perform.
-     * @param callbackId
-     *            The callback ID to be invoked upon action completion
-     * @param args
-     *            JSONArry of arguments for the specified action.
-     * @return A PluginResult object with a status and message.
-     */
-    public PluginResult execute(String action, JSONArray args, String callbackId) {
-        PluginResult result = null;
-
-        if (ACTION_ALERT.equals(action)) {
-            result = AlertAction.execute(args);
-        } else if (ACTION_BEEP.equals(action)) {
-            result = BeepAction.execute(args);
-        } else if (ACTION_CONFIRM.equals(action)) {
-            result = ConfirmAction.execute(args);
-        } else if (ACTION_VIBRATE.equals(action)) {
-            result = VibrateAction.execute(args);
-        } else if (ACTION_ACTIVITY_START.equals(action)) {
-            result = ActivityDialog.start(args);
-        } else if (ACTION_ACTIVITY_STOP.equals(action)) {
-            result = ActivityDialog.stop();
-        } else if (ACTION_PROGRESS_START.equals(action)) {
-            result = ProgressDialog.start(args);
-        } else if (ACTION_PROGRESS_STOP.equals(action)) {
-            result = ProgressDialog.stop();
-        } else if (ACTION_PROGRESS_VALUE.equals(action)) {
-            result = ProgressDialog.setValue(args);
-        } else {
-            result = new PluginResult(PluginResult.Status.INVALID_ACTION,
-                    "Notification: Invalid action: " + action);
-        }
-
-        return result;
-    }
-
-    /**
-     * Identifies if action to be executed returns a value and should be run
-     * synchronously.
-     *
-     * @param action
-     *            The action to execute
-     * @return T=returns value
-     */
-    public boolean isSynch(String action) {
-        if (ACTION_ALERT.equals(action) || ACTION_CONFIRM.equals(action)) {
-            return false;
-        }
-
-        return true;
-    }
-
-}


[14/15] CB-4228

Posted by lo...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/cordova/build
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/cordova/build b/bbos/bin/templates/project/cordova/build
deleted file mode 100755
index 4743782..0000000
--- a/bbos/bin/templates/project/cordova/build
+++ /dev/null
@@ -1,28 +0,0 @@
-#! /bin/sh
-#       Licensed to the Apache Software Foundation (ASF) under one
-#       or more contributor license agreements.  See the NOTICE file
-#       distributed with this work for additional information
-#       regarding copyright ownership.  The ASF licenses this file
-#       to you under the Apache License, Version 2.0 (the
-#       "License"); you may not use this file except in compliance
-#       with the License.  You may obtain a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#       Unless required by applicable law or agreed to in writing,
-#       software distributed under the License is distributed on an
-#       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#       KIND, either express or implied.  See the License for the
-#       specific language governing permissions and limitations
-#       under the License.
-
-ANT=$(which ant)
-
-if [ "$1" == "--help" ]
-then
-  echo 'usage: build'
-  echo 'NOTE: please customize the project.properties file first before using this command!'
-  exit 0
-fi
-
-$ANT blackberry build

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/cordova/run
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/cordova/run b/bbos/bin/templates/project/cordova/run
deleted file mode 100755
index 4b8f8eb..0000000
--- a/bbos/bin/templates/project/cordova/run
+++ /dev/null
@@ -1,35 +0,0 @@
-#! /bin/sh
-#       Licensed to the Apache Software Foundation (ASF) under one
-#       or more contributor license agreements.  See the NOTICE file
-#       distributed with this work for additional information
-#       regarding copyright ownership.  The ASF licenses this file
-#       to you under the Apache License, Version 2.0 (the
-#       "License"); you may not use this file except in compliance
-#       with the License.  You may obtain a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#       Unless required by applicable law or agreed to in writing,
-#       software distributed under the License is distributed on an
-#       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#       KIND, either express or implied.  See the License for the
-#       specific language governing permissions and limitations
-#       under the License.
-
-ANT=$(which ant)
-
-if [ "$1" == "--help" ]
-then
-  echo 'usage: run'
-  echo 'NOTE: please customize the project.properties file first before using this command!'
-  exit 0
-fi
-
-echo 'Do you have a BlackBerry device connected to your computer? (y/n)'
-read DEVICE
-if [ $DEVICE == "y" ]
-  then
-    $ANT blackberry debug-device
-else
-    $ANT blackberry load-simulator
-fi

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/cordova/version
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/cordova/version b/bbos/bin/templates/project/cordova/version
deleted file mode 100644
index 74c4ef0..0000000
--- a/bbos/bin/templates/project/cordova/version
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#  KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-#
-# Returns the VERSION of CordovaLib used.
-#
-
-
-CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd -P)
-PROJECT_PATH="$(dirname "$CORDOVA_PATH")"
-
-VERSION_FILE_PATH="$PROJECT_PATH/VERSION"
-VERSION=$(<$VERSION_FILE_PATH)
-
-if [ -f "$VERSION_FILE_PATH" ]; then
-  echo $VERSION
-else
-  echo "The file \"$VERSION_FILE_PATH\" does not exist."
-  exit 1
-fi

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/playbook.xml
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/playbook.xml b/bbos/bin/templates/project/playbook.xml
deleted file mode 100644
index 7250cbc..0000000
--- a/bbos/bin/templates/project/playbook.xml
+++ /dev/null
@@ -1,338 +0,0 @@
-<project default="help">
-<!-- 
-       Licensed to the Apache Software Foundation (ASF) under one
-       or more contributor license agreements.  See the NOTICE file
-       distributed with this work for additional information
-       regarding copyright ownership.  The ASF licenses this file
-       to you under the Apache License, Version 2.0 (the
-       "License"); you may not use this file except in compliance
-       with the License.  You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-       Unless required by applicable law or agreed to in writing,
-       software distributed under the License is distributed on an
-       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-       KIND, either express or implied.  See the License for the
-       specific language governing permissions and limitations
-       under the License.
--->    
-    <!-- LOAD PROPERTIES -->
-    
-    <property prefix="properties" file="project.properties" />
-    <property name="build.dir"    location="build" />
-    <property name="widget.dir"   location="${build.dir}/widget" />
-    <property name="code.sign"    value="false" />
-    <property name="generate.ext"   value="cod" />
-    <property name="build.num.file" value="buildId.txt" />
-    
-    <!-- BlackBerry WebWorks Packager for Tablets directory is required. -->
-    <fail unless="properties.playbook.bbwp.dir" message="Please specify BlackBerry WebWorks Packager directory using 'playbook.bbwp.dir' in your 'project.properties' file." />
-
-    <!-- OS identification -->
-    <condition property="isMacOSX" else="false">
-        <and>
-            <os family="mac" />
-            <os family="unix" />
-        </and>
-    </condition>
-
-    <condition property="bbwp" value="${properties.playbook.bbwp.dir}/bbwp" else="${properties.playbook.bbwp.dir}/bbwp.exe">
-        <equals arg1="${isMacOSX}" arg2="true" />
-    </condition>
-
-    <condition property="blackberry-deploy" value="${properties.playbook.bbwp.dir}/blackberry-tablet-sdk/bin/blackberry-deploy" else="${properties.playbook.bbwp.dir}/blackberry-tablet-sdk/bin/blackberry-deploy.bat">
-        <equals arg1="${isMacOSX}" arg2="true" />
-    </condition>
-
-    <condition property="blackberry-debugtokenrequest" value="${properties.playbook.bbwp.dir}/blackberry-tablet-sdk/bin/blackberry-debugtokenrequest" else="${properties.playbook.bbwp.dir}/blackberry-tablet-sdk/bin/blackberry-debugtokenrequest.bat">
-        <equals arg1="${isMacOSX}" arg2="true" />
-    </condition>
-
-    <!-- LOAD DEVICE -->
-    
-    <target name="load-device" depends="package-app">
-        <bbwp code-sign="true" />
-
-        <exec executable="${blackberry-deploy}" dir="." failonerror="true">
-            <arg value="-installApp" />
-            <arg value="-launchApp" />
-            <arg value="-device" />
-            <arg value="${properties.playbook.device.ip}" />
-            <arg value="-password" />
-            <arg value="${properties.playbook.device.password}" />
-            <arg value="-package" />
-            <arg file="${build.dir}/${cod.name}.bar" />
-        </exec>
-    </target>
-    
-    <!-- DEBUG-LOAD DEVICE -->
-    
-    <target name="debug-device" depends="package-app">
-        <if>
-            <equals arg1="${properties.playbook.device.pin}" arg2="" />
-            <then>
-                <echo>
-                    If you fill in the playbook.device.pin value you can use debug tokens!
-                    This means you won't have to worry about having a unique version in config.xml every time.
-                </echo>
-                <bbwp code-sign="true" debug="true" />
-            </then>
-            <else>
-                <generate-debug-token />
-                <bbwp code-sign="false" debug="true" />
-            </else>
-        </if>
-
-        <exec executable="${blackberry-deploy}" dir="." failonerror="true">
-            <arg value="-installApp" />
-            <arg value="-launchApp" />
-            <arg value="-device" />
-            <arg value="${properties.playbook.device.ip}" />
-            <arg value="-password" />
-            <arg value="${properties.playbook.device.password}" />
-            <arg value="-package" />
-            <arg file="${build.dir}/${cod.name}.bar" />
-        </exec>
-    </target>
-    
-    <!-- LOAD SIMULATOR -->
-    
-    <target name="load-simulator" depends="build">
-
-        <echo>This tool will not open the simulator for you </echo>
-
-        <exec executable="${blackberry-deploy}" dir="." failonerror="true">
-            <arg value="-installApp" />
-            <arg value="-launchApp" />
-            <arg value="-device" />
-            <arg value="${properties.playbook.sim.ip}" />
-            <arg value="-password" />
-            <arg value="${properties.playbook.sim.password}" />
-            <arg value="-package" />
-            <arg file="${build.dir}/${cod.name}.bar" />
-        </exec>
-    </target>
-    
-    <target name="debug-simulator" depends="package-app">
-        <bbwp code-sign="false" debug="true" />
-        <echo>This tool will not open the simulator for you </echo>
-
-        <exec executable="${blackberry-deploy}" dir="." failonerror="true">
-            <arg value="-installApp" />
-            <arg value="-launchApp" />
-            <arg value="-device" />
-            <arg value="${properties.playbook.sim.ip}" />
-            <arg value="-password" />
-            <arg value="${properties.playbook.sim.password}" />
-            <arg value="-package" />
-            <arg file="${build.dir}/${cod.name}.bar" />
-        </exec>
-    </target>
-    <!-- PACKAGE-APP -->
-    
-    <target name="package-app" depends="generate-cod-name, clean">
-        <!-- Copy the WebWorks application -->
-        <mkdir dir="${widget.dir}" />
-        <copy todir="${widget.dir}" overwrite="true">
-            <fileset dir="www" >
-                <exclude name="ext/**"/>
-                <exclude name="ext-air/**"/>
-                <exclude name="res/resourceBundles/**"/>
-            </fileset>
-        </copy>
-        
-        <!-- Update WebWorks Packager with the AIR APIs -->
-        <copy todir="${properties.playbook.bbwp.dir}\ext" overwrite="true">
-            <fileset dir="www/ext-air" excludes="README.md" />
-        </copy>
-        
-        <!-- Package the WebWorks app by zipping the widget dir. -->
-        <mkdir dir="${build.dir}" />
-        <zip compress="false" destfile="${build.dir}/${cod.name}.zip" basedir="${widget.dir}" excludes="**/build/**,**/.settings/**,**/.project" />
-    </target>
-    
-    <!-- BUILD -->
-
-    <target name="build" depends="package-app">
-        <bbwp code-sign="${code.sign}" />
-    </target>
-
-    <!-- BBWP MACRO -->
-
-    <macrodef name="bbwp">
-        <attribute name="code-sign" default="false" />
-        <attribute name="debug" default="false" />
-        <sequential>
-            <!-- check if debug flag was passed in and set an appropriate flag for CLI exec of bbwp -->
-            <if>
-                <equals arg1="@{debug}" arg2="true" />
-                <then>
-                    <property name="debug.flag" value="-d" />
-                </then>
-                <else>
-                    <property name="debug.flag" value="" />
-                </else>
-            </if>
-            <buildnumber file="${build.num.file}" />
-            <if>
-                <equals arg1="@{code-sign}" arg2="true" />
-                <then>
-                    <exec executable="${bbwp}">
-                        <arg file="${build.dir}/${cod.name}.zip" />
-                        <arg value="-gcsk" />
-                        <arg value="${properties.playbook.sigtool.csk.password}" />
-                        <arg value="-gp12" />
-                        <arg value="${properties.playbook.sigtool.p12.password}" />
-                        <arg value="-o" />
-                        <arg file="${build.dir}" />
-                        <arg line="${debug.flag} -buildId" />
-                        <arg value="${build.number}" />
-                    </exec>
-                </then>
-                <else>
-                    <exec executable="${bbwp}">
-                        <arg file="${build.dir}/${cod.name}.zip" />
-                        <arg value="-o" />
-                        <arg file="${build.dir}" />
-                        <arg line="${debug.flag} -buildId" />
-                        <arg value="${build.number}" />
-                    </exec>
-                </else>
-            </if>
-        </sequential>
-    </macrodef>
-
-    <!-- install debug token" -->
-    <macrodef name="generate-debug-token">
-        <sequential>
-            <exec executable="${blackberry-debugtokenrequest}" dir="." failonerror="true">
-                <arg value="-storepass" />
-                <arg value="${properties.playbook.sigtool.csk.password}" />
-                <arg value="-deviceID" />
-                <arg value="0x${properties.playbook.device.pin}" />
-                <arg file="${properties.playbook.bbwp.dir}/debugtoken.bar" />
-            </exec>
-
-            <exec executable="${blackberry-deploy}" dir="." failonerror="true">
-                <arg value="-installApp" />
-                <arg value="-launchApp" />
-                <arg value="-device" />
-                <arg value="${properties.playbook.device.ip}" />
-                <arg value="-password" />
-                <arg value="${properties.playbook.device.password}" />
-                <arg value="-package" />
-                <arg file="${properties.playbook.bbwp.dir}/debugtoken.bar" />
-            </exec>
-
-            <replaceregexp 
-                file="${properties.playbook.bbwp.dir}/bin/bbwp.properties" 
-                match='&lt;debug_token&gt;.*&lt;\/debug_token&gt;'
-                replace='&lt;debug_token&gt;${properties.playbook.bbwp.dir}/debugtoken.bar&lt;/debug_token&gt;'
-                byline='true'/>
-        </sequential>
-    </macrodef>
-
-    <!-- CLEAN -->
-    
-    <target name="clean">
-        <delete dir="${build.dir}" />
-        <delete dir="${widget.dir}" />
-    </target>
-    
-    <!-- CLEAN DEVICE -->
-    
-    <target name="clean-device" depends="generate-cod-name">
-        <exec executable="${blackberry-deploy}" dir="." failonerror="true">
-            <arg value="-uninstallApp" />
-            <arg value="-device" />
-            <arg value="${properties.playbook.device.ip}" />
-            <arg value="-password" />
-            <arg value="${properties.playbook.device.password}" />
-            <arg value="-package" />
-            <arg file="${build.dir}/${cod.name}.bar" />
-        </exec>
-    </target>
-    
-    <!-- CLEAN SIMULATOR -->
-    
-    <target name="clean-simulator" depends="generate-cod-name">
-        <exec executable="${blackberry-deploy}" dir="." failonerror="true">
-            <arg value="-uninstallApp" />
-            <arg value="-device" />
-            <arg value="${properties.playbook.sim.ip}" />
-            <arg value="-password" />
-            <arg value="${properties.playbook.sim.password}" />
-            <arg value="-package" />
-            <arg file="${build.dir}/${cod.name}.bar" />
-        </exec>
-    </target>
-    
-        <!-- HELPER TASKS -->
-    
-    <target name="generate-cod-name">
-        <xmlproperty file="www/config.xml" prefix="config.xml" />
-        <propertyregex property="cod.name"
-                       input="${config.xml.widget.name}"
-                       regexp="(\W+)"
-                       replace=""
-                       casesensitive="false"
-                       global="true"
-                       defaultValue="${config.xml.widget.name}" />
-        <echo message="Generated name: ${cod.name}.bar" />
-    </target>
-
-    <!-- HELP -->
-
-    <target name="help">
-        <echo>
-NAME
-  ${ant.project.name}
-
-SYNOPSIS
-  ant TARGET COMMAND [-D&lt;argument&gt;=&lt;value&gt;]...
-
-DESCRIPTION
-  You can build and deploy your project to a device or simulator.
-  
-TARGETS
-  blackberry ........ Builds a cod file and deploys to a device or simulator
- 
-  playbook .......... Builds a bar file and deploys to a device or simulator
-
-COMMANDS
-  help .............. Show this help menu.
-                        ant, ant help
-
-  load-device ....... Builds and deploys project to a connected USB device.
-                        ant load-device
-
-  load-simulator .... Builds and deploys project to default simulator.
-                        ant load-simulator
-
-  build ............. Compiles and packages the project for deployment.
-                        ant build
-
-  clean ............. Remove all files from the build/ directory.
-                        ant clean
-
-  clean-device ...... Remove this project from the connected USB device.
-                        ant clean-device
-
-  clean-simulator ... Remove this project from the simulator (takes a while).
-                        ant clean-simulator
-
-GETTING STARTED
-  1. Edit project.properties
-
-  2. &lt;ant &lt;TARGET&gt; load-simulator&gt; to run the project on the simulator
-
-  3. Customize your project by editing www/config.xml
-
-  4. To run the project on a BlackBerry device, you will need to obtain
-     code signing keys from RIM. Once you have the key, a project is
-     installed by connecting a BlackBerry via USB and running
-     &lt;ant &lt;TARGET&gt; load-device&gt;.
-        </echo>
-    </target>
-</project>

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/project.properties
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/project.properties b/bbos/bin/templates/project/project.properties
deleted file mode 100644
index 31a28a0..0000000
--- a/bbos/bin/templates/project/project.properties
+++ /dev/null
@@ -1,100 +0,0 @@
-# BlackBerry WebWorks Packager Directory
-#
-#   The BlackBerry WebWorks Packager (bbwp) is required for compiling and packaging
-#   BlackBerry WebWorks applications for deployment to a BlackBerry device
-#   or simulator.  The bbwp utility is installed with the standalone BlackBerry
-#   WebWorks SDK, and as part of the BlackBerry Web Plugin for Eclipse.
-#
-#   Please specify the location of the BlackBerry WebWorks Packager in your
-#   environment.
-#
-#   Typical location of bbwp for standalone BlackBerry WebWorks SDK installation:
-#     C:\Program Files (x86)\Research In Motion\BlackBerry Widget Packager
-#
-#   Typical location of bbwp for BlackBerry Web Plugin for Eclipse installation:
-#     C:\Eclipse-3.5.2\plugins\net.rim.browser.tools.wcpc_1.0.0.201003191451-126\wcpc
-#
-#   The ANT script is brittle and requires you to escape the backslashes.
-#     e.g. C:\some\path must be C:\\some\\path
-#
-#   Please remember to:
-#     - Double escape your backslahses (i.e. \ must be \\)
-#     - Do not add a trailing slash (e.g. C:\some\path)
-#
-blackberry.bbwp.dir=C:\\Program Files\\Research In Motion\\BlackBerry WebWorks Packager
-playbook.bbwp.dir=C:\\Program Files\\Research In Motion\\BlackBerry WebWorks SDK for TabletOS 2.1.0.6\\bbwp
-
-# (Optional) Simulator Directory
-#
-#   If sim.dir is not specified, the build script will use the simulator directory
-#   within the BlackBerry WebWorks Packager.
-#
-blackberry.sim.dir=C:\\Program Files\\Research In Motion\BlackBerry WebWorks Packager\\simpack\\6.0.0.227
-
-# (Optional) Simulator Binary
-#
-#   If sim.bin is not specified, the build script will attempt to use the default
-#   simulator in the simulator directory.
-#
-#blackberry.sim.bin=9700.bat
-
-# (Optional) MDS Directory
-#
-#   If mds.dir is not specified, the build script will attempt to use the MDS that
-#   is installed with the BlackBerry WebWorks Packager.
-#
-blackberry.mds.dir=C:\\Program Files\\Research In Motion\\BlackBerry WebWorks Packager\\mds
-
-# BlackBerry Code Signing Password
-#
-#   If you leave this field blank, then
-#   the signing tool will prompt you each time
-#
-blackberry.sigtool.password=
-
-# Playbook Code Signing Password
-#
-#   If you leave these fields blank, then
-#   signing will fail
-#
-playbook.sigtool.csk.password=
-playbook.sigtool.p12.password=
-
-# BlackBerry Simulator Password
-#
-#   If you leave this field blank, then
-#   you cannot deploy to simulator
-#
-blackberry.sim.password=
-
-# Playbook Simulator IP
-#
-#   If you leave this field blank, then
-#   you cannot deploy to simulator
-#
-playbook.sim.ip=
-
-# Playbook Simulator Password
-#
-#   If you leave this field blank, then
-#   you cannot deploy to simulator
-#
-playbook.sim.password=
-
-# Playbook Device IP
-#
-#   If you leave this field blank, then
-#   you cannot deploy to device
-#
-playbook.device.ip=
-
-# Playbook Device Password
-#
-#   If you leave this field blank, then
-#   you cannot deploy to device
-#
-playbook.device.password=
-# PlayBook Device PIN
-#
-#   Fill this value in to use debug tokens when debuging on the device
-playbook.device.pin=

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/LICENSE
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/LICENSE b/bbos/bin/templates/project/www/LICENSE
deleted file mode 100644
index 9f761f1..0000000
--- a/bbos/bin/templates/project/www/LICENSE
+++ /dev/null
@@ -1,296 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
-==============================================================
-This product also include the following software:
-==============================================================
-
---------------------------------------------------------------
-jasmine from GitHub
-
-   https://github.com/pivotal/jasmine
-
-MIT-style license
-
-license available from:
-
-   https://github.com/pivotal/jasmine/blob/master/MIT.LICENSE
-   
------------------------------
-
-Copyright (c) 2008-2011 Pivotal Labs
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
---------------------------------------------------------------
-commonjs tests from the commonjs organization at GitHub
-
-   https://github.com/commonjs/commonjs
-
-MIT-style license
-
-license available from:
-
-   https://github.com/commonjs/commonjs/blob/master/docs/license.html.markdown
-
-contributor list available from:
-
-   https://github.com/commonjs/commonjs/blob/master/docs/contributors.html.markdown
-
------------------------------
-
-Copyright 2009 Kevin Dangoor
-Copyright 2009 Ihab Awad
-Copyright 2009 Ash Berlin
-Copyright 2009 Aristid Breitkreuz
-Copyright 2009 Kevin Dangoor
-Copyright 2009 Daniel Friesen
-Copyright 2009 Wes Garland
-Copyright 2009 Kris Kowal
-Copyright 2009 Dean Landolt
-Copyright 2009 Peter Michaux
-Copyright 2009 George Moschovitis
-Copyright 2009 Michael O'Brien
-Copyright 2009 Tom Robinson
-Copyright 2009 Hannes Wallnoefer
-Copyright 2009 Mike Wilson
-Copyright 2009 Ondrej Zara
-Copyright 2009 Chris Zumbrunn
-Copyright 2009 Kris Zyp
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/NOTICE
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/NOTICE b/bbos/bin/templates/project/www/NOTICE
deleted file mode 100644
index 4e02ca4..0000000
--- a/bbos/bin/templates/project/www/NOTICE
+++ /dev/null
@@ -1,8 +0,0 @@
-Apache Cordova
-Copyright 2012 The Apache Software Foundation
-
-This product includes software developed by
-The Apache Software Foundation (http://www.apache.org)
-
-This product includes software developed by
-Jasmine (https://github.com/pivotal/jasmine)

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/README.md
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/README.md b/bbos/bin/templates/project/www/README.md
deleted file mode 100644
index 61256fe..0000000
--- a/bbos/bin/templates/project/www/README.md
+++ /dev/null
@@ -1,30 +0,0 @@
-# Apache Cordova Hello World Application
-
-> Simple Hello World application and test suite.
-
-## Run Application
-
-    /www/index.html
-
-## Run Tests
-
-    /www/spec.html
-
-## Versions and Tags
-
-The Hello World's version is directly tied to an Apache Cordova release.
-
-For example, Hello World `2.0.0` is compatible with Apache Cordova `2.0.0`.
-
-## How to Update
-
-Update to Apache Cordova x.x.x by:
-
-1. `www/index.html`
-    - Update `<script type="text/javascript" src="cordova-x.x.x.js"></script>`
-2. `VERSION`
-    - Update the version
-3. Commit and Tag
-    - `git commit -am "[app] Version x.x.x"`
-    - `git tag x.x.x`
-

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/VERSION
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/VERSION b/bbos/bin/templates/project/www/VERSION
deleted file mode 100644
index 38f8e88..0000000
--- a/bbos/bin/templates/project/www/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-dev

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/config.xml
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/config.xml b/bbos/bin/templates/project/www/config.xml
deleted file mode 100644
index 0dc6aaa..0000000
--- a/bbos/bin/templates/project/www/config.xml
+++ /dev/null
@@ -1,96 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-       Licensed to the Apache Software Foundation (ASF) under one
-       or more contributor license agreements.  See the NOTICE file
-       distributed with this work for additional information
-       regarding copyright ownership.  The ASF licenses this file
-       to you under the Apache License, Version 2.0 (the
-       "License"); you may not use this file except in compliance
-       with the License.  You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-       Unless required by applicable law or agreed to in writing,
-       software distributed under the License is distributed on an
-       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-       KIND, either express or implied.  See the License for the
-       specific language governing permissions and limitations
-       under the License.
--->
-<!--
-  Widget Configuration Reference:
-    http://docs.blackberry.com/en/developers/deliverables/15274/
--->
-
-<widget xmlns="http://www.w3.org/ns/widgets"
-        xmlns:rim="http://www.blackberry.com/ns/widgets"
-	version="1.0.0.0">
-
-  <name>__NAME__</name>
-
-  <author>Your Name Here</author>
-
-  <description>
-       A sample Apache Cordova application that responds to the deviceready event.
-  </description>
-
-  <license href="http://opensource.org/licenses/alphabetical">
-  </license>
-
-  <!-- Cordova API -->
-  <feature id="blackberry.system" required="true" version="1.0.0.0" />
-  <feature id="org.apache.cordova" required="true" version="1.0.0" />
-  <feature id="blackberry.find" required="true" version="1.0.0.0" />
-  <feature id="blackberry.identity" required="true" version="1.0.0.0" />
-  <feature id="blackberry.identity.phone" required="true" version="1.0.0.0" />
-  <feature id="blackberry.pim.Address" required="true" version="1.0.0.0" />
-  <feature id="blackberry.pim.Contact" required="true" version="1.0.0.0" />
-  <feature id="blackberry.io.file" required="true" version="1.0.0.0" />
-  <feature id="blackberry.utils" required="true" version="1.0.0.0" />
-  <feature id="blackberry.io.dir" required="true" version="1.0.0.0" />
-  <feature id="blackberry.app" required="true" version="1.0.0.0" />
-  <feature id="blackberry.app.event" required="true" version="1.0.0.0" />
-  <feature id="blackberry.system.event" required="true" version="1.0.0.0"/>
-  <feature id="blackberry.widgetcache" required="true" version="1.0.0.0"/>
-  <feature id="blackberry.media.camera" />
-  <feature id="blackberry.ui.dialog" />
-  <feature id="blackberry.connection" />
-  <feature id="blackberry.bbm.platform" />
-  <feature id="blackberry.invoke.card" />
-  <feature id="blackberry.pim.contacts" />
-  <feature id="blackberry.ui.contextmenu" />
-  <feature id="blackberry.io.filetransfer" />
-  <feature id="blackberry.io" />
-  <feature id="blackberry.invoke" />
-  <feature id="blackberry.invoked" />
-  <feature id="blackberry.push" />
-  <feature id="blackberry.media.microphone" required="true" version="1.0.0.0"/>
-
-  <!-- Cordova API -->
-  <access subdomains="true" uri="file:///store/home" />
-  <access subdomains="true" uri="file:///SDCard" />
-
-  <!-- Expose access to all URIs, including the file and http protocols -->
-  <access subdomains="true" uri="*" />
-
-  <icon rim:hover="false" src="res/icon/blackberry/icon-80.png" />
-  <icon rim:hover="true" src="res/icon/blackberry/icon-80.png" />
-
-  <rim:loadingScreen backgroundColor="#CFCFCF"
-                     foregroundImage="res/screen/blackberry/screen-225.png"
-		     onFirstLaunch="true">
-    <rim:transitionEffect type="fadeOut" />
-  </rim:loadingScreen>
-
-  <content src="index.html" />
-
-  <rim:permissions>
-    <rim:permit>use_camera</rim:permit>
-    <rim:permit>read_device_identifying_information</rim:permit>
-    <rim:permit>access_shared</rim:permit>
-    <rim:permit>read_geolocation</rim:permit>
-    <rim:permit>record_audio</rim:permit>
-    <rim:permit>access_pimdomain_contacts</rim:permit>
-  </rim:permissions>
-
-</widget>

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/css/index.css
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/css/index.css b/bbos/bin/templates/project/www/css/index.css
deleted file mode 100644
index 51daa79..0000000
--- a/bbos/bin/templates/project/www/css/index.css
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-* {
-    -webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */
-}
-
-body {
-    -webkit-touch-callout: none;                /* prevent callout to copy image, etc when tap to hold */
-    -webkit-text-size-adjust: none;             /* prevent webkit from resizing text to fit */
-    -webkit-user-select: none;                  /* prevent copy paste, to allow, change 'none' to 'text' */
-    background-color:#E4E4E4;
-    background-image:linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
-    background-image:-webkit-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
-    background-image:-ms-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
-    background-image:-webkit-gradient(
-        linear,
-        left top,
-        left bottom,
-        color-stop(0, #A7A7A7),
-        color-stop(0.51, #E4E4E4)
-    );
-    background-attachment:fixed;
-    font-family:'HelveticaNeue-Light', 'HelveticaNeue', Helvetica, Arial, sans-serif;
-    font-size:12px;
-    height:100%;
-    margin:0px;
-    padding:0px;
-    text-transform:uppercase;
-    width:100%;
-}
-
-/* Portrait layout (default) */
-.app {
-    background:url(../img/logo.png) no-repeat center top; /* 170px x 200px */
-    position:absolute;             /* position in the center of the screen */
-    left:50%;
-    top:50%;
-    height:50px;                   /* text area height */
-    width:225px;                   /* text area width */
-    text-align:center;
-    padding:180px 0px 0px 0px;     /* image height is 200px (bottom 20px are overlapped with text) */
-    margin:-115px 0px 0px -112px;  /* offset vertical: half of image height and text area height */
-                                   /* offset horizontal: half of text area width */
-}
-
-/* Landscape layout (with min-width) */
-@media screen and (min-aspect-ratio: 1/1) and (min-width:400px) {
-    .app {
-        background-position:left center;
-        padding:75px 0px 75px 170px;  /* padding-top + padding-bottom + text area = image height */
-        margin:-90px 0px 0px -198px;  /* offset vertical: half of image height */
-                                      /* offset horizontal: half of image width and text area width */
-    }
-}
-
-h1 {
-    font-size:24px;
-    font-weight:normal;
-    margin:0px;
-    overflow:visible;
-    padding:0px;
-    text-align:center;
-}
-
-.event {
-    border-radius:4px;
-    -webkit-border-radius:4px;
-    color:#FFFFFF;
-    font-size:12px;
-    margin:0px 30px;
-    padding:2px 0px;
-}
-
-.event.listening {
-    background-color:#333333;
-    display:block;
-}
-
-.event.received {
-    background-color:#4B946A;
-    display:none;
-}
-
-@keyframes fade {
-    from { opacity: 1.0; }
-    50% { opacity: 0.4; }
-    to { opacity: 1.0; }
-}
- 
-@-webkit-keyframes fade {
-    from { opacity: 1.0; }
-    50% { opacity: 0.4; }
-    to { opacity: 1.0; }
-}
- 
-.blink {
-    animation:fade 3000ms infinite;
-    -webkit-animation:fade 3000ms infinite;
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/img/logo.png
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/img/logo.png b/bbos/bin/templates/project/www/img/logo.png
deleted file mode 100644
index 9519e7d..0000000
Binary files a/bbos/bin/templates/project/www/img/logo.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/index.html
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/index.html b/bbos/bin/templates/project/www/index.html
deleted file mode 100644
index e84fbd7..0000000
--- a/bbos/bin/templates/project/www/index.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!DOCTYPE html>
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one
-    or more contributor license agreements.  See the NOTICE file
-    distributed with this work for additional information
-    regarding copyright ownership.  The ASF licenses this file
-    to you under the Apache License, Version 2.0 (the
-    "License"); you may not use this file except in compliance
-    with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing,
-    software distributed under the License is distributed on an
-    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-     KIND, either express or implied.  See the License for the
-    specific language governing permissions and limitations
-    under the License.
--->
-<html>
-    <head>
-        <meta charset="utf-8" />
-        <meta name="format-detection" content="telephone=no" />
-        <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
-        <link rel="stylesheet" type="text/css" href="css/index.css" />
-        <title>Hello World</title>
-    </head>
-    <body>
-        <div class="app">
-            <h1>Apache Cordova</h1>
-            <div id="deviceready" class="blink">
-                <p class="event listening">Connecting to Device</p>
-                <p class="event received">Device is Ready</p>
-            </div>
-        </div>
-        <script type="text/javascript" src="cordova.js"></script>
-        <script type="text/javascript" src="js/index.js"></script>
-        <script type="text/javascript">
-            app.initialize();
-        </script>
-    </body>
-</html>

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/js/index.js
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/js/index.js b/bbos/bin/templates/project/www/js/index.js
deleted file mode 100644
index 31d9064..0000000
--- a/bbos/bin/templates/project/www/js/index.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-var app = {
-    // Application Constructor
-    initialize: function() {
-        this.bindEvents();
-    },
-    // Bind Event Listeners
-    //
-    // Bind any events that are required on startup. Common events are:
-    // 'load', 'deviceready', 'offline', and 'online'.
-    bindEvents: function() {
-        document.addEventListener('deviceready', this.onDeviceReady, false);
-    },
-    // deviceready Event Handler
-    //
-    // The scope of 'this' is the event. In order to call the 'receivedEvent'
-    // function, we must explicity call 'app.receivedEvent(...);'
-    onDeviceReady: function() {
-        app.receivedEvent('deviceready');
-    },
-    // Update DOM on a Received Event
-    receivedEvent: function(id) {
-        var parentElement = document.getElementById(id);
-        var listeningElement = parentElement.querySelector('.listening');
-        var receivedElement = parentElement.querySelector('.received');
-
-        listeningElement.setAttribute('style', 'display:none;');
-        receivedElement.setAttribute('style', 'display:block;');
-
-        console.log('Received Event: ' + id);
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/json2.js
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/json2.js b/bbos/bin/templates/project/www/json2.js
deleted file mode 100644
index c52b92a..0000000
--- a/bbos/bin/templates/project/www/json2.js
+++ /dev/null
@@ -1,482 +0,0 @@
-/*
-    http://www.JSON.org/json2.js
-    2010-03-20
-
-    Public Domain.
-
-    NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
-
-    See http://www.JSON.org/js.html
-
-
-    This code should be minified before deployment.
-    See http://javascript.crockford.com/jsmin.html
-
-    USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
-    NOT CONTROL.
-
-
-    This file creates a global JSON object containing two methods: stringify
-    and parse.
-
-        JSON.stringify(value, replacer, space)
-            value       any JavaScript value, usually an object or array.
-
-            replacer    an optional parameter that determines how object
-                        values are stringified for objects. It can be a
-                        function or an array of strings.
-
-            space       an optional parameter that specifies the indentation
-                        of nested structures. If it is omitted, the text will
-                        be packed without extra whitespace. If it is a number,
-                        it will specify the number of spaces to indent at each
-                        level. If it is a string (such as '\t' or '&nbsp;'),
-                        it contains the characters used to indent at each level.
-
-            This method produces a JSON text from a JavaScript value.
-
-            When an object value is found, if the object contains a toJSON
-            method, its toJSON method will be called and the result will be
-            stringified. A toJSON method does not serialize: it returns the
-            value represented by the name/value pair that should be serialized,
-            or undefined if nothing should be serialized. The toJSON method
-            will be passed the key associated with the value, and this will be
-            bound to the value
-
-            For example, this would serialize Dates as ISO strings.
-
-                Date.prototype.toJSON = function (key) {
-                    function f(n) {
-                        // Format integers to have at least two digits.
-                        return n < 10 ? '0' + n : n;
-                    }
-
-                    return this.getUTCFullYear()   + '-' +
-                         f(this.getUTCMonth() + 1) + '-' +
-                         f(this.getUTCDate())      + 'T' +
-                         f(this.getUTCHours())     + ':' +
-                         f(this.getUTCMinutes())   + ':' +
-                         f(this.getUTCSeconds())   + 'Z';
-                };
-
-            You can provide an optional replacer method. It will be passed the
-            key and value of each member, with this bound to the containing
-            object. The value that is returned from your method will be
-            serialized. If your method returns undefined, then the member will
-            be excluded from the serialization.
-
-            If the replacer parameter is an array of strings, then it will be
-            used to select the members to be serialized. It filters the results
-            such that only members with keys listed in the replacer array are
-            stringified.
-
-            Values that do not have JSON representations, such as undefined or
-            functions, will not be serialized. Such values in objects will be
-            dropped; in arrays they will be replaced with null. You can use
-            a replacer function to replace those with JSON values.
-            JSON.stringify(undefined) returns undefined.
-
-            The optional space parameter produces a stringification of the
-            value that is filled with line breaks and indentation to make it
-            easier to read.
-
-            If the space parameter is a non-empty string, then that string will
-            be used for indentation. If the space parameter is a number, then
-            the indentation will be that many spaces.
-
-            Example:
-
-            text = JSON.stringify(['e', {pluribus: 'unum'}]);
-            // text is '["e",{"pluribus":"unum"}]'
-
-
-            text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t');
-            // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'
-
-            text = JSON.stringify([new Date()], function (key, value) {
-                return this[key] instanceof Date ?
-                    'Date(' + this[key] + ')' : value;
-            });
-            // text is '["Date(---current time---)"]'
-
-
-        JSON.parse(text, reviver)
-            This method parses a JSON text to produce an object or array.
-            It can throw a SyntaxError exception.
-
-            The optional reviver parameter is a function that can filter and
-            transform the results. It receives each of the keys and values,
-            and its return value is used instead of the original value.
-            If it returns what it received, then the structure is not modified.
-            If it returns undefined then the member is deleted.
-
-            Example:
-
-            // Parse the text. Values that look like ISO date strings will
-            // be converted to Date objects.
-
-            myData = JSON.parse(text, function (key, value) {
-                var a;
-                if (typeof value === 'string') {
-                    a =
-/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
-                    if (a) {
-                        return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
-                            +a[5], +a[6]));
-                    }
-                }
-                return value;
-            });
-
-            myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) {
-                var d;
-                if (typeof value === 'string' &&
-                        value.slice(0, 5) === 'Date(' &&
-                        value.slice(-1) === ')') {
-                    d = new Date(value.slice(5, -1));
-                    if (d) {
-                        return d;
-                    }
-                }
-                return value;
-            });
-
-
-    This is a reference implementation. You are free to copy, modify, or
-    redistribute.
-*/
-
-/*jslint evil: true, strict: false */
-
-/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
-    call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
-    getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
-    lastIndex, length, parse, prototype, push, replace, slice, stringify,
-    test, toJSON, toString, valueOf
-*/
-
-
-// Create a JSON object only if one does not already exist. We create the
-// methods in a closure to avoid creating global variables.
-
-if (!this.JSON) {
-    this.JSON = {};
-}
-
-(function () {
-
-    function f(n) {
-        // Format integers to have at least two digits.
-        return n < 10 ? '0' + n : n;
-    }
-
-    if (typeof Date.prototype.toJSON !== 'function') {
-
-        Date.prototype.toJSON = function (key) {
-
-            return isFinite(this.valueOf()) ?
-                   this.getUTCFullYear()   + '-' +
-                 f(this.getUTCMonth() + 1) + '-' +
-                 f(this.getUTCDate())      + 'T' +
-                 f(this.getUTCHours())     + ':' +
-                 f(this.getUTCMinutes())   + ':' +
-                 f(this.getUTCSeconds())   + 'Z' : null;
-        };
-
-        String.prototype.toJSON =
-        Number.prototype.toJSON =
-        Boolean.prototype.toJSON = function (key) {
-            return this.valueOf();
-        };
-    }
-
-    var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
-        escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
-        gap,
-        indent,
-        meta = {    // table of character substitutions
-            '\b': '\\b',
-            '\t': '\\t',
-            '\n': '\\n',
-            '\f': '\\f',
-            '\r': '\\r',
-            '"' : '\\"',
-            '\\': '\\\\'
-        },
-        rep;
-
-
-    function quote(string) {
-
-// If the string contains no control characters, no quote characters, and no
-// backslash characters, then we can safely slap some quotes around it.
-// Otherwise we must also replace the offending characters with safe escape
-// sequences.
-
-        escapable.lastIndex = 0;
-        return escapable.test(string) ?
-            '"' + string.replace(escapable, function (a) {
-                var c = meta[a];
-                return typeof c === 'string' ? c :
-                    '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
-            }) + '"' :
-            '"' + string + '"';
-    }
-
-
-    function str(key, holder) {
-
-// Produce a string from holder[key].
-
-        var i,          // The loop counter.
-            k,          // The member key.
-            v,          // The member value.
-            length,
-            mind = gap,
-            partial,
-            value = holder[key];
-
-// If the value has a toJSON method, call it to obtain a replacement value.
-
-        if (value && typeof value === 'object' &&
-                typeof value.toJSON === 'function') {
-            value = value.toJSON(key);
-        }
-
-// If we were called with a replacer function, then call the replacer to
-// obtain a replacement value.
-
-        if (typeof rep === 'function') {
-            value = rep.call(holder, key, value);
-        }
-
-// What happens next depends on the value's type.
-
-        switch (typeof value) {
-        case 'string':
-            return quote(value);
-
-        case 'number':
-
-// JSON numbers must be finite. Encode non-finite numbers as null.
-
-            return isFinite(value) ? String(value) : 'null';
-
-        case 'boolean':
-        case 'null':
-
-// If the value is a boolean or null, convert it to a string. Note:
-// typeof null does not produce 'null'. The case is included here in
-// the remote chance that this gets fixed someday.
-
-            return String(value);
-
-// If the type is 'object', we might be dealing with an object or an array or
-// null.
-
-        case 'object':
-
-// Due to a specification blunder in ECMAScript, typeof null is 'object',
-// so watch out for that case.
-
-            if (!value) {
-                return 'null';
-            }
-
-// Make an array to hold the partial results of stringifying this object value.
-
-            gap += indent;
-            partial = [];
-
-// Is the value an array?
-
-            if (Object.prototype.toString.apply(value) === '[object Array]') {
-
-// The value is an array. Stringify every element. Use null as a placeholder
-// for non-JSON values.
-
-                length = value.length;
-                for (i = 0; i < length; i += 1) {
-                    partial[i] = str(i, value) || 'null';
-                }
-
-// Join all of the elements together, separated with commas, and wrap them in
-// brackets.
-
-                v = partial.length === 0 ? '[]' :
-                    gap ? '[\n' + gap +
-                            partial.join(',\n' + gap) + '\n' +
-                                mind + ']' :
-                          '[' + partial.join(',') + ']';
-                gap = mind;
-                return v;
-            }
-
-// If the replacer is an array, use it to select the members to be stringified.
-
-            if (rep && typeof rep === 'object') {
-                length = rep.length;
-                for (i = 0; i < length; i += 1) {
-                    k = rep[i];
-                    if (typeof k === 'string') {
-                        v = str(k, value);
-                        if (v) {
-                            partial.push(quote(k) + (gap ? ': ' : ':') + v);
-                        }
-                    }
-                }
-            } else {
-
-// Otherwise, iterate through all of the keys in the object.
-
-                for (k in value) {
-                    if (Object.hasOwnProperty.call(value, k)) {
-                        v = str(k, value);
-                        if (v) {
-                            partial.push(quote(k) + (gap ? ': ' : ':') + v);
-                        }
-                    }
-                }
-            }
-
-// Join all of the member texts together, separated with commas,
-// and wrap them in braces.
-
-            v = partial.length === 0 ? '{}' :
-                gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' +
-                        mind + '}' : '{' + partial.join(',') + '}';
-            gap = mind;
-            return v;
-        }
-    }
-
-// If the JSON object does not yet have a stringify method, give it one.
-
-    if (typeof JSON.stringify !== 'function') {
-        JSON.stringify = function (value, replacer, space) {
-
-// The stringify method takes a value and an optional replacer, and an optional
-// space parameter, and returns a JSON text. The replacer can be a function
-// that can replace values, or an array of strings that will select the keys.
-// A default replacer method can be provided. Use of the space parameter can
-// produce text that is more easily readable.
-
-            var i;
-            gap = '';
-            indent = '';
-
-// If the space parameter is a number, make an indent string containing that
-// many spaces.
-
-            if (typeof space === 'number') {
-                for (i = 0; i < space; i += 1) {
-                    indent += ' ';
-                }
-
-// If the space parameter is a string, it will be used as the indent string.
-
-            } else if (typeof space === 'string') {
-                indent = space;
-            }
-
-// If there is a replacer, it must be a function or an array.
-// Otherwise, throw an error.
-
-            rep = replacer;
-            if (replacer && typeof replacer !== 'function' &&
-                    (typeof replacer !== 'object' ||
-                     typeof replacer.length !== 'number')) {
-                throw new Error('JSON.stringify');
-            }
-
-// Make a fake root object containing our value under the key of ''.
-// Return the result of stringifying the value.
-
-            return str('', {'': value});
-        };
-    }
-
-
-// If the JSON object does not yet have a parse method, give it one.
-
-    if (typeof JSON.parse !== 'function') {
-        JSON.parse = function (text, reviver) {
-
-// The parse method takes a text and an optional reviver function, and returns
-// a JavaScript value if the text is a valid JSON text.
-
-            var j;
-
-            function walk(holder, key) {
-
-// The walk method is used to recursively walk the resulting structure so
-// that modifications can be made.
-
-                var k, v, value = holder[key];
-                if (value && typeof value === 'object') {
-                    for (k in value) {
-                        if (Object.hasOwnProperty.call(value, k)) {
-                            v = walk(value, k);
-                            if (v !== undefined) {
-                                value[k] = v;
-                            } else {
-                                delete value[k];
-                            }
-                        }
-                    }
-                }
-                return reviver.call(holder, key, value);
-            }
-
-
-// Parsing happens in four stages. In the first stage, we replace certain
-// Unicode characters with escape sequences. JavaScript handles many characters
-// incorrectly, either silently deleting them, or treating them as line endings.
-
-            text = String(text);
-            cx.lastIndex = 0;
-            if (cx.test(text)) {
-                text = text.replace(cx, function (a) {
-                    return '\\u' +
-                        ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
-                });
-            }
-
-// In the second stage, we run the text against regular expressions that look
-// for non-JSON patterns. We are especially concerned with '()' and 'new'
-// because they can cause invocation, and '=' because it can cause mutation.
-// But just to be safe, we want to reject all unexpected forms.
-
-// We split the second stage into 4 regexp operations in order to work around
-// crippling inefficiencies in IE's and Safari's regexp engines. First we
-// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we
-// replace all simple value tokens with ']' characters. Third, we delete all
-// open brackets that follow a colon or comma or that begin the text. Finally,
-// we look to see that the remaining characters are only whitespace or ']' or
-// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
-
-            if (/^[\],:{}\s]*$/.
-test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@').
-replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']').
-replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
-
-// In the third stage we use the eval function to compile the text into a
-// JavaScript structure. The '{' operator is subject to a syntactic ambiguity
-// in JavaScript: it can begin a block or an object literal. We wrap the text
-// in parens to eliminate the ambiguity.
-
-                j = eval('(' + text + ')');
-
-// In the optional fourth stage, we recursively walk the new structure, passing
-// each name/value pair to a reviver function for possible transformation.
-
-                return typeof reviver === 'function' ?
-                    walk({'': j}, '') : j;
-            }
-
-// If the text is not JSON parseable, then a SyntaxError is thrown.
-
-            throw new SyntaxError('JSON.parse');
-        };
-    }
-}());
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/plugins.xml
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/plugins.xml b/bbos/bin/templates/project/www/plugins.xml
deleted file mode 100644
index 3d41236..0000000
--- a/bbos/bin/templates/project/www/plugins.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-       Licensed to the Apache Software Foundation (ASF) under one
-       or more contributor license agreements.  See the NOTICE file
-       distributed with this work for additional information
-       regarding copyright ownership.  The ASF licenses this file
-       to you under the Apache License, Version 2.0 (the
-       "License"); you may not use this file except in compliance
-       with the License.  You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-       Unless required by applicable law or agreed to in writing,
-       software distributed under the License is distributed on an
-       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-       KIND, either express or implied.  See the License for the
-       specific language governing permissions and limitations
-       under the License.
--->
-<plugins>
-  <plugin name="App"            value="org.apache.cordova.app.App"/>
-  <plugin name="Device"         value="org.apache.cordova.device.Device"/>
-  <plugin name="Camera"         value="org.apache.cordova.camera.Camera"/>
-  <plugin name="NetworkStatus"  value="org.apache.cordova.network.Network"/>
-  <plugin name="Notification"   value="org.apache.cordova.notification.Notification"/>
-  <plugin name="Accelerometer"  value="org.apache.cordova.accelerometer.Accelerometer"/>
-  <plugin name="Geolocation"    value="org.apache.cordova.geolocation.Geolocation"/>
-  <plugin name="File"           value="org.apache.cordova.file.FileManager"/>
-  <plugin name="FileTransfer"   value="org.apache.cordova.http.FileTransfer"/>
-  <plugin name="Contacts"       value="org.apache.cordova.pim.Contact"/>
-  <plugin name="Capture"        value="org.apache.cordova.capture.MediaCapture"/>
-  <plugin name="Battery"        value="org.apache.cordova.battery.Battery"/>
-  <plugin name="Media"          value="org.apache.cordova.media.Media"/>
-  <plugin name="Globalization"  value="org.apache.cordova.globalization.Globalization"/>
-</plugins>

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/icon/blackberry/icon-80.png
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/icon/blackberry/icon-80.png b/bbos/bin/templates/project/www/res/icon/blackberry/icon-80.png
deleted file mode 100644
index f86a27a..0000000
Binary files a/bbos/bin/templates/project/www/res/icon/blackberry/icon-80.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ar.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ar.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ar.js.gz
deleted file mode 100644
index 3c1fecd..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ar.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ar_AE.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ar_AE.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ar_AE.js.gz
deleted file mode 100644
index 677a6ad..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ar_AE.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ar_BH.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ar_BH.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ar_BH.js.gz
deleted file mode 100644
index 602c22c..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ar_BH.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ar_DZ.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ar_DZ.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ar_DZ.js.gz
deleted file mode 100644
index 485b9a2..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ar_DZ.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ar_EG.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ar_EG.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ar_EG.js.gz
deleted file mode 100644
index dfc2045..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ar_EG.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ar_IQ.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ar_IQ.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ar_IQ.js.gz
deleted file mode 100644
index 9e7c5ae..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ar_IQ.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ar_JO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ar_JO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ar_JO.js.gz
deleted file mode 100644
index 72d26ca..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ar_JO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ar_KW.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ar_KW.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ar_KW.js.gz
deleted file mode 100644
index 1dde592..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ar_KW.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ar_LB.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ar_LB.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ar_LB.js.gz
deleted file mode 100644
index 640e8be..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ar_LB.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ar_LY.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ar_LY.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ar_LY.js.gz
deleted file mode 100644
index b7beb36..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ar_LY.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ar_MA.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ar_MA.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ar_MA.js.gz
deleted file mode 100644
index 3eb49f9..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ar_MA.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ar_OM.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ar_OM.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ar_OM.js.gz
deleted file mode 100644
index b68cf81..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ar_OM.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ar_QA.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ar_QA.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ar_QA.js.gz
deleted file mode 100644
index d2583d4..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ar_QA.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ar_SA.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ar_SA.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ar_SA.js.gz
deleted file mode 100644
index aa15f88..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ar_SA.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ar_SD.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ar_SD.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ar_SD.js.gz
deleted file mode 100644
index 116f0e2..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ar_SD.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ar_SY.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ar_SY.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ar_SY.js.gz
deleted file mode 100644
index 65aaeb0..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ar_SY.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ar_TN.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ar_TN.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ar_TN.js.gz
deleted file mode 100644
index 853cc9e..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ar_TN.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ar_YE.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ar_YE.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ar_YE.js.gz
deleted file mode 100644
index 841ee63..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ar_YE.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/be.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/be.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/be.js.gz
deleted file mode 100644
index a0a64b8..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/be.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/be_BY.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/be_BY.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/be_BY.js.gz
deleted file mode 100644
index fec5f32..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/be_BY.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/bg.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/bg.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/bg.js.gz
deleted file mode 100644
index 4f816d8..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/bg.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/bg_BG.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/bg_BG.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/bg_BG.js.gz
deleted file mode 100644
index 9cc5ec3..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/bg_BG.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/bn_IN.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/bn_IN.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/bn_IN.js.gz
deleted file mode 100644
index 3f40ba4..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/bn_IN.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ca.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ca.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ca.js.gz
deleted file mode 100644
index 32e04c5..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ca.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ca_ES.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ca_ES.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ca_ES.js.gz
deleted file mode 100644
index 93d8ec3..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ca_ES.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/ca_ES_PREEURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/ca_ES_PREEURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/ca_ES_PREEURO.js.gz
deleted file mode 100644
index 69be9b1..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/ca_ES_PREEURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/cs.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/cs.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/cs.js.gz
deleted file mode 100644
index 28dd3ee..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/cs.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/cs_CZ.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/cs_CZ.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/cs_CZ.js.gz
deleted file mode 100644
index 95d0e32..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/cs_CZ.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/cs_CZ_EURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/cs_CZ_EURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/cs_CZ_EURO.js.gz
deleted file mode 100644
index 9d821d6..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/cs_CZ_EURO.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/cs_CZ_PREEURO.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/cs_CZ_PREEURO.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/cs_CZ_PREEURO.js.gz
deleted file mode 100644
index 681c4b3..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/cs_CZ_PREEURO.js.gz and /dev/null differ


[12/15] CB-4228

Posted by lo...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/zh.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/zh.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/zh.js.gz
deleted file mode 100644
index ea819e5..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/zh.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/zh_CN.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/zh_CN.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/zh_CN.js.gz
deleted file mode 100644
index eeddad9..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/zh_CN.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/zh_HK.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/zh_HK.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/zh_HK.js.gz
deleted file mode 100644
index 63130e3..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/zh_HK.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/zh_SG.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/zh_SG.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/zh_SG.js.gz
deleted file mode 100644
index ced2c42..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/zh_SG.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/resourceBundles/zh_TW.js.gz
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/resourceBundles/zh_TW.js.gz b/bbos/bin/templates/project/www/res/resourceBundles/zh_TW.js.gz
deleted file mode 100644
index 105e4fa..0000000
Binary files a/bbos/bin/templates/project/www/res/resourceBundles/zh_TW.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/res/screen/blackberry/screen-225.png
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/res/screen/blackberry/screen-225.png b/bbos/bin/templates/project/www/res/screen/blackberry/screen-225.png
deleted file mode 100644
index 29873e9..0000000
Binary files a/bbos/bin/templates/project/www/res/screen/blackberry/screen-225.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/spec.html
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/spec.html b/bbos/bin/templates/project/www/spec.html
deleted file mode 100644
index 71f00de..0000000
--- a/bbos/bin/templates/project/www/spec.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<!DOCTYPE html>
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one
-    or more contributor license agreements.  See the NOTICE file
-    distributed with this work for additional information
-    regarding copyright ownership.  The ASF licenses this file
-    to you under the Apache License, Version 2.0 (the
-    "License"); you may not use this file except in compliance
-    with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing,
-    software distributed under the License is distributed on an
-    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-     KIND, either express or implied.  See the License for the
-    specific language governing permissions and limitations
-    under the License.
--->
-<html>
-    <head>
-        <title>Jasmine Spec Runner</title>
-
-        <!-- jasmine source -->
-        <link rel="shortcut icon" type="image/png" href="spec/lib/jasmine-1.2.0/jasmine_favicon.png">
-        <link rel="stylesheet" type="text/css" href="spec/lib/jasmine-1.2.0/jasmine.css">
-        <script type="text/javascript" src="spec/lib/jasmine-1.2.0/jasmine.js"></script>
-        <script type="text/javascript" src="spec/lib/jasmine-1.2.0/jasmine-html.js"></script>
-
-        <!-- include source files here... -->
-        <script type="text/javascript" src="js/index.js"></script>
-
-        <!-- include spec files here... -->
-        <script type="text/javascript" src="spec/helper.js"></script>
-        <script type="text/javascript" src="spec/index.js"></script>
-
-        <script type="text/javascript">
-            (function() {
-                var jasmineEnv = jasmine.getEnv();
-                jasmineEnv.updateInterval = 1000;
-
-                var htmlReporter = new jasmine.HtmlReporter();
-
-                jasmineEnv.addReporter(htmlReporter);
-
-                jasmineEnv.specFilter = function(spec) {
-                    return htmlReporter.specFilter(spec);
-                };
-
-                var currentWindowOnload = window.onload;
-
-                window.onload = function() {
-                    if (currentWindowOnload) {
-                        currentWindowOnload();
-                    }
-                    execJasmine();
-                };
-
-                function execJasmine() {
-                    jasmineEnv.execute();
-                }
-            })();
-        </script>
-    </head>
-    <body>
-        <div id="stage" style="display:none;"></div>
-    </body>
-</html>

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/spec/helper.js
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/spec/helper.js b/bbos/bin/templates/project/www/spec/helper.js
deleted file mode 100644
index 929f776..0000000
--- a/bbos/bin/templates/project/www/spec/helper.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-afterEach(function() {
-    document.getElementById('stage').innerHTML = '';
-});
-
-var helper = {
-    trigger: function(obj, name) {
-        var e = document.createEvent('Event');
-        e.initEvent(name, true, true);
-        obj.dispatchEvent(e);
-    },
-    getComputedStyle: function(querySelector, property) {
-        var element = document.querySelector(querySelector);
-        return window.getComputedStyle(element).getPropertyValue(property);
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/spec/index.js
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/spec/index.js b/bbos/bin/templates/project/www/spec/index.js
deleted file mode 100644
index 20f8be5..0000000
--- a/bbos/bin/templates/project/www/spec/index.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-describe('app', function() {
-    describe('initialize', function() {
-        it('should bind deviceready', function() {
-            runs(function() {
-                spyOn(app, 'onDeviceReady');
-                app.initialize();
-                helper.trigger(window.document, 'deviceready');
-            });
-
-            waitsFor(function() {
-                return (app.onDeviceReady.calls.length > 0);
-            }, 'onDeviceReady should be called once', 500);
-
-            runs(function() {
-                expect(app.onDeviceReady).toHaveBeenCalled();
-            });
-        });
-    });
-
-    describe('onDeviceReady', function() {
-        it('should report that it fired', function() {
-            spyOn(app, 'receivedEvent');
-            app.onDeviceReady();
-            expect(app.receivedEvent).toHaveBeenCalledWith('deviceready');
-        });
-    });
-
-    describe('receivedEvent', function() {
-        beforeEach(function() {
-            var el = document.getElementById('stage');
-            el.innerHTML = ['<div id="deviceready">',
-                            '    <p class="event listening">Listening</p>',
-                            '    <p class="event received">Received</p>',
-                            '</div>'].join('\n');
-        });
-
-        it('should hide the listening element', function() {
-            app.receivedEvent('deviceready');
-            var displayStyle = helper.getComputedStyle('#deviceready .listening', 'display');
-            expect(displayStyle).toEqual('none');
-        });
-
-        it('should show the received element', function() {
-            app.receivedEvent('deviceready');
-            var displayStyle = helper.getComputedStyle('#deviceready .received', 'display');
-            expect(displayStyle).toEqual('block');
-        });
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/spec/lib/jasmine-1.2.0/MIT.LICENSE
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/spec/lib/jasmine-1.2.0/MIT.LICENSE b/bbos/bin/templates/project/www/spec/lib/jasmine-1.2.0/MIT.LICENSE
deleted file mode 100644
index 7c435ba..0000000
--- a/bbos/bin/templates/project/www/spec/lib/jasmine-1.2.0/MIT.LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2008-2011 Pivotal Labs
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/spec/lib/jasmine-1.2.0/jasmine-html.js
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/spec/lib/jasmine-1.2.0/jasmine-html.js b/bbos/bin/templates/project/www/spec/lib/jasmine-1.2.0/jasmine-html.js
deleted file mode 100644
index a0b0639..0000000
--- a/bbos/bin/templates/project/www/spec/lib/jasmine-1.2.0/jasmine-html.js
+++ /dev/null
@@ -1,616 +0,0 @@
-jasmine.HtmlReporterHelpers = {};
-
-jasmine.HtmlReporterHelpers.createDom = function(type, attrs, childrenVarArgs) {
-  var el = document.createElement(type);
-
-  for (var i = 2; i < arguments.length; i++) {
-    var child = arguments[i];
-
-    if (typeof child === 'string') {
-      el.appendChild(document.createTextNode(child));
-    } else {
-      if (child) {
-        el.appendChild(child);
-      }
-    }
-  }
-
-  for (var attr in attrs) {
-    if (attr == "className") {
-      el[attr] = attrs[attr];
-    } else {
-      el.setAttribute(attr, attrs[attr]);
-    }
-  }
-
-  return el;
-};
-
-jasmine.HtmlReporterHelpers.getSpecStatus = function(child) {
-  var results = child.results();
-  var status = results.passed() ? 'passed' : 'failed';
-  if (results.skipped) {
-    status = 'skipped';
-  }
-
-  return status;
-};
-
-jasmine.HtmlReporterHelpers.appendToSummary = function(child, childElement) {
-  var parentDiv = this.dom.summary;
-  var parentSuite = (typeof child.parentSuite == 'undefined') ? 'suite' : 'parentSuite';
-  var parent = child[parentSuite];
-
-  if (parent) {
-    if (typeof this.views.suites[parent.id] == 'undefined') {
-      this.views.suites[parent.id] = new jasmine.HtmlReporter.SuiteView(parent, this.dom, this.views);
-    }
-    parentDiv = this.views.suites[parent.id].element;
-  }
-
-  parentDiv.appendChild(childElement);
-};
-
-
-jasmine.HtmlReporterHelpers.addHelpers = function(ctor) {
-  for(var fn in jasmine.HtmlReporterHelpers) {
-    ctor.prototype[fn] = jasmine.HtmlReporterHelpers[fn];
-  }
-};
-
-jasmine.HtmlReporter = function(_doc) {
-  var self = this;
-  var doc = _doc || window.document;
-
-  var reporterView;
-
-  var dom = {};
-
-  // Jasmine Reporter Public Interface
-  self.logRunningSpecs = false;
-
-  self.reportRunnerStarting = function(runner) {
-    var specs = runner.specs() || [];
-
-    if (specs.length == 0) {
-      return;
-    }
-
-    createReporterDom(runner.env.versionString());
-    doc.body.appendChild(dom.reporter);
-
-    reporterView = new jasmine.HtmlReporter.ReporterView(dom);
-    reporterView.addSpecs(specs, self.specFilter);
-  };
-
-  self.reportRunnerResults = function(runner) {
-    reporterView && reporterView.complete();
-  };
-
-  self.reportSuiteResults = function(suite) {
-    reporterView.suiteComplete(suite);
-  };
-
-  self.reportSpecStarting = function(spec) {
-    if (self.logRunningSpecs) {
-      self.log('>> Jasmine Running ' + spec.suite.description + ' ' + spec.description + '...');
-    }
-  };
-
-  self.reportSpecResults = function(spec) {
-    reporterView.specComplete(spec);
-  };
-
-  self.log = function() {
-    var console = jasmine.getGlobal().console;
-    if (console && console.log) {
-      if (console.log.apply) {
-        console.log.apply(console, arguments);
-      } else {
-        console.log(arguments); // ie fix: console.log.apply doesn't exist on ie
-      }
-    }
-  };
-
-  self.specFilter = function(spec) {
-    if (!focusedSpecName()) {
-      return true;
-    }
-
-    return spec.getFullName().indexOf(focusedSpecName()) === 0;
-  };
-
-  return self;
-
-  function focusedSpecName() {
-    var specName;
-
-    (function memoizeFocusedSpec() {
-      if (specName) {
-        return;
-      }
-
-      var paramMap = [];
-      var params = doc.location.search.substring(1).split('&');
-
-      for (var i = 0; i < params.length; i++) {
-        var p = params[i].split('=');
-        paramMap[decodeURIComponent(p[0])] = decodeURIComponent(p[1]);
-      }
-
-      specName = paramMap.spec;
-    })();
-
-    return specName;
-  }
-
-  function createReporterDom(version) {
-    dom.reporter = self.createDom('div', { id: 'HTMLReporter', className: 'jasmine_reporter' },
-      dom.banner = self.createDom('div', { className: 'banner' },
-        self.createDom('span', { className: 'title' }, "Jasmine "),
-        self.createDom('span', { className: 'version' }, version)),
-
-      dom.symbolSummary = self.createDom('ul', {className: 'symbolSummary'}),
-      dom.alert = self.createDom('div', {className: 'alert'}),
-      dom.results = self.createDom('div', {className: 'results'},
-        dom.summary = self.createDom('div', { className: 'summary' }),
-        dom.details = self.createDom('div', { id: 'details' }))
-    );
-  }
-};
-jasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter);jasmine.HtmlReporter.ReporterView = function(dom) {
-  this.startedAt = new Date();
-  this.runningSpecCount = 0;
-  this.completeSpecCount = 0;
-  this.passedCount = 0;
-  this.failedCount = 0;
-  this.skippedCount = 0;
-
-  this.createResultsMenu = function() {
-    this.resultsMenu = this.createDom('span', {className: 'resultsMenu bar'},
-      this.summaryMenuItem = this.createDom('a', {className: 'summaryMenuItem', href: "#"}, '0 specs'),
-      ' | ',
-      this.detailsMenuItem = this.createDom('a', {className: 'detailsMenuItem', href: "#"}, '0 failing'));
-
-    this.summaryMenuItem.onclick = function() {
-      dom.reporter.className = dom.reporter.className.replace(/ showDetails/g, '');
-    };
-
-    this.detailsMenuItem.onclick = function() {
-      showDetails();
-    };
-  };
-
-  this.addSpecs = function(specs, specFilter) {
-    this.totalSpecCount = specs.length;
-
-    this.views = {
-      specs: {},
-      suites: {}
-    };
-
-    for (var i = 0; i < specs.length; i++) {
-      var spec = specs[i];
-      this.views.specs[spec.id] = new jasmine.HtmlReporter.SpecView(spec, dom, this.views);
-      if (specFilter(spec)) {
-        this.runningSpecCount++;
-      }
-    }
-  };
-
-  this.specComplete = function(spec) {
-    this.completeSpecCount++;
-
-    if (isUndefined(this.views.specs[spec.id])) {
-      this.views.specs[spec.id] = new jasmine.HtmlReporter.SpecView(spec, dom);
-    }
-
-    var specView = this.views.specs[spec.id];
-
-    switch (specView.status()) {
-      case 'passed':
-        this.passedCount++;
-        break;
-
-      case 'failed':
-        this.failedCount++;
-        break;
-
-      case 'skipped':
-        this.skippedCount++;
-        break;
-    }
-
-    specView.refresh();
-    this.refresh();
-  };
-
-  this.suiteComplete = function(suite) {
-    var suiteView = this.views.suites[suite.id];
-    if (isUndefined(suiteView)) {
-      return;
-    }
-    suiteView.refresh();
-  };
-
-  this.refresh = function() {
-
-    if (isUndefined(this.resultsMenu)) {
-      this.createResultsMenu();
-    }
-
-    // currently running UI
-    if (isUndefined(this.runningAlert)) {
-      this.runningAlert = this.createDom('a', {href: "?", className: "runningAlert bar"});
-      dom.alert.appendChild(this.runningAlert);
-    }
-    this.runningAlert.innerHTML = "Running " + this.completeSpecCount + " of " + specPluralizedFor(this.totalSpecCount);
-
-    // skipped specs UI
-    if (isUndefined(this.skippedAlert)) {
-      this.skippedAlert = this.createDom('a', {href: "?", className: "skippedAlert bar"});
-    }
-
-    this.skippedAlert.innerHTML = "Skipping " + this.skippedCount + " of " + specPluralizedFor(this.totalSpecCount) + " - run all";
-
-    if (this.skippedCount === 1 && isDefined(dom.alert)) {
-      dom.alert.appendChild(this.skippedAlert);
-    }
-
-    // passing specs UI
-    if (isUndefined(this.passedAlert)) {
-      this.passedAlert = this.createDom('span', {href: "?", className: "passingAlert bar"});
-    }
-    this.passedAlert.innerHTML = "Passing " + specPluralizedFor(this.passedCount);
-
-    // failing specs UI
-    if (isUndefined(this.failedAlert)) {
-      this.failedAlert = this.createDom('span', {href: "?", className: "failingAlert bar"});
-    }
-    this.failedAlert.innerHTML = "Failing " + specPluralizedFor(this.failedCount);
-
-    if (this.failedCount === 1 && isDefined(dom.alert)) {
-      dom.alert.appendChild(this.failedAlert);
-      dom.alert.appendChild(this.resultsMenu);
-    }
-
-    // summary info
-    this.summaryMenuItem.innerHTML = "" + specPluralizedFor(this.runningSpecCount);
-    this.detailsMenuItem.innerHTML = "" + this.failedCount + " failing";
-  };
-
-  this.complete = function() {
-    dom.alert.removeChild(this.runningAlert);
-
-    this.skippedAlert.innerHTML = "Ran " + this.runningSpecCount + " of " + specPluralizedFor(this.totalSpecCount) + " - run all";
-
-    if (this.failedCount === 0) {
-      dom.alert.appendChild(this.createDom('span', {className: 'passingAlert bar'}, "Passing " + specPluralizedFor(this.passedCount)));
-    } else {
-      showDetails();
-    }
-
-    dom.banner.appendChild(this.createDom('span', {className: 'duration'}, "finished in " + ((new Date().getTime() - this.startedAt.getTime()) / 1000) + "s"));
-  };
-
-  return this;
-
-  function showDetails() {
-    if (dom.reporter.className.search(/showDetails/) === -1) {
-      dom.reporter.className += " showDetails";
-    }
-  }
-
-  function isUndefined(obj) {
-    return typeof obj === 'undefined';
-  }
-
-  function isDefined(obj) {
-    return !isUndefined(obj);
-  }
-
-  function specPluralizedFor(count) {
-    var str = count + " spec";
-    if (count > 1) {
-      str += "s"
-    }
-    return str;
-  }
-
-};
-
-jasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter.ReporterView);
-
-
-jasmine.HtmlReporter.SpecView = function(spec, dom, views) {
-  this.spec = spec;
-  this.dom = dom;
-  this.views = views;
-
-  this.symbol = this.createDom('li', { className: 'pending' });
-  this.dom.symbolSummary.appendChild(this.symbol);
-
-  this.summary = this.createDom('div', { className: 'specSummary' },
-      this.createDom('a', {
-        className: 'description',
-        href: '?spec=' + encodeURIComponent(this.spec.getFullName()),
-        title: this.spec.getFullName()
-      }, this.spec.description)
-  );
-
-  this.detail = this.createDom('div', { className: 'specDetail' },
-      this.createDom('a', {
-        className: 'description',
-        href: '?spec=' + encodeURIComponent(this.spec.getFullName()),
-        title: this.spec.getFullName()
-      }, this.spec.getFullName())
-  );
-};
-
-jasmine.HtmlReporter.SpecView.prototype.status = function() {
-  return this.getSpecStatus(this.spec);
-};
-
-jasmine.HtmlReporter.SpecView.prototype.refresh = function() {
-  this.symbol.className = this.status();
-
-  switch (this.status()) {
-    case 'skipped':
-      break;
-
-    case 'passed':
-      this.appendSummaryToSuiteDiv();
-      break;
-
-    case 'failed':
-      this.appendSummaryToSuiteDiv();
-      this.appendFailureDetail();
-      break;
-  }
-};
-
-jasmine.HtmlReporter.SpecView.prototype.appendSummaryToSuiteDiv = function() {
-  this.summary.className += ' ' + this.status();
-  this.appendToSummary(this.spec, this.summary);
-};
-
-jasmine.HtmlReporter.SpecView.prototype.appendFailureDetail = function() {
-  this.detail.className += ' ' + this.status();
-
-  var resultItems = this.spec.results().getItems();
-  var messagesDiv = this.createDom('div', { className: 'messages' });
-
-  for (var i = 0; i < resultItems.length; i++) {
-    var result = resultItems[i];
-
-    if (result.type == 'log') {
-      messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage log'}, result.toString()));
-    } else if (result.type == 'expect' && result.passed && !result.passed()) {
-      messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage fail'}, result.message));
-
-      if (result.trace.stack) {
-        messagesDiv.appendChild(this.createDom('div', {className: 'stackTrace'}, result.trace.stack));
-      }
-    }
-  }
-
-  if (messagesDiv.childNodes.length > 0) {
-    this.detail.appendChild(messagesDiv);
-    this.dom.details.appendChild(this.detail);
-  }
-};
-
-jasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter.SpecView);jasmine.HtmlReporter.SuiteView = function(suite, dom, views) {
-  this.suite = suite;
-  this.dom = dom;
-  this.views = views;
-
-  this.element = this.createDom('div', { className: 'suite' },
-      this.createDom('a', { className: 'description', href: '?spec=' + encodeURIComponent(this.suite.getFullName()) }, this.suite.description)
-  );
-
-  this.appendToSummary(this.suite, this.element);
-};
-
-jasmine.HtmlReporter.SuiteView.prototype.status = function() {
-  return this.getSpecStatus(this.suite);
-};
-
-jasmine.HtmlReporter.SuiteView.prototype.refresh = function() {
-  this.element.className += " " + this.status();
-};
-
-jasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter.SuiteView);
-
-/* @deprecated Use jasmine.HtmlReporter instead
- */
-jasmine.TrivialReporter = function(doc) {
-  this.document = doc || document;
-  this.suiteDivs = {};
-  this.logRunningSpecs = false;
-};
-
-jasmine.TrivialReporter.prototype.createDom = function(type, attrs, childrenVarArgs) {
-  var el = document.createElement(type);
-
-  for (var i = 2; i < arguments.length; i++) {
-    var child = arguments[i];
-
-    if (typeof child === 'string') {
-      el.appendChild(document.createTextNode(child));
-    } else {
-      if (child) { el.appendChild(child); }
-    }
-  }
-
-  for (var attr in attrs) {
-    if (attr == "className") {
-      el[attr] = attrs[attr];
-    } else {
-      el.setAttribute(attr, attrs[attr]);
-    }
-  }
-
-  return el;
-};
-
-jasmine.TrivialReporter.prototype.reportRunnerStarting = function(runner) {
-  var showPassed, showSkipped;
-
-  this.outerDiv = this.createDom('div', { id: 'TrivialReporter', className: 'jasmine_reporter' },
-      this.createDom('div', { className: 'banner' },
-        this.createDom('div', { className: 'logo' },
-            this.createDom('span', { className: 'title' }, "Jasmine"),
-            this.createDom('span', { className: 'version' }, runner.env.versionString())),
-        this.createDom('div', { className: 'options' },
-            "Show ",
-            showPassed = this.createDom('input', { id: "__jasmine_TrivialReporter_showPassed__", type: 'checkbox' }),
-            this.createDom('label', { "for": "__jasmine_TrivialReporter_showPassed__" }, " passed "),
-            showSkipped = this.createDom('input', { id: "__jasmine_TrivialReporter_showSkipped__", type: 'checkbox' }),
-            this.createDom('label', { "for": "__jasmine_TrivialReporter_showSkipped__" }, " skipped")
-            )
-          ),
-
-      this.runnerDiv = this.createDom('div', { className: 'runner running' },
-          this.createDom('a', { className: 'run_spec', href: '?' }, "run all"),
-          this.runnerMessageSpan = this.createDom('span', {}, "Running..."),
-          this.finishedAtSpan = this.createDom('span', { className: 'finished-at' }, ""))
-      );
-
-  this.document.body.appendChild(this.outerDiv);
-
-  var suites = runner.suites();
-  for (var i = 0; i < suites.length; i++) {
-    var suite = suites[i];
-    var suiteDiv = this.createDom('div', { className: 'suite' },
-        this.createDom('a', { className: 'run_spec', href: '?spec=' + encodeURIComponent(suite.getFullName()) }, "run"),
-        this.createDom('a', { className: 'description', href: '?spec=' + encodeURIComponent(suite.getFullName()) }, suite.description));
-    this.suiteDivs[suite.id] = suiteDiv;
-    var parentDiv = this.outerDiv;
-    if (suite.parentSuite) {
-      parentDiv = this.suiteDivs[suite.parentSuite.id];
-    }
-    parentDiv.appendChild(suiteDiv);
-  }
-
-  this.startedAt = new Date();
-
-  var self = this;
-  showPassed.onclick = function(evt) {
-    if (showPassed.checked) {
-      self.outerDiv.className += ' show-passed';
-    } else {
-      self.outerDiv.className = self.outerDiv.className.replace(/ show-passed/, '');
-    }
-  };
-
-  showSkipped.onclick = function(evt) {
-    if (showSkipped.checked) {
-      self.outerDiv.className += ' show-skipped';
-    } else {
-      self.outerDiv.className = self.outerDiv.className.replace(/ show-skipped/, '');
-    }
-  };
-};
-
-jasmine.TrivialReporter.prototype.reportRunnerResults = function(runner) {
-  var results = runner.results();
-  var className = (results.failedCount > 0) ? "runner failed" : "runner passed";
-  this.runnerDiv.setAttribute("class", className);
-  //do it twice for IE
-  this.runnerDiv.setAttribute("className", className);
-  var specs = runner.specs();
-  var specCount = 0;
-  for (var i = 0; i < specs.length; i++) {
-    if (this.specFilter(specs[i])) {
-      specCount++;
-    }
-  }
-  var message = "" + specCount + " spec" + (specCount == 1 ? "" : "s" ) + ", " + results.failedCount + " failure" + ((results.failedCount == 1) ? "" : "s");
-  message += " in " + ((new Date().getTime() - this.startedAt.getTime()) / 1000) + "s";
-  this.runnerMessageSpan.replaceChild(this.createDom('a', { className: 'description', href: '?'}, message), this.runnerMessageSpan.firstChild);
-
-  this.finishedAtSpan.appendChild(document.createTextNode("Finished at " + new Date().toString()));
-};
-
-jasmine.TrivialReporter.prototype.reportSuiteResults = function(suite) {
-  var results = suite.results();
-  var status = results.passed() ? 'passed' : 'failed';
-  if (results.totalCount === 0) { // todo: change this to check results.skipped
-    status = 'skipped';
-  }
-  this.suiteDivs[suite.id].className += " " + status;
-};
-
-jasmine.TrivialReporter.prototype.reportSpecStarting = function(spec) {
-  if (this.logRunningSpecs) {
-    this.log('>> Jasmine Running ' + spec.suite.description + ' ' + spec.description + '...');
-  }
-};
-
-jasmine.TrivialReporter.prototype.reportSpecResults = function(spec) {
-  var results = spec.results();
-  var status = results.passed() ? 'passed' : 'failed';
-  if (results.skipped) {
-    status = 'skipped';
-  }
-  var specDiv = this.createDom('div', { className: 'spec '  + status },
-      this.createDom('a', { className: 'run_spec', href: '?spec=' + encodeURIComponent(spec.getFullName()) }, "run"),
-      this.createDom('a', {
-        className: 'description',
-        href: '?spec=' + encodeURIComponent(spec.getFullName()),
-        title: spec.getFullName()
-      }, spec.description));
-
-
-  var resultItems = results.getItems();
-  var messagesDiv = this.createDom('div', { className: 'messages' });
-  for (var i = 0; i < resultItems.length; i++) {
-    var result = resultItems[i];
-
-    if (result.type == 'log') {
-      messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage log'}, result.toString()));
-    } else if (result.type == 'expect' && result.passed && !result.passed()) {
-      messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage fail'}, result.message));
-
-      if (result.trace.stack) {
-        messagesDiv.appendChild(this.createDom('div', {className: 'stackTrace'}, result.trace.stack));
-      }
-    }
-  }
-
-  if (messagesDiv.childNodes.length > 0) {
-    specDiv.appendChild(messagesDiv);
-  }
-
-  this.suiteDivs[spec.suite.id].appendChild(specDiv);
-};
-
-jasmine.TrivialReporter.prototype.log = function() {
-  var console = jasmine.getGlobal().console;
-  if (console && console.log) {
-    if (console.log.apply) {
-      console.log.apply(console, arguments);
-    } else {
-      console.log(arguments); // ie fix: console.log.apply doesn't exist on ie
-    }
-  }
-};
-
-jasmine.TrivialReporter.prototype.getLocation = function() {
-  return this.document.location;
-};
-
-jasmine.TrivialReporter.prototype.specFilter = function(spec) {
-  var paramMap = {};
-  var params = this.getLocation().search.substring(1).split('&');
-  for (var i = 0; i < params.length; i++) {
-    var p = params[i].split('=');
-    paramMap[decodeURIComponent(p[0])] = decodeURIComponent(p[1]);
-  }
-
-  if (!paramMap.spec) {
-    return true;
-  }
-  return spec.getFullName().indexOf(paramMap.spec) === 0;
-};

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/www/spec/lib/jasmine-1.2.0/jasmine.css
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/www/spec/lib/jasmine-1.2.0/jasmine.css b/bbos/bin/templates/project/www/spec/lib/jasmine-1.2.0/jasmine.css
deleted file mode 100644
index 826e575..0000000
--- a/bbos/bin/templates/project/www/spec/lib/jasmine-1.2.0/jasmine.css
+++ /dev/null
@@ -1,81 +0,0 @@
-body { background-color: #eeeeee; padding: 0; margin: 5px; overflow-y: scroll; }
-
-#HTMLReporter { font-size: 11px; font-family: Monaco, "Lucida Console", monospace; line-height: 14px; color: #333333; }
-#HTMLReporter a { text-decoration: none; }
-#HTMLReporter a:hover { text-decoration: underline; }
-#HTMLReporter p, #HTMLReporter h1, #HTMLReporter h2, #HTMLReporter h3, #HTMLReporter h4, #HTMLReporter h5, #HTMLReporter h6 { margin: 0; line-height: 14px; }
-#HTMLReporter .banner, #HTMLReporter .symbolSummary, #HTMLReporter .summary, #HTMLReporter .resultMessage, #HTMLReporter .specDetail .description, #HTMLReporter .alert .bar, #HTMLReporter .stackTrace { padding-left: 9px; padding-right: 9px; }
-#HTMLReporter #jasmine_content { position: fixed; right: 100%; }
-#HTMLReporter .version { color: #aaaaaa; }
-#HTMLReporter .banner { margin-top: 14px; }
-#HTMLReporter .duration { color: #aaaaaa; float: right; }
-#HTMLReporter .symbolSummary { overflow: hidden; *zoom: 1; margin: 14px 0; }
-#HTMLReporter .symbolSummary li { display: block; float: left; height: 7px; width: 14px; margin-bottom: 7px; font-size: 16px; }
-#HTMLReporter .symbolSummary li.passed { font-size: 14px; }
-#HTMLReporter .symbolSummary li.passed:before { color: #5e7d00; content: "\02022"; }
-#HTMLReporter .symbolSummary li.failed { line-height: 9px; }
-#HTMLReporter .symbolSummary li.failed:before { color: #b03911; content: "x"; font-weight: bold; margin-left: -1px; }
-#HTMLReporter .symbolSummary li.skipped { font-size: 14px; }
-#HTMLReporter .symbolSummary li.skipped:before { color: #bababa; content: "\02022"; }
-#HTMLReporter .symbolSummary li.pending { line-height: 11px; }
-#HTMLReporter .symbolSummary li.pending:before { color: #aaaaaa; content: "-"; }
-#HTMLReporter .bar { line-height: 28px; font-size: 14px; display: block; color: #eee; }
-#HTMLReporter .runningAlert { background-color: #666666; }
-#HTMLReporter .skippedAlert { background-color: #aaaaaa; }
-#HTMLReporter .skippedAlert:first-child { background-color: #333333; }
-#HTMLReporter .skippedAlert:hover { text-decoration: none; color: white; text-decoration: underline; }
-#HTMLReporter .passingAlert { background-color: #a6b779; }
-#HTMLReporter .passingAlert:first-child { background-color: #5e7d00; }
-#HTMLReporter .failingAlert { background-color: #cf867e; }
-#HTMLReporter .failingAlert:first-child { background-color: #b03911; }
-#HTMLReporter .results { margin-top: 14px; }
-#HTMLReporter #details { display: none; }
-#HTMLReporter .resultsMenu, #HTMLReporter .resultsMenu a { background-color: #fff; color: #333333; }
-#HTMLReporter.showDetails .summaryMenuItem { font-weight: normal; text-decoration: inherit; }
-#HTMLReporter.showDetails .summaryMenuItem:hover { text-decoration: underline; }
-#HTMLReporter.showDetails .detailsMenuItem { font-weight: bold; text-decoration: underline; }
-#HTMLReporter.showDetails .summary { display: none; }
-#HTMLReporter.showDetails #details { display: block; }
-#HTMLReporter .summaryMenuItem { font-weight: bold; text-decoration: underline; }
-#HTMLReporter .summary { margin-top: 14px; }
-#HTMLReporter .summary .suite .suite, #HTMLReporter .summary .specSummary { margin-left: 14px; }
-#HTMLReporter .summary .specSummary.passed a { color: #5e7d00; }
-#HTMLReporter .summary .specSummary.failed a { color: #b03911; }
-#HTMLReporter .description + .suite { margin-top: 0; }
-#HTMLReporter .suite { margin-top: 14px; }
-#HTMLReporter .suite a { color: #333333; }
-#HTMLReporter #details .specDetail { margin-bottom: 28px; }
-#HTMLReporter #details .specDetail .description { display: block; color: white; background-color: #b03911; }
-#HTMLReporter .resultMessage { padding-top: 14px; color: #333333; }
-#HTMLReporter .resultMessage span.result { display: block; }
-#HTMLReporter .stackTrace { margin: 5px 0 0 0; max-height: 224px; overflow: auto; line-height: 18px; color: #666666; border: 1px solid #ddd; background: white; white-space: pre; }
-
-#TrivialReporter { padding: 8px 13px; position: absolute; top: 0; bottom: 0; left: 0; right: 0; overflow-y: scroll; background-color: white; font-family: "Helvetica Neue Light", "Lucida Grande", "Calibri", "Arial", sans-serif; /*.resultMessage {*/ /*white-space: pre;*/ /*}*/ }
-#TrivialReporter a:visited, #TrivialReporter a { color: #303; }
-#TrivialReporter a:hover, #TrivialReporter a:active { color: blue; }
-#TrivialReporter .run_spec { float: right; padding-right: 5px; font-size: .8em; text-decoration: none; }
-#TrivialReporter .banner { color: #303; background-color: #fef; padding: 5px; }
-#TrivialReporter .logo { float: left; font-size: 1.1em; padding-left: 5px; }
-#TrivialReporter .logo .version { font-size: .6em; padding-left: 1em; }
-#TrivialReporter .runner.running { background-color: yellow; }
-#TrivialReporter .options { text-align: right; font-size: .8em; }
-#TrivialReporter .suite { border: 1px outset gray; margin: 5px 0; padding-left: 1em; }
-#TrivialReporter .suite .suite { margin: 5px; }
-#TrivialReporter .suite.passed { background-color: #dfd; }
-#TrivialReporter .suite.failed { background-color: #fdd; }
-#TrivialReporter .spec { margin: 5px; padding-left: 1em; clear: both; }
-#TrivialReporter .spec.failed, #TrivialReporter .spec.passed, #TrivialReporter .spec.skipped { padding-bottom: 5px; border: 1px solid gray; }
-#TrivialReporter .spec.failed { background-color: #fbb; border-color: red; }
-#TrivialReporter .spec.passed { background-color: #bfb; border-color: green; }
-#TrivialReporter .spec.skipped { background-color: #bbb; }
-#TrivialReporter .messages { border-left: 1px dashed gray; padding-left: 1em; padding-right: 1em; }
-#TrivialReporter .passed { background-color: #cfc; display: none; }
-#TrivialReporter .failed { background-color: #fbb; }
-#TrivialReporter .skipped { color: #777; background-color: #eee; display: none; }
-#TrivialReporter .resultMessage span.result { display: block; line-height: 2em; color: black; }
-#TrivialReporter .resultMessage .mismatch { color: black; }
-#TrivialReporter .stackTrace { white-space: pre; font-size: .8em; margin-left: 10px; max-height: 5em; overflow: auto; border: 1px inset red; padding: 1em; background: #eef; }
-#TrivialReporter .finished-at { padding-left: 1em; font-size: .6em; }
-#TrivialReporter.show-passed .passed, #TrivialReporter.show-skipped .skipped { display: block; }
-#TrivialReporter #jasmine_content { position: fixed; right: 100%; }
-#TrivialReporter .runner { border: 1px solid gray; display: block; margin: 5px 0; padding: 2px 0 2px 10px; }


[07/15] CB-4228

Posted by lo...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/globalization/Globalization.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/globalization/Globalization.java b/bbos/framework/ext/src/org/apache/cordova/globalization/Globalization.java
deleted file mode 100644
index e6aaae5..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/globalization/Globalization.java
+++ /dev/null
@@ -1,558 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.globalization;
-
-import org.apache.cordova.json4j.JSONArray;
-import org.apache.cordova.json4j.JSONObject;
-
-import org.apache.cordova.api.Plugin;
-import org.apache.cordova.api.PluginResult;
-
-import net.rim.device.api.i18n.Locale;
-import net.rim.device.api.i18n.SimpleDateFormat;
-import net.rim.device.api.util.TimeZoneUtilities;
-import javax.microedition.global.Formatter;
-
-import java.util.Date;
-import java.util.Calendar;
-import java.util.TimeZone;
-import java.lang.Long;
-
-public class Globalization extends Plugin {
-
-    /**
-     * Executes the requested action and returns a PluginResult.
-     *
-     * @param action
-     *            The action to execute.
-     * @param data
-     *            JSONArry of arguments for the action.
-     * @param callbackId
-     *            The callback ID to be invoked upon action completion
-     * @return A PluginResult object with a status and message.
-     */
-    public PluginResult execute(String action, JSONArray data, String callbackId) {
-        JSONObject obj = new JSONObject();
-
-        try {
-            if (action.equals(Resources.GETLOCALENAME)) {
-                obj = getLocaleName();
-            } else if (action.equals(Resources.GETPREFERREDLANGUAGE)) {
-                obj = getPreferredLanguage();
-            } else if (action.equalsIgnoreCase(Resources.DATETOSTRING)) {
-                obj = getDateToString(data);
-            } else if (action.equalsIgnoreCase(Resources.STRINGTODATE)) {
-                obj = getStringToDate(data);
-            } else if (action.equalsIgnoreCase(Resources.GETDATEPATTERN)) {
-                obj = getDatePattern(data);
-            } else if (action.equalsIgnoreCase(Resources.GETDATENAMES)) {
-                obj = getDateNames(data);
-            } else if (action.equalsIgnoreCase(Resources.ISDAYLIGHTSAVINGSTIME)) {
-                obj = getIsDayLightSavingsTime(data);
-            } else if (action.equalsIgnoreCase(Resources.GETFIRSTDAYOFWEEK)) {
-                obj = getFirstDayOfWeek(data);
-            } else if (action.equalsIgnoreCase(Resources.NUMBERTOSTRING)) {
-                obj = getNumberToString(data);
-            } else if (action.equalsIgnoreCase(Resources.STRINGTONUMBER)) {
-                obj = getStringToNumber(data);
-            } else if (action.equalsIgnoreCase(Resources.GETNUMBERPATTERN)) {
-                obj = getNumberPattern(data);
-            } else if (action.equalsIgnoreCase(Resources.GETCURRENCYPATTERN)) {
-                obj = getCurrencyPattern(data);
-            } else {
-                return new PluginResult(PluginResult.Status.INVALID_ACTION);
-            }
-        } catch (GlobalizationError ge) {
-            return new PluginResult(PluginResult.Status.ERROR, ge.toJson());
-        } catch (Exception e) {
-            return new PluginResult(PluginResult.Status.JSON_EXCEPTION);
-        }
-
-        return new PluginResult(PluginResult.Status.OK, obj);
-    }
-
-    /**
-     * Returns the string identifier for the client's current locale setting.
-     *
-     * @return JSONObject Object.value {String}: The locale identifier
-     *
-     * @throws GlobalizationError.UNKNOWN_ERROR
-     */
-    private JSONObject getLocaleName() throws GlobalizationError {
-        JSONObject obj = new JSONObject();
-        try {
-            return obj.put("value", Locale.getDefault().toString());
-        } catch (Exception e) {
-            throw new GlobalizationError(GlobalizationError.UNKNOWN_ERROR);
-        }
-    }
-
-    /**
-     * Returns the string identifier for the client's current language
-     *
-     * @return JSONObject Object.value {String}: The language identifier
-     *
-     * @throws GlobalizationError.UNKNOWN_ERROR
-     */
-    private JSONObject getPreferredLanguage() throws GlobalizationError {
-        JSONObject obj = new JSONObject();
-        try {
-            return obj.put("value", Locale.getDefault().getDisplayLanguage()
-                    .toString());
-        } catch (Exception e) {
-            throw new GlobalizationError(GlobalizationError.UNKNOWN_ERROR);
-        }
-    }
-
-    /**
-     * Returns a date formatted as a string according to the client's user
-     * preferences and calendar using the time zone of the client.
-     *
-     * @return JSONObject Object.value {String}: The localized date string
-     *
-     * @throws GlobalizationError.FORMATTING_ERROR
-     */
-    private JSONObject getDateToString(JSONArray options)
-            throws GlobalizationError {
-        JSONObject obj = new JSONObject();
-        try {
-            Date date = new Date(Long.parseLong(options.getJSONObject(0)
-                    .get(Resources.DATE).toString()));
-            // get formatting pattern from BB device
-            SimpleDateFormat fmt = new SimpleDateFormat(
-                    Util.getBlackBerryDatePattern(options));
-
-            // return formatted date
-            return obj.put("value", fmt.format(date));
-        } catch (Exception ge) {
-            throw new GlobalizationError(GlobalizationError.FORMATTING_ERROR);
-        }
-    }
-
-    /**
-     * Parses a date formatted as a string according to the client's user
-     * preferences and calendar using the time zone of the client and returns
-     * the corresponding date object
-     *
-     * @return JSONObject
-     *          Object.year {Number}: The four digit year
-     *          Object.month {Number}: The month from (0 - 11)
-     *          Object.day {Number}: The day from (1 - 31)
-     *          Object.hour {Number}: The hour from (0 - 23)
-     *          Object.minute {Number}: The minute from (0 - 59)
-     *          Object.second {Number}: The second from (0 - 59)
-     *          Object.millisecond {Number}: The milliseconds (from 0 - 999),
-     *                                      not available on all platforms
-     *
-     * @throws GlobalizationError.PARSING_ERROR
-     */
-    private JSONObject getStringToDate(JSONArray options)
-            throws GlobalizationError {
-        JSONObject obj = new JSONObject();
-        try {
-            // get formatting pattern from BB device
-            SimpleDateFormat fmt = new SimpleDateFormat(
-                    Util.getBlackBerryDatePattern(options));
-
-            // Manually parse string based on user preferences or Locale default
-            String userDate = options.getJSONObject(0)
-                    .get(Resources.DATESTRING).toString().trim();
-
-            Calendar date = Util.dateParserBB(userDate, fmt.toPattern());
-            if (date == null) { // date was unparsable
-                throw new Exception();
-            }
-
-            // return properties;
-            obj.put("year", date.get(Calendar.YEAR));
-            obj.put("month", date.get(Calendar.MONTH)); // returns 0-11
-            obj.put("day", date.get(Calendar.DAY_OF_MONTH));
-            obj.put("hour", date.get(Calendar.HOUR));
-            obj.put("minute", date.get(Calendar.MINUTE));
-            obj.put("second", date.get(Calendar.SECOND));
-            obj.put("millisecond", date.get(Calendar.MILLISECOND));
-            return obj;
-        } catch (Exception ge) {
-            throw new GlobalizationError(GlobalizationError.PARSING_ERROR);
-        }
-    }
-
-    /**
-     * Returns a pattern string for formatting and parsing dates according to
-     * the client's user preferences.
-     *
-     * @return JSONObject
-     *          Object.pattern {String}: The date and time pattern for
-     *                  formatting and parsing dates. The patterns follow
-     *                  Unicode Technical Standard #35
-     *                  http://unicode.org/reports/tr35/tr35-4.html
-     *          Object.timezone {String}: The abbreviated name of the time
-     *                  zone on the client
-     *          Object.utc_offset {Number}: The current difference in seconds
-     *                  between the client's time zon and coordinated universal
-     *                  time.
-     *          Object.dst_offset {Number}: The current daylight saving time
-     *                  offset in seconds between the client's non-daylight
-     *                  saving's time zone and the client's daylight saving's
-     *                  time zone.
-     *
-     * @throws GlobalizationError.PATTERN_ERROR
-     */
-    private JSONObject getDatePattern(JSONArray options)
-            throws GlobalizationError {
-        JSONObject obj = new JSONObject();
-        try {
-            // TimeZone from users device
-            TimeZone tz = Calendar.getInstance().getTimeZone();
-
-            // Daylight
-            boolean daylight = tz.useDaylightTime();
-
-            // set dst_offset
-            int dst_offset = 0; // defaulted to zero
-            if (daylight) {
-                Calendar c = Calendar.getInstance();
-                dst_offset = (tz.getOffset(1, c.get(Calendar.YEAR),
-                        c.get(Calendar.MONTH), c.get(Calendar.DAY_OF_MONTH),
-                        c.get(Calendar.DAY_OF_WEEK),
-                        c.get(Calendar.MILLISECOND))) / 1000;
-            }
-
-            obj.put("pattern", Util.getBlackBerryDatePattern(options));
-            obj.put("timezone", TimeZoneUtilities.getDisplayName(tz,
-                    TimeZoneUtilities.SHORT));
-            obj.put("utc_offset", tz.getRawOffset() / 1000);
-            obj.put("dst_offset", dst_offset);
-            return obj;
-        } catch (Exception ge) {
-            throw new GlobalizationError(GlobalizationError.PATTERN_ERROR);
-        }
-    }
-
-    /**
-     * Returns an array of either the names of the months or days of the week
-     * according to the client's user preferences and calendar
-     *
-     * @return JSONObject
-     *          Object.value {Array{String}}: The array of names starting from
-     *                      either the first month in the year or the first day
-     *                      of the week.
-     *
-     * @throws GlobalizationError.UNKNOWN_ERROR
-     */
-    private JSONObject getDateNames(JSONArray options)
-            throws GlobalizationError {
-        JSONObject obj = new JSONObject();
-        JSONArray value = new JSONArray();
-        try {
-            int type = 0; // default wide
-            int item = 0; // default months
-
-            // get options if available
-            if (options.getJSONObject(0).length() > 0) {
-                // get type if available
-                if (!((JSONObject) options.getJSONObject(0).get(
-                        Resources.OPTIONS)).isNull(Resources.TYPE)) {
-                    String t = (String) ((JSONObject) options.getJSONObject(0)
-                            .get(Resources.OPTIONS)).get(Resources.TYPE);
-                    if (t.equalsIgnoreCase(Resources.NARROW)) {
-                        type++;
-                    } // DateUtils.LENGTH_MEDIUM
-                }
-                // get item if available
-                if (!((JSONObject) options.getJSONObject(0).get(
-                        Resources.OPTIONS)).isNull(Resources.ITEM)) {
-                    String t = (String) ((JSONObject) options.getJSONObject(0)
-                            .get(Resources.OPTIONS)).get(Resources.ITEM);
-                    if (t.equalsIgnoreCase(Resources.DAYS)) {
-                        item += 10;
-                    } // Days of week start at 1
-                }
-            }
-            // determine return value
-
-            int method = item + type;
-            if (method == 1) {
-                value = Util.getDateNameString(Resources.MONTHS, "MMM");
-            }// months and narrow
-            else if (method == 10) {
-                value = Util.getDateNameString(Resources.DAYS, "EEEE");
-            }// days and wide
-            else if (method == 11) {
-                value = Util.getDateNameString(Resources.DAYS, "EEE");
-            }// days and narrow
-            else {
-                value = Util.getDateNameString(Resources.MONTHS, "MMMM");
-            }// default: months and wide
-
-            if (value == null) {
-                throw new Exception();
-            }
-
-            // return array of names
-            return obj.put("value", value);
-        } catch (Exception ge) {
-            throw new GlobalizationError(GlobalizationError.UNKNOWN_ERROR);
-        }
-    }
-
-    /**
-     * Returns whether daylight savings time is in effect for a given date using
-     * the client's time zone and calendar.
-     *
-     * @return JSONObject
-     *          Object.dst {Boolean}: The value "true" indicates that daylight
-     *                      savings time is in effect for the given date and
-     *                      "false" indicates that it is not.
-     *
-     * @throws GlobalizationError.UNKNOWN_ERROR
-     *
-     *             Note: Functionality to determine if date is within day light
-     *             savings time is not available in this API version
-     */
-    private JSONObject getIsDayLightSavingsTime(JSONArray options)
-            throws GlobalizationError {
-        throw new GlobalizationError(GlobalizationError.UNKNOWN_ERROR);
-    }
-
-    /**
-     * Returns the first day of the week according to the client's user
-     * preferences and calendar. The days of the week are numbered starting from
-     * 1 where 1 is considered to be Sunday.
-     *
-     * @return JSONObject
-     *          Object.value {Number}: The number of the first day of the week.
-     *
-     * @throws GlobalizationError.UNKNOWN_ERROR
-     */
-    private JSONObject getFirstDayOfWeek(JSONArray options)
-            throws GlobalizationError {
-        JSONObject obj = new JSONObject();
-        try {
-            JSONObject result = Util.getLocaleData(Locale.getDefault()
-                    .toString());
-
-            if (result == null || result.length() <= 0) {
-                throw new Exception();
-            }
-            return obj.put("value", Integer.valueOf(result
-                    .getString(Resources.JSON_FIRISTDAYOFWEEK)));
-        } catch (Exception e) {
-            throw new GlobalizationError(GlobalizationError.UNKNOWN_ERROR);
-        }
-    }
-
-    /**
-     * Returns a number formatted as a string according to the client's user
-     * preferences.
-     *
-     * @return JSONObject
-     *          Object.value {String}: The formatted number string.
-     *
-     * @throws GlobalizationError.FORMATTING_ERROR
-     */
-    private JSONObject getNumberToString(JSONArray options)
-            throws GlobalizationError {
-        JSONObject obj = new JSONObject();
-        String value;
-        try {
-            // Initialize formatter
-            Formatter fmt = new Formatter(Locale.getDefault().toString());
-
-            // obtain user supplied number
-            double num = Double.parseDouble(options.getJSONObject(0)
-                    .get(Resources.NUMBER).toString());
-            // format based on options if available
-            value = fmt.formatNumber(num);
-            if (options.getJSONObject(0).length() > 1) {
-                // options were included
-                if (!((JSONObject) options.getJSONObject(0).get(
-                        Resources.OPTIONS)).isNull(Resources.TYPE)) {
-                    String fmtOpt = (String) ((JSONObject) options
-                            .getJSONObject(0).get(Resources.OPTIONS))
-                            .get(Resources.TYPE);
-                    if (fmtOpt.equalsIgnoreCase(Resources.CURRENCY)) {
-                        value = fmt.formatCurrency(num);
-                    } else if (fmtOpt.equalsIgnoreCase(Resources.PERCENT)) {
-                        // convert double to long
-                        // used 1 decimal places as a default
-                        value = fmt.formatPercentage((float) num, 1);
-                    }
-                }
-            }
-            return obj.put("value", value);
-        } catch (Exception ge) {
-            throw new GlobalizationError(GlobalizationError.FORMATTING_ERROR);
-        }
-
-    }
-
-    /**
-     * Parses a number formatted as a string according to the client's user
-     * preferences and returns the corresponding number.
-     *
-     * @return JSONObject
-     *          Object.value {Number}: The parsed number.
-     *
-     * @throws GlobalizationError.PARSING_ERROR
-     */
-    private JSONObject getStringToNumber(JSONArray options)
-            throws GlobalizationError {
-        JSONObject obj = new JSONObject();
-        double value = 0;
-        try {
-            // format based on options if available
-            String num = options.getJSONObject(0).get(Resources.NUMBERSTRING)
-                    .toString().trim();
-            if (options.getJSONObject(0).length() > 1) {
-                // options were included
-                if (!((JSONObject) options.getJSONObject(0).get(
-                        Resources.OPTIONS)).isNull(Resources.TYPE)) {
-                    String fmtOpt = (String) ((JSONObject) options
-                            .getJSONObject(0).get(Resources.OPTIONS))
-                            .get(Resources.TYPE);
-                    // remove unwanted symbols
-                    if (fmtOpt.equalsIgnoreCase(Resources.CURRENCY)) {
-                        value = (Double.parseDouble(Util.removeSymbols(num)));
-                    } else if (fmtOpt.equalsIgnoreCase(Resources.PERCENT)) {
-                        value = (Double.parseDouble(Util.removeSymbols(num)) / 100);
-                    }
-                }
-            } else {
-                value = Double.parseDouble(num); // decimal default
-            }
-
-            return obj.put("value", value);
-        } catch (Exception ge) {
-            throw new GlobalizationError(GlobalizationError.PARSING_ERROR);
-        }
-    }
-
-    /**
-     * Returns a pattern string for formatting and parsing numbers according to
-     * the client's user preferences.
-     *
-     * @return JSONObject
-     *          Object.pattern {String}: The number pattern for formatting and
-     *                      parsing numbers. The patterns follow Unicode
-     *                      Technical Standard #35.
-     *                      http://unicode.org/reports/tr35/tr35-4.html
-     *          Object.symbol {String}: The symbol to be used when formatting
-     *                      and parsing e.g., percent or currency symbol.
-     *          Object.fraction {Number}: The number of fractional digits to use
-     *                      when parsing and formatting numbers.
-     *          Object.rounding {Number}: The rounding increment to use when
-     *                      parsing and formatting.
-     *          Object.positive {String}: The symbol to use for positive numbers
-     *                      when parsing and formatting.
-     *          Object.negative: {String}: The symbol to use for negative
-     *                      numbers when parsing and formatting.
-     *          Object.decimal: {String}: The decimal symbol to use for parsing
-     *                      and formatting.
-     *          Object.grouping: {String}: The grouping symbol to use for
-     *                      parsing and formatting.
-     *
-     * @throws GlobalizationError.PATTERN_ERROR
-     */
-    private JSONObject getNumberPattern(JSONArray options)
-            throws GlobalizationError {
-        JSONObject obj = new JSONObject();
-        try {
-            JSONObject result = Util.getLocaleData(Locale.getDefault()
-                    .toString());
-
-            String symbol = Resources.JSON_DECIMALSYMBOL;
-            // get Date value + options (if available)
-            if (options.getJSONObject(0).length() > 0) {
-                // options were included
-                if (!((JSONObject) options.getJSONObject(0).get(
-                        Resources.OPTIONS)).isNull(Resources.TYPE)) {
-                    String fmtOpt = (String) ((JSONObject) options
-                            .getJSONObject(0).get(Resources.OPTIONS))
-                            .get(Resources.TYPE);
-                    if (fmtOpt.equalsIgnoreCase(Resources.CURRENCY)) {
-                        symbol = Resources.JSON_CURRENCYSYMBOL;
-                    } else if (fmtOpt.equalsIgnoreCase(Resources.PERCENT)) {
-                        symbol = Resources.JSON_PERCENTSYMBOL;
-                    }
-                }
-            }
-
-            // return properties
-            obj.put("pattern", result.getString(Resources.JSON_PATTERN));
-            obj.put("symbol", result.getString(symbol));
-            obj.put("fraction",
-                    Integer.valueOf(result.getString(Resources.JSON_FRACTION)));
-            obj.put("rounding",
-                    Integer.valueOf(result.getString(Resources.JSON_ROUNDING)));
-            obj.put("positive", result.getString(Resources.JSON_POSITIVE));
-            obj.put("negative", result.getString(Resources.JSON_NEGATIVE));
-            obj.put("decimal", result.getString(Resources.JSON_DECIMALSYMBOL));
-            obj.put("grouping", result.getString(Resources.JSON_GROUPING));
-            return obj;
-        } catch (Exception ge) {
-            throw new GlobalizationError(GlobalizationError.PATTERN_ERROR);
-        }
-    }
-
-    /**
-     * Returns a pattern string for formatting and parsing currency values
-     * according to the client's user preferences and ISO 4217 currency code.
-     *
-     * @return JSONObject =
-     *          Object.pattern {String}: The currency pattern for formatting and
-     *                      parsing currency values. The patterns follow
-     *                      Unicode Technical Standard #35
-     *                      http://unicode.org/reports/tr35/tr35-4.html
-     *          Object.code {String}: The ISO 4217 currency code for the pattern.
-     *          Object.fraction {Number}: The number of fractional digits to use
-     *                      when parsing and formatting currency.
-     *          Object.rounding {Number}: The rounding increment to use when
-     *                      parsing and formatting.
-     *          Object.decimal: {String}: The decimal symbol to use for parsing
-     *                      and formatting.
-     *          Object.grouping: {String}: The grouping symbol to use for
-     *                      parsing and formatting.
-     *
-     * @throws GlobalizationError.FORMATTING_ERROR
-     */
-    private JSONObject getCurrencyPattern(JSONArray options)
-            throws GlobalizationError {
-        JSONObject obj = new JSONObject();
-        try {
-            JSONObject result = Util.getCurrencyData(Locale.getDefault()
-                    .toString(),
-                    options.getJSONObject(0).getString(Resources.CURRENCYCODE));
-
-            // return properties
-            obj.put("pattern", result.getString(Resources.JSON_CURRENCYPATTERN));
-            obj.put("code", result.getString(Resources.JSON_CURRENCYCODE));
-            obj.put("fraction", Integer.valueOf(result
-                    .getString(Resources.JSON_CURRENCYFRACTION)));
-            obj.put("rounding", Integer.valueOf(result
-                    .getString(Resources.JSON_CURRENCYROUNDING)));
-            obj.put("decimal", result.getString(Resources.JSON_CURRENCYDECIMAL));
-            obj.put("grouping",
-                    result.getString(Resources.JSON_CURRENCYGROUPING));
-            return obj;
-        } catch (Exception ge) {
-            throw new GlobalizationError(GlobalizationError.FORMATTING_ERROR);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/globalization/GlobalizationError.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/globalization/GlobalizationError.java b/bbos/framework/ext/src/org/apache/cordova/globalization/GlobalizationError.java
deleted file mode 100644
index b2a9388..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/globalization/GlobalizationError.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.globalization;
-
-import org.apache.cordova.json4j.JSONException;
-import org.apache.cordova.json4j.JSONObject;
-
-/**
- * User initiated exception. Exception class representing defined Globalization
- * error codes.
- *
- * Globalization error codes:
- *          GlobalizationError.UNKNOWN_ERROR = 0;
- *          GlobalizationError.FORMATTING_ERROR = 1;
- *          GlobalizationError.PARSING_ERROR = 2;
- *          GlobalizationError.PATTERN_ERROR = 3;
- */
-public class GlobalizationError extends Exception {
-
-    private static final long serialVersionUID = 1L;
-    public static final String UNKNOWN_ERROR = "UNKNOWN_ERROR";
-    public static final String FORMATTING_ERROR = "FORMATTING_ERROR";
-    public static final String PARSING_ERROR = "PARSING_ERROR";
-    public static final String PATTERN_ERROR = "PATTERN_ERROR";
-
-    int error = 0; // default unknown error thrown
-
-    /**
-     * Default constructor
-     */
-    public GlobalizationError() {
-    }
-
-    /**
-     * Create an exception returning an error code
-     *
-     * @param s
-     */
-    public GlobalizationError(String s) {
-        if (s.equalsIgnoreCase(FORMATTING_ERROR)) {
-            error = 1;
-        } else if (s.equalsIgnoreCase(PARSING_ERROR)) {
-            error = 2;
-        } else if (s.equalsIgnoreCase(PATTERN_ERROR)) {
-            error = 3;
-        }
-    }
-
-    /**
-     * get error string based on error code
-     *
-     * @param String
-     *            msg
-     */
-    public String getErrorString() {
-        String msg = "";
-        switch (error) {
-        case 0:
-            msg = UNKNOWN_ERROR;
-            break;
-        case 1:
-            msg = FORMATTING_ERROR;
-            break;
-        case 2:
-            msg = PARSING_ERROR;
-            break;
-        case 3:
-            msg = PATTERN_ERROR;
-            break;
-        }
-        return msg;
-    }
-
-    /**
-     * get error code
-     *
-     * @param String
-     *            msg
-     */
-    public int getErrorCode() {
-        return error;
-    }
-
-    /**
-     * get the json version of this object to return to javascript
-     *
-     * @return
-     */
-    public JSONObject toJson() {
-        JSONObject obj = new JSONObject();
-        try {
-            obj.put("code", getErrorCode());
-            obj.put("message", getErrorString());
-        } catch (JSONException e) {
-            // never happens
-        }
-        return obj;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/globalization/Resources.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/globalization/Resources.java b/bbos/framework/ext/src/org/apache/cordova/globalization/Resources.java
deleted file mode 100644
index 02cbc8a..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/globalization/Resources.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.globalization;
-
-public class Resources {
-    // Globalization Plugin Actions
-    public static final String GETLOCALENAME = "getLocaleName";
-    public static final String DATETOSTRING = "dateToString";
-    public static final String STRINGTODATE = "stringToDate";
-    public static final String GETDATEPATTERN = "getDatePattern";
-    public static final String GETDATENAMES = "getDateNames";
-    public static final String ISDAYLIGHTSAVINGSTIME = "isDayLightSavingsTime";
-    public static final String GETFIRSTDAYOFWEEK = "getFirstDayOfWeek";
-    public static final String NUMBERTOSTRING = "numberToString";
-    public static final String STRINGTONUMBER = "stringToNumber";
-    public static final String GETNUMBERPATTERN = "getNumberPattern";
-    public static final String GETCURRENCYPATTERN = "getCurrencyPattern";
-    public static final String GETPREFERREDLANGUAGE = "getPreferredLanguage";
-
-    // Globalization Option Parameters
-    public static final String OPTIONS = "options";
-    public static final String FORMATLENGTH = "formatLength";
-    public static final String MEDIUM = "medium";
-    public static final String LONG = "long";
-    public static final String FULL = "full";
-    public static final String SELECTOR = "selector";
-    public static final String DATE = "date";
-    public static final String TIME = "time";
-    public static final String DATESTRING = "dateString";
-    public static final String TYPE = "type";
-    public static final String ITEM = "item";
-    public static final String NARROW = "narrow";
-    public static final String WIDE = "wide";
-    public static final String MONTHS = "months";
-    public static final String DAYS = "days";
-    public static final String SPACE = " ";
-    public static final String DATEDELIMITER = "-";
-    public static final String TIMEDELIMITER = ":";
-    public static final String[] AM_PMFORMATS = { "a", "aa" };
-    public static final String NUMBER = "number";
-    public static final String NUMBERSTRING = "numberString";
-    public static final String PERCENT = "percent";
-    public static final String CURRENCY = "currency";
-    public static final String CURRENCYCODE = "currencyCode";
-
-    // JSON File: JSONObject
-    public static final String JSON_CURRENCY = "currency";
-    public static final String JSON_LOCALE = "locale";
-    public static final String JSON_NAME = "name";
-
-    // JSON File: parameters
-    // locale:
-    public static final String JSON_PATTERN = "pattern";
-    public static final String JSON_DECIMAL = "decimal";
-    public static final String JSON_FRACTION = "fraction";
-    public static final String JSON_ROUNDING = "rounding";
-    public static final String JSON_GROUPING = "grouping";
-    public static final String JSON_NEGATIVE = "negative";
-    public static final String JSON_FIRISTDAYOFWEEK = "firstDayOfWeek";
-    public static final String JSON_POSITIVE = "positive";
-    public static final String JSON_PERCENTSYMBOL = "percentSymbol";
-    public static final String JSON_CURRENCYSYMBOL = "currencySymbol";
-    public static final String JSON_DECIMALSYMBOL = "decimalSymbol";
-    public static final String JSON_DISPLAYNAME = "displayName";
-
-    // currency
-    public static final String JSON_CURRENCYCODE = "currencyCode";
-    public static final String JSON_CURRENCYPATTERN = "currencyPattern";
-    public static final String JSON_CURRENCYDECIMAL = "currencyDecimal";
-    public static final String JSON_CURRENCYFRACTION = "currencyFraction";
-    public static final String JSON_CURRENCYGROUPING = "currencyGrouping";
-    public static final String JSON_CURRENCYROUNDING = "currencyRounding";
-
-    // class paths:
-    public static final String LOCALEINFOPATH = "/res/resourceBundles/";
-    public static final String LOCALEINFOPATHEND = ".js.gz";
-
-    // locale resource key identifiers
-    public static final int LOCALENAME = 0;
-
-    // Persistent Store ID:
-    public static final long PERSISTENTSTORE_ID = 0x10001;
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/globalization/Util.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/globalization/Util.java b/bbos/framework/ext/src/org/apache/cordova/globalization/Util.java
deleted file mode 100644
index 340876e..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/globalization/Util.java
+++ /dev/null
@@ -1,721 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.globalization;
-
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.Hashtable;
-import java.util.TimeZone;
-
-import net.rim.device.api.i18n.DateFormat;
-import net.rim.device.api.i18n.Locale;
-import net.rim.device.api.i18n.SimpleDateFormat;
-import net.rim.device.api.system.NonPersistableObjectException;
-import net.rim.device.api.system.PersistentObject;
-import net.rim.device.api.system.PersistentStore;
-import net.rim.device.api.util.StringMatch;
-import net.rim.device.api.util.StringUtilities;
-import net.rim.device.api.compress.GZIPInputStream;
-
-import org.apache.cordova.json4j.JSONArray;
-import org.apache.cordova.json4j.JSONObject;
-import org.apache.cordova.json4j.internal.Parser;
-import org.apache.cordova.util.StringUtils;
-import org.apache.cordova.util.Logger;
-
-public class Util {
-
-    /**
-     * Provides manual date string parsing
-     *
-     * @param d
-     *            Date string
-     * @param p
-     *            Pattern string
-     * @return Calendar
-     */
-    public static Calendar dateParserBB(String d, String p) {
-        String time = "";
-        String date = d;
-        String delimiter = Resources.DATEDELIMITER; // "-"
-        try {
-            // replace '/' with '-' (to compensate for delimiters '/' and '-' in
-            // string)
-            date = date.replace('/', '-');
-
-            // extract time first
-            if (date.indexOf(':') > 0) {
-                time = date.substring(date.indexOf(':') - 2, date.length())
-                        .trim();
-                date = date.substring(0, date.indexOf(':') - 2).trim();
-            }
-
-            // determine string delimiter
-            if (date.indexOf(delimiter) == -1) { // is not in short format
-                delimiter = Resources.SPACE; // " "
-            }
-
-            // split date into sections
-            JSONArray str = Util.split(date, delimiter);
-            if (str == null) {
-                throw new Exception(); // incorrect format
-            }
-
-            // remove day of week and other unwanted characters -- will
-            // automatically be set in calendar object
-            str = Util.removeDayOfWeek(str);
-
-            // convert month string into integer: if applicable
-            str = Util.convertMonthString(str);
-
-            // use pattern to determine order of dd, mm, yyyy. If no pattern
-            // will use Locale Default order
-            Hashtable patternFmt = Util.getDatePattern(p);
-
-            // create calendar object
-            Calendar c = Calendar.getInstance(TimeZone.getDefault());
-
-            // set calendar instance:
-            c.set(Calendar.YEAR, Integer.parseInt(removeSymbols(str
-                    .getString(Integer.parseInt(patternFmt.get("year")
-                            .toString())))));
-            c.set(Calendar.MONTH, Integer.parseInt(removeSymbols(str
-                    .getString(Integer.parseInt(patternFmt.get("month")
-                            .toString())))));
-            c.set(Calendar.DAY_OF_MONTH, Integer.parseInt(removeSymbols(str
-                    .getString(Integer.parseInt(patternFmt.get("day")
-                            .toString())))));
-
-            // set time if applicable
-            if (time.length() > 0) {
-                JSONArray t = Util.split(time, Resources.TIMEDELIMITER);
-                // determine if 12hour or 24hour clock
-                int am_pm = getAmPm(t.getString(t.length() - 1).toString());
-                if (!t.isNull(0)) {
-                    c.set(Calendar.HOUR,
-                            Integer.parseInt(removeSymbols(t.getString(0))));
-                }
-                if (!t.isNull(1)) {
-                    c.set(Calendar.MINUTE,
-                            Integer.parseInt(removeSymbols(t.getString(1))));
-                }
-                if (!t.isNull(2)) {
-                    c.set(Calendar.SECOND,
-                            Integer.parseInt(removeSymbols(t.getString(2))));
-                }
-                if (am_pm != -1) {
-                    c.set(Calendar.AM_PM, am_pm);
-                }
-            }
-            return c;
-        } catch (Exception e) {
-        }
-        return null;
-    }
-
-    /**
-     * Returns a pattern string for formatting and parsing dates according to
-     * the client's user preferences.
-     *
-     * @param options
-     *            JSONArray options (user pattern)
-     *
-     * @return String (String}: The date and time pattern for formatting and
-     *         parsing dates. The patterns follow Unicode Technical Standard #35
-     *         http://unicode.org/reports/tr35/tr35-4.html
-     *
-     * @throws GlobalizationError
-     */
-    public static String getBlackBerryDatePattern(JSONArray options)
-            throws GlobalizationError {
-
-        try {
-            // default user preference for date
-            String fmtDate = ((SimpleDateFormat) DateFormat
-                    .getInstance(DateFormat.DATE_SHORT)).toPattern();
-            // default user preference for time
-            String fmtTime = ((SimpleDateFormat) DateFormat
-                    .getInstance(DateFormat.TIME_SHORT)).toPattern();
-            // default SHORT date/time format. ex. dd/MM/yyyy h:mma
-            String fmt = fmtDate + Resources.SPACE + fmtTime;
-
-            // get Date value + options (if available)
-            if (options.getJSONObject(0).length() > 1) {
-                // options were included. get formatLength option
-                if (!((JSONObject) options.getJSONObject(0).get(
-                        Resources.OPTIONS)).isNull(Resources.FORMATLENGTH)) {
-                    String fmtOpt = (String) ((JSONObject) options
-                            .getJSONObject(0).get(Resources.OPTIONS))
-                            .get(Resources.FORMATLENGTH);
-                    // medium
-                    if (fmtOpt.equalsIgnoreCase(Resources.MEDIUM)) {
-                        // default user preference for date
-                        fmtDate = ((SimpleDateFormat) DateFormat
-                                .getInstance(DateFormat.DATE_MEDIUM))
-                                .toPattern();
-                        // default user preference for time
-                        fmtTime = ((SimpleDateFormat) DateFormat
-                                .getInstance(DateFormat.TIME_MEDIUM))
-                                .toPattern();
-                    } else if (fmtOpt.equalsIgnoreCase(Resources.LONG)) { // long/full
-                        // default user preference for date
-                        fmtDate = ((SimpleDateFormat) DateFormat
-                                .getInstance(DateFormat.DATE_LONG)).toPattern();
-                        // default user preference for time
-                        fmtTime = ((SimpleDateFormat) DateFormat
-                                .getInstance(DateFormat.TIME_LONG)).toPattern();
-                    } else if (fmtOpt.equalsIgnoreCase(Resources.FULL)) { // long/full
-                        // default user preference for date
-                        fmtDate = ((SimpleDateFormat) DateFormat
-                                .getInstance(DateFormat.DATE_FULL)).toPattern();
-                        // default user preference for time
-                        fmtTime = ((SimpleDateFormat) DateFormat
-                                .getInstance(DateFormat.TIME_FULL)).toPattern();
-                    }
-                }
-
-                // return pattern type
-                fmt = fmtDate + Resources.SPACE + fmtTime;
-                if (!((JSONObject) options.getJSONObject(0).get(
-                        Resources.OPTIONS)).isNull(Resources.SELECTOR)) {
-                    String selOpt = (String) ((JSONObject) options
-                            .getJSONObject(0).get(Resources.OPTIONS))
-                            .get(Resources.SELECTOR);
-                    if (selOpt.equalsIgnoreCase(Resources.DATE)) {
-                        fmt = fmtDate;
-                    } else if (selOpt.equalsIgnoreCase(Resources.TIME)) {
-                        fmt = fmtTime;
-                    }
-                }
-            }
-            return fmt;
-        } catch (Exception ge) {
-        }
-        return null;
-    }
-
-    /**
-     * Returns a JSONArray of either the names of the months or days of the week
-     * according to the client's user preferences and calendar. Note: Months
-     * will be in order from Jan - Dec, while days of week will begin on random
-     * day due to Locale time differences of defined long date values
-     *
-     * @param item
-     *            String item (days of week or months)
-     * @param pattern
-     *            String pattern (pattern to parse item)
-     * @return JSONArray The array of names starting from either the first month
-     *         in the year or the first day of the week.
-     */
-    public static JSONArray getDateNameString(String item, String pattern) {
-        JSONArray value = new JSONArray();
-
-        // multipliers
-        long day = 1000 * 60 * 60 * 24; // 86,400,000
-        long startDay = day * 3; // starting three days in to avoid locale
-                                 // differences
-        long month = day * 31; // 2,678,400,000
-
-        SimpleDateFormat fmt = new SimpleDateFormat(pattern,
-                Locale.getDefault());
-        Date d = new Date();
-        try {
-            if (item.equalsIgnoreCase(Resources.MONTHS)) {
-                for (int x = 0; x < 13; x++) {
-                    d = new Date(startDay + (month * x));
-                    // testing short Month first
-                    if (!value.contains(fmt.format(d).toString())
-                            && !value.isEmpty()) {
-                        // add day into array
-                        value.put(fmt.format(d).toString());
-                    } else if (value.isEmpty()) {
-                        // Initialize array
-                        value.put(fmt.format(d).toString());
-                    }
-                }
-            } else { // Days
-                for (int x = 3; x < 11; x++) {
-                    d = new Date(day * x);
-                    // testing short day first
-                    if (!value.contains(fmt.format(d).toString())
-                            && !value.isEmpty()) {
-                        // add day into array
-                        value.put(fmt.format(d).toString());
-                    } else if (value.isEmpty()) {
-                        // Initialize array
-                        value.put(fmt.format(d).toString());
-                    }
-                }
-            }
-            return value;
-        } catch (Exception e) {
-        }
-        return null;
-    }
-
-    /**
-     * Parses a String formatted as a percent or currency removing the symbol
-     * returns the corresponding number.
-     *
-     * @return String Corresponding number
-     *
-     * @throws Exception
-     */
-    public static String removeSymbols(String s) throws Exception {
-        StringBuffer sb = new StringBuffer(s.trim());
-        try {
-            // begin removing all characters before string
-            for (int x = 0; x < sb.length(); x++) {
-                if (Character.isDigit(sb.charAt(x))) {
-                    x = sb.length() - 1; // end loop
-                } else {
-                    sb.deleteCharAt(x);
-                }
-            }
-            // begin removing all characters after string
-            for (int x = sb.length() - 1; x > -1; x--) {
-                if (Character.isDigit(sb.charAt(x))) {
-                    x = 0; // end loop
-                } else {
-                    sb.deleteCharAt(x);
-                }
-            }
-            return sb.toString().trim();
-        } catch (Exception e) {
-        }
-        return null;
-    }
-
-    /**
-     * Splits string into a JSONArray Note: Other options are to use
-     * org.apache.cordova.util.StringUtils.split(String strString, String
-     * strDelimiter)
-     *
-     * @param s
-     *            String s (String to split)
-     * @param delimiter
-     *            String delimiter (String used to split s)
-     * @return JSONArray: String objects
-     */
-    public static JSONArray split(String s, String delimiter) {
-        JSONArray result = new JSONArray();
-        String str = s;
-        try {
-            int p = s.indexOf(delimiter);
-            if (p != -1) {
-                while (p != -1) {
-                    result.put(str.substring(0, p).trim());
-                    if (p + 1 <= str.length()) {
-                        str = str.substring(p + 1);
-                    } else {
-                        // delimiter is the last character in the string
-                        str = "";
-                        break;
-                    }
-                    p = str.indexOf(delimiter);
-                }
-                // add remaining characters if any
-                if (str.length() > 0) {
-                    result.put(str);
-                }
-                return result;
-            }
-            return null; // incorrect delimiter
-        } catch (Exception e) {
-        }
-        return null; // error thrown
-    }
-
-    /**
-     * If applicable; removes day of week and other unwanted characters from
-     * JSONArray
-     *
-     * @param s
-     *            JSONArray s (List of date properties)
-     *
-     * @return JSONArray:
-     *          [key: day], [int: position]
-     *          [key: month], [int: position]
-     *          [key: year], [int: position]
-     */
-    public static JSONArray removeDayOfWeek(JSONArray s) {
-        JSONArray str = s;
-        JSONArray list;
-        try {
-            // get week names in short format //$NON-NLS-1$
-            list = getDateNameString(Resources.DAYS, "EEE");
-
-            // remove day of week from JSONArray
-            for (int x = 0; x < str.length(); x++) {
-                // do manual checking due to short or long version of week
-                // validate entry is not already an int
-                if (!Character.isDigit(str.getString(x).charAt(0))) {
-                    // run though short weeks to get match and remove
-                    StringMatch sm;
-                    for (int y = 0; y < list.length(); y++) {
-                        sm = new StringMatch(list.getString(y));
-                        if (sm.indexOf(str.getString(x)) != -1) {// week found
-                            str.removeElementAt(x); // remove day of week
-                            return str;
-                        }
-                        // if end of list reached, load long version of names
-                        // and rerun loop
-                        if (y == list.length() - 1) {
-                            y = -1;
-                            // get week names in long format//$NON-NLS-1$
-                            list = getDateNameString(Resources.DAYS, "EEEE");
-                        }
-                    }
-                }
-            }
-        } catch (Exception e) {
-        }// exception caught, return initial JSONArray
-        return s;
-    }
-
-    /**
-     * If applicable; converts Month String into number
-     *
-     * @param s
-     *            JSONArray s (List of date properties)
-     *
-     * @return JSONArray:
-     *          [key: day], [int: position]
-     *          [key: month], [int: position]
-     *          [key: year], [int: position]
-     */
-    public static JSONArray convertMonthString(JSONArray s) {
-        JSONArray str = s;
-        JSONArray list;
-        try {
-            // get month names in short format
-            list = getDateNameString(Resources.MONTHS, "MMM");
-
-            // convert month string into integer if applicable
-            for (int x = 0; x < str.length(); x++) {
-                // do manual checking due to short or long version of months
-                // validate entry is not already an int
-                if (!Character.isDigit(str.getString(x).charAt(0))) {
-                    // run though short format months to get index number
-                    StringMatch sm;
-                    for (int y = 0; y < list.length(); y++) {
-                        sm = new StringMatch(list.getString(y));
-                        if (sm.indexOf(str.getString(x)) != -1) {// month found
-                            // replace string with integer
-                            str.setElementAt(String.valueOf(y), x);
-                            return str;
-                        }
-                        // if end of list reached load long version of names and
-                        // rerun loop
-                        if (y == list.length() - 1) {
-                            y = -1;
-                            // get month names in long format
-                            list = getDateNameString(Resources.MONTHS, "MMMM");
-                        }
-                    }
-                }
-            }
-            return str;
-        } catch (Exception e) {
-        }// exception caught, return initial JSONArray
-        return s;
-    }
-
-    /**
-     * Determine if am_pm present and return value. if not return -1
-     *
-     * @param time
-     *            String time (time string of date object)
-     *
-     * @return int
-     *          -1 = am_pm not present
-     *           0 = am
-     *           1 = pm
-     */
-    public static int getAmPm(String time) {
-        // multipliers
-        long am_pm = 0; // pm
-        long am_pm_12 = 43200000; // am
-        int value = 1;
-        boolean reloop = true;
-
-        Date d = new Date(am_pm);
-
-        for (int x = 0; x < Resources.AM_PMFORMATS.length; x++) {
-            SimpleDateFormat fmt = new SimpleDateFormat(
-                    Resources.AM_PMFORMATS[x], Locale.getDefault());
-
-            StringMatch sm = new StringMatch(fmt.format(d).toString());
-
-            if (sm.indexOf(time) != -1) {
-                return value;
-            }
-
-            if (x == Resources.AM_PMFORMATS.length - 1 && reloop) {
-                d = new Date(am_pm_12);
-                value = 0;
-                x = -1;
-                reloop = false;
-            }
-        }
-        return -1;
-    }
-
-    /**
-     * Returns Hashtable indicating position of dd, MM, and yyyy in string.
-     * Position will either be 0, 1, or 2
-     *
-     * @param p
-     *            String pattern
-     *
-     * @return Hashtable:
-     *          [key: day], [int: position]
-     *          [key: month], [int: position]
-     *          [key: year], [int: position]
-     *
-     * @throws Exception
-     */
-    public static Hashtable getDatePattern(String p) {
-        Hashtable result = new Hashtable();
-
-        if (p.length() <= 0) {
-            // default device preference for date
-            p = ((SimpleDateFormat) DateFormat
-                    .getInstance(DateFormat.DATE_SHORT)).toPattern();
-        }
-
-        // get positions
-        int day = p.indexOf('d'); //$NON-NLS-1$
-        int month = p.indexOf('M'); //$NON-NLS-1$
-        int year = p.indexOf('y'); //$NON-NLS-1$
-        // int weekDay = p.indexOf('E'); //removed in removeDayOfWeek()
-
-        if (year < day && day < month) { // yyyy/dd/mmmm
-            year = 0;
-            day = 1;
-            month = 2;
-        } else if (day < month && month < year) { // dd/mm/yyyy
-            year = 2;
-            day = 0;
-            month = 1;
-        } else if (year < month && month < day) {// yyyy/mm/dd
-            year = 0;
-            day = 2;
-            month = 1;
-        } else if (month < day && day < year) { // mm/dd/yyyy
-            year = 2;
-            day = 1;
-            month = 0;
-        } else if (month < year && year < day) { // mm/yyyy/dd
-            year = 1;
-            day = 2;
-            month = 0;
-        } else if (day < year && year < month) { // dd/yyyy/mm
-            year = 1;
-            day = 0;
-            month = 2;
-        } else {
-            return null; // an error has occurred
-        }
-        result.put("day", String.valueOf(day)); //$NON-NLS-1$
-        result.put("month", String.valueOf(month)); //$NON-NLS-1$
-        result.put("year", String.valueOf(year)); //$NON-NLS-1$
-        return result;
-    }
-
-    /**
-     * Returns JSONObject of returnType('currency')
-     *
-     * @param _locale
-     *            String _locale (user supplied Locale.toString())
-     * @param code
-     *            String code (The ISO 4217 currency code)
-     *
-     * @return JSONObject: 'currency':
-     *              [key: currencyCodes], [String]
-     *              [key: currencyPattern], [String]
-     *              [key: currencyDecimal], [String]
-     *              [key: currencyFraction], [String]
-     *              [key: currencyGrouping], [String]
-     *              [key: currencyRounding], [String]
-     *
-     * @throws: Exception
-     */
-    public static JSONObject getCurrencyData(String _locale, String code) {
-        JSONObject result = null;
-        try {
-            JSONArray jsonArray;
-            result = getPersistentResourceBundle(_locale);
-            if (result == null) {
-                jsonArray = getResourceBundle(_locale).getJSONArray(
-                        Resources.JSON_CURRENCY);
-            } else {
-                jsonArray = result.getJSONArray(Resources.JSON_CURRENCY);
-            }
-
-            for (int x = 0; x < jsonArray.length(); x++) {
-                JSONObject temp = jsonArray.getJSONObject(x);
-                if (temp.get(Resources.CURRENCYCODE).toString()
-                        .equalsIgnoreCase(code)) {
-                    result = temp;
-                }
-            }
-        } catch (Exception e) {
-
-        }
-        return result;
-    }
-
-    /**
-     * Returns JSONObject of returnType('locale')
-     *
-     * @param _locale
-     *            String _locale (user supplied Locale.toString())
-     *
-     * @return JSONObject: 'locale':
-     *              [key: displayName], [String]
-     *              [key: firstDayOfWeek], [String]
-     *              [key: pattern], [String]
-     *              [key: decimalSymbol], [String]
-     *              [key: currencySymbol], [String]
-     *              [key: percentSymbol], [String]
-     *
-     * @throws Exception
-     */
-    public static JSONObject getLocaleData(String _locale) {
-        JSONObject result = null;
-        try {
-            result = getPersistentResourceBundle(_locale);
-            if (result == null) {
-                result = getResourceBundle(_locale).getJSONObject(
-                        Resources.JSON_LOCALE);
-            } else {
-                result = result.getJSONObject(Resources.JSON_LOCALE);
-            }
-        } catch (Exception e) {
-        }
-        return result;
-    }
-
-    /**
-     * Returns resourceBundle JSONObject cached in PersistentStore
-     *
-     * Note: Recursively searches JSONObject from persistentStore using
-     * Resources.PERSISTENTSTORE_ID for locale by removing sub-parts (separated
-     * by '_')
-     *
-     * @param _locale
-     *            String _locale (user supplied Locale.toString())
-     *
-     * @return JSONObject
-     */
-    private static JSONObject getPersistentResourceBundle(String _locale) {
-        JSONObject result = null;
-        try {
-            // load object
-            result = (JSONObject) PersistentStore.getPersistentObject(
-                    Resources.PERSISTENTSTORE_ID).getContents();
-        } catch (Exception e) {
-            if (StringUtilities.indexOf(_locale, '_', 0, _locale.length()) > 0) {
-                result = getPersistentResourceBundle(removeSubPart(StringUtils
-                        .split(_locale, "_"))); //$NON-NLS-1$
-            } else {
-                result = null;
-            }
-        }
-        return result;
-    }
-
-    /**
-     * Returns resourceBundle File as JSONObject from
-     * /resource/resourceBundles/<Locale.toString()>.js.gz
-     *
-     * Note: Recursively searches for locale by removing sub-parts (separated by
-     * '_')
-     *
-     * @param _locale
-     *            String _locale (user supplied Locale.toString())
-     *
-     * @return JSONObject
-     */
-    private static JSONObject getResourceBundle(String _locale) {
-        JSONObject result = null;
-
-        try {
-            if (_locale == null || _locale.length() <= 0) {
-                return null;
-            }
-
-            InputStream is = Util.class.getClass().getResourceAsStream(
-                    Resources.LOCALEINFOPATH + _locale
-                            + Resources.LOCALEINFOPATHEND);
-            Parser parser = new Parser(new InputStreamReader(
-                    new GZIPInputStream(is), "UTF-8"));
-            result = parser.parse();
-
-            // cache resourceBundle as JSONOBJECT
-            // store new object
-            PersistentObject persist = PersistentStore
-                    .getPersistentObject(Resources.PERSISTENTSTORE_ID);
-            // Synchronize on the PersistentObject so that no other object can
-            // acquire the lock before we finish our commit operation.
-            synchronized (persist) {
-                persist.setContents((Hashtable) result);
-                persist.commit();
-            }
-        } catch (NonPersistableObjectException npoe) {
-            Logger.log("Globalization: Failed to persist locale: "
-                    + npoe.getMessage());
-        } catch (Exception e) {
-            // if resourceBundle not found, recursively search for file by
-            // removing substrings from name
-            if (StringUtilities.indexOf(_locale, '_', 0, _locale.length()) > 0) {
-                result = getResourceBundle(removeSubPart(StringUtils.split(
-                        _locale, "_"))); //$NON-NLS-1$
-            } else {
-                result = null;
-            }
-        }
-        return result;
-    }
-
-    /**
-     * Returns substring of resourceBundle with the last section removed. Ex.
-     * cs_CZ_PREEURO -> cs_CZ
-     *
-     * @param s
-     *            String[] s (Array of locale split by '_')
-     *
-     * @return JSONObject
-     */
-    private static String removeSubPart(String[] s) {
-        String result = "";
-        for (int x = 0; x < s.length - 1; x++) {
-            result += s[x];
-            if (x != s.length - 2) {// length - 2 to account for starting at
-                                    // zero
-                result += "_"; //$NON-NLS-1$
-            }
-        }
-        return result;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/http/FileTransfer.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/http/FileTransfer.java b/bbos/framework/ext/src/org/apache/cordova/http/FileTransfer.java
deleted file mode 100644
index b0f089c..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/http/FileTransfer.java
+++ /dev/null
@@ -1,473 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.http;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import javax.microedition.io.Connector;
-import javax.microedition.io.HttpConnection;
-import javax.microedition.io.file.FileConnection;
-
-import org.apache.cordova.api.Plugin;
-import org.apache.cordova.api.PluginResult;
-import org.apache.cordova.file.Entry;
-import org.apache.cordova.json4j.JSONArray;
-import org.apache.cordova.json4j.JSONException;
-import org.apache.cordova.json4j.JSONObject;
-import org.apache.cordova.util.Logger;
-
-import net.rim.device.api.io.FileNotFoundException;
-import net.rim.device.api.io.http.HttpProtocolConstants;
-
-/**
- * The FileTransfer plugin can be used to transfer files between the device and
- * a remote server. The following actions are supported:
- *
- *      download - Download a file from a server to the device.
- *      upload   - Upload a file from the device to a server.
- */
-public class FileTransfer extends Plugin {
-    private static final String LOG_TAG = "FileTransfer: ";
-
-    /**
-     * Error codes
-     */
-    static int FILE_NOT_FOUND_ERR = 1;
-    static int INVALID_URL_ERR = 2;
-    static int CONNECTION_ERR = 3;
-
-    /**
-     * Possible actions
-     */
-    private static final String ACTION_DOWNLOAD = "download";
-    private static final String ACTION_UPLOAD = "upload";
-
-    private static final char SEPARATOR = '/';
-
-    /**
-     * Executes the requested action and returns a PluginResult.
-     *
-     * @param action
-     *            The action to execute.
-     * @param callbackId
-     *            The callback ID to be invoked upon action completion.
-     * @param args
-     *            JSONArry of arguments for the action.
-     * @return A PluginResult object with a status and message.
-     */
-    public PluginResult execute(String action, JSONArray args, String callbackId) {
-        String source = null;
-        String target = null;
-        PluginResult result = null;
-
-        try {
-            // Retrieve the source and target locations from the argument array.
-            source = args.isNull(0) ? null : args.getString(0).trim();
-            target = args.isNull(1) ? null : args.getString(1).trim();
-
-            if (source == null || source.length() == 0 || target == null
-                    || target.length() == 0) {
-                Logger.log(LOG_TAG + "Missing source or target");
-                return new PluginResult(PluginResult.Status.JSON_EXCEPTION,
-                        "Missing source or target");
-            }
-        } catch (JSONException e) {
-            Logger.log(LOG_TAG + e.getMessage());
-            return new PluginResult(PluginResult.Status.JSON_EXCEPTION,
-                    "Invalid or missing parameter");
-        }
-
-        if (ACTION_UPLOAD.equals(action)) {
-            // Source needs to follow the file URI protocol so add "file:///"
-            // prefix if it doesn't exist.
-            if (!source.startsWith("file:///")) {
-                if (source.indexOf(SEPARATOR) != 0) {
-                    source = "file://" + SEPARATOR + source;
-                } else {
-                    source = "file://" + source;
-                }
-            }
-
-            FileUploader uploader = null;
-            try {
-                // Setup the options
-                String fileKey = getArgument(args, 2, "file");
-                String fileName = getArgument(args, 3, "image.jpg");
-                String mimeType = getArgument(args, 4, null);
-                JSONObject params = null;
-                JSONObject headers = null;
-                
-                if (args.length() > 5 && !args.isNull(5)) {
-                    params = args.getJSONObject(5);
-                }
-
-                if(args.length() > 8 && !args.isNull(8)){
-                    headers = args.getJSONObject(8);
-                }
-                uploader = new FileUploader();
-                FileUploadResult r = uploader.upload(source, target, fileKey,
-                        fileName, mimeType, params, headers);
-
-                int status = r.getResponseCode();
-                if (status < 200 || status > 399) {
-                    Logger.log(LOG_TAG + "HTTP Status " + status);
-                    JSONObject error = createFileTransferError(CONNECTION_ERR, source, target, new Integer(status));
-                    return new PluginResult(PluginResult.Status.IO_EXCEPTION, error);
-                }
-
-                result = new PluginResult(PluginResult.Status.OK,
-                        r.toJSONObject());
-            } catch (FileNotFoundException e) {
-                Logger.log(LOG_TAG + e.getMessage());
-                JSONObject error = createFileTransferError(FILE_NOT_FOUND_ERR,
-                        source, target, uploader);
-                result = new PluginResult(PluginResult.Status.IO_EXCEPTION,
-                        error);
-            } catch (IllegalArgumentException e) {
-                Logger.log(LOG_TAG + e.getMessage());
-                JSONObject error = createFileTransferError(INVALID_URL_ERR,
-                        source, target, uploader);
-                result = new PluginResult(
-                        PluginResult.Status.MALFORMED_URL_EXCEPTION, error);
-            } catch (IOException e) {
-                Logger.log(LOG_TAG + e.getMessage());
-                JSONObject error = createFileTransferError(CONNECTION_ERR,
-                        source, target, uploader);
-                result = new PluginResult(PluginResult.Status.IO_EXCEPTION,
-                        error);
-            } catch (JSONException e) {
-                Logger.log(LOG_TAG + e.getMessage());
-                result = new PluginResult(PluginResult.Status.JSON_EXCEPTION,
-                        "Invalid or missing parameter");
-            }
-        } else if (ACTION_DOWNLOAD.equals(action)) {
-            result = download(source, target);
-        } else {
-            // invalid action
-            result = new PluginResult(PluginResult.Status.INVALID_ACTION,
-                    LOG_TAG + "invalid action " + action);
-        }
-
-        return result;
-    }
-
-    /**
-     * Create an error object based on the passed in errorCode
-     *
-     * @param errorCode
-     *            the error
-     * @return JSONObject containing the error
-     */
-    private JSONObject createFileTransferError(int errorCode, String source,
-            String target) {
-        return createFileTransferError(errorCode, source, target,
-                (Integer) null);
-    }
-
-    /**
-     * Create an error object based on the passed in errorCode
-     *
-     * @param errorCode
-     *            the error
-     * @return JSONObject containing the error
-     */
-    private JSONObject createFileTransferError(int errorCode, String source,
-            String target, FileUploader fileUploader) {
-
-        Integer httpStatus = null;
-
-        if (fileUploader != null) {
-            httpStatus = fileUploader.getResponseCode();
-        }
-        return createFileTransferError(errorCode, source, target, httpStatus);
-    }
-
-    /**
-     * Create an error object based on the passed in errorCode
-     *
-     * @param errorCode
-     *            the error
-     * @return JSONObject containing the error
-     */
-    private JSONObject createFileTransferError(int errorCode, String source,
-            String target, HttpConnection connection) {
-
-        Integer httpStatus = null;
-
-        if (connection != null) {
-            try {
-                httpStatus = new Integer(connection.getResponseCode());
-            } catch (IOException e) {
-                Logger.log(LOG_TAG + " exception getting http response code "
-                        + e.toString());
-            }
-        }
-
-        return createFileTransferError(errorCode, source, target, httpStatus);
-    }
-
-    /**
-     * Create an error object based on the passed in errorCode
-     *
-     * @param errorCode
-     *            the error
-     * @return JSONObject containing the error
-     */
-    private JSONObject createFileTransferError(int errorCode, String source,
-            String target, Integer httpStatus) {
-        JSONObject error = null;
-        try {
-            error = new JSONObject();
-            error.put("code", errorCode);
-            error.put("source", source);
-            error.put("target", target);
-            if (httpStatus != null) {
-                error.put("http_status", httpStatus);
-            }
-        } catch (JSONException e) {
-            Logger.log(LOG_TAG + e.getMessage());
-        }
-        return error;
-    }
-
-    /**
-     * Recurse through a specified path and create any directories that do not
-     * already exist.
-     *
-     * @param path
-     *            directory path to recurse
-     * @throws IOException
-     */
-    private void createSubDirs(String path) throws IOException {
-        FileConnection outputStream = null;
-
-        try {
-            outputStream = (FileConnection) Connector.open(path,
-                    Connector.READ_WRITE);
-            if (!outputStream.exists()) {
-                int dirIndex = path.lastIndexOf(SEPARATOR, path.length() - 2);
-                // This code assumes file protocol is specified so stop
-                // recursion once "file:///" is hit.
-                if (dirIndex != -1 && dirIndex > 7) {
-                    createSubDirs(path.substring(0, dirIndex + 1));
-                }
-                outputStream.mkdir();
-            }
-        } finally {
-            try {
-                if (outputStream != null) {
-                    outputStream.close();
-                }
-            } catch (IOException e) {
-                Logger.log(LOG_TAG + e.getMessage());
-            }
-        }
-    }
-
-    /**
-     * Download a file from a given URL and save it to the specified location.
-     *
-     * @param source
-     *            URL of the server to receive the file
-     * @param target
-     *            Full path of the file on the file system
-     * @return JSONObject a file entry object in JSON form describing the
-     *         downloaded file.
-     */
-    private PluginResult download(String source, String target) {
-        HttpConnection httpConn = null;
-        FileConnection fileConn = null;
-        OutputStream outputStream = null;
-        String filename = null;
-        String path = null;
-
-        Logger.debug(LOG_TAG + "downloading " + source + " to " + target);
-
-        // Target needs to follow the file URI protocol so add "file:///"
-        // prefix if it doesn't exist.
-        if (!target.startsWith("file:///")) {
-            if (target.indexOf(SEPARATOR) != 0) {
-                target = "file://" + SEPARATOR + target;
-            } else {
-                target = "file://" + target;
-            }
-        }
-
-        // Parse the target filename and directory path. If the target does not
-        // specify a file name (only directory), try to get the file name from
-        // the source.
-        int dirIndex = target.lastIndexOf(SEPARATOR);
-        if (dirIndex == (target.length() - 1)) {
-            int srcdirIndex = source.lastIndexOf(SEPARATOR);
-            if (srcdirIndex != (source.length() - 1)) {
-                path = target;
-                filename = source.substring(srcdirIndex + 1);
-                target = path + filename;
-            }
-        } else if (dirIndex != -1) {
-            filename = target.substring(dirIndex + 1);
-            path = target.substring(0, dirIndex + 1);
-        }
-
-        // If no filename or path could be determined for the target, error out.
-        if (filename == null || path == null) {
-            Logger.log(LOG_TAG + "Target filename could not be determined.");
-            JSONObject error = createFileTransferError(FILE_NOT_FOUND_ERR,
-                    source, target);
-            return new PluginResult(PluginResult.Status.JSON_EXCEPTION, error);
-        }
-
-        try {
-            try {
-                // Create any directories in the path that do not already exist.
-                createSubDirs(path);
-
-                // Open connection to the target file.
-                fileConn = (FileConnection) Connector.open(target,
-                    Connector.READ_WRITE);
-            } catch (IOException e) {
-                Logger.log(LOG_TAG + "Failed to open target file: " + target);
-                JSONObject error = createFileTransferError(FILE_NOT_FOUND_ERR, source,
-                        target, httpConn);
-                return new PluginResult(PluginResult.Status.IO_EXCEPTION, error);
-            }
-
-            // Create the target file if it doesn't exist, otherwise truncate.
-            if (!fileConn.exists()) {
-                fileConn.create();
-            } else {
-                fileConn.truncate(0);
-            }
-
-            // Open the http connection to the server.
-            try {
-                httpConn = HttpUtils.getHttpConnection(source);
-            } catch (IllegalArgumentException e) {
-                JSONObject error = createFileTransferError(INVALID_URL_ERR, source, target, httpConn);
-                return new PluginResult(PluginResult.Status.MALFORMED_URL_EXCEPTION, error);
-            }
-            if (httpConn == null) {
-                Logger.log(LOG_TAG + "Failed to create http connection.");
-                // TODO separate malformed url from actual connection error
-                JSONObject error = createFileTransferError(CONNECTION_ERR,
-                        source, target);
-                return new PluginResult(
-                        PluginResult.Status.IO_EXCEPTION, error);
-            }
-
-            // Set the request headers
-            httpConn.setRequestMethod(HttpConnection.GET);
-            httpConn.setRequestProperty(
-                    HttpProtocolConstants.HEADER_USER_AGENT,
-                    System.getProperty("browser.useragent"));
-            httpConn.setRequestProperty(
-                    HttpProtocolConstants.HEADER_KEEP_ALIVE, "300");
-            httpConn.setRequestProperty(
-                    HttpProtocolConstants.HEADER_CONNECTION, "keep-alive");
-
-            // Set the cookie
-            String cookie = HttpUtils.getCookie(source);
-            if (cookie != null) {
-                httpConn.setRequestProperty(
-                        HttpProtocolConstants.HEADER_COOKIE, cookie);
-            }
-
-            InputStream inputStream = httpConn.openInputStream();
-            int status = httpConn.getResponseCode();
-            if (status < 200 || status > 399) {
-                Logger.log(LOG_TAG + "HTTP Status " + status);
-                JSONObject error = createFileTransferError(CONNECTION_ERR, source, target, httpConn);
-                return new PluginResult(PluginResult.Status.IO_EXCEPTION, error);
-            }
-
-            outputStream = fileConn.openOutputStream();
-
-            // Read from the connection and write bytes to the file.
-            byte[] buffer = new byte[1024];
-            int bytesRead = 0;
-            while ((bytesRead = inputStream.read(buffer)) > 0) {
-                outputStream.write(buffer, 0, bytesRead);
-            }
-        } catch (IOException e) {
-            Logger.log(LOG_TAG + e.getMessage());
-            JSONObject error = createFileTransferError(CONNECTION_ERR, source,
-                    target, httpConn);
-            return new PluginResult(PluginResult.Status.IO_EXCEPTION, error);
-        } catch (ClassCastException e) {
-            // in case something really funky gets passed in
-            Logger.log(LOG_TAG + e.getMessage());
-            JSONObject error = createFileTransferError(INVALID_URL_ERR, source,
-                    target, httpConn);
-            return new PluginResult(
-                    PluginResult.Status.MALFORMED_URL_EXCEPTION, error);
-        } catch (Throwable t) {
-            Logger.log(LOG_TAG + t.toString());
-            JSONObject error = createFileTransferError(CONNECTION_ERR, source, target, httpConn);
-            return new PluginResult(PluginResult.Status.IO_EXCEPTION, error);
-        } finally {
-            try {
-                if (httpConn != null) {
-                    httpConn.close();
-                }
-                if (outputStream != null) {
-                    outputStream.close();
-                }
-                if (fileConn != null) {
-                    fileConn.close();
-                }
-            } catch (IOException e) {
-                Logger.log(LOG_TAG + "IOException in finally: "
-                        + e.getMessage());
-            }
-        }
-
-        // create a new Entry
-        Entry entry = new Entry();
-        entry.setDirectory(false);
-        entry.setName(filename);
-        entry.setFullPath(target);
-
-        return new PluginResult(PluginResult.Status.OK, entry.toJSONObject());
-    }
-
-    /**
-     * Convenience method to read a parameter from the list of JSON args.
-     *
-     * @param args
-     *            the args passed to the Plugin
-     * @param position
-     *            the position to retrieve the arg from
-     * @param defaultString
-     *            the default to be used if the arg does not exist
-     * @return String with the retrieved value
-     */
-    private String getArgument(JSONArray args, int position,
-            String defaultString) {
-        String arg = defaultString;
-        if (args.length() >= position) {
-            arg = args.optString(position);
-            if (arg == null || "null".equals(arg)) {
-                arg = defaultString;
-            }
-        }
-        return arg;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/http/FileUploadResult.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/http/FileUploadResult.java b/bbos/framework/ext/src/org/apache/cordova/http/FileUploadResult.java
deleted file mode 100644
index 4b00159..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/http/FileUploadResult.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.http;
-
-import org.apache.cordova.json4j.JSONException;
-import org.apache.cordova.json4j.JSONObject;
-
-/**
- * Encapsulates the result and/or status of uploading a file to a remote server.
- */
-public class FileUploadResult {
-
-    private long bytesSent = 0;         // bytes sent
-    private int responseCode = -1;      // HTTP response code
-    private String response = null;     // HTTP response
-
-    public long getBytesSent() {
-        return bytesSent;
-    }
-
-    public void setBytesSent(long bytes) {
-        this.bytesSent = bytes;
-    }
-
-    public int getResponseCode() {
-        return responseCode;
-    }
-
-    public void setResponseCode(int responseCode) {
-        this.responseCode = responseCode;
-    }
-
-    public String getResponse() {
-        return response;
-    }
-
-    public void setResponse(String response) {
-        this.response = response;
-    }
-
-    public JSONObject toJSONObject() throws JSONException {
-        return new JSONObject(
-                "{bytesSent:" + bytesSent +
-                ",responseCode:" + responseCode +
-                ",response:" + JSONObject.quote(response) + "}");
-    }
-}


[15/15] webworks commit: CB-4228

Posted by lo...@apache.org.
CB-4228

removed BBOS from Cordova BlackBerry

- deleted bbos directory
- updated README.md


Project: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/commit/69105e07
Tree: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/tree/69105e07
Diff: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/diff/69105e07

Branch: refs/heads/master
Commit: 69105e0731d9fd0d6ff51af7e5607d4c16539b3b
Parents: 90779d5
Author: lorinbeer <lo...@adobe.com>
Authored: Mon Jul 15 13:50:46 2013 -0700
Committer: lorinbeer <lo...@adobe.com>
Committed: Mon Jul 15 13:50:46 2013 -0700

----------------------------------------------------------------------
 README.md                                       |    2 +-
 bbos/LICENSE                                    |  268 -
 bbos/NOTICE                                     |    8 -
 bbos/README.md                                  |  183 -
 bbos/VERSION                                    |    1 -
 bbos/bin/create                                 |  108 -
 bbos/bin/create.bat                             |   33 -
 bbos/bin/create.js                              |  129 -
 bbos/bin/templates/dist/README.md               |   90 -
 bbos/bin/templates/project/blackberry.xml       |  456 -
 bbos/bin/templates/project/build.xml            |  154 -
 bbos/bin/templates/project/cordova/build        |   28 -
 bbos/bin/templates/project/cordova/run          |   35 -
 bbos/bin/templates/project/cordova/version      |   38 -
 bbos/bin/templates/project/playbook.xml         |  338 -
 bbos/bin/templates/project/project.properties   |  100 -
 bbos/bin/templates/project/www/LICENSE          |  296 -
 bbos/bin/templates/project/www/NOTICE           |    8 -
 bbos/bin/templates/project/www/README.md        |   30 -
 bbos/bin/templates/project/www/VERSION          |    1 -
 bbos/bin/templates/project/www/config.xml       |   96 -
 bbos/bin/templates/project/www/css/index.css    |  115 -
 bbos/bin/templates/project/www/img/logo.png     |  Bin 21814 -> 0 bytes
 bbos/bin/templates/project/www/index.html       |   42 -
 bbos/bin/templates/project/www/js/index.js      |   49 -
 bbos/bin/templates/project/www/json2.js         |  482 -
 bbos/bin/templates/project/www/plugins.xml      |   35 -
 .../project/www/res/icon/blackberry/icon-80.png |  Bin 7287 -> 0 bytes
 .../project/www/res/resourceBundles/ar.js.gz    |  Bin 708 -> 0 bytes
 .../project/www/res/resourceBundles/ar_AE.js.gz |  Bin 745 -> 0 bytes
 .../project/www/res/resourceBundles/ar_BH.js.gz |  Bin 738 -> 0 bytes
 .../project/www/res/resourceBundles/ar_DZ.js.gz |  Bin 737 -> 0 bytes
 .../project/www/res/resourceBundles/ar_EG.js.gz |  Bin 735 -> 0 bytes
 .../project/www/res/resourceBundles/ar_IQ.js.gz |  Bin 736 -> 0 bytes
 .../project/www/res/resourceBundles/ar_JO.js.gz |  Bin 736 -> 0 bytes
 .../project/www/res/resourceBundles/ar_KW.js.gz |  Bin 738 -> 0 bytes
 .../project/www/res/resourceBundles/ar_LB.js.gz |  Bin 735 -> 0 bytes
 .../project/www/res/resourceBundles/ar_LY.js.gz |  Bin 736 -> 0 bytes
 .../project/www/res/resourceBundles/ar_MA.js.gz |  Bin 738 -> 0 bytes
 .../project/www/res/resourceBundles/ar_OM.js.gz |  Bin 736 -> 0 bytes
 .../project/www/res/resourceBundles/ar_QA.js.gz |  Bin 700 -> 0 bytes
 .../project/www/res/resourceBundles/ar_SA.js.gz |  Bin 704 -> 0 bytes
 .../project/www/res/resourceBundles/ar_SD.js.gz |  Bin 737 -> 0 bytes
 .../project/www/res/resourceBundles/ar_SY.js.gz |  Bin 699 -> 0 bytes
 .../project/www/res/resourceBundles/ar_TN.js.gz |  Bin 700 -> 0 bytes
 .../project/www/res/resourceBundles/ar_YE.js.gz |  Bin 701 -> 0 bytes
 .../project/www/res/resourceBundles/be.js.gz    |  Bin 703 -> 0 bytes
 .../project/www/res/resourceBundles/be_BY.js.gz |  Bin 686 -> 0 bytes
 .../project/www/res/resourceBundles/bg.js.gz    |  Bin 702 -> 0 bytes
 .../project/www/res/resourceBundles/bg_BG.js.gz |  Bin 688 -> 0 bytes
 .../project/www/res/resourceBundles/bn_IN.js.gz |  Bin 767 -> 0 bytes
 .../project/www/res/resourceBundles/ca.js.gz    |  Bin 698 -> 0 bytes
 .../project/www/res/resourceBundles/ca_ES.js.gz |  Bin 678 -> 0 bytes
 .../www/res/resourceBundles/ca_ES_PREEURO.js.gz |  Bin 696 -> 0 bytes
 .../project/www/res/resourceBundles/cs.js.gz    |  Bin 699 -> 0 bytes
 .../project/www/res/resourceBundles/cs_CZ.js.gz |  Bin 687 -> 0 bytes
 .../www/res/resourceBundles/cs_CZ_EURO.js.gz    |  Bin 702 -> 0 bytes
 .../www/res/resourceBundles/cs_CZ_PREEURO.js.gz |  Bin 706 -> 0 bytes
 .../project/www/res/resourceBundles/da.js.gz    |  Bin 698 -> 0 bytes
 .../project/www/res/resourceBundles/da_DK.js.gz |  Bin 717 -> 0 bytes
 .../www/res/resourceBundles/da_DK_EURO.js.gz    |  Bin 731 -> 0 bytes
 .../project/www/res/resourceBundles/de.js.gz    |  Bin 697 -> 0 bytes
 .../project/www/res/resourceBundles/de_AT.js.gz |  Bin 719 -> 0 bytes
 .../www/res/resourceBundles/de_AT_PREEURO.js.gz |  Bin 737 -> 0 bytes
 .../project/www/res/resourceBundles/de_CH.js.gz |  Bin 723 -> 0 bytes
 .../project/www/res/resourceBundles/de_DE.js.gz |  Bin 678 -> 0 bytes
 .../www/res/resourceBundles/de_DE_PREEURO.js.gz |  Bin 696 -> 0 bytes
 .../project/www/res/resourceBundles/de_LU.js.gz |  Bin 682 -> 0 bytes
 .../www/res/resourceBundles/de_LU_PREEURO.js.gz |  Bin 700 -> 0 bytes
 .../project/www/res/resourceBundles/el.js.gz    |  Bin 696 -> 0 bytes
 .../project/www/res/resourceBundles/el_CY.js.gz |  Bin 712 -> 0 bytes
 .../www/res/resourceBundles/el_CY_EURO.js.gz    |  Bin 726 -> 0 bytes
 .../www/res/resourceBundles/el_CY_PREEURO.js.gz |  Bin 730 -> 0 bytes
 .../project/www/res/resourceBundles/el_GR.js.gz |  Bin 690 -> 0 bytes
 .../www/res/resourceBundles/el_GR_PREEURO.js.gz |  Bin 708 -> 0 bytes
 .../project/www/res/resourceBundles/en.js.gz    |  Bin 670 -> 0 bytes
 .../project/www/res/resourceBundles/en_AU.js.gz |  Bin 689 -> 0 bytes
 .../project/www/res/resourceBundles/en_BE.js.gz |  Bin 680 -> 0 bytes
 .../www/res/resourceBundles/en_BE_PREEURO.js.gz |  Bin 699 -> 0 bytes
 .../project/www/res/resourceBundles/en_CA.js.gz |  Bin 699 -> 0 bytes
 .../project/www/res/resourceBundles/en_GB.js.gz |  Bin 692 -> 0 bytes
 .../www/res/resourceBundles/en_GB_EURO.js.gz    |  Bin 706 -> 0 bytes
 .../project/www/res/resourceBundles/en_HK.js.gz |  Bin 701 -> 0 bytes
 .../project/www/res/resourceBundles/en_IE.js.gz |  Bin 692 -> 0 bytes
 .../www/res/resourceBundles/en_IE_PREEURO.js.gz |  Bin 710 -> 0 bytes
 .../project/www/res/resourceBundles/en_IN.js.gz |  Bin 762 -> 0 bytes
 .../project/www/res/resourceBundles/en_MT.js.gz |  Bin 686 -> 0 bytes
 .../project/www/res/resourceBundles/en_NZ.js.gz |  Bin 691 -> 0 bytes
 .../project/www/res/resourceBundles/en_PH.js.gz |  Bin 703 -> 0 bytes
 .../project/www/res/resourceBundles/en_SG.js.gz |  Bin 688 -> 0 bytes
 .../project/www/res/resourceBundles/en_US.js.gz |  Bin 705 -> 0 bytes
 .../project/www/res/resourceBundles/en_ZA.js.gz |  Bin 692 -> 0 bytes
 .../project/www/res/resourceBundles/es.js.gz    |  Bin 681 -> 0 bytes
 .../project/www/res/resourceBundles/es_AR.js.gz |  Bin 699 -> 0 bytes
 .../project/www/res/resourceBundles/es_BO.js.gz |  Bin 697 -> 0 bytes
 .../project/www/res/resourceBundles/es_CL.js.gz |  Bin 696 -> 0 bytes
 .../project/www/res/resourceBundles/es_CO.js.gz |  Bin 698 -> 0 bytes
 .../project/www/res/resourceBundles/es_CR.js.gz |  Bin 699 -> 0 bytes
 .../project/www/res/resourceBundles/es_DO.js.gz |  Bin 708 -> 0 bytes
 .../project/www/res/resourceBundles/es_EC.js.gz |  Bin 697 -> 0 bytes
 .../project/www/res/resourceBundles/es_ES.js.gz |  Bin 679 -> 0 bytes
 .../www/res/resourceBundles/es_ES_PREEURO.js.gz |  Bin 697 -> 0 bytes
 .../project/www/res/resourceBundles/es_GT.js.gz |  Bin 699 -> 0 bytes
 .../project/www/res/resourceBundles/es_HN.js.gz |  Bin 698 -> 0 bytes
 .../project/www/res/resourceBundles/es_MX.js.gz |  Bin 697 -> 0 bytes
 .../project/www/res/resourceBundles/es_NI.js.gz |  Bin 699 -> 0 bytes
 .../project/www/res/resourceBundles/es_PA.js.gz |  Bin 697 -> 0 bytes
 .../project/www/res/resourceBundles/es_PE.js.gz |  Bin 695 -> 0 bytes
 .../project/www/res/resourceBundles/es_PR.js.gz |  Bin 700 -> 0 bytes
 .../project/www/res/resourceBundles/es_PY.js.gz |  Bin 720 -> 0 bytes
 .../project/www/res/resourceBundles/es_SV.js.gz |  Bin 702 -> 0 bytes
 .../project/www/res/resourceBundles/es_US.js.gz |  Bin 707 -> 0 bytes
 .../project/www/res/resourceBundles/es_UY.js.gz |  Bin 721 -> 0 bytes
 .../project/www/res/resourceBundles/es_VE.js.gz |  Bin 701 -> 0 bytes
 .../project/www/res/resourceBundles/et.js.gz    |  Bin 700 -> 0 bytes
 .../project/www/res/resourceBundles/et_EE.js.gz |  Bin 677 -> 0 bytes
 .../www/res/resourceBundles/et_EE_EURO.js.gz    |  Bin 691 -> 0 bytes
 .../www/res/resourceBundles/et_EE_PREEURO.js.gz |  Bin 695 -> 0 bytes
 .../project/www/res/resourceBundles/fi.js.gz    |  Bin 700 -> 0 bytes
 .../project/www/res/resourceBundles/fi_FI.js.gz |  Bin 685 -> 0 bytes
 .../www/res/resourceBundles/fi_FI_PREEURO.js.gz |  Bin 702 -> 0 bytes
 .../project/www/res/resourceBundles/fr.js.gz    |  Bin 661 -> 0 bytes
 .../project/www/res/resourceBundles/fr_BE.js.gz |  Bin 679 -> 0 bytes
 .../www/res/resourceBundles/fr_BE_PREEURO.js.gz |  Bin 698 -> 0 bytes
 .../project/www/res/resourceBundles/fr_CA.js.gz |  Bin 696 -> 0 bytes
 .../project/www/res/resourceBundles/fr_CH.js.gz |  Bin 723 -> 0 bytes
 .../project/www/res/resourceBundles/fr_FR.js.gz |  Bin 682 -> 0 bytes
 .../www/res/resourceBundles/fr_FR_PREEURO.js.gz |  Bin 700 -> 0 bytes
 .../project/www/res/resourceBundles/fr_LU.js.gz |  Bin 682 -> 0 bytes
 .../www/res/resourceBundles/fr_LU_PREEURO.js.gz |  Bin 700 -> 0 bytes
 .../project/www/res/resourceBundles/ga.js.gz    |  Bin 700 -> 0 bytes
 .../project/www/res/resourceBundles/ga_IE.js.gz |  Bin 691 -> 0 bytes
 .../project/www/res/resourceBundles/gu.js.gz    |  Bin 702 -> 0 bytes
 .../project/www/res/resourceBundles/gu_IN.js.gz |  Bin 763 -> 0 bytes
 .../project/www/res/resourceBundles/hi_IN.js.gz |  Bin 759 -> 0 bytes
 .../project/www/res/resourceBundles/hr.js.gz    |  Bin 699 -> 0 bytes
 .../project/www/res/resourceBundles/hr_HR.js.gz |  Bin 712 -> 0 bytes
 .../project/www/res/resourceBundles/hu.js.gz    |  Bin 702 -> 0 bytes
 .../project/www/res/resourceBundles/hu_HU.js.gz |  Bin 680 -> 0 bytes
 .../www/res/resourceBundles/hu_HU_EURO.js.gz    |  Bin 694 -> 0 bytes
 .../www/res/resourceBundles/hu_HU_PREEURO.js.gz |  Bin 698 -> 0 bytes
 .../project/www/res/resourceBundles/in.js.gz    |  Bin 669 -> 0 bytes
 .../project/www/res/resourceBundles/in_ID.js.gz |  Bin 684 -> 0 bytes
 .../project/www/res/resourceBundles/is.js.gz    |  Bin 702 -> 0 bytes
 .../project/www/res/resourceBundles/is_IS.js.gz |  Bin 679 -> 0 bytes
 .../project/www/res/resourceBundles/it.js.gz    |  Bin 698 -> 0 bytes
 .../project/www/res/resourceBundles/it_CH.js.gz |  Bin 723 -> 0 bytes
 .../project/www/res/resourceBundles/it_IT.js.gz |  Bin 717 -> 0 bytes
 .../www/res/resourceBundles/it_IT_PREEURO.js.gz |  Bin 734 -> 0 bytes
 .../project/www/res/resourceBundles/iw.js.gz    |  Bin 701 -> 0 bytes
 .../project/www/res/resourceBundles/iw_IL.js.gz |  Bin 683 -> 0 bytes
 .../project/www/res/resourceBundles/ja.js.gz    |  Bin 703 -> 0 bytes
 .../project/www/res/resourceBundles/ja_JP.js.gz |  Bin 692 -> 0 bytes
 .../www/res/resourceBundles/ja_JP_JP.js.gz      |  Bin 700 -> 0 bytes
 .../project/www/res/resourceBundles/kk.js.gz    |  Bin 700 -> 0 bytes
 .../project/www/res/resourceBundles/kk_KZ.js.gz |  Bin 711 -> 0 bytes
 .../project/www/res/resourceBundles/kn.js.gz    |  Bin 701 -> 0 bytes
 .../project/www/res/resourceBundles/kn_IN.js.gz |  Bin 761 -> 0 bytes
 .../project/www/res/resourceBundles/ko.js.gz    |  Bin 700 -> 0 bytes
 .../project/www/res/resourceBundles/ko_KR.js.gz |  Bin 695 -> 0 bytes
 .../project/www/res/resourceBundles/lt.js.gz    |  Bin 701 -> 0 bytes
 .../project/www/res/resourceBundles/lt_LT.js.gz |  Bin 676 -> 0 bytes
 .../www/res/resourceBundles/lt_LT_EURO.js.gz    |  Bin 690 -> 0 bytes
 .../www/res/resourceBundles/lt_LT_PREEURO.js.gz |  Bin 694 -> 0 bytes
 .../project/www/res/resourceBundles/lv.js.gz    |  Bin 700 -> 0 bytes
 .../project/www/res/resourceBundles/lv_LV.js.gz |  Bin 677 -> 0 bytes
 .../www/res/resourceBundles/lv_LV_EURO.js.gz    |  Bin 691 -> 0 bytes
 .../www/res/resourceBundles/lv_LV_PREEURO.js.gz |  Bin 695 -> 0 bytes
 .../project/www/res/resourceBundles/mk.js.gz    |  Bin 700 -> 0 bytes
 .../project/www/res/resourceBundles/mk_MK.js.gz |  Bin 720 -> 0 bytes
 .../project/www/res/resourceBundles/ml_IN.js.gz |  Bin 762 -> 0 bytes
 .../project/www/res/resourceBundles/mr.js.gz    |  Bin 701 -> 0 bytes
 .../project/www/res/resourceBundles/mr_IN.js.gz |  Bin 761 -> 0 bytes
 .../project/www/res/resourceBundles/ms.js.gz    |  Bin 696 -> 0 bytes
 .../project/www/res/resourceBundles/ms_MY.js.gz |  Bin 694 -> 0 bytes
 .../project/www/res/resourceBundles/mt.js.gz    |  Bin 701 -> 0 bytes
 .../project/www/res/resourceBundles/mt_MT.js.gz |  Bin 685 -> 0 bytes
 .../www/res/resourceBundles/mt_MT_EURO.js.gz    |  Bin 699 -> 0 bytes
 .../www/res/resourceBundles/mt_MT_PREEURO.js.gz |  Bin 703 -> 0 bytes
 .../project/www/res/resourceBundles/nb_NO.js.gz |  Bin 688 -> 0 bytes
 .../project/www/res/resourceBundles/nl.js.gz    |  Bin 700 -> 0 bytes
 .../project/www/res/resourceBundles/nl_BE.js.gz |  Bin 679 -> 0 bytes
 .../www/res/resourceBundles/nl_BE_PREEURO.js.gz |  Bin 697 -> 0 bytes
 .../project/www/res/resourceBundles/nl_NL.js.gz |  Bin 724 -> 0 bytes
 .../www/res/resourceBundles/nl_NL_PREEURO.js.gz |  Bin 741 -> 0 bytes
 .../project/www/res/resourceBundles/no.js.gz    |  Bin 701 -> 0 bytes
 .../project/www/res/resourceBundles/no_NO.js.gz |  Bin 680 -> 0 bytes
 .../www/res/resourceBundles/no_NO_NY.js.gz      |  Bin 692 -> 0 bytes
 .../project/www/res/resourceBundles/or_IN.js.gz |  Bin 761 -> 0 bytes
 .../project/www/res/resourceBundles/pa.js.gz    |  Bin 737 -> 0 bytes
 .../project/www/res/resourceBundles/pa_IN.js.gz |  Bin 753 -> 0 bytes
 .../project/www/res/resourceBundles/pl.js.gz    |  Bin 699 -> 0 bytes
 .../project/www/res/resourceBundles/pl_PL.js.gz |  Bin 683 -> 0 bytes
 .../www/res/resourceBundles/pl_PL_EURO.js.gz    |  Bin 697 -> 0 bytes
 .../www/res/resourceBundles/pl_PL_PREEURO.js.gz |  Bin 701 -> 0 bytes
 .../project/www/res/resourceBundles/pt.js.gz    |  Bin 700 -> 0 bytes
 .../project/www/res/resourceBundles/pt_BR.js.gz |  Bin 717 -> 0 bytes
 .../project/www/res/resourceBundles/pt_PT.js.gz |  Bin 681 -> 0 bytes
 .../www/res/resourceBundles/pt_PT_PREEURO.js.gz |  Bin 699 -> 0 bytes
 .../project/www/res/resourceBundles/ro.js.gz    |  Bin 699 -> 0 bytes
 .../project/www/res/resourceBundles/ro_RO.js.gz |  Bin 675 -> 0 bytes
 .../project/www/res/resourceBundles/ru.js.gz    |  Bin 700 -> 0 bytes
 .../project/www/res/resourceBundles/ru_RU.js.gz |  Bin 689 -> 0 bytes
 .../project/www/res/resourceBundles/sh.js.gz    |  Bin 691 -> 0 bytes
 .../project/www/res/resourceBundles/sh_CS.js.gz |  Bin 725 -> 0 bytes
 .../project/www/res/resourceBundles/sk.js.gz    |  Bin 699 -> 0 bytes
 .../project/www/res/resourceBundles/sk_SK.js.gz |  Bin 679 -> 0 bytes
 .../www/res/resourceBundles/sk_SK_EURO.js.gz    |  Bin 693 -> 0 bytes
 .../www/res/resourceBundles/sk_SK_PREEURO.js.gz |  Bin 696 -> 0 bytes
 .../project/www/res/resourceBundles/sl.js.gz    |  Bin 700 -> 0 bytes
 .../project/www/res/resourceBundles/sl_SI.js.gz |  Bin 676 -> 0 bytes
 .../www/res/resourceBundles/sl_SI_PREEURO.js.gz |  Bin 693 -> 0 bytes
 .../project/www/res/resourceBundles/sq.js.gz    |  Bin 699 -> 0 bytes
 .../project/www/res/resourceBundles/sq_AL.js.gz |  Bin 684 -> 0 bytes
 .../project/www/res/resourceBundles/sr.js.gz    |  Bin 698 -> 0 bytes
 .../project/www/res/resourceBundles/sr_BA.js.gz |  Bin 727 -> 0 bytes
 .../project/www/res/resourceBundles/sr_CS.js.gz |  Bin 727 -> 0 bytes
 .../project/www/res/resourceBundles/sr_ME.js.gz |  Bin 716 -> 0 bytes
 .../project/www/res/resourceBundles/sr_RS.js.gz |  Bin 712 -> 0 bytes
 .../www/res/resourceBundles/sr_RS_Cyrl.js.gz    |  Bin 727 -> 0 bytes
 .../www/res/resourceBundles/sr_RS_Latn.js.gz    |  Bin 724 -> 0 bytes
 .../project/www/res/resourceBundles/sv.js.gz    |  Bin 701 -> 0 bytes
 .../project/www/res/resourceBundles/sv_SE.js.gz |  Bin 679 -> 0 bytes
 .../www/res/resourceBundles/sv_SE_EURO.js.gz    |  Bin 693 -> 0 bytes
 .../www/res/resourceBundles/sv_SE_PREEURO.js.gz |  Bin 697 -> 0 bytes
 .../project/www/res/resourceBundles/ta.js.gz    |  Bin 736 -> 0 bytes
 .../project/www/res/resourceBundles/ta_IN.js.gz |  Bin 759 -> 0 bytes
 .../project/www/res/resourceBundles/te.js.gz    |  Bin 701 -> 0 bytes
 .../project/www/res/resourceBundles/te_IN.js.gz |  Bin 761 -> 0 bytes
 .../project/www/res/resourceBundles/th.js.gz    |  Bin 699 -> 0 bytes
 .../project/www/res/resourceBundles/th_TH.js.gz |  Bin 705 -> 0 bytes
 .../www/res/resourceBundles/th_TH_TH.js.gz      |  Bin 712 -> 0 bytes
 .../project/www/res/resourceBundles/tr.js.gz    |  Bin 699 -> 0 bytes
 .../project/www/res/resourceBundles/tr_TR.js.gz |  Bin 676 -> 0 bytes
 .../project/www/res/resourceBundles/uk.js.gz    |  Bin 702 -> 0 bytes
 .../project/www/res/resourceBundles/uk_UA.js.gz |  Bin 693 -> 0 bytes
 .../project/www/res/resourceBundles/vi.js.gz    |  Bin 663 -> 0 bytes
 .../project/www/res/resourceBundles/vi_VN.js.gz |  Bin 678 -> 0 bytes
 .../project/www/res/resourceBundles/zh.js.gz    |  Bin 702 -> 0 bytes
 .../project/www/res/resourceBundles/zh_CN.js.gz |  Bin 691 -> 0 bytes
 .../project/www/res/resourceBundles/zh_HK.js.gz |  Bin 705 -> 0 bytes
 .../project/www/res/resourceBundles/zh_SG.js.gz |  Bin 690 -> 0 bytes
 .../project/www/res/resourceBundles/zh_TW.js.gz |  Bin 689 -> 0 bytes
 .../www/res/screen/blackberry/screen-225.png    |  Bin 16776 -> 0 bytes
 bbos/bin/templates/project/www/spec.html        |   68 -
 bbos/bin/templates/project/www/spec/helper.js   |   33 -
 bbos/bin/templates/project/www/spec/index.js    |   67 -
 .../www/spec/lib/jasmine-1.2.0/MIT.LICENSE      |   20 -
 .../www/spec/lib/jasmine-1.2.0/jasmine-html.js  |  616 --
 .../www/spec/lib/jasmine-1.2.0/jasmine.css      |   81 -
 .../www/spec/lib/jasmine-1.2.0/jasmine.js       | 2529 -----
 bbos/build.xml                                  |  299 -
 bbos/framework/ext/.classpath                   |    7 -
 bbos/framework/ext/.project                     |   29 -
 .../net.rim.browser.tools.debug.widget.prefs    |    3 -
 .../ext/.settings/org.eclipse.jdt.core.prefs    |   12 -
 .../framework/ext/BlackBerry_App_Descriptor.xml |   36 -
 bbos/framework/ext/src/library.xml              |   35 -
 .../org/apache/cordova/CordovaExtension.java    |  208 -
 .../cordova/accelerometer/Accelerometer.java    |  228 -
 .../ext/src/org/apache/cordova/api/IPlugin.java |   71 -
 .../ext/src/org/apache/cordova/api/Plugin.java  |  114 -
 .../org/apache/cordova/api/PluginManager.java   |  168 -
 .../cordova/api/PluginManagerFunction.java      |  240 -
 .../org/apache/cordova/api/PluginResult.java    |  152 -
 .../ext/src/org/apache/cordova/app/App.java     |  147 -
 .../src/org/apache/cordova/battery/Battery.java |  210 -
 .../src/org/apache/cordova/camera/Camera.java   |  470 -
 .../apache/cordova/camera/CameraOptions.java    |  193 -
 .../apache/cordova/camera/PhotoListener.java    |  107 -
 .../cordova/capture/AudioCaptureListener.java   |   80 -
 .../cordova/capture/AudioCaptureOperation.java  |  173 -
 .../apache/cordova/capture/AudioControl.java    |   75 -
 .../apache/cordova/capture/CameraControl.java   |   87 -
 .../apache/cordova/capture/CaptureControl.java  |  169 -
 .../org/apache/cordova/capture/CaptureMode.java |   87 -
 .../cordova/capture/CaptureOperation.java       |  202 -
 .../cordova/capture/ImageCaptureListener.java   |   84 -
 .../cordova/capture/ImageCaptureOperation.java  |  161 -
 .../apache/cordova/capture/MediaCapture.java    |  502 -
 .../org/apache/cordova/capture/MediaQueue.java  |   44 -
 .../cordova/capture/VideoCaptureListener.java   |  107 -
 .../cordova/capture/VideoCaptureOperation.java  |  124 -
 .../src/org/apache/cordova/device/Device.java   |   70 -
 .../ext/src/org/apache/cordova/file/Entry.java  |   66 -
 .../ext/src/org/apache/cordova/file/File.java   |   84 -
 .../org/apache/cordova/file/FileManager.java    | 1051 --
 .../apache/cordova/geolocation/Geolocation.java |  372 -
 .../geolocation/GeolocationListener.java        |  133 -
 .../cordova/geolocation/GeolocationResult.java  |   73 -
 .../cordova/geolocation/GeolocationStatus.java  |   36 -
 .../apache/cordova/geolocation/Position.java    |  133 -
 .../cordova/geolocation/PositionOptions.java    |   42 -
 .../cordova/globalization/Globalization.java    |  558 -
 .../globalization/GlobalizationError.java       |  115 -
 .../apache/cordova/globalization/Resources.java |   99 -
 .../org/apache/cordova/globalization/Util.java  |  721 --
 .../org/apache/cordova/http/FileTransfer.java   |  473 -
 .../apache/cordova/http/FileUploadResult.java   |   63 -
 .../org/apache/cordova/http/FileUploader.java   |  280 -
 .../src/org/apache/cordova/http/HttpUtils.java  |   66 -
 .../ext/src/org/apache/cordova/json4j/JSON.java |  208 -
 .../org/apache/cordova/json4j/JSONArray.java    | 1123 --
 .../org/apache/cordova/json4j/JSONArtifact.java |  118 -
 .../apache/cordova/json4j/JSONException.java    |   55 -
 .../org/apache/cordova/json4j/JSONObject.java   | 1367 ---
 .../org/apache/cordova/json4j/JSONString.java   |   32 -
 .../org/apache/cordova/json4j/JSONStringer.java |   58 -
 .../org/apache/cordova/json4j/JSONWriter.java   |  586 --
 .../cordova/json4j/internal/JSON4JNumber.java   |   22 -
 .../json4j/internal/JSON4JPBackReader.java      |   47 -
 .../json4j/internal/JSON4JStringReader.java     |   54 -
 .../json4j/internal/JSON4JStringWriter.java     |   68 -
 .../cordova/json4j/internal/NumberUtil.java     |  109 -
 .../apache/cordova/json4j/internal/Parser.java  |  338 -
 .../cordova/json4j/internal/Serializer.java     |  353 -
 .../json4j/internal/SerializerVerbose.java      |  102 -
 .../apache/cordova/json4j/internal/Token.java   |  115 -
 .../cordova/json4j/internal/Tokenizer.java      |  619 --
 .../org/apache/cordova/media/AudioPlayer.java   |  654 --
 .../ext/src/org/apache/cordova/media/Media.java |  344 -
 .../cordova/network/ConnectionInfoAction.java   |  355 -
 .../src/org/apache/cordova/network/Network.java |   66 -
 .../cordova/notification/ActivityDialog.java    |  146 -
 .../cordova/notification/AlertAction.java       |   83 -
 .../cordova/notification/AlertDialog.java       |   68 -
 .../apache/cordova/notification/BeepAction.java |  160 -
 .../cordova/notification/ConfirmAction.java     |   85 -
 .../cordova/notification/ConfirmDialog.java     |  100 -
 .../cordova/notification/Notification.java      |  135 -
 .../cordova/notification/ProgressDialog.java    |  182 -
 .../cordova/notification/VibrateAction.java     |   64 -
 .../ext/src/org/apache/cordova/pim/Contact.java |  430 -
 .../src/org/apache/cordova/ui/SpacerField.java  |   71 -
 .../apache/cordova/util/ApplicationUtils.java   |  108 -
 .../src/org/apache/cordova/util/FileUtils.java  |  730 --
 .../ext/src/org/apache/cordova/util/Log.java    |   83 -
 .../org/apache/cordova/util/LogFunction.java    |   41 -
 .../ext/src/org/apache/cordova/util/Logger.java |  155 -
 .../org/apache/cordova/util/StringUtils.java    |  103 -
 bbos/javascript/cordova.blackberry.js           | 9928 ------------------
 341 files changed, 1 insertion(+), 35062 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 3e2dbf1..c94ce12 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@
 
 This repo contains cordova projects for the BlackBerry platforms:
 
-blackberry - BBOS 5+ and Tablet OS
+playbook - BlackBerry Tablet OS
 
 blackberry10 - BB10
 

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/LICENSE
----------------------------------------------------------------------
diff --git a/bbos/LICENSE b/bbos/LICENSE
deleted file mode 100644
index ee6a935..0000000
--- a/bbos/LICENSE
+++ /dev/null
@@ -1,268 +0,0 @@
-
-                               Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
-For the template/project/lib/ant-contrib/ant-contrib-1.0b3.jar component:
-
-   The Apache Software License, Version 1.1
-
-   Copyright (c) 2001-2003 Ant-Contrib project.  All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-
-   1. Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-
-   2. Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in
-      the documentation and/or other materials provided with the
-      distribution.
-
-   3. The end-user documentation included with the redistribution, if
-      any, must include the following acknowlegement:
-         "This product includes software developed by the
-          Ant-Contrib project (http://sourceforge.net/projects/ant-contrib)."
-      Alternately, this acknowlegement may appear in the software itself,
-      if and wherever such third-party acknowlegements normally appear.
-
-   4. The name Ant-Contrib must not be used to endorse or promote products
-      derived from this software without prior written permission. For
-      written permission, please contact
-      ant-contrib-developers@lists.sourceforge.net.
-
-   5. Products derived from this software may not be called "Ant-Contrib"
-      nor may "Ant-Contrib" appear in their names without prior written
-      permission of the Ant-Contrib project.
-
-   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
-   WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-   OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED.  IN NO EVENT SHALL THE ANT-CONTRIB PROJECT OR ITS
-   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-   USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-   OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-   SUCH DAMAGE.
-   ====================================================================
-
-For the template/project/www/json2.js component:
-
-    http://www.JSON.org/json2.js
-    2010-03-20
-
-    Public Domain.
-
-    NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
-
-    See http://www.JSON.org/js.html
-
-
-    This code should be minified before deployment.
-    See http://javascript.crockford.com/jsmin.html
-
-    USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
-    NOT CONTROL.

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/NOTICE
----------------------------------------------------------------------
diff --git a/bbos/NOTICE b/bbos/NOTICE
deleted file mode 100644
index 23360ce..0000000
--- a/bbos/NOTICE
+++ /dev/null
@@ -1,8 +0,0 @@
-Apache Cordova
-Copyright 2012 The Apache Software Foundation
-
-This product includes software developed by
-The Apache Software Foundation (http://www.apache.org)
-
-This product includes software developed by
-Ant-Contrib project (http://sourceforge.net/projects/ant-contrib).

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/README.md
----------------------------------------------------------------------
diff --git a/bbos/README.md b/bbos/README.md
deleted file mode 100644
index 05c56c7..0000000
--- a/bbos/README.md
+++ /dev/null
@@ -1,183 +0,0 @@
-Cordova BlackBerry WebWorks
-============================
-
-[Cordova framework](http://cordova.apache.org/) for __BlackBerry Tablet OS. The framework is implemented using the [BlackBerry WebWorks SDK](http://us.blackberry.com/developers/tablet/webworks.jsp).
-
-Directory Structure
--------------------
-
-    framework/ ... BlackBerry WebWorks JavaScript Extension (Cordova native code)
-    javascript/ .. Cordova JavaScript (concatenated, non-minified)
-    bin/ ......... Scripts for project creation
-
-Introduction
-------------
-
-BlackBerry WebWorks is a framework for developing web-based applications for BlackBerry SmartPhones (BlackBerry OS 5.0 and higher) and the TabletOS.  Creating a web application is one of the easiest ways to have an application that runs on both platforms.
-
-The WebWorks framework allows developers to create applications using web content and resources (HTML/CSS/JavaScript) that are able to access device features through the [BlackBerry WebWorks API](http://www.blackberry.com/developers/docs/widgetapi/).  In addition, the framework allows developers to create their own WebWorks JavaScript Extensions to expose additional device capabilities through JavaScript APIs.  These extensions are written using either the BlackBerry Java API for SmartPhones, or Adobe AIR for the Tablet OS.
-
-The cordova-blackberry-webworks platform allows web developers to develop applications targeting BlackBerry 5.0 and higher devices using the common [Cordova API](http://docs.cordova.io).  When possible, Cordova makes use of the WebWorks JavaScript API; however, most Cordova features are implemented in the native Java or AIR environment as a WebWorks JavaScript Extension.
-
-
-Getting Started
-===============
-
-Several guides are available on the [Cordova Documentation site](http://docs.cordova.io/) (Getting Started Guides - on the left side near the bottom) to help you get started developing for the cordova-blackberry-webworks platform.  This guide will help you install and configure the BlackBerry WebWorks development environment, and the cordova-blackberry-webworks platform.  It will also step you through the process of creating a Cordova project.
-
-[Getting Started with Cordova BlackBerry WebWorks](http://docs.cordova.io/guide_getting-started_blackberry_index.md.html)
-
-This guide is for advanced developers who wish to develop their own cordova-blackberry-webworks plugin.
-
-[How To Create a Cordova Plugin for Cordova BlackBerry WebWorks](http://docs.cordova.io/guide_plugin-development_blackberry_index.md.html)
-
-
-Installing the cordova-blackberry-webworks Framework
-=====================================================
-
-Cloning the cordova-blackberry-webworks repository always provides you with the latest (EDGE) version of the Cordova code.  To clone the repository, do the following:
-
-    $ cd C:\some\path\
-    $ git clone git://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks.git
-
-Cordova BlackBerry Developer Tools
----
-
-The Cordova developer tooling is split between general tooling and project level tooling. If you are on Windows, please run the equivalent .bat files instead of the shell scripts :)
-
-### General Commands
-
-    ./bin/create [path appname packagename] ............ creates a sample app with the specified application name, to the specified path
-
-Please note that once you `create` a Cordova BlackBerry project, you
-will need to edit the `project.properties` file that resides inside your
-generated application directory to set up your environment properly. You
-will need to specify things like the location of the BlackBerry Widget
-Packager(s), device and signing key passwords, simulator executables,
-and device IPs (if applicable).
-
-The ./bin/create command is also required to be called in order to automatically download
-the bin/template/project/lib/ant-contrib.jar file. Please be aware that without running
-this command first, your project will not have this important file! Once that ant-contrib.jar
-file is downloaded, there is no need to update that file or download again.
-
-#### Running the Example Project
-
-Create the example project and build it to the first device:
-
-    ./bin/create
-    cd example
-    ./cordova/run blackberry
-
-#### Creating a new Cordova BlackBerry Project
-
-    ./bin/create ~/Desktop/myapp MyAppName MyAppPackageName
-
-### Project Commands
-
-These commands live in a generated Cordova BlackBerry project. As per
-the note above, please make sure you edit the `project.properties` file
-inside your application directory appropriately otherwise these commands
-will not work!
-
-    ./cordova/run ............................ install to a connected device or simulator
-    ./cordova/build .......................... build project, but do not deploy to simulator or device
-
-
-(Legacy) Creating a New Cordova Project
--------------------------------
-
-The (legacy) Cordova ant build scripts enable you to create multiple, independent Cordova projects.
-
-(Note: The Cordova build script requires Apache ANT 1.8 or higher. Also, these scripts won't work without
-the bin/template/project/lib/ant-contrib.jar file so please run the ./bin/create command to automatically
-download that file or manually download it and place it in the bin/template/lib/ directory.
-
-The build script packages the Cordova source code and resources into each project you create.  This allows you to easily distribute the project to other BlackBerry WebWorks developers.  To create a Cordova project:
-
-    $ cd cordova-blackberry-webworks
-    $ ant help
-
-    $ ant create -Dproject.path="C:\development\my_new_project"
-
-    $ cd C:\development\my_new_project
-    $ ant help
-
-For each project, you need to tell ANT where you installed the BlackBerry WebWorks SDK, which packages and compiles your code into a deployable application.  You can specify the location of the BlackBerry WebWorks Packager (BBWP) by editing __project.properties__ in the project directory.
-
-    [edit project.properties]
-
-Building and Deploying a Project
---------------------------------
-
-The Cordova build scripts automate common tasks, such as compiling your project, and deploying it to simulators or devices.  To see what options are available, use:
-
-    $ cd C:\development\my_new_project
-    $ ant help
-
-Every command is in the form `ant TARGET COMMAND [options]`, where
-target is either `blackberry` or `playbook`.
-
-To build your project into a deployable application (.cod/.jad) file:
-
-    $ ant TARGET build
-
-To build your project and load it in a BlackBerry simulator:
-
-    $ ant TARGET load-simulator
-
-To build your project and load it onto a USB-attached device:
-
-    $ ant TARGET load-device
-
-Updating the Cordova Framework
--------------------------------
-
-As you develop your application, there may be updates made to the Cordova source code.  To incorporate Cordova changes into your project, use the build script as follows:
-
-    $ cd cordova-blackberry-webworks
-    $ git pull origin master
-
-    $ ant update -Dproject.path="C:\development\my_new_project"
-
-Customizing Cordova
---------------------
-
-By default, Cordova gives access to all the core Cordova APIs as detailed at docs.cordova.io.
-If you want to remove some of those APIs you can do so by editing the plugins.xml document in your
-application root. You need to edit the plugins.xml file to add third-party plugins to your application
-as well.
-
-Creating a Distribution
------------------------
-
-### Update Version
-
-    $ ant version -Dvalue="1.0.0"
-
-    $ git diff
-    $ git commit -am "Update to version 1.0.0"
-    $ git tag 1.0.0
-
-### Create distribution
-
-    $ ant dist
-
-Troubleshooting
-===============
-
-__Q: I uploaded my application to the BlackBerry device, but it will not open or run.__
-
-__A:__ Try hard resetting the device by pressing and hold ALT + CAPS LOCK + DEL. You must press and hold each key in sequence and not all at once.  Some devices require _either_ the right or left CAPS LOCK key to be pressed.  Some devices also require this combination to be pressed twice.
-
-__Q: My simulator screen is not refreshing and I see blocks on a clicked position.__
-
-__A:__ Windows 7 and the simulator's graphics acceleration do not mix. On the simulator, set View -> Graphics Acceleration to Off.
-
-__Q: When I use the Cordova [Camera.getPicture API](http://docs.cordova.io/cordova_camera_camera.md.html#camera.getPicture) on my device, the camera never returns to my application.  Why does this happen?__
-
-__A:__ Cordova uses a JavaScript Extension to invoke the native camera application so the user can take a picture.  When the picture is taken, Cordova will close the native camera application by emulating a key injection (pressing the back/escape button).  On a physical device, users will have to set permissions to allow the application to simulate key injections.  Setting application permissions is device-specific.  On a Storm2 (9550), for example, select the BlackBerry button from the Home screen to get to All Applications screen, then Options > Applications > Your Application.  Then select Edit Default Permissions > Interactions > Input Simulation and set it to 'Allow'.  Save your changes.
-
-__Q: None of the Cordova APIs are working, why is that?__
-
-__A:__ You probably need to update your plugins.xml file in the root of your application.

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/VERSION
----------------------------------------------------------------------
diff --git a/bbos/VERSION b/bbos/VERSION
deleted file mode 100644
index 38f8e88..0000000
--- a/bbos/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-dev

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/create
----------------------------------------------------------------------
diff --git a/bbos/bin/create b/bbos/bin/create
deleted file mode 100755
index ca84dc8..0000000
--- a/bbos/bin/create
+++ /dev/null
@@ -1,108 +0,0 @@
-#! /bin/sh
-#       Licensed to the Apache Software Foundation (ASF) under one
-#       or more contributor license agreements.  See the NOTICE file
-#       distributed with this work for additional information
-#       regarding copyright ownership.  The ASF licenses this file
-#       to you under the Apache License, Version 2.0 (the
-#       "License"); you may not use this file except in compliance
-#       with the License.  You may obtain a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#       Unless required by applicable law or agreed to in writing,
-#       software distributed under the License is distributed on an
-#       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#       KIND, either express or implied.  See the License for the
-#       specific language governing permissions and limitations
-#       under the License.
-#
-# create a cordova/blackberry project
-# 
-# USAGE
-#   ./create [path package appname]
-#
-set -e
-
-if [ -n "$1" ] && [ "$1" == "-h" ]
-then
-  echo "Usage: $0 <path_to_new_project> <package_name> <project_name>"
-  echo "    <path_to_new_project>: Path to your new Cordova iOS project"
-  echo "    <package_name>: Package name, following reverse-domain style convention (ignored on BlackBerry platforms)"
-  echo "    <project_name>: Project name"
-  echo 'After you have created your application, make sure to customize the project.properties file inside your app directory with your environment specifics!'
-  exit 0;
-fi
-
-
-BUILD_PATH="$( cd "$( dirname "$0" )/.." && pwd )"
-VERSION=$(cat "$BUILD_PATH/VERSION")
-
-PROJECT_PATH="${1:-"./example"}"
-PACKAGE=${2:-"org.apache.cordova.example"}
-NAME=${3:-"cordovaExample"}
-
-# clobber any existing example
-if [ -d "$PROJECT_PATH" ]
-then
-    echo "Project already exists! Delete and recreate"
-    exit 1
-fi
-
-# cleanup after exit and/or on error
-function on_exit {
-    echo "Cleaning up ..."
-    [ -d "$BUILD_PATH/build" ] && rm -rf "$BUILD_PATH/build"
-    echo "Remember to update the project.properties file inside your application directory!"
-}
-
-function on_error {
-    echo "An error occured. Deleting project..."
-    [ -d "$PROJECT_PATH" ] && rm -rf "$PROJECT_PATH"
-}
-
-function replace {
-    local pattern=$1
-    local filename=$2
-    # Mac OS X requires -i argument
-    if [[ "$OSTYPE" =~ "darwin" ]]
-    then
-        /usr/bin/sed -i '' -e $pattern "$filename"
-    elif [[ "$OSTYPE" =~ "linux" ]]
-    then
-        /bin/sed -i -e $pattern "$filename"
-    fi
-}
-
-# we do not want the script to silently fail
-trap on_error ERR
-trap on_exit EXIT
-
-ANT="$(which ant)"
-
-MANIFEST_PATH="$PROJECT_PATH/www/config.xml"
-
-# compile cordova.js and cordova.jar if in source, ignore if in distribution
-if [ ! -e "$BUILD_PATH/www/ext/cordova-$VERSION.jar" ] && [ -d "$BUILD_PATH/framework" ]
-then
-    if [ ! -e "$BUILD_PATH"/bin/templates/project/lib/ant-contrib/ant-contrib-1.0b3.jar ]; then
-        echo "Downloading ant-contrib"
-        # Use curl to get the jar
-        curl -OL http://central.maven.org/maven2/ant-contrib/ant-contrib/1.0b3/ant-contrib-1.0b3.jar &> /dev/null
-        mkdir -p "$BUILD_PATH"/bin/templates/project/lib/ant-contrib
-        mv ant-contrib-1.0b3.jar "$BUILD_PATH"/bin/templates/project/lib/ant-contrib
-    fi
-    
-	echo "Creating BlackBerry project..."
-	("$ANT" create -Dproject.path="$PROJECT_PATH" -f "$BUILD_PATH/build.xml" &> /dev/null)
-    # interpolate the activity and package into config.xml
-    echo "Updating config.xml ..."
-    replace "s/__NAME__/${NAME}/g" "$MANIFEST_PATH"
-    replace "s/__PACKAGE__/${PACKAGE}/g" "$MANIFEST_PATH"
-else
-	# copy project template if in distribution
-	echo "Copying assets and resources ..."
-	cp -r "$BUILD_PATH/sample/." "$PROJECT_PATH"
-    echo "Updating config.xml ..."
-    replace "s/cordovaExample/${NAME}/g" "$MANIFEST_PATH"
-    replace "s/org.apache.cordova.example/${PACKAGE}/g" "$MANIFEST_PATH"
-fi

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/create.bat
----------------------------------------------------------------------
diff --git a/bbos/bin/create.bat b/bbos/bin/create.bat
deleted file mode 100644
index ecb039a..0000000
--- a/bbos/bin/create.bat
+++ /dev/null
@@ -1,33 +0,0 @@
-@ECHO OFF
-goto comment
-       Licensed to the Apache Software Foundation (ASF) under one
-       or more contributor license agreements.  See the NOTICE file
-       distributed with this work for additional information
-       regarding copyright ownership.  The ASF licenses this file
-       to you under the Apache License, Version 2.0 (the
-       "License"); you may not use this file except in compliance
-       with the License.  You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-       Unless required by applicable law or agreed to in writing,
-       software distributed under the License is distributed on an
-       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-       KIND, either express or implied.  See the License for the
-       specific language governing permissions and limitations
-       under the License.
-:comment
-
-IF NOT DEFINED JAVA_HOME GOTO MISSING
-FOR %%X in (ant.bat) do (
-    SET FOUND=%%~$PATH:X
-    IF NOT DEFINED FOUND GOTO MISSING
-)
-cscript %~dp0\create.js %*
-GOTO END
-:MISSING
-ECHO Missing one of the following:
-ECHO JDK: http://java.oracle.com
-ECHO Apache ant: http://ant.apache.org
-EXIT /B 1
-:END

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/create.js
----------------------------------------------------------------------
diff --git a/bbos/bin/create.js b/bbos/bin/create.js
deleted file mode 100644
index ac4b083..0000000
--- a/bbos/bin/create.js
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
-       Licensed to the Apache Software Foundation (ASF) under one
-       or more contributor license agreements.  See the NOTICE file
-       distributed with this work for additional information
-       regarding copyright ownership.  The ASF licenses this file
-       to you under the Apache License, Version 2.0 (the
-       "License"); you may not use this file except in compliance
-       with the License.  You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-       Unless required by applicable law or agreed to in writing,
-       software distributed under the License is distributed on an
-       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-       KIND, either express or implied.  See the License for the
-       specific language governing permissions and limitations
-       under the License.
-*/
-
-/*
- * create a cordova/blackberry project
- *
- * USAGE
- *  ./create [path package appname]
- */
-
-var fso = WScript.CreateObject('Scripting.FileSystemObject');
-
-function read(filename) {
-    var fso=WScript.CreateObject("Scripting.FileSystemObject");
-    var f=fso.OpenTextFile(filename, 1);
-    var s=f.ReadAll();
-    f.Close();
-    return s;
-}
-function write(filename, contents) {
-    var fso=WScript.CreateObject("Scripting.FileSystemObject");
-    var f=fso.OpenTextFile(filename, 2, true);
-    f.Write(contents);
-    f.Close();
-}
-function replaceInFile(filename, regexp, replacement) {
-    write(filename, read(filename).replace(regexp, replacement));
-}
-function downloadAntContrib(){
-    if (!fso.FileExists(ROOT + '\\bin\\templates\\project\\lib\\ant-contrib\\ant-contrib-1.0b3.jar')) {
-      // We need the .jar
-      var url = 'http://central.maven.org/maven2/ant-contrib/ant-contrib/1.0b3/ant-contrib-1.0b3.jar';
-      var libsPath = ROOT + '\\bin\\templates\\project\\lib\\ant-contrib';
-      var savePath = libsPath + '\\ant-contrib-1.0b3.jar';
-      if (!fso.FileExists(savePath)) {
-        if(!fso.FolderExists(libsPath)) {
-            fso.CreateFolder(libsPath);
-        }
-        // We need the zip to get the jar
-        var xhr = WScript.CreateObject('MSXML2.XMLHTTP');
-        xhr.open('GET', url, false);
-        xhr.send();
-        if (xhr.status == 200) {
-          var stream = WScript.CreateObject('ADODB.Stream');
-          stream.Open();
-          stream.Type = 1;
-          stream.Write(xhr.ResponseBody);
-          stream.Position = 0;
-          stream.SaveToFile(savePath);
-          stream.Close();
-        } else {
-          WScript.Echo('Could not retrieve the antcontrib. Please download it yourself and put into the bin/templates/project/lib directory. This process may fail now. Sorry.');
-        }
-      }
-      var app = WScript.CreateObject('Shell.Application');
-      var source = app.NameSpace(savePath).Items();
-      var target = app.NameSpace(libsPath);
-      target.CopyHere(source, 256);
-    }
-}
-function exec(s, output) {
-    var o=shell.Exec(s);
-    while (o.Status == 0) {
-        WScript.Sleep(100);
-    }
-    //WScript.Echo("Command exited with code " + o.Status);
-}
-
-function cleanup() {
-    // Cleanup
-    if(fso.FolderExists(ROOT + '\\dist')) {
-        fso.DeleteFolder(ROOT + '\\dist', true);
-    }
-    if(fso.FolderExists(ROOT + '\\build')) {
-        fso.DeleteFolder(ROOT + '\\build');
-    }
-}
-
-var args = WScript.Arguments, PROJECT_PATH="example", 
-    PACKAGE="org.apache.cordova.example",
-    NAME="cordovaExample",
-    shell=WScript.CreateObject("WScript.Shell");
-    
-// working dir
-var ROOT = WScript.ScriptFullName.split('\\bin\\create.js').join('');
-
-if (args.Count() == 3) {
-    PROJECT_PATH=args(0);
-    PACKAGE=args(1);
-    NAME=args(2);
-}
-
-if(fso.FolderExists(PROJECT_PATH)) {
-    WScript.Echo("Project directory already exists! Please remove it first.");
-    WScript.Quit(1);
-}
-
-var MANIFEST_PATH=PROJECT_PATH+'\\www\\config.xml';
-var VERSION=read(ROOT+'\\VERSION').replace(/\r\n/,'').replace(/\n/,'');
-
-if(fso.FolderExists(ROOT+'\\framework')){
-    downloadAntContrib();
-    exec('ant.bat -f '+ ROOT +'\\build.xml create -Dproject.path="' + PROJECT_PATH + '"');
-    replaceInFile(MANIFEST_PATH, /__PACKAGE__/, PACKAGE);
-    replaceInFile(MANIFEST_PATH, /__ACTIVITY__/, NAME);
-}else{
-    // copy in the project template
-    exec('cmd /c xcopy '+ ROOT + '\\sample\\* '+PROJECT_PATH+' /I /S /Y');    
-    replaceInFile(MANIFEST_PATH, /org.apache.cordova.example/, PACKAGE);
-    replaceInFile(MANIFEST_PATH, /cordovaExample/, NAME);
-}
-
-cleanup();

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/dist/README.md
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/dist/README.md b/bbos/bin/templates/dist/README.md
deleted file mode 100644
index 35a8393..0000000
--- a/bbos/bin/templates/dist/README.md
+++ /dev/null
@@ -1,90 +0,0 @@
-Cordova BlackBerry Distribution
-===============================
-
-Cordova BlackBerry is a framework that allows for Cordova based projects to be built for the [BlackBerry WebWorks Platform](https://bdsc.webapps.blackberry.com/html5/). Cordova based applications are, at the core, an application written with web technology: HTML, CSS and JavaScript.  The Cordova BlackBerry project allows web developers to develop applications targeting BlackBerry OS 5.0+ and PlayBook devices using the common [Cordova API](http://docs.phonegap.com).
-
-Apache Cordova is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator project. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.
-
-Pre-requisites
---------------
-
-- Windows XP (32-bit) or Windows 7 (32-bit and 64-bit) or Mac OSX 10.6.4+
-- Java JDK 1.5
-- Apache ANT
-- [BlackBerry WebWorks SDK](https://bdsc.webapps.blackberry.com/html5/download/sdk)
-- PlayBook development requires [Adobe Air SDK](http://www.adobe.com/devnet/air/air-sdk-download.html)
-
-Directory Structure
--------------------
-
-    sample/ ... Ready-to-run sample project
-    www/ ...... Barebones project assets
-
-### Ready-to-Run Sample Project
-
-The quickest way to get started with Cordova BlackBerry is to make a copy of the `sample` folder. The `sample` folder is a complete Cordova BlackBerry project including build scripts. Copy the `sample` folder to a desired location to create a new Cordova BlackBerry project.
-
-#### Building and Deploying a Project
-
-The build scripts included in the `sample` folder automate common tasks, such as compiling your project, and deploying it to simulators or devices.  To see what options are available, use:
-
-    $ cd C:\development\my_new_project
-    $ ant help
-
-Every command is in the form `ant TARGET COMMAND [options]`, where
-target is either `blackberry` or `playbook`.
-
-To build your project into a deployable application (.cod/.jad) file:
-
-    $ ant TARGET build
-
-To build your project and load it in a BlackBerry simulator:
-
-    $ ant TARGET load-simulator
-
-To build your project and load it onto a USB-attached device:
-
-    $ ant TARGET load-device
-
-### Barebones Project Assets
-
-The `www` folder contains the Cordova specific assets that must be available in a BlackBerry WebWorks project.  If you have an existing BlackBerry WebWorks project, copy/merge these files into your project to enable the project for Cordova.
-
-    ext/cordova.jar     - Native Cordova API implementations for smartphones.
-    ext-air/            - PlayBook Adobe Air extensions for Cordova API.
-    playbook/cordova.js - PlayBook Cordova JavaScript API.
-    cordova.js          - Smartphone Cordova JavaScript API.
-    config.xml          - BlackBerry WebWorks configuration file.
-    plugins.xml         - Cordova plugin configuration file.
-
-`config.xml` is a sample that you are free to alter or merge with an existing BlackBerry WebWorks configuration file. The necessary Cordova sections are contained in the `<feature>` and `<access>` sections:
-
-    <!-- Cordova API -->
-    <feature ... />
-    <feature ... />
-    
-    <!-- Cordova API -->
-    <access ... />
-    <access ... />
-
-Frequently Asked Questions
---------------------------
-
-__Q: My simulator screen is not refreshing and I see blocks on a clicked position.__
-
-__A:__ Windows 7 and the simulator's graphics acceleration do not mix. On the simulator, set View -> Graphics Acceleration to Off.
-
-__Q: When I use the Cordova [Camera.getPicture API](http://docs.phonegap.com/phonegap_camera_camera.md.html#camera.getPicture) on my device, the camera never returns to my application.  Why does this happen?__
-
-__A:__ Cordova uses a JavaScript Extension to invoke the native camera application so the user can take a picture.  When the picture is taken, Cordova will close the native camera application by emulating a key injection (pressing the back/escape button).  On a physical device, users will have to set permissions to allow the application to simulate key injections.  Setting application permissions is device-specific.  On a Storm2 (9550), for example, select the BlackBerry button from the Home screen to get to All Applications screen, then Options > Applications > Your Application.  Then select Edit Default Permissions > Interactions > Input Simulation and set it to 'Allow'.  Save your changes.
-
-__Q: None of the Cordova APIs are working, why is that?__
-
-__A:__ You probably need to update your plugins.xml file in the root of your application.
-
-Additional Information
-----------------------
-- [Cordova home](http://incubator.apache.org/cordova/)
-- [Cordova Documentation](http://docs.phonegap.com)
-- [Cordova Issue Tracker](https://issues.apache.org/jira/browse/CB)
-- [BlackBerry WebWorks Framework](https://bdsc.webapps.blackberry.com/html5/)

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/blackberry.xml
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/blackberry.xml b/bbos/bin/templates/project/blackberry.xml
deleted file mode 100644
index ce3099f..0000000
--- a/bbos/bin/templates/project/blackberry.xml
+++ /dev/null
@@ -1,456 +0,0 @@
-<project default="help">
-<!-- 
-       Licensed to the Apache Software Foundation (ASF) under one
-       or more contributor license agreements.  See the NOTICE file
-       distributed with this work for additional information
-       regarding copyright ownership.  The ASF licenses this file
-       to you under the Apache License, Version 2.0 (the
-       "License"); you may not use this file except in compliance
-       with the License.  You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-       Unless required by applicable law or agreed to in writing,
-       software distributed under the License is distributed on an
-       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-       KIND, either express or implied.  See the License for the
-       specific language governing permissions and limitations
-       under the License.
--->    
-    <!-- LOAD PROPERTIES -->
-    
-    <property prefix="properties" file="project.properties" />
-    <property name="build.dir"    location="build" />
-    <property name="widget.dir"   location="${build.dir}/widget" />
-    <property name="code.sign"    value="false" />
-    <property name="generate.ext" value="cod" />
-    <property name="globalization" value="false" />
-    
-    <!-- BlackBerry WebWorks Packager directory is required. -->
-    <fail unless="properties.blackberry.bbwp.dir" message="Please specify BlackBerry WebWorks Packager directory using 'blackberry.bbwp.dir' in your 'project.properties' file." />
-
-    <!-- OS identification -->
-    <condition property="isMacOSX" else="false">
-        <and>
-            <os family="mac" />
-            <os family="unix" />
-        </and>
-    </condition>
-
-    <condition property="javaloader" value="${properties.blackberry.bbwp.dir}/bin/javaloader" else="${properties.blackberry.bbwp.dir}/bin/JavaLoader.exe">
-        <equals arg1="${isMacOSX}" arg2="true" />
-    </condition>
-
-    <condition property="bbwp" value="${properties.blackberry.bbwp.dir}/bbwp" else="${properties.blackberry.bbwp.dir}/bbwp.exe">
-        <equals arg1="${isMacOSX}" arg2="true" />
-    </condition>
-
-
-    <!-- LOAD DEVICE -->
-    
-    <target name="load-device" depends="package-app">
-        <bbwp code-sign="true" />
-        <exec executable="${javaloader}" dir="." failonerror="true">
-            <arg value="-u" />
-            <arg value="-w${properties.blackberry.sim.password}" />
-            <arg value="load" />
-            <arg file="${build.dir}/StandardInstall/${cod.name}.cod" />
-        </exec>
-    </target>
-
-    <!-- DEBUG-LOAD DEVICE -->
-    
-    <target name="debug-device" depends="package-app">
-        <bbwp code-sign="true" debug="true" />
-        <exec executable="${javaloader}" dir="." failonerror="true">
-            <arg value="-u" />
-            <arg value="-w${properties.blackberry.sim.password}" />
-            <arg value="load" />
-            <arg file="${build.dir}/StandardInstall/${cod.name}.cod" />
-        </exec>
-    </target>
-
-    <!-- LOAD SIMULATOR -->
-    
-    <target name="load-simulator" depends="build">
-    
-        <!-- Find the simulator directory -->
-        <set-simulator-dir />
-
-        <!-- Locate BBWP simulator directory. There may be multiple, so choose the first. -->
-        <path id="bbwp.sim.path">
-            <first>
-                <fileset dir="${properties.blackberry.bbwp.dir}/simpack">
-                    <include name="**/handhelds.manifest.txt" />
-                </fileset>
-            </first>
-        </path>
-        <dirname property="bbwp.sim.dir" file="${toString:bbwp.sim.path}" />
-
-        <!-- Simulator directory: Use sim.dir property if set in project.properties file. 
-             Otherwise, use bbwp simulator directory. -->
-        <condition 
-            property="simulator.dir" 
-            value="${properties.blackberry.sim.dir}" 
-            else="${bbwp.sim.dir}">
-                <available file="${properties.blackberry.sim.dir}" type="dir" />
-        </condition>
-        <echo message="Simulator directory=${simulator.dir}" />
-
-        <!-- Simulator binary: Use sim.bin property if set in project.properties file  
-             or try setting to 'defaultSimulator.bat' in simulator directory. -->
-        <condition 
-            property="sim.bin" 
-            value="${properties.blackberry.sim.bin}" 
-            else="defaultSimulator.bat">
-                <available file="${simulator.dir}/${properties.blackberry.sim.bin}"/>
-        </condition>
-
-        <!-- If simulator executable does not exist, use the first device listed 
-             in the 'handhelds.manifest.txt' file in the simulator directory. -->
-        <loadfile 
-            property="device.list"
-            srcFile="${simulator.dir}/handhelds.manifest.txt">
-            <filterchain>
-                <tokenFilter>
-                    <stringtokenizer/>
-                </tokenFilter>
-            </filterchain>
-        </loadfile>
-
-        <propertyregex property="device"
-            input="${device.list}"
-            regexp="^\d{4}"
-            select="\0"
-            override="true" />
-        <property name="device.bin" value="${device}.bat" />
-
-        <condition
-            property="simulator.bin" 
-            value="${sim.bin}"
-            else="${device.bin}">
-                <available file="${simulator.dir}/${sim.bin}" />
-        </condition>
-        
-        <echo message="Simulator executable=${simulator.dir}/${simulator.bin}" />
-
-        <!-- Close running simulators -->
-        <echo message="Closing all running simulators..." />
-        <exec executable="${simulator.dir}/fledgecontroller.exe" dir="${simulator.dir}" spawn="false">
-            <arg value="/execute=kill" />
-        </exec>
-
-        <!-- MDS directory: Use mds.dir property if set in project.properties file. 
-             Otherwise, use bbwp MDS directory. -->
-        <condition 
-            property="mds.dir" 
-            value="${properties.blackberry.mds.dir}" 
-            else="${properties.blackberry.bbwp.dir}/mds">
-                <available file="${properties.blackberry.mds.dir}" type="dir" />
-        </condition>
-        <echo message="MDS directory=${mds.dir}" />
-        
-        <copy todir="${simulator.dir}">
-            <fileset dir="${build.dir}/StandardInstall" includes="*.cod, *.cso, *.csl, *.alx" />
-        </copy>
-        <exec executable="${mds.dir}/run.bat" dir="${mds.dir}" spawn="true" />
-        <exec executable="${simulator.dir}/${simulator.bin}" dir="${simulator.dir}" spawn="true" />
-
-        <!-- Only invoke FledgeHook.exe if it is found. Newer versions of the
-             WebWorks SDK do not include it. -->
-        <if>
-            <available file="${properties.blackberry.bbwp.dir}/FledgeHook.exe" />
-            <then>
-                <exec executable="${properties.blackberry.bbwp.dir}/FledgeHook.exe" dir="${properties.blackberry.bbwp.dir}" spawn="true" />
-            </then>
-        </if>
-    </target>
-
-    <target name="debug-simulator" depends="package-app">
-        <bbwp code-sign="false" debug="true" />
-    
-        <!-- Find the simulator directory -->
-        <set-simulator-dir />
-
-        <!-- Locate BBWP simulator directory. There may be multiple, so choose the first. -->
-        <path id="bbwp.sim.path">
-            <first>
-                <fileset dir="${properties.blackberry.bbwp.dir}/simpack">
-                    <include name="**/handhelds.manifest.txt" />
-                </fileset>
-            </first>
-        </path>
-        <dirname property="bbwp.sim.dir" file="${toString:bbwp.sim.path}" />
-
-        <!-- Simulator directory: Use sim.dir property if set in project.properties file. 
-             Otherwise, use bbwp simulator directory. -->
-        <condition 
-            property="simulator.dir" 
-            value="${properties.blackberry.sim.dir}" 
-            else="${bbwp.sim.dir}">
-                <available file="${properties.blackberry.sim.dir}" type="dir" />
-        </condition>
-        <echo message="Simulator directory=${simulator.dir}" />
-
-        <!-- Simulator binary: Use sim.bin property if set in project.properties file  
-             or try setting to 'defaultSimulator.bat' in simulator directory. -->
-        <condition 
-            property="sim.bin" 
-            value="${properties.blackberry.sim.bin}" 
-            else="defaultSimulator.bat">
-                <available file="${simulator.dir}/${properties.blackberry.sim.bin}"/>
-        </condition>
-
-        <!-- If simulator executable does not exist, use the first device listed 
-             in the 'handhelds.manifest.txt' file in the simulator directory. -->
-        <loadfile 
-            property="device.list"
-            srcFile="${simulator.dir}/handhelds.manifest.txt">
-            <filterchain>
-                <tokenFilter>
-                    <stringtokenizer/>
-                </tokenFilter>
-            </filterchain>
-        </loadfile>
-
-        <propertyregex property="device"
-            input="${device.list}"
-            regexp="^\d{4}"
-            select="\0"
-            override="true" />
-        <property name="device.bin" value="${device}.bat" />
-
-        <condition
-            property="simulator.bin" 
-            value="${sim.bin}"
-            else="${device.bin}">
-                <available file="${simulator.dir}/${sim.bin}" />
-        </condition>
-        
-        <echo message="Simulator executable=${simulator.dir}/${simulator.bin}" />
-
-        <!-- Close running simulators -->
-        <echo message="Closing all running simulators..." />
-        <exec executable="${simulator.dir}/fledgecontroller.exe" dir="${simulator.dir}" spawn="false">
-            <arg value="/execute=kill" />
-        </exec>
-
-        <!-- MDS directory: Use mds.dir property if set in project.properties file. 
-             Otherwise, use bbwp MDS directory. -->
-        <condition 
-            property="mds.dir" 
-            value="${properties.blackberry.mds.dir}" 
-            else="${properties.blackberry.bbwp.dir}/mds">
-                <available file="${properties.blackberry.mds.dir}" type="dir" />
-        </condition>
-        <echo message="MDS directory=${mds.dir}" />
-        
-        <copy todir="${simulator.dir}">
-            <fileset dir="${build.dir}/StandardInstall" includes="*.cod, *.cso, *.csl, *.alx" />
-        </copy>
-        <exec executable="${mds.dir}/run.bat" dir="${mds.dir}" spawn="true" />
-        <exec executable="${simulator.dir}/${simulator.bin}" dir="${simulator.dir}" spawn="true" />
-
-        <!-- Only invoke FledgeHook.exe if it is found. Newer versions of the
-             WebWorks SDK do not include it. -->
-        <if>
-            <available file="${properties.blackberry.bbwp.dir}/FledgeHook.exe" />
-            <then>
-                <exec executable="${properties.blackberry.bbwp.dir}/FledgeHook.exe" dir="${properties.blackberry.bbwp.dir}" spawn="true" />
-            </then>
-        </if>
-    </target>
-    
-    <!-- PACKAGE-APP -->
-    
-    <target name="package-app" depends="generate-cod-name, clean">
-        <!-- Copy the WebWorks application -->
-        <mkdir dir="${widget.dir}" />
-        <copy todir="${widget.dir}" overwrite="true">
-            <fileset dir="www" >
-                <exclude name="ext-air/**"/>
-                <exclude name="ext-qnx/**"/>
-                <exclude name="res/resourceBundles/**" unless="${globalization}"/>
-            </fileset>
-        </copy>
-        
-        <!-- Package the WebWorks app by zipping the widget dir. -->
-        <mkdir dir="${build.dir}" />
-        <zip compress="false" destfile="${build.dir}/${cod.name}.zip" basedir="${widget.dir}" excludes="**/build/**,**/.settings/**,**/.project" />
-    </target>
-    
-    <!-- BUILD -->
-
-    <target name="build" depends="package-app">
-        <bbwp code-sign="${code.sign}" />
-    </target>
-
-    <!-- BBWP MACRO -->
-
-    <macrodef name="bbwp">
-        <attribute name="code-sign" default="false" />
-        <attribute name="debug" default="false" />
-        <sequential>
-            <!-- check if debug flag was passed in and set an appropriate flag for CLI exec of bbwp -->
-            <if>
-                <equals arg1="@{debug}" arg2="true" />
-                <then>
-                    <property name="debug.flag" value="/d" />
-                </then>
-                <else>
-                    <property name="debug.flag" value="" />
-                </else>
-            </if>
-
-            <!-- Ensure bbwp executable exists. -->
-            <property name="properties.blackberry.bbwp.bin" location="${bbwp}" /> 
-            <available file="${properties.blackberry.bbwp.bin}" property="properties.blackberry.bbwp.exists" />
-            <fail unless="properties.blackberry.bbwp.exists" message="Cannot find ${properties.blackberry.bbwp.bin}. Please edit 'blackberry.bbwp.dir' in your 'project.properties' file." />
-
-            <if>
-                <equals arg1="@{code-sign}" arg2="true" />
-                <then>
-                    <exec executable="${properties.blackberry.bbwp.bin}">
-                        <arg file="${build.dir}/${cod.name}.zip" />
-                        <arg value="/g" />
-                        <arg value="${properties.blackberry.sigtool.password}" />
-                        <arg line="${debug.flag} /o" />
-                        <arg file="${build.dir}" />
-                    </exec>
-                </then>
-                <else>
-                    <exec executable="${properties.blackberry.bbwp.bin}">
-                        <arg file="${build.dir}/${cod.name}.zip" />
-                        <arg line="${debug.flag} /o" />
-                        <arg file="${build.dir}" />
-                    </exec>
-                </else>
-            </if>
-        </sequential>
-    </macrodef>
-
-    <!-- CLEAN -->
-    
-    <target name="clean">
-        <delete dir="${build.dir}" />
-        <delete dir="${widget.dir}" />
-    </target>
-    
-    <!-- CLEAN DEVICE -->
-    
-    <target name="clean-device" depends="generate-cod-name">
-        <exec executable="${javaloader}">
-            <arg value="-usb" />
-            <arg value="erase" />
-            <arg value="-f" />
-            <arg value="${cod.name}.cod" />
-        </exec>
-    </target>
-    
-    <!-- CLEAN SIMULATOR -->
-    
-    <target name="clean-simulator">
-        <!-- Find the simulator directory -->
-        <set-simulator-dir />
-        
-        <exec executable="${simulator.dir}/clean.bat" dir="${simulator.dir}" />
-        
-        <delete>
-            <fileset dir="${simulator.dir}" includes="*.cod,*.csl,*.cso,*.debug,*.jar" />
-        </delete>
-    </target>
-    
-        <!-- HELPER TASKS -->
-    
-    <target name="generate-cod-name">
-        <xmlproperty file="www/config.xml" prefix="config.xml" />
-        <propertyregex property="cod.name"
-                       input="${config.xml.widget.name}"
-                       regexp="(\W+)"
-                       replace=""
-                       casesensitive="false"
-                       global="true"
-                       defaultValue="${config.xml.widget.name}" />
-        <echo message="Generated name: ${cod.name}.cod" />
-    </target>
-    
-        <!-- MACRO: SET SIMULATOR DIRECTORY -->
-    
-    <macrodef name="set-simulator-dir">
-        <sequential>
-            <!-- Locate BBWP simulator directory. There may be multiple, so choose the first. -->
-            <path id="bbwp.sim.path">
-                <first>
-                    <fileset dir="${properties.blackberry.bbwp.dir}/simpack">
-                        <include name="**/handhelds.manifest.txt" />
-                    </fileset>
-                </first>
-            </path>
-            <dirname property="bbwp.sim.dir" file="${toString:bbwp.sim.path}" />
-
-            <!-- Simulator directory: Use sim.dir property if set in project.properties file.
-                 Otherwise, use bbwp simulator directory. -->
-            <condition
-                property="simulator.dir"
-                value="${properties.blackberry.sim.dir}"
-                else="${bbwp.sim.dir}">
-                    <available file="${properties.blackberry.sim.dir}" type="dir" />
-            </condition>
-            <echo message="Simulator directory=${simulator.dir}" />
-        </sequential>
-    </macrodef>
-	
-	    <!-- HELP -->
-    
-    <target name="help">
-        <echo>
-NAME
-  ${ant.project.name}
-
-SYNOPSIS
-  ant TARGET COMMAND [-D&lt;argument&gt;=&lt;value&gt;]...
-
-DESCRIPTION
-  You can build and deploy your project to a device or simulator.
-  
-TARGETS
-  blackberry ........ Builds a cod file and deploys to a device or simulator
- 
-  playbook .......... Builds a bar file and deploys to a device or simulator
-
-COMMANDS
-  help .............. Show this help menu.
-                        ant, ant help
-
-  load-device ....... Builds and deploys project to a connected USB device.
-                        ant load-device
-
-  load-simulator .... Builds and deploys project to default simulator.
-                        ant load-simulator
-
-  build ............. Compiles and packages the project for deployment.
-                        ant build
-                                              
-  clean ............. Remove all files from the build/ directory.
-                        ant clean
-
-  clean-device ...... Remove this project from the connected USB device.
-                        ant clean-device
-
-  clean-simulator ... Remove this project from the simulator (takes a while).
-                        ant clean-simulator
-
-GETTING STARTED
-  1. Edit project.properties
-
-  2. &lt;ant load-simulator&gt; to run the project on the simulator
-
-  3. Customize your project by editing www/config.xml
-
-  4. To run the project on a BlackBerry device, you will need to obtain
-     code signing keys from RIM. Once you have the key, a project is
-     installed by connecting a BlackBerry via USB and running
-     &lt;ant load-device&gt;.
-        </echo>
-    </target>
-</project>

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/bin/templates/project/build.xml
----------------------------------------------------------------------
diff --git a/bbos/bin/templates/project/build.xml b/bbos/bin/templates/project/build.xml
deleted file mode 100644
index de9e56f..0000000
--- a/bbos/bin/templates/project/build.xml
+++ /dev/null
@@ -1,154 +0,0 @@
-<project name="Build and Deploy a Cordova BlackBerry WebWorks Project" default="help">
-<!--
-       Licensed to the Apache Software Foundation (ASF) under one
-       or more contributor license agreements.  See the NOTICE file
-       distributed with this work for additional information
-       regarding copyright ownership.  The ASF licenses this file
-       to you under the Apache License, Version 2.0 (the
-       "License"); you may not use this file except in compliance
-       with the License.  You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-       Unless required by applicable law or agreed to in writing,
-       software distributed under the License is distributed on an
-       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-       KIND, either express or implied.  See the License for the
-       specific language governing permissions and limitations
-       under the License.
--->
-    <!-- LOAD ANT-CONTRIB LIBRARY -->
-
-    <taskdef resource="net/sf/antcontrib/antcontrib.properties">
-      <classpath>
-        <pathelement location="./lib/ant-contrib/ant-contrib-1.0b3.jar" />
-      </classpath>
-    </taskdef>
-
-    <!-- LOAD PROPERTIES -->
-
-    <property prefix="properties" file="project.properties" />
-    <property name="build.dir"    location="build" />
-    <property name="widget.dir"   location="${build.dir}/widget" />
-    <property name="code.sign"    value="false" />
-    <property name="globalization" value="false" />
-
-    <target name="blackberry" >
-        <property name="subant.file"  value="blackberry.xml" />
-    </target>
-
-    <target name="playbook" >
-        <property name="subant.file"  value="playbook.xml" />
-    </target>
-
-    <target name="load-device">
-        <subant target="load-device">
-            <fileset dir="." includes="${subant.file}"/>
-        </subant>
-    </target>
-
-    <target name="load-simulator">
-        <subant target="load-simulator">
-            <fileset dir="." includes="${subant.file}"/>
-        </subant>
-    </target>
-
-    <target name="debug-simulator">
-        <subant target="debug-simulator">
-            <fileset dir="." includes="${subant.file}"/>
-        </subant>
-    </target>
-
-    <target name="debug-device">
-        <subant target="debug-device">
-            <fileset dir="." includes="${subant.file}"/>
-        </subant>
-    </target>
-
-    <target name="build">
-        <subant target="build">
-            <fileset dir="." includes="${subant.file}"/>
-        </subant>
-    </target>
-
-    <target name="clean">
-        <subant target="clean">
-            <fileset dir="." includes="${subant.file}"/>
-        </subant>
-    </target>
-
-    <target name="clean-device">
-        <subant target="clean-device">
-            <fileset dir="." includes="${subant.file}"/>
-        </subant>
-    </target>
-
-    <target name="package-app">
-        <subant target="package-app">
-            <fileset dir="." includes="${subant.file}"/>
-        </subant>
-    </target>
-
-    <target name="clean-simulator">
-        <subant target="clean-simulator">
-            <fileset dir="." includes="${subant.file}"/>
-        </subant>
-    </target>
-
-    <!-- HELP -->
-
-    <target name="help">
-        <echo>
-NAME
-  ${ant.project.name}
-
-SYNOPSIS
-  ant TARGET COMMAND [-D&lt;argument&gt;=&lt;value&gt;]...
-
-DESCRIPTION
-  You can build and deploy your project to a device or simulator.
-
-TARGETS
-  blackberry ........ Builds a cod file and deploys to a device or simulator
-
-  playbook .......... Builds a bar file and deploys to a device or simulator
-
-COMMANDS
-  help .............. Show this help menu.
-                        ant, ant help
-
-  load-device ....... Builds and deploys project to a connected USB device.
-                        ant TARGET load-device
-
-  load-simulator .... Builds and deploys project to default simulator.
-                        ant TARGET load-simulator
-
-  build ............. Compiles and packages the project for deployment.
-                        ant TARGET build
-
-  package-app ....... Packages the app into a WebWorks-compatible .zip file.
-                        ant TARGET package-app
-
-  clean ............. Remove all files from the build/ directory.
-                        ant TARGET clean
-
-  clean-device ...... Remove this project from the connected USB device.
-                        ant TARGET clean-device
-
-  clean-simulator ... Remove this project from the simulator (takes a while).
-                        ant TARGET clean-simulator
-
-GETTING STARTED
-  1. Edit project.properties
-
-  2. &lt;ant load-simulator&gt; to run the project on the simulator
-
-  3. Customize your project by editing www/config.xml
-
-  4. To run the project on a BlackBerry device, you will need to obtain
-     code signing keys from RIM. Once you have the key, a project is
-     installed by connecting a BlackBerry via USB and running
-     &lt;ant load-device&gt;.
-        </echo>
-    </target>
-</project>


[04/15] CB-4228

Posted by lo...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/json4j/internal/JSON4JStringReader.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/json4j/internal/JSON4JStringReader.java b/bbos/framework/ext/src/org/apache/cordova/json4j/internal/JSON4JStringReader.java
deleted file mode 100644
index 5c3583a..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/json4j/internal/JSON4JStringReader.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.json4j.internal;
-
-import java.io.IOException;
-import java.io.Reader;
-
-public class JSON4JStringReader extends Reader {
-
-    private char[] _buf = null;
-    private int _mark = 0;
-    private int maxLength = 0;
-
-    public JSON4JStringReader(String str) {
-        _buf = str.toCharArray();
-        maxLength = str.length();
-        _mark = 0;
-    }
-
-    public void close() throws IOException {
-        return;
-    }
-
-    public int read(char[] cbuf, int off, int len) throws IOException {
-        if (_mark == (maxLength))
-            return -1;
-
-        int read = 0;
-        for (int x=0; x<len; x++) {
-            cbuf[x+off] = _buf[_mark];
-            read++;
-            _mark++;
-            if (_mark == (maxLength))
-                return read;
-        }
-        return read;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/json4j/internal/JSON4JStringWriter.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/json4j/internal/JSON4JStringWriter.java b/bbos/framework/ext/src/org/apache/cordova/json4j/internal/JSON4JStringWriter.java
deleted file mode 100644
index ce1d2cc..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/json4j/internal/JSON4JStringWriter.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.json4j.internal;
-
-import java.io.IOException;
-import java.io.Writer;
-
-public class JSON4JStringWriter extends Writer {
-
-    public static int BUF_SIZE = 10000;
-
-    private char[] _buffer = null;
-
-    private int _mark = 0;
-
-    public JSON4JStringWriter() {
-        _buffer = new char[BUF_SIZE];
-        _mark = 0;
-    }
-
-    // Resizes an array; doubles up every time.
-    public static char[] resizeArray(char[] expandMe) {
-        int newSize = expandMe.length * 2;
-        char[] newArray = new char[newSize];
-        System.arraycopy(expandMe, 0, newArray, 0, expandMe.length);
-        return newArray;
-    }
-
-
-    public void close() throws IOException {
-        return;
-    }
-
-    public void flush() throws IOException {
-        return;
-    }
-
-    public void write(char[] cbuf, int off, int len) throws IOException {
-        if (((len - off) + _mark) >= _buffer.length) {
-            // Resize the array first.
-            _buffer = JSON4JStringWriter.resizeArray(_buffer);
-        }
-        for (int x=0; x < len; x++) {
-            _buffer[_mark] = cbuf[off+x];
-            _mark++;
-        }
-    }
-
-    public String toString() {
-        return new String(_buffer, 0, _mark);
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/json4j/internal/NumberUtil.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/json4j/internal/NumberUtil.java b/bbos/framework/ext/src/org/apache/cordova/json4j/internal/NumberUtil.java
deleted file mode 100644
index d63d4db..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/json4j/internal/NumberUtil.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.json4j.internal;
-
-public class NumberUtil {
-
-    public static  boolean isNumber(Class clazz) {
-        if ( (clazz == Integer.class) || (clazz == Long.class) || (clazz == Double.class) || (clazz == Short.class) || (clazz == Float.class)) {
-            return true;
-        }
-        return false;
-    }
-
-    public static double getDouble(Object val) {
-        if (val instanceof Double) {
-            return ((Double)val).doubleValue();
-        }
-        else if (val instanceof Long) {
-            return ((Long)val).doubleValue();
-        }
-        else if (val instanceof Short) {
-            Integer i = new Integer( ((Short)val).shortValue() );
-            return i.doubleValue();
-        }
-        else if (val instanceof Float) {
-            return ((Float)val).doubleValue();
-        }
-        else if (val instanceof Integer) {
-            return ((Integer)val).doubleValue();
-        }
-        throw new IllegalArgumentException("Not a number");
-    }
-
-    public static short getShort(Object val) {
-        if (val instanceof Double) {
-            return ((Double)val).shortValue();
-        }
-        else if (val instanceof Long) {
-            Double dg = new Double(((Long)val).longValue());
-            return dg.shortValue();
-        }
-        else if (val instanceof Short) {
-            return ((Short)val).shortValue();
-        }
-        else if (val instanceof Float) {
-            return ((Float)val).shortValue();
-        } else if (val instanceof Integer) {
-            return ((Integer)val).shortValue();
-        }
-        throw new IllegalArgumentException("Not a number");
-    }
-
-    public static int getInt(Object val) {
-        if (val instanceof Double) {
-            return ((Double)val).intValue();
-        }
-        else if (val instanceof Long) {
-            Double dg = new Double(((Long)val).longValue());
-            return dg.intValue();
-        }
-        else if (val instanceof Short) {
-            Double dg = new Double(((Short)val).shortValue());
-            return dg.intValue();
-        }
-        else if (val instanceof Float) {
-            return ((Float)val).intValue();
-        }
-        else if (val instanceof Integer) {
-            return ((Integer)val).intValue();
-        }
-        throw new IllegalArgumentException("Not a number");
-    }
-
-    public static long getLong(Object val) {
-        if (val instanceof Double) {
-            return ((Double)val).longValue();
-        }
-        else if (val instanceof Long) {
-            return ((Long)val).longValue();
-        }
-        else if (val instanceof Short) {
-            Long lg = new Long(((Short)val).shortValue());
-            return lg.longValue();
-        }
-        else if (val instanceof Float) {
-            return ((Float)val).longValue();
-        }
-        else if (val instanceof Integer) {
-            return ((Integer)val).longValue();
-        }
-        throw new IllegalArgumentException("Not a number");
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/json4j/internal/Parser.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/json4j/internal/Parser.java b/bbos/framework/ext/src/org/apache/cordova/json4j/internal/Parser.java
deleted file mode 100644
index 39ddf98..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/json4j/internal/Parser.java
+++ /dev/null
@@ -1,338 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.json4j.internal;
-
-import java.io.IOException;
-import java.io.Reader;
-
-import org.apache.cordova.json4j.JSONArray;
-import org.apache.cordova.json4j.JSONException;
-import org.apache.cordova.json4j.JSONObject;
-
-/**
- * Private parser class which handles doing the parsing of the JSON string into tokens.
- */
-public class Parser {
-
-    private Tokenizer tokenizer;
-    private Token     lastToken;
-
-    /**
-     * Contructor
-     * @param reader The Reader to use when reading in the JSON stream/string.
-     *
-     * @throws JSONException Thrown if an error occurs in tokenizing the JSON string.
-     */
-    public Parser(Reader reader) throws JSONException {
-        super();
-        try {
-            this.tokenizer = new Tokenizer(reader, false);
-        } catch (IOException iox) {
-            JSONException jex = new JSONException("Error occurred during input read.");
-            jex.setCause(iox);
-            throw jex;
-        }
-    }
-
-    /**
-     * Contructor
-     * @param reader The Reader to use when reading in the JSON stream/string.
-     * @param strict Boolean indicating if the parser should parse in strict mode, meaning unqoted strings and comments are not allowed.
-     *
-     * @throws JSONException Thrown if an error occurs in tokenizing the JSON string.
-     */
-    public Parser(Reader reader, boolean strict) throws JSONException {
-        super();
-        try {
-            this.tokenizer = new Tokenizer(reader, strict);
-        } catch (IOException iox) {
-            JSONException jex = new JSONException("Error occurred during input read.");
-            jex.setCause(iox);
-            throw jex;
-        }
-    }
-
-    /**
-     * Method to initiate the parse of the toplevel JSON object, which will in turn parse all child JSON objects contained within.
-     * Same as calling parse(false);
-     *
-     * @throws JSONException Thrown if an IO error occurd during parse of the JSON object(s).
-     */
-    public JSONObject parse() throws JSONException {
-        return parse(false, (JSONObject)null);
-    }
-
-    /**
-     * Method to initiate the parse of the toplevel JSON object, which will in turn parse all child JSON objects contained within.
-     * Same as calling parse(false);
-     *
-     * @throws JSONException Thrown if an IO error occurd during parse of the JSON object(s).
-     */
-    public JSONObject parse(JSONObject jObj) throws JSONException {
-        return parse(false, jObj);
-    }
-
-    /**
-     * Method to initiate the parse of the toplevel JSON object, which will in turn parse all child JSON objects contained within.
-     * @param ordered Flag to denote if the parse should contruct a JSON object which maintains serialization order of the attributes.
-     *
-     * @throws JSONException Thrown if an IO error occurd during parse of the JSON object(s).
-     */
-    public JSONObject parse(boolean ordered) throws JSONException {
-        try {
-            lastToken = tokenizer.next();
-        } catch (IOException iox) {
-            JSONException jex = new JSONException("Error occurred during input read.");
-            jex.setCause(iox);
-            throw jex;
-        }
-        return parseObject(ordered, null);
-    }
-
-    /**
-     * Method to initiate the parse of the toplevel JSON object, which will in turn parse all child JSON objects contained within.
-     * @param ordered Flag to denote if the parse should contruct a JSON object which maintains serialization order of the attributes.
-     * @param jObj The JSONObjetc to fill out from the parsing.  If null, create a new one.
-     *
-     * @throws JSONException Thrown if an IO error occurd during parse of the JSON object(s).
-     */
-    public JSONObject parse(boolean ordered, JSONObject jObj) throws JSONException {
-        try {
-            lastToken = tokenizer.next();
-        } catch (IOException iox) {
-            JSONException jex = new JSONException("Error occurred during input read.");
-            jex.setCause(iox);
-            throw jex;
-        }
-        return parseObject(ordered, jObj);
-    }
-
-    /**
-     * Method to initiate the parse of the toplevel JSON object, which will in turn parse all child JSON objects contained within.
-     * @param jObj The JSONArray to fill out from the parsing.  If null, create a new one.
-     *
-     * @throws JSONException Thrown if an IO error occurd during parse of the JSON object(s).
-     */
-    public JSONArray parse(JSONArray jObj) throws JSONException {
-        return parse(false, jObj);
-    }
-
-    /**
-     * Method to initiate the parse of the toplevel JSON object, which will in turn parse all child JSON objects contained within.
-     * @param ordered Flag to denote if the parse should contruct for all JSON objects encounted, a JSON object which maintains serialization order of the attributes.
-     * @param jObj The JSONArray to fill out from the parsing.  If null, create a new one.
-     *
-     * @throws JSONException Thrown if an IO error occurd during parse of the JSON object(s).
-     */
-    public JSONArray parse(boolean ordered, JSONArray jObj) throws JSONException {
-        try {
-            lastToken = tokenizer.next();
-        } catch (IOException iox) {
-            JSONException jex = new JSONException("Error occurred during input read.");
-            jex.setCause(iox);
-            throw jex;
-        }
-        return parseArray(ordered, jObj);
-    }
-
-    /**
-     * Method to parse a JSON object out of the current JSON string position.
-     * @return JSONObject Returns the parsed out JSON object.
-     *
-     * @throws JSONException Thrown if an IO error occurs during parse, such as a malformed JSON object.
-     */
-    public JSONObject parseObject() throws JSONException {
-        return parseObject(false, null);
-    }
-
-    /**
-     * Method to parse a JSON object out of the current JSON string position.
-     * @param ordered Flag to denote if the parse should contruct a JSON object which maintains serialization order of the attributes.
-     * @return JSONObject Returns the parsed out JSON object.
-     *
-     * @throws JSONException Thrown if an IO error occurs during parse, such as a malformed JSON object.
-     */
-    public JSONObject parseObject(boolean ordered, JSONObject rootObject) throws JSONException {
-
-        try {
-            JSONObject result = null;
-            if (rootObject != null) {
-                result = rootObject;
-            } else {
-                if (!ordered) {
-                    result = new JSONObject();
-                } else {
-                    //MSN NO ORDERED
-                    result = new JSONObject();
-                }
-            }
-
-            if (lastToken != Token.TokenBraceL) throw new JSONException("Expecting '{' " + tokenizer.onLineCol() + " instead, obtained token: '" + lastToken + "'");
-            lastToken = tokenizer.next();
-
-            while (true) {
-                if (lastToken == Token.TokenEOF) throw new JSONException("Unterminated object " + tokenizer.onLineCol());
-
-                if (lastToken == Token.TokenBraceR) {
-                    lastToken = tokenizer.next();
-                    break;
-                }
-
-                if (!lastToken.isString()) throw new JSONException("Expecting string key " + tokenizer.onLineCol());
-                String key = lastToken.getString();
-
-                lastToken = tokenizer.next();
-                if (lastToken != Token.TokenColon) throw new JSONException("Expecting colon " + tokenizer.onLineCol());
-
-                lastToken = tokenizer.next();
-                Object val = parseValue(ordered);
-
-                result.put(key, val);
-
-                if (lastToken == Token.TokenComma) {
-                    lastToken = tokenizer.next();
-                }
-
-                else if (lastToken != Token.TokenBraceR) {
-                    throw new JSONException("expecting either ',' or '}' " + tokenizer.onLineCol());
-                }
-            }
-            return result;
-        } catch (IOException iox) {
-            JSONException jex = new JSONException("Error occurred during object input read.");
-            jex.setCause(iox);
-            throw jex;
-        }
-    }
-
-    /**
-     * Method to parse out a JSON array from a JSON string
-     * Same as calling parseArray(false, null)
-     *
-     * @throws JSONException Thrown if a parse error occurs, such as a malformed JSON array.
-     */
-    public JSONArray parseArray() throws JSONException {
-        return parseArray(false, null);
-    }
-
-    /**
-     * Method to parse out a JSON array from a JSON string
-     * @param ordered Flag to denote if the parse should contruct JSON objects which maintain serialization order of the attributes for all JSONOjects in the array.
-     * *param array An array instance to populate instead of creating a new one.
-     *
-     * @throws JSONException Thrown if a parse error occurs, such as a malformed JSON array.
-     */
-    public JSONArray parseArray(boolean ordered, JSONArray array) throws JSONException {
-        JSONArray result = null;
-        if(array != null){
-            result = array;
-        } else {
-            result = new JSONArray();
-        }
-
-        try {
-            if (lastToken != Token.TokenBrackL) throw new JSONException("Expecting '[' " + tokenizer.onLineCol());
-            lastToken = tokenizer.next();
-            while (true) {
-                if (lastToken == Token.TokenEOF) throw new JSONException("Unterminated array " + tokenizer.onLineCol());
-
-                /**
-                 * End of the array.
-                 */
-                if (lastToken == Token.TokenBrackR) {
-                    lastToken = tokenizer.next();
-                    break;
-                }
-
-                Object val = parseValue(ordered);
-                result.add(val);
-
-                if (lastToken == Token.TokenComma) {
-                    lastToken = tokenizer.next();
-                } else if (lastToken != Token.TokenBrackR) {
-                    throw new JSONException("expecting either ',' or ']' " + tokenizer.onLineCol());
-                }
-            }
-        } catch (IOException iox) {
-            JSONException jex = new JSONException("Error occurred during array input read.");
-            jex.setCause(iox);
-            throw jex;
-        }
-        return result;
-    }
-
-    /**
-     * Method to parse the current JSON property value from the last token.
-     * @return The java object type that represents the JSON value.
-     *
-     * @throws JSONException Thrown if an IO error (read incomplete token) occurs.
-     */
-    public Object parseValue() throws JSONException {
-        return parseValue(false);
-    }
-
-    /**
-     * Method to parse the current JSON property value from the last token.
-     * @return The java object type that represents the JSON value.
-     * @param ordered Flag to denote if the parse should contruct JSON objects and arrays which maintain serialization order of the attributes.
-     *
-     * @throws JSONException Thrown if an IO error (read incomplete token) occurs.
-     */
-    public Object parseValue(boolean ordered) throws JSONException {
-        if (lastToken == Token.TokenEOF) throw new JSONException("Expecting property value " + tokenizer.onLineCol());
-
-        try {
-            if (lastToken.isNumber()) {
-                Object result = lastToken.getNumber();
-                lastToken = tokenizer.next();
-                return result;
-            }
-
-            if (lastToken.isString()) {
-                Object result = lastToken.getString();
-                lastToken = tokenizer.next();
-                return result;
-            }
-
-            if (lastToken == Token.TokenFalse) {
-                lastToken = tokenizer.next();
-                return Boolean.FALSE;
-            }
-
-            if (lastToken == Token.TokenTrue) {
-                lastToken = tokenizer.next();
-                return Boolean.TRUE;
-            }
-
-            if (lastToken == Token.TokenNull) {
-                lastToken = tokenizer.next();
-                return JSONObject.NULL;
-            }
-
-            if (lastToken == Token.TokenBrackL) return parseArray(ordered, null);
-            if (lastToken == Token.TokenBraceL) return parseObject(ordered, null);
-
-        } catch (IOException iox) {
-            JSONException jex = new JSONException("Error occurred during value input read.");
-            jex.setCause(iox);
-            throw jex;
-        }
-        throw new JSONException("Invalid token " + tokenizer.onLineCol());
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/json4j/internal/Serializer.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/json4j/internal/Serializer.java b/bbos/framework/ext/src/org/apache/cordova/json4j/internal/Serializer.java
deleted file mode 100644
index 50f34d3..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/json4j/internal/Serializer.java
+++ /dev/null
@@ -1,353 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.json4j.internal;
-
-import java.io.IOException;
-import java.io.Writer;
-import java.util.Enumeration;
-import java.util.Hashtable;
-
-import org.apache.cordova.json4j.JSONArray;
-import org.apache.cordova.json4j.JSONObject;
-import org.apache.cordova.json4j.JSONString;
-
-/**
- * Class to handle serialization of a JSON object to a JSON string.
- */
-public class Serializer {
-
-    /**
-     * The writer to use when writing this JSON object.
-     */
-    private Writer writer;
-
-    /**
-     * Create a serializer on the specified output stream writer.
-     */
-    public Serializer(Writer writer) {
-        super();
-        this.writer = writer;
-    }
-
-    /**
-     * Method to flush the current writer.
-     * @throws IOException Thrown if an error occurs during writer flush.
-     */
-    public void flush() throws IOException {
-        writer.flush();
-    }
-
-    /**
-     * Method to close the current writer.
-     * @throws IOException Thrown if an error occurs during writer close.
-     */
-    public void close() throws IOException {
-        writer.close();
-    }
-
-    /**
-     * Method to write a raw string to the writer.
-     * @param s The String to write.
-     * @throws IOException Thrown if an error occurs during write.
-     */
-    public Serializer writeRawString(String s) throws IOException {
-        writer.write(s);
-        return this;
-    }
-
-    /**
-     * Method to write the text string 'null' to the output stream (null JSON object).
-     * @throws IOException Thrown if an error occurs during write.
-     */
-    public Serializer writeNull() throws IOException {
-        writeRawString("null");
-        return this;
-    }
-
-    /**
-     * Method to write a number to the current writer.
-     * @param value The number to write to the JSON output string.
-     * @throws IOException Thrown if an error occurs during write.
-     */
-    public Serializer writeNumber(Object value) throws IOException {
-        if (null == value) return writeNull();
-
-        if (value instanceof Float) {
-            if (((Float)value).isNaN()) return writeNull();
-            if (Float.NEGATIVE_INFINITY == ((Float)value).floatValue()) return writeNull();
-            if (Float.POSITIVE_INFINITY == ((Float)value).floatValue()) return writeNull();
-        }
-
-        if (value instanceof Double) {
-            if (((Double)value).isNaN()) return writeNull();
-            if (Double.NEGATIVE_INFINITY == ((Double)value).doubleValue()) return writeNull();
-            if (Double.POSITIVE_INFINITY == ((Double)value).doubleValue()) return writeNull();
-        }
-
-        writeRawString(value.toString());
-
-        return this;
-    }
-
-    /**
-     * Method to write a boolean value to the output stream.
-     * @param value The Boolean object to write out as a JSON boolean.
-     * @throws IOException Thrown if an error occurs during write.
-     */
-    public Serializer writeBoolean(Boolean value) throws IOException {
-        if (null == value) return writeNull();
-
-        writeRawString(value.toString());
-
-        return this;
-    }
-
-    /**
-     * Method to generate a string with a particular width.  Alignment is done using zeroes if it does not meet the width requirements.
-     * @param s The string to write
-     * @param len The minimum length it should be, and to align with zeroes if length is smaller.
-     * @return A string properly aligned/correct width.
-     */
-    private static String rightAlignedZero(String s, int len) {
-        if (len == s.length()) return s;
-
-        StringBuffer sb = new StringBuffer(s);
-
-        while (sb.length() < len) {
-            sb.insert(0, '0');
-        }
-
-        return sb.toString();
-    }
-
-    /**
-     * Method to write a String out to the writer, encoding special characters and unicode characters properly.
-     * @param value The string to write out.
-     * @throws IOException Thrown if an error occurs during write.
-     */
-    public Serializer writeString(String value) throws IOException {
-        if (null == value) return writeNull();
-
-        writer.write('"');
-
-        char[] chars = value.toCharArray();
-
-        for (int i=0; i<chars.length; i++) {
-            char c = chars[i];
-            switch (c) {
-                case  '"': writer.write("\\\""); break;
-                case '\\': writer.write("\\\\"); break;
-                case    0: writer.write("\\0"); break;
-                case '\b': writer.write("\\b"); break;
-                case '\t': writer.write("\\t"); break;
-                case '\n': writer.write("\\n"); break;
-                case '\f': writer.write("\\f"); break;
-                case '\r': writer.write("\\r"); break;
-                case '/': writer.write("\\/"); break;
-                default:
-                    if ((c >= 32) && (c <= 126)) {
-                        writer.write(c);
-                    } else {
-                        writer.write("\\u");
-                        writer.write(rightAlignedZero(Integer.toHexString(c),4));
-                    }
-            }
-        }
-
-        writer.write('"');
-
-        return this;
-    }
-
-    /**
-     * Method to write out a generic JSON type.
-     * @param object The JSON compatible object to serialize.
-     * @throws IOException Thrown if an error occurs during write, or if a nonJSON compatible Java object is passed..
-     */
-    private Serializer write(Object object) throws IOException {
-        if (null == object) return writeNull();
-
-        // Serialize the various types!
-        Class clazz = object.getClass();
-        if (NumberUtil.isNumber(clazz)) return writeNumber(object);
-        if (Boolean.class.isAssignableFrom(clazz)) return writeBoolean((Boolean) object);
-        if (JSONObject.class.isAssignableFrom(clazz)) return writeObject((JSONObject) object);
-        if (JSONArray.class.isAssignableFrom(clazz)) return writeArray((JSONArray) object);
-        if (JSONString.class.isAssignableFrom(clazz)) return writeRawString(((JSONString) object).toJSONString());
-        if (String.class.isAssignableFrom(clazz)) return writeString((String) object);
-
-        throw new IOException("Attempting to serialize unserializable object: '" + object + "'");
-    }
-
-    /**
-     * Method to write a complete JSON object to the stream.
-     * @param object The JSON object to write out.
-     * @throws IOException Thrown if an error occurs during write.
-     */
-    public Serializer writeObject(JSONObject object) throws IOException {
-        if (null == object) return writeNull();
-
-        // write header
-        writeRawString("{");
-        indentPush();
-
-        Enumeration iter = getPropertyNames(object);
-
-        while ( iter.hasMoreElements() ) {
-            Object key = iter.nextElement();
-            if (!(key instanceof String)) throw new IOException("attempting to serialize object with an invalid property name: '" + key + "'" );
-
-            Object value = object.get(key);
-            if (!JSONObject.isValidObject(value)) throw new IOException("attempting to serialize object with an invalid property value: '" + value + "'");
-
-            newLine();
-            indent();
-            writeString((String)key);
-            writeRawString(":");
-            space();
-            write(value);
-
-            if (iter.hasMoreElements()) writeRawString(",");
-        }
-
-        // write trailer
-        indentPop();
-        newLine();
-        indent();
-        writeRawString("}");
-
-        return this;
-    }
-
-    /**
-     * Method to write a JSON array out to the stream.
-     * @param value The JSON array to write out.
-     * @throws IOException Thrown if an error occurs during write.
-     */
-    public Serializer writeArray(JSONArray value) throws IOException {
-        if (null == value) return writeNull();
-
-        // write header
-        writeRawString("[");
-        indentPush();
-
-        for (Enumeration iter=value.elements(); iter.hasMoreElements(); ) {
-            Object element = iter.nextElement();
-            if (!JSONObject.isValidObject(element)) throw new IOException("attempting to serialize array with an invalid element: '" + value + "'");
-
-            newLine();
-            indent();
-            write(element);
-
-            if (iter.hasMoreElements()) writeRawString(",");
-        }
-
-        // write trailer
-        indentPop();
-        newLine();
-        indent();
-        writeRawString("]");
-
-        return this;
-    }
-
-    //---------------------------------------------------------------
-    // pretty printing overridables
-    //---------------------------------------------------------------
-
-    /**
-     * Method to write a space to the output writer.
-     * @throws IOException Thrown if an error occurs during write.
-     */
-    public void space() throws IOException {
-    }
-
-    /**
-     * Method to write a newline to the output writer.
-     * @throws IOException Thrown if an error occurs during write.
-     */
-    public void newLine() throws IOException {
-    }
-
-    /**
-     * Method to write an indent to the output writer.
-     * @throws IOException Thrown if an error occurs during write.
-     */
-    public void indent() throws IOException {
-    }
-
-    /**
-     * Method to increase the indent depth of the output writer.
-     * @throws IOException Thrown if an error occurs during write.
-     */
-    public void indentPush() {
-    }
-
-    /**
-     * Method to reduce the indent depth of the output writer.
-     */
-    public void indentPop() {
-    }
-
-    /**
-     * Method to get a list of all the property names stored in a map.
-     */
-    public Enumeration getPropertyNames(Hashtable map) {
-        return map.keys();
-    }
-
-    /**
-     * Method to write a String out to the writer, encoding special characters and unicode characters properly.
-     * @param value The string to write out.
-     */
-    public static String quote(String value) {
-        if (value == null || value.length() == 0) {
-            return "\"\"";
-        }
-
-        StringBuffer buf = new StringBuffer();
-        char[] chars = value.toCharArray();
-
-        buf.append('"');
-        for (int i=0; i<chars.length; i++) {
-            char c = chars[i];
-            switch (c) {
-                case  '"': buf.append("\\\""); break;
-                case '\\': buf.append("\\\\"); break;
-                case    0: buf.append("\\0"); break;
-                case '\b': buf.append("\\b"); break;
-                case '\t': buf.append("\\t"); break;
-                case '\n': buf.append("\\n"); break;
-                case '\f': buf.append("\\f"); break;
-                case '\r': buf.append("\\r"); break;
-                case '/': buf.append("\\/"); break;
-                default:
-                    if ((c >= 32) && (c <= 126)) {
-                        buf.append(c);
-                    } else {
-                        buf.append("\\u");
-                        buf.append(rightAlignedZero(Integer.toHexString(c),4));
-                    }
-            }
-        }
-        buf.append('"');
-
-        return buf.toString();
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/json4j/internal/SerializerVerbose.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/json4j/internal/SerializerVerbose.java b/bbos/framework/ext/src/org/apache/cordova/json4j/internal/SerializerVerbose.java
deleted file mode 100644
index 5132591..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/json4j/internal/SerializerVerbose.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.json4j.internal;
-
-import java.io.IOException;
-import java.io.Writer;
-
-/**
- * Internaql class for handling the serialization of JSON objects in a verbose
- * format, meaning newlines and indention.
- */
-public class SerializerVerbose extends Serializer {
-
-    /**
-     * Internal tracker keeping indent position.
-     */
-    private int indent = 0;
-
-    /**
-     * The indent string to use when serializing.
-     */
-    private String indentStr = "\t";
-
-    /**
-     * Constructor.
-     */
-    public SerializerVerbose(Writer writer) {
-        super(writer);
-    }
-
-    /**
-     * Constructor.
-     * @param Writer The writer to serialize JSON to.
-     * @param indentSpaces: How many spaces to indent by (0 to 8).
-     * The default indent is the TAB character.
-     */
-    public SerializerVerbose(Writer writer, int indentSpaces) {
-        super(writer);
-        if(indentSpaces > 0 && indentSpaces < 8){
-            this.indentStr = "";
-            for(int i = 0; i < indentSpaces; i++){
-                this.indentStr += " ";
-            }
-        }
-    }
-
-    /**
-     * Method to write a space to the output writer.
-     * @throws IOException Thrown if an error occurs during write.
-     */
-    public void space() throws IOException {
-        writeRawString(" ");
-    }
-
-    /**
-     * Method to write a newline to the output writer.
-     * @throws IOException Thrown if an error occurs during write.
-     */
-    public void newLine() throws IOException {
-        writeRawString("\n");
-    }
-
-    /**
-     * Method to write an indent to the output writer.
-     * @throws IOException Thrown if an error occurs during write.
-     */
-    public void indent() throws IOException {
-        for (int i=0; i<indent; i++) writeRawString(this.indentStr);
-    }
-
-    /**
-     * Method to increase the indent depth of the output writer.
-     * @throws IOException Thrown if an error occurs during write.
-     */
-    public void indentPush() {
-        indent++;
-    }
-
-    /**
-     * Method to reduce the indent depth of the output writer.
-     */
-    public void indentPop() {
-        indent--;
-        if (indent < 0) throw new IllegalStateException();
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/json4j/internal/Token.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/json4j/internal/Token.java b/bbos/framework/ext/src/org/apache/cordova/json4j/internal/Token.java
deleted file mode 100644
index 1c635e9..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/json4j/internal/Token.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.json4j.internal;
-
-/**
- * Class representing a JSON token.
- */
-public class Token {
-
-    static final public Token TokenEOF    = new Token();
-    static final public Token TokenBraceL = new Token();
-    static final public Token TokenBraceR = new Token();
-    static final public Token TokenBrackL = new Token();
-    static final public Token TokenBrackR = new Token();
-    static final public Token TokenColon  = new Token();
-    static final public Token TokenComma  = new Token();
-    static final public Token TokenTrue   = new Token();
-    static final public Token TokenFalse  = new Token();
-    static final public Token TokenNull   = new Token();
-
-    private String  valueString;
-    private Object  valueNumber;
-    private boolean  isConstant;
-
-    /**
-     * Constructor
-     */
-    public Token() {
-        super();
-    }
-
-    /**
-     * Constructor
-     * @param value The value of the token as a string
-     */
-    public Token(String value) {
-        super();
-        valueString = value;
-    }
-
-    /**
-     * Constructor
-     * @param value The value of the token as a number
-     */
-    public Token(Object value) {
-        super();
-
-        valueNumber = value;
-    }
-
-    /**
-     * Method to obtain the string value of this token
-     */
-    public String getString() {
-        return valueString;
-    }
-
-    /**
-     * Method to obtain the number value of this token
-     */
-    public Object getNumber() {
-        return valueNumber;
-    }
-
-    /**
-     * Method to indicate if this token is string based or not.
-     */
-    public boolean isString() {
-        return (null != valueString) && !isConstant;
-    }
-
-    /**
-     * Method to indicate if this token is number based or not.
-     */
-    public boolean isNumber() {
-        return null != valueNumber;
-    }
-
-    /**
-     * Method to convert the token to a string representation.
-     */
-    public String toString() {
-        if (this == TokenEOF)    return "Token: EOF";
-        if (this == TokenBraceL) return "Token: {";
-        if (this == TokenBraceR) return "Token: }";
-        if (this == TokenBrackL) return "Token: [";
-        if (this == TokenBrackR) return "Token: ]";
-        if (this == TokenColon)  return "Token: :";
-        if (this == TokenComma)  return "Token: ,";
-        if (this == TokenTrue)   return "Token: true";
-        if (this == TokenFalse)  return "Token: false";
-        if (this == TokenNull)   return "Token: null";
-
-        if (this.isNumber()) return "Token: Number - " + getNumber();
-        if (this.isString()) return "Token: String - '" + getString() + "'";
-
-        return "Token: unknown.";
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/69105e07/bbos/framework/ext/src/org/apache/cordova/json4j/internal/Tokenizer.java
----------------------------------------------------------------------
diff --git a/bbos/framework/ext/src/org/apache/cordova/json4j/internal/Tokenizer.java b/bbos/framework/ext/src/org/apache/cordova/json4j/internal/Tokenizer.java
deleted file mode 100644
index 652106e..0000000
--- a/bbos/framework/ext/src/org/apache/cordova/json4j/internal/Tokenizer.java
+++ /dev/null
@@ -1,619 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cordova.json4j.internal;
-
-import java.io.IOException;
-import java.io.Reader;
-
-/**
- * Tokenizes a stream into JSON tokens.
- */
-public class Tokenizer {
-
-    /**
-     * The reader from which the JSON string is being read.
-     */
-    private Reader reader;
-
-    /**
-     * The current line position in the JSON string.
-     */
-    private int     lineNo;
-
-    /**
-     * The current column position in the JSON string.
-     */
-    private int     colNo;
-
-    /**
-     * The last character read from the JSON string.
-     */
-    private int     lastChar;
-
-    /**
-     * Whether or not the parser should be spec strict, or allow unquoted strings and comments
-     */
-    private boolean strict = false;
-
-    /**
-     * Constructor.
-     * @param reader The reader from which the JSON string is read.  Same as Tokenizer(reader, false);
-     *
-     * @throws IOException Thrown on IOErrors such as invalid JSON or sudden reader closures.
-     */
-    public Tokenizer(Reader reader) throws IOException {
-        super();
-
-//        Class readerClass= reader.getClass();
-        //In-memory readers don't need to be buffered.  Also, skip PushbackReaders
-        //because they probably already wrap a buffered stream.  And lastly, anything
-        //that extends from a BufferedReader also doesn't need buffering!
-//        if (!StringReader.class.isAssignableFrom(readerClass) &&
-//            !CharArrayReader.class.isAssignableFrom(readerClass) &&
-//            !PushbackReader.class.isAssignableFrom(readerClass) &&
-//            !BufferedReader.class.isAssignableFrom(readerClass)) {
-//            reader = new BufferedReader(reader);
-//        }
-        this.reader    = reader;
-        this.lineNo    = 0;
-        this.colNo     = 0;
-        this.lastChar  = '\n';
-        readChar();
-    }
-
-    /**
-     * Constructor.
-     * @param reader The reader from which the JSON string is read.
-     * @param strict Whether or not the parser should be spec strict, or allow unquoted strings and comments.
-     *
-     * @throws IOException Thrown on IOErrors such as invalid JSON or sudden reader closures.
-     */
-    public Tokenizer(Reader reader, boolean strict) throws IOException {
-        super();
-
-//        Class readerClass= reader.getClass();
-        //In-memory readers don't need to be buffered.  Also, skip PushbackReaders
-        //because they probably already wrap a buffered stream.  And lastly, anything
-        //that extends from a BufferedReader also doesn't need buffering!
-//        if (!StringReader.class.isAssignableFrom(readerClass) &&
-//            !CharArrayReader.class.isAssignableFrom(readerClass) &&
-//            !PushbackReader.class.isAssignableFrom(readerClass) &&
-//            !BufferedReader.class.isAssignableFrom(readerClass)) {
-//            reader = new BufferedReader(reader);
-//        }
-        this.reader    = reader;
-        this.lineNo    = 0;
-        this.colNo     = 0;
-        this.lastChar  = '\n';
-        this.strict    = strict;
-
-        readChar();
-    }
-
-    /**
-     * Method to get the next JSON token from the JSON String
-     * @return The next token in the stream, returning Token.TokenEOF when finished.
-     *
-     * @throws IOException Thrown if unexpected read error occurs or invalid character encountered in JSON string.
-     */
-    public Token next() throws IOException {
-
-        // skip whitespace, use our own checker, it seems
-        // a bit faster than Java's default.
-        //while (Character.isWhitespace((char)lastChar)) {
-        while (isWhitespace((char)lastChar)) {
-            readChar();
-        }
-
-        // handle punctuation
-        switch (lastChar) {
-            case -1:  readChar(); return Token.TokenEOF;
-            case '{': readChar(); return Token.TokenBraceL;
-            case '}': readChar(); return Token.TokenBraceR;
-            case '[': readChar(); return Token.TokenBrackL;
-            case ']': readChar(); return Token.TokenBrackR;
-            case ':': readChar(); return Token.TokenColon;
-            case ',': readChar(); return Token.TokenComma;
-
-            case '"':
-            case '\'':
-                String stringValue = readString();
-                return new Token(stringValue);
-
-            case '-':
-            case '.':
-            case '0':
-            case '1':
-            case '2':
-            case '3':
-            case '4':
-            case '5':
-            case '6':
-            case '7':
-            case '8':
-            case '9':
-                Object numberValue = readNumber();
-                return new Token(numberValue);
-
-            case 'n':
-            case 't':
-            case 'f':
-                String ident = readIdentifier();
-
-                if (ident.equals("null"))  return Token.TokenNull;
-                if (ident.equals("true"))  return Token.TokenTrue;
-                if (ident.equals("false")) return Token.TokenFalse;
-
-                // Okay, this was some sort of unquoted string, may be okay
-                if (!this.strict) {
-                    //Unquoted string.  Non-strict mode allows this.  It's still bad input
-                    //from a spec perspective, but allowable in non-strict mode.
-                    return new Token(ident);
-                } else {
-                    throw new IOException("Unexpected unquoted string literal: [" + ident + "].  Unquoted strings are not allowed in strict mode");
-                }
-            case '/':
-                if (!this.strict) {
-                    // Comment mode and not strict.  Lets just devour the comment.
-                    readComment();
-                    return next();
-                } else {
-                    throw new IOException("Unexpected character / encountered " + onLineCol() + ".  Comments are not allowed in strict mode");
-                }
-
-            default:
-                if (!this.strict && isValidUnquotedChar((char)lastChar)) {
-                    // Unquoted string.  Bad form, but ... okay, lets accept it.
-                    // some other parsers do.
-                    String unquotedStr = readIdentifier();
-                    return new Token(unquotedStr);
-                } else {
-                    if (this.strict) {
-                        throw new IOException("Unexpected character '" + (char)lastChar + "' " + onLineCol() + ".  Unquoted strings are not allowed in strict mode.");
-                    } else {
-                        throw new IOException("Unexpected character '" + (char)lastChar + "' " + onLineCol());
-                    }
-                }
-        }
-
-    }
-
-    /**
-     * Method to read out comments in the 'JSON'.  JSON normally should not
-     * have comments, but I guess we need to be more permissive to make some Crockford code
-     * happy.
-     */
-    private void readComment() throws IOException {
-        readChar();
-        if ((char)lastChar == '/') {
-            // Okay, // comment,so just read to \n or end of line
-            while ((char)lastChar != '\n' && lastChar != -1) {
-                readChar();
-            }
-        } else if ((char)lastChar == '*') {
-            // /* comment, so read past it.
-            char[] chars = new char[2];
-            readChar();
-            if (lastChar != -1) {
-                chars[0] = (char)lastChar;
-            } else {
-                return;
-            }
-            readChar();
-            if (lastChar != -1) {
-                chars[1] = (char)lastChar;
-            } else {
-                return;
-            }
-
-            while (chars[0] != '*' || chars[1] != '/') {
-                readChar();
-                if (lastChar != -1) {
-                    chars[0] = chars[1];
-                    chars[1] = (char)lastChar;
-
-                } else {
-                    return;
-                }
-            }
-        }
-    }
-
-    /**
-     * Method to read a string from the JSON string, converting escapes accordingly.
-     * @return The parsed JSON string with all escapes properly converyed.
-     *
-     * @throws IOException Thrown on unterminated strings, invalid characters, bad escapes, and so on.  Basically, invalid JSON.
-     */
-    private String readString() throws IOException {
-        StringBuffer sb    = new StringBuffer();
-        int          delim = lastChar;
-        int          l = lineNo;
-        int          c = colNo;
-
-        readChar();
-        while ((-1 != lastChar) && (delim != lastChar)) {
-            StringBuffer digitBuffer;
-
-            if (lastChar != '\\') {
-                sb.append((char)lastChar);
-                readChar();
-                continue;
-            }
-
-            readChar();
-
-            switch (lastChar) {
-                case 'b':  readChar(); sb.append('\b'); continue;
-                case 'f':  readChar(); sb.append('\f'); continue;
-                case 'n':  readChar(); sb.append('\n'); continue;
-                case 'r':  readChar(); sb.append('\r'); continue;
-                case 't':  readChar(); sb.append('\t'); continue;
-                case '\'': readChar(); sb.append('\''); continue;
-                case '"':  readChar(); sb.append('"');  continue;
-                case '\\': readChar(); sb.append('\\'); continue;
-                case '/': readChar();  sb.append('/'); continue;
-
-                    // hex constant
-                    // unicode constant
-                case 'x':
-                case 'u':
-                    digitBuffer = new StringBuffer();
-
-                    int toRead = 2;
-                    if (lastChar == 'u') toRead = 4;
-
-                    for (int i=0; i<toRead; i++) {
-                        readChar();
-                        if (!isHexDigit(lastChar)) throw new IOException("non-hex digit " + onLineCol());
-                        digitBuffer.append((char) lastChar);
-                    }
-                    readChar();
-
-                    try {
-                        int digitValue = Integer.parseInt(digitBuffer.toString(), 16);
-                        sb.append((char) digitValue);
-                    } catch (NumberFormatException e) {
-                        throw new IOException("non-hex digit " + onLineCol());
-                    }
-
-                    break;
-
-                    // octal constant
-                default:
-                    if (!isOctalDigit(lastChar)) throw new IOException("non-hex digit " + onLineCol());
-
-                    digitBuffer = new StringBuffer();
-                    digitBuffer.append((char) lastChar);
-
-                    for (int i=0; i<2; i++) {
-                        readChar();
-                        if (!isOctalDigit(lastChar)) break;
-
-                        digitBuffer.append((char) lastChar);
-                    }
-
-                    try {
-                        int digitValue = Integer.parseInt(digitBuffer.toString(), 8);
-                        sb.append((char) digitValue);
-                    } catch (NumberFormatException e) {
-                        throw new IOException("non-hex digit " + onLineCol());
-                    }
-            }
-        }
-
-        if (-1 == lastChar) {
-            throw new IOException("String not terminated " + onLineCol(l,c));
-        }
-
-        readChar();
-
-        return sb.toString();
-    }
-
-    /**
-     * Method to read a number from the JSON string.
-     *
-     * (-)(1-9)(0-9)*            : decimal
-     * (-)0(0-7)*               : octal
-     * (-)0(x|X)(0-9|a-f|A-F)*  : hex
-     * [digits][.digits][(E|e)[(+|-)]digits]
-     *
-     * @returns The number as the wrapper Java Number type.
-     *
-     * @throws IOException Thrown in invalid numbers or unexpected end of JSON string
-     * */
-    private Object readNumber() throws IOException {
-        StringBuffer sb = new StringBuffer();
-        int          l    = lineNo;
-        int          c    = colNo;
-
-        boolean isHex = false;
-
-        if (lastChar == '-') {
-            sb.append((char)lastChar);
-            readChar();
-        }
-        if (lastChar == '0') {
-            sb.append((char)lastChar);
-            readChar();
-            if (lastChar == 'x' || lastChar == 'X') {
-                sb.append((char)lastChar);
-                readChar();
-                isHex = true;
-            }
-        }
-
-        if (isHex) {
-            while (isDigitChar(lastChar) || isHexDigit(lastChar)) {
-                sb.append((char)lastChar);
-                readChar();
-            }
-        }
-        else {
-            while (isDigitChar(lastChar)) {
-                sb.append((char)lastChar);
-                readChar();
-            }
-        }
-
-        // convert it!
-        String string = sb.toString();
-
-        try {
-            if (-1 != string.indexOf('.')) {
-                return Double.valueOf(string);
-            }
-
-            String sign = "";
-            if (string.startsWith("-")) {
-                sign = "-";
-                string = string.substring(1);
-            }
-
-//            if (isHex) {
-//            	Long value = Long.valueOf(sign + string.substring(2),16);
-//                if (value.longValue() <= Integer.MAX_VALUE  && (value.longValue() >= Integer.MIN_VALUE)) {
-//                	return new Integer(value.intValue());
-//                }
-//                else {
-//                	return value;
-//                }
-//            }
-
-            if (string.equals("0")) {
-                return new Integer(0);
-//            } else if (string.startsWith("0") && string.length() > 1) {
-//            	Long value = Long.valueOf(sign + string.substring(1),8);
-//                if (value.longValue() <= Integer.MAX_VALUE  && (value.longValue() >= Integer.MIN_VALUE)) {
-//                	return new Integer(value.intValue());
-//                }
-//                else {
-//                	return value;
-//                }
-            }
-
-            /**
-             * We have to check for the exponential and treat appropriately
-             * Exponentials should be treated as Doubles.
-             */
-            if (string.indexOf("e") != -1 || string.indexOf("E") != -1) {
-                return Double.valueOf(sign + string);
-            } else {
-                Long value = new Long(Long.parseLong(sign+ string, 10));
-                //Long value = Long.valueOf(sign + string);
-                if (value.longValue() <= Integer.MAX_VALUE  && (value.longValue() >= Integer.MIN_VALUE)) {
-                    return new Integer(Integer.parseInt(sign + string, 10));
-                }
-                else {
-                    return value;
-                }
-            }
-           // else return new Integer(0);  //MSN
-        } catch (NumberFormatException e) {
-            IOException iox = new IOException("Invalid number literal " + onLineCol(l,c));
-            //MSNiox.setCause(e);
-            throw iox;
-        }
-    }
-
-    /**
-     * Method to indicate if the character read is a HEX digit or not.
-     * @param c The character to check for being a HEX digit.
-     */
-    private boolean isHexDigit(int c) {
-        switch (c) {
-            case '0':
-            case '1':
-            case '2':
-            case '3':
-            case '4':
-            case '5':
-            case '6':
-            case '7':
-            case '8':
-            case '9':
-            case 'A':
-            case 'B':
-            case 'C':
-            case 'D':
-            case 'E':
-            case 'F':
-            case 'a':
-            case 'b':
-            case 'c':
-            case 'd':
-            case 'e':
-            case 'f':
-                return true;
-        }
-
-        return false;
-    }
-
-    /**
-     * Method to indicate if the character read is an OCTAL digit or not.
-     * @param c The character to check for being a OCTAL digit.
-     */
-    private boolean isOctalDigit(int c) {
-        switch (c) {
-            case '0':
-            case '1':
-            case '2':
-            case '3':
-            case '4':
-            case '5':
-            case '6':
-            case '7':
-                return true;
-        }
-
-        return false;
-    }
-
-    /**
-     * Method to indicate if the character read is a digit or not.
-     * @param c The character to check for being a digit.
-     */
-    private boolean isDigitChar(int c) {
-        switch (c) {
-            case '0':
-            case '1':
-            case '2':
-            case '3':
-            case '4':
-            case '5':
-            case '6':
-            case '7':
-            case '8':
-            case '9':
-            case '.':
-            case 'e':
-            case 'E':
-            case 'x':
-            case 'X':
-            case '+':
-            case '-':
-                return true;
-        }
-
-        return false;
-    }
-
-    /**
-     * Method to read a partular character string.
-     * only really need to handle 'null', 'true', and 'false'
-     */
-    private String readIdentifier() throws IOException {
-        StringBuffer sb = new StringBuffer();
-
-        if (this.strict) {
-            while ((-1 != lastChar) && ( (Character.isUpperCase((char)lastChar)) || (Character.isLowerCase((char)lastChar)) ) ){
-                sb.append((char)lastChar);
-                readChar();
-            }
-        }
-        else {
-            while ((-1 != lastChar) && isValidUnquotedChar((char)lastChar)) {
-               sb.append((char)lastChar);
-               readChar();
-           }
-        }
-
-        return sb.toString();
-    }
-
-    /**
-     * Method to read the next character from the string, keeping track of line/column position.
-     *
-     * @throws IOEXception Thrown when underlying reader throws an error.
-     */
-    private void readChar() throws IOException {
-        if ('\n' == lastChar) {
-            this.colNo = 0;
-            this.lineNo++;
-        }
-        lastChar = reader.read();
-        if (-1 == lastChar) return ;
-        colNo++;
-    }
-
-    /**
-     * Method to generate a String indicationg the current line and column position in the JSON string.
-     */
-    private String onLineCol(int line, int col) {
-        return "on line " + line + ", column " + col;
-    }
-
-    /**
-     * Method to generate a String indicationg the current line and column position in the JSON string.
-     */
-    public String onLineCol() {
-        return onLineCol(lineNo,colNo);
-    }
-
-    /**
-     * High speed test for whitespace!  Faster than the java one (from some testing).
-     * @return if the indicated character is whitespace.
-     */
-    public boolean isWhitespace(char c) {
-        switch (c) {
-            case 9:  //'unicode: 0009
-            case 10: //'unicode: 000A'
-            case 11: //'unicode: 000B'
-            case 12: //'unicode: 000C'
-            case 13: //'unicode: 000D'
-            case 28: //'unicode: 001C'
-            case 29: //'unicode: 001D'
-            case 30: //'unicode: 001E'
-            case 31: //'unicode: 001F'
-            case ' ': // Space
-                //case Character.SPACE_SEPARATOR:
-                //case Character.LINE_SEPARATOR:
-           //MSN  case Character.PARAGRAPH_SEPARATOR:
-                return true;
-        }
-        return false;
-    }
-
-    /**
-     * For non strict mode, check if char is valid when not quoted.
-     * @param c
-     * @return if character is valid unquoted character.
-     */
-    public boolean isValidUnquotedChar(char c) {
-
-        if ( (Character.isDigit(c)) || (Character.isLowerCase(c)) || (Character.isUpperCase(c)) ) {
-            return true;
-        }
-
-        switch (c) {
-        case '@':
-        case '-':
-        case '.':
-        case '$':
-        case '+':
-        case '!':
-        case '_':
-            return true;
-        }
-        return false;
-    }
-
-}