Package net.rim.device.api.system

Examples of net.rim.device.api.system.CodeSigningKey


            Object storeObject = RuntimeStore.getRuntimeStore().get( DAEMON_STORE_ID );
            if( storeObject != null ) {
                store = (DaemonStore) storeObject;
            } else {
                store = new DaemonStore();
                CodeSigningKey codeSigningKey = CodeSigningKey.get( store );
                RuntimeStore.getRuntimeStore().put( DAEMON_STORE_ID, new ControlledAccess( store, codeSigningKey ) );
            }

            return store;
        }
View Full Code Here


    public static void setLastKnownType( int type ) {
        PersistentObject persistentObject = PersistentStore.getPersistentObject( LASTKNOWN_ID );
        Hashtable info = (Hashtable) persistentObject.getContents();
        if( info == null ) {
            info = SettingsManager.createStorableObject();
            CodeSigningKey codeSigningKey = CodeSigningKey.get( info );
            persistentObject.setContents( new ControlledAccess( info, codeSigningKey ) );
        }
        info.put( "type", new Integer( type ) );
        persistentObject.commit();
    }
View Full Code Here

    public static void setLastKnownPort( int port ) {
        PersistentObject persistentObject = PersistentStore.getPersistentObject( LASTKNOWN_ID );
        Hashtable info = (Hashtable) persistentObject.getContents();
        if( info == null ) {
            info = SettingsManager.createStorableObject();
            CodeSigningKey codeSigningKey = CodeSigningKey.get( info );
            persistentObject.setContents( new ControlledAccess( info, codeSigningKey ) );
        }
        info.put( "port", new Integer( port ) );
        persistentObject.commit();
    }
View Full Code Here

     */
    public byte[] getData() {
        byte[] data = null;

        // Get the code signing key associated with this BlackBerry WebWorks Application
        CodeSigningKey codeSigningKey = CodeSigningKey.get( this );
        // Check Persistent Store for existing data
        PersistentObject cacheItemStore = PersistentStore.getPersistentObject( _storeKey );       

        // If we find an entry in the Persistent store
        if( cacheItemStore != null ) {
View Full Code Here

    public HttpHeaders getHeaders() {
        HttpHeaders headers = null;
        byte[] data = null;

        // Get the code signing key associated with this BlackBerry WebWorks Application
        CodeSigningKey codeSigningKey = CodeSigningKey.get( this );
        // Check Persistent Store for existing data
        PersistentObject cacheItemStore = PersistentStore.getPersistentObject( _storeKey );       

        // If we find an entry in the Persistent store
        if( cacheItemStore != null ) {
View Full Code Here

            // Check Persistent Store for existing cacheTable data.
            PersistentObject cacheTableStore = PersistentStore.getPersistentObject( _storeKey );

            // Get the code signing key associated with this BlackBerry WebWorks Application.
            CodeSigningKey codeSigningKey = CodeSigningKey.get( this );
            Object cacheTableObj = cacheTableStore.getContents( codeSigningKey );

            // If we find an entry in the Persistent store.
            if( cacheTableObj != null ) {
View Full Code Here

            }

            // Update cache table in persistent store.
            PersistentObject cacheTableStore = PersistentStore.getPersistentObject( _storeKey );
            CodeSigningKey codeSigningKey = CodeSigningKey.get( this );
            synchronized( cacheTableStore ) {
                cacheTableStore.setContents( new ControlledAccess( _cacheTable, codeSigningKey ) );
                cacheTableStore.commit();
            }
        }
View Full Code Here

        // Check Persistent Store for existing cacheTable data.
        PersistentObject cacheItemStore = PersistentStore.getPersistentObject( storeKey );

        // Get the code signing key associated with this BlackBerry WebWorks Application.
        CodeSigningKey codeSigningKey = CodeSigningKey.get( this );

        // If we find an entry in the Persistent store.
        if( cacheItemStore != null ) {
            Object cacheItemObj = cacheItemStore.getContents( codeSigningKey );
            if( cacheItemObj instanceof ByteVectorWrapper ) {
View Full Code Here

        // Save to Pstore.
        synchronized( persistentObject ) {
            try {
                // Get the code signing key associated with this BlackBerry WebWorks Application.
                CodeSigningKey codeSigningKey = CodeSigningKey.get( this );
                persistentObject.setContents( new ControlledAccess( pDataStore, codeSigningKey ) );
                persistentObject.commit();
            } catch ( ControlledAccessException cae ) {
                throw new IOException();
            } catch ( NonPersistableObjectException npoe ) {
View Full Code Here

            } else {
                if( retry ) {
                    retry = false;
                } else {
                    registry = new ApplicationRegistry();
                    CodeSigningKey codeSigningKey = CodeSigningKey.get( registry );
                    try {
                        RuntimeStore.getRuntimeStore().put( APP_STORE_ID, new ControlledAccess( registry, codeSigningKey ) );
                    } catch( IllegalArgumentException e ) {
                        retry = true; // Just in case of a race condition try once more
                    }
View Full Code Here

TOP

Related Classes of net.rim.device.api.system.CodeSigningKey

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.