Package net.rim.device.api.web

Examples of net.rim.device.api.web.WidgetAccess


    /**
     * @see net.rim.device.api.browser.field2.BrowserFieldController
     */

    public void handleNavigationRequest( BrowserFieldRequest request ) throws Exception {
        WidgetAccess access = _widgetPolicy.getElement( request.getURL(), _widgetConfig.getAccessList() );
        if( access == null && !_hasMultiAccess ) {
            if( !DeviceInfo.isBlackBerry6() ) {
                _browserField.getHistory().go( -1 );
            }
            throw new WidgetException( WidgetException.ERROR_WHITELIST_FAIL, request.getURL() );
View Full Code Here


                } else if( !( ext instanceof IJSExtension ) ) {
                    return new HTTPResponseStatus( HTTPResponseStatus.SC_NOT_IMPLEMENTED, request ).getResponse();
                }
            }
        }
        WidgetAccess access = _widgetPolicy.getElement( request.getURL(), _widgetConfig.getAccessList() );
        if( access == null && !_hasMultiAccess ) {
            throw new WidgetException( WidgetException.ERROR_WHITELIST_FAIL, request.getURL() );
        }

        // In this event, only rtsp link needs to open browser
View Full Code Here

        /// EVERYTHING ABOVE THIS LINE IS STATIC AND DOES NOT NEED TO BE CHANGED  
       
        // create access
        try {
            _accessList.put(                WidgetConfig.WIDGET_LOCAL_DOMAIN,       // access:uri (FEATURE nodes stored at the root level are defaulted with access:uri=local, access:sub-domain=true
                                            new WidgetAccess(
                                                WidgetConfig.WIDGET_LOCAL_DOMAIN,   // access:uri
                                                true,                               // access:sub-domain
                                                new WidgetFeature[]                 // features allowed for this access node
                                                    { new WidgetFeature(
                                                        "blackberry",        // feature:id
                                                        true,                       // feature:required
                                                        "1.0.0",                    // feature:version
                                                        null),
                                                      new WidgetFeature(
                                                        "blackberry.pim.Task",
                                                        true,
                                                        "1.0.0",
                                                        null),
                                                      new WidgetFeature(
                                                        "blackberry.system",
                                                        true,
                                                        "1.0.0",
                                                        null) }) );                 // sub-features
            _accessList.put(                "http://awong-xp2/",                    // access:uri (FEATURE nodes stored at the root level are defaulted with access:uri=local, access:sub-domain=true
                                            new WidgetAccess(
                                                "http://awong-xp2/",      // access:uri
                                                true,                               // access:sub-domain
                                                new WidgetFeature[]                 // features allowed for this access node
                                                    { new WidgetFeature(
                                                        "blackberry.app",        // feature:id
                                                        true,                       // feature:required
                                                        "1.0.0",                    // feature:version
                                                        null),
                                                      new WidgetFeature(
                                                        "blackberry.push",
                                                        true,
                                                        "1.0.0",
                                                        null),
                                                      new WidgetFeature(
                                                        "blackberry.push.Data",
                                                        true,
                                                        "1.0.0",
                                                        null) }) );                 // sub-features
            _accessList.put(                "http://rim.net/",                    // access:uri (FEATURE nodes stored at the root level are defaulted with access:uri=local, access:sub-domain=true
                                            new WidgetAccess(
                                                "http://rim.net/",      // access:uri
                                                true,                               // access:sub-domain
                                                new WidgetFeature[]                 // features allowed for this access node
                                                    { new WidgetFeature(
                                                        "blackberry.app",        // feature:id
View Full Code Here

    private void initFeatureTable() {
        // Enumerate access elements, map feature elements to proper extension
        // loop through <access>
        int waSize = _accessArray.length;
        for( int a = 0; a < waSize; a++ ) {
            WidgetAccess wa = _accessArray[ a ];
            WidgetFeature[] wfList = wa.getFeatures();
            if( wfList == null ) {
                continue;
            }
            // Loop through <feature>
            int wfSize = wfList.length;
View Full Code Here

    // Retrieves the access element assigned to the folder path, if it exists
    // Folder path must not include the scheme or the host
    private WidgetAccess fetchWidgetAccess( String folderPath ) {
        try {
            WidgetAccess accessElement = (WidgetAccess) _pathCollection.get( folderPath );
            return accessElement;
        } catch( Exception e ) {
            // Return null if any problem occurs
            return null;
        }
View Full Code Here

                if( authString.equals( "" ) && !( schemeString.equals( "file" ) || schemeString.equals( "local" ) || schemeString.equals( "data" ) ) ) {
                    return null;
                }

                WidgetWebFolderAccess folderAccess;
                WidgetAccess fetchedAccess = null;

                // Retrieve WidgetAccess set for the specified authority
                folderAccess = (WidgetWebFolderAccess) _authorityCollection.get( schemeString + "://" + authString );

                // Special case: no access element was found for a file protocol request.
View Full Code Here

        if( _authorityCollection == null ) {
            _authorityCollection = new Hashtable();

            // Loop access elements and add them to the authority collection
            for( int i = 0; i < accessList.length; i++ ) {
                WidgetAccess currentAccess = accessList[ i ];
                URI currentURI = currentAccess.getURI();

                // Special case: local access does not go into the collection because it has no URI
                if( currentAccess.isLocal() ) {
                    _localAccess = currentAccess;
                } else {
                    WidgetWebFolderAccess folderAccess;

                    // Check the authority collection to see if the authority item we want already exists
View Full Code Here

           
            _scriptEngine = proxyScriptEngine;
        }

        // Load features for the current URL of the BrowserField.
        WidgetAccess access = _widgetPolicy.getElement( document.getDocumentURI(), _accessList );
        if( access != null && access.getFeatures() != null ) {
            loadFeatures( access.getFeatures(), document, proxyScriptEngine );
            _prevAccess = access;
        }

        if( browserField.getScreen() instanceof BrowserFieldScreen ) {
            BrowserFieldScreen bfScreen = (BrowserFieldScreen) browserField.getScreen();
View Full Code Here

TOP

Related Classes of net.rim.device.api.web.WidgetAccess

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