Package net.rim.device.api.system

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


            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


        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

        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

                }
            }
            // Otherwise, create the cacheTable entry in persistent store.
            else {
                synchronized( cacheTableStore ) {
                    cacheTableStore.setContents( new ControlledAccess( _cacheTable, codeSigningKey ) );
                    cacheTableStore.commit();
                }
            }

        } catch( Exception e ) {
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

        // 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 ) {
                throw new IOException();
View Full Code Here

                    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

                        .getPersistentObject(PERSISTENT_STORE_DEMO_CONTROLLED_ID);
        synchronized (controlledStore) {
            final CodeSigningKey codeSigningKey =
                    CodeSigningKey.get(CodeModuleManager
                            .getModuleHandle("PersistentStoreDemo"), "ACME");
            controlledStore.setContents(new ControlledAccess(new Vector(),
                    codeSigningKey));
            PersistentObject.commit(controlledStore);
        }

        // Retrieve the persistent object for this application
View Full Code Here

TOP

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

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.