Package org.papoose.core

Examples of org.papoose.core.FatalError


        this.root = root;

        if (!root.exists())
        {
            if (!root.mkdirs()) throw new FatalError("Unable to create non-existant root: " + root);
            save();
        }
        else
        {
            load();
        }

        File bundlesRoot = new File(root, BUNDLES_DIR);
        if (!bundlesRoot.exists() && !bundlesRoot.mkdirs()) throw new FatalError("Unable to create bundles root: " + bundlesRoot);

        if (LOGGER.isLoggable(Level.CONFIG)) LOGGER.config("root: " + root);

        LOGGER.exiting(CLASS_NAME, "FileStore");
    }
View Full Code Here


    {
        LOGGER.entering(CLASS_NAME, "obtainSystemBundleStore");

        File bundleRoot = new File(root, SYSTEM_DIR);

        if (!bundleRoot.exists() && !bundleRoot.mkdirs()) throw new FatalError("Unable to create bundle store location: " + bundleRoot);

        BundleStore result = new BundleTmpFileMemoryStore(bundleRoot, 0, Constants.SYSTEM_BUNDLE_LOCATION);

        LOGGER.exiting(CLASS_NAME, "obtainSystemBundleStore", result);
View Full Code Here

        properties.setProperty(GENERATION_KEY + bundleId, "-1");

        save();

        if (bundleRoot.exists()) throw new BundleException("Bundle store location " + bundleRoot + " already exists");
        if (!bundleRoot.mkdirs()) throw new FatalError("Unable to create bundle store location: " + bundleRoot);

        BundleStore result = new BundleTmpFileMemoryStore(bundleRoot, bundleId, location);

        LOGGER.exiting(CLASS_NAME, "allocateBundleStore", result);
View Full Code Here

            save();
        }
        catch (NumberFormatException nfe)
        {
            LOGGER.log(Level.SEVERE, "Unable to obtain last generation", nfe);
            throw new FatalError("Unable to obtain last generation", nfe);
        }

        LOGGER.exiting(CLASS_NAME, "allocateArchiveStore", result);

        return result;
View Full Code Here

            properties.load(new FileInputStream(new File(this.root, PROPERTIES_FILE)));
        }
        catch (IOException ioe)
        {
            LOGGER.log(Level.SEVERE, "Unable to load bundle store state", ioe);
            throw new FatalError("Unable to save bundle store state", ioe);
        }

        LOGGER.exiting(CLASS_NAME, "load");
    }
View Full Code Here

            properties.store(new FileOutputStream(new File(root, PROPERTIES_FILE)), " bundle store state");
        }
        catch (IOException ioe)
        {
            LOGGER.log(Level.SEVERE, "Unable to save bundle store state", ioe);
            throw new FatalError("Unable to save bundle store state", ioe);
        }

        LOGGER.exiting(CLASS_NAME, "save");
    }
View Full Code Here

            }
            catch (MalformedURLException mue)
            {
                LOGGER.severe("Unable to pick up Papoose protocol handlers");

                throw new FatalError("Unable to pick up Papoose protocol handlers", mue);
            }
        }

        LOGGER.exiting(CLASS_NAME, "ensureUrlHandling");
    }
View Full Code Here

        this.root = new File(root, "papoose");

        if (!this.root.exists())
        {
            if (!this.root.mkdirs()) throw new FatalError("Unable to create non-existant root: " + this.root);
        }
        else
        {
            File propertiesFile = new File(this.root, PROPERTIES_FILE);
            if (propertiesFile.exists())
            {
                load();
            }
            else
            {
                properties.put(FILESTORE_VERSION_KEY, FILESTORE_VERSION);
                save();
            }
        }

        File bundlesRoot = new File(this.root, BUNDLES_DIR);
        if (!bundlesRoot.exists() && !bundlesRoot.mkdirs()) throw new FatalError("Unable to create bundles root: " + bundlesRoot);

        if (LOGGER.isLoggable(Level.CONFIG)) LOGGER.config("root: " + this.root);

        LOGGER.exiting(CLASS_NAME, "FileStore");
    }
View Full Code Here

                LOGGER.log(Level.WARNING, "Unable to add non-caching bundle file store for bundle id " + bundleId, be);
            }
            catch (NumberFormatException nfe)
            {
                LOGGER.log(Level.SEVERE, "Unable to add non-caching bundle file store for bundle id " + bundleId, nfe);
                throw new FatalError("Unable to add non-caching bundle file store for bundle id " + bundleId);
            }
        }

        LOGGER.exiting(CLASS_NAME, "loadBundleStores", result);
View Full Code Here

    {
        LOGGER.entering(CLASS_NAME, "obtainSystemBundleStore");

        File bundleRoot = new File(root, SYSTEM_DIR);

        if (!bundleRoot.exists() && !bundleRoot.mkdirs()) throw new FatalError("Unable to create bundle store location: " + bundleRoot);

        BundleFileStore result = new BundleFileStore(bundleRoot, 0, Constants.SYSTEM_BUNDLE_LOCATION);

        LOGGER.exiting(CLASS_NAME, "obtainSystemBundleStore", result);
View Full Code Here

TOP

Related Classes of org.papoose.core.FatalError

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.