Package org.fcrepo.server.journal

Examples of org.fcrepo.server.journal.JournalException


        this.repositoryHash = repositoryHash;

        try {
            receiver.openFile(repositoryHash, filename);
        } catch (RemoteException e) {
            throw new JournalException(e);
        }
    }
View Full Code Here


        journalFile = null;
    }

    private JournalException logAndGetException(String message) {
        logger.error(message);
        return new JournalException(message);
    }
View Full Code Here

        return new JournalException(message);
    }

    private JournalException logAndGetException(String message, Throwable e) {
        logger.error(message, e);
        return new JournalException(message + ": " + e.toString());
    }
View Full Code Here

        } else {
            try {
                File tempFile = JournalHelper.copyToTempFile(stream);
                arguments.put(key, tempFile);
            } catch (IOException e) {
                throw new JournalException(e);
            }
        }
    }
View Full Code Here

            return null;
        } else {
            try {
                return new FileInputStream(file);
            } catch (FileNotFoundException e) {
                throw new JournalException(e);
            }
        }
    }
View Full Code Here

            // Add the size of the formatted string to the size of the encoded
            // files.
            return totalFileSizes + stringWriter.getBuffer().length();
        } catch (FactoryConfigurationError e) {
            throw new JournalException("can't estimate the size of a JournalEntry",
                                       e);
        } catch (XMLStreamException e) {
            throw new JournalException("can't estimate the size of a JournalEntry",
                                       e);
        }
    }
View Full Code Here

            parent.writeDocumentHeader(xmlWriter, repositoryHash, currentDate);

            super.setState(State.FILE_OPEN);
        } catch (FactoryConfigurationError e) {
            throw new JournalException(e);
        } catch (XMLStreamException e) {
            throw new JournalException(e);
        } catch (IOException e) {
            throw new JournalException(e);
        }
    }
View Full Code Here

            parent.writeDocumentTrailer(xmlWriter);
            xmlWriter.close();
            journalFile.close();
            super.setState(State.FILE_CLOSED);
        } catch (XMLStreamException e) {
            throw new JournalException(e);
        } catch (IOException e) {
            throw new JournalException(e);
        }
    }
View Full Code Here

    public void closeFile() throws RemoteException, JournalException {
        howManyCallsToClosefile++;

        if (closeFileThrowsException) {
            throw new JournalException("closeFile throws exception");
        }

        if (trace) {
            System.out.println("closeFile()");
        }
View Full Code Here

            stringWriter = new StringWriter();
            xmlWriter =
                    new IndentingXMLEventWriter(XMLOutputFactory.newInstance()
                            .createXMLEventWriter(stringWriter));
        } catch (XMLStreamException e) {
            throw new JournalException(e);
        } catch (FactoryConfigurationError e) {
            throw new JournalException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.fcrepo.server.journal.JournalException

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.