Package org.osgi.service.prefs

Examples of org.osgi.service.prefs.BackingStoreException


                this.readTree(root, session, (Node)session.getItem(path));

                return root;
            }
        } catch (RepositoryException re) {
            throw new BackingStoreException("Unable to load preferences.", re);
        } finally {
            session.logout();
        }
        return null;
    }
View Full Code Here


                    list.add(root);
                }
            }
            return list.toArray(new PreferencesImpl[list.size()]);
        } catch (RepositoryException re) {
            throw new BackingStoreException("Unable to load preferences.", re);
        } finally {
            session.logout();
        }
    }
View Full Code Here

                final Node parent = node.getParent();
                node.remove();
                parent.save();
            }
        } catch (RepositoryException re) {
            throw new BackingStoreException("Unable to remove preferences.", re);
        } finally {
            session.logout();
        }
    }
View Full Code Here

    public void store(PreferencesImpl prefs) throws BackingStoreException {
        final Session session = this.checkInitialized();
        try {
            this.store(prefs, session);
        } catch (RepositoryException re) {
            throw new BackingStoreException("Unable to store preferences.", re);
        } finally {
            session.logout();
        }
    }
View Full Code Here

    /**
     * @see org.apache.felix.sandbox.preferences.impl.StreamBackingStoreImpl#checkAccess()
     */
    protected void checkAccess() throws BackingStoreException {
        if ( this.rootDirectory == null ) {
            throw new BackingStoreException("Saving of data files to the bundle context is currently not supported.");
        }
    }
View Full Code Here

                    try {
                        final FileInputStream fis = getFileInputStream(current);
                        this.read(root, fis);
                        fis.close();
                    } catch (IOException ioe) {
                        throw new BackingStoreException("Unable to load preferences.", ioe);
                    }
                    list.add(root);
                }
            }
        }
View Full Code Here

                this.read(root, fis);
                fis.close();

                return root;
            } catch (IOException ioe) {
                throw new BackingStoreException("Unable to load preferences.", ioe);
            }
        }
        return null;
    }
View Full Code Here

          }
        }

        if (service == null) {
            // (still) no service available; cannot fulfill this request...
            throw new BackingStoreException("No backing store!");
        }

        return service;
    }
View Full Code Here

        try {
            final OutputStream os = this.getOutputStream(root.getDescription());
            this.write(root, os);
            os.close();
        } catch (IOException ioe) {
            throw new BackingStoreException("Unable to store preferences.", ioe);
        }
    }
View Full Code Here

        /*
         * @see org.osgi.service.prefs.Preferences#flush()
         */
        public void flush() throws BackingStoreException {
            // flush all children
            BackingStoreException exception = null;
            String[] names = childrenNames();
            for (int i = 0; i < names.length; i++) {
                try {
                    node(names[i]).flush();
                } catch (BackingStoreException e) {
View Full Code Here

TOP

Related Classes of org.osgi.service.prefs.BackingStoreException

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.