Package org.papoose.core

Examples of org.papoose.core.FatalError


        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);

        BundleFileStore result = new BundleFileStore(bundleRoot, bundleId, location);

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


            properties.setProperty(GENERATION_KEY + bundleId, Integer.toString(generation));

            File archiveRoot = FileUtils.buildPath(root, BUNDLES_DIR, bundleId, GENERATIONS_DIR, generation);

            if (archiveRoot.exists()) throw new FatalError("Archive store location " + archiveRoot + " already exists");
            if (!archiveRoot.mkdirs()) throw new FatalError("Unable to create archive store location: " + archiveRoot);

            result = new ArchiveFileStore(framework, bundleId, generation, archiveRoot, inputStream);

            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

                generations.add(Integer.parseInt(generation));
            }
            catch (NumberFormatException nfe)
            {
                LOGGER.log(Level.SEVERE, "Unable to parse generation id " + generation, nfe);
                throw new FatalError("Unable to parse generation id " + generation, nfe);
            }
        }

        ArchiveStore result = null;
        if (!generations.isEmpty())
        {
            int current = generations.last();

            if (current != Integer.parseInt(properties.getProperty(GENERATION_KEY + bundleId))) throw new FatalError("Generation store inconsistent with bundle store");

            generations.remove(current);

            for (Integer generation : generations)
            {
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(this.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

            save();
        }
        catch (IOException ioe)
        {
            LOGGER.log(Level.SEVERE, "Unable to save settings", ioe);
            throw new FatalError("Unable to save settings", ioe);
        }
    }
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.