Search in sources :

Example 1 with SystemViewExporter

use of org.apache.jackrabbit.commons.xml.SystemViewExporter in project jackrabbit-oak by apache.

the class SessionImpl method exportSystemView.

@Override
public void exportSystemView(String absPath, OutputStream out, boolean skipBinary, boolean noRecurse) throws IOException, RepositoryException {
    try {
        ContentHandler handler = new ToXmlContentHandler(checkNotNull(out));
        export(checkNotNull(absPath), new SystemViewExporter(this, handler, !noRecurse, !skipBinary));
    } catch (SAXException e) {
        Exception exception = e.getException();
        if (exception instanceof RepositoryException) {
            throw (RepositoryException) exception;
        } else if (exception instanceof IOException) {
            throw (IOException) exception;
        } else {
            throw new RepositoryException("Error serializing system view XML", e);
        }
    }
}
Also used : SystemViewExporter(org.apache.jackrabbit.commons.xml.SystemViewExporter) ToXmlContentHandler(org.apache.jackrabbit.commons.xml.ToXmlContentHandler) RepositoryException(javax.jcr.RepositoryException) IOException(java.io.IOException) ContentHandler(org.xml.sax.ContentHandler) ParsingContentHandler(org.apache.jackrabbit.commons.xml.ParsingContentHandler) ToXmlContentHandler(org.apache.jackrabbit.commons.xml.ToXmlContentHandler) ConstraintViolationException(javax.jcr.nodetype.ConstraintViolationException) InvalidSerializedDataException(javax.jcr.InvalidSerializedDataException) ItemNotFoundException(javax.jcr.ItemNotFoundException) SAXException(org.xml.sax.SAXException) AccessControlException(java.security.AccessControlException) AccessDeniedException(javax.jcr.AccessDeniedException) PathNotFoundException(javax.jcr.PathNotFoundException) RepositoryException(javax.jcr.RepositoryException) IOException(java.io.IOException) UnsupportedRepositoryOperationException(javax.jcr.UnsupportedRepositoryOperationException) SAXException(org.xml.sax.SAXException)

Aggregations

IOException (java.io.IOException)1 AccessControlException (java.security.AccessControlException)1 AccessDeniedException (javax.jcr.AccessDeniedException)1 InvalidSerializedDataException (javax.jcr.InvalidSerializedDataException)1 ItemNotFoundException (javax.jcr.ItemNotFoundException)1 PathNotFoundException (javax.jcr.PathNotFoundException)1 RepositoryException (javax.jcr.RepositoryException)1 UnsupportedRepositoryOperationException (javax.jcr.UnsupportedRepositoryOperationException)1 ConstraintViolationException (javax.jcr.nodetype.ConstraintViolationException)1 ParsingContentHandler (org.apache.jackrabbit.commons.xml.ParsingContentHandler)1 SystemViewExporter (org.apache.jackrabbit.commons.xml.SystemViewExporter)1 ToXmlContentHandler (org.apache.jackrabbit.commons.xml.ToXmlContentHandler)1 ContentHandler (org.xml.sax.ContentHandler)1 SAXException (org.xml.sax.SAXException)1