Package org.modeshape.jcr.cache

Examples of org.modeshape.jcr.cache.WrappedException


                boolean resolvableInTargetWorkspace = targetCache.getNode(referenceInTargetKey) != null;
                boolean resolvableInSourceWorkspace = sourceCache.getNode(referenceInSourceKey) != null;
                if (!resolvableInTargetWorkspace && resolvableInSourceWorkspace) {
                    // it's not resolvable in the target but it's resolvable in the source, so the clone/copy graph is not
                    // reference-isolated
                    throw new WrappedException(
                                               new RepositoryException(
                                                                       JcrI18n.cannotCopyOrCloneReferenceOutsideGraph.text(propertyName,
                                                                                                                           referenceInSourceKey,
                                                                                                                           startingPathInSource)));
                } else if (!resolvableInSourceWorkspace && !referenceInSource.isWeak() && !referenceInSource.isSimple()) {
                    // it's a non resolvable strong reference, meaning it's corrupt
                    throw new WrappedException(
                                               new RepositoryException(
                                                                       JcrI18n.cannotCopyOrCloneCorruptReference.text(propertyName,
                                                                                                                      referenceInSourceKey)));
                }
            }
View Full Code Here


        protected Object convertToInternalBinaryValue( Object value ) {
            if (value instanceof ExternalBinaryValue) {
                try {
                    return valueFactories.getBinaryFactory().create(((ExternalBinaryValue)value).getStream());
                } catch (RepositoryException e) {
                    throw new WrappedException(e);
                }
            }
            return value;
        }
View Full Code Here

            }

        } catch (RuntimeException e) {
            throw e;
        } catch (Throwable t) {
            throw new WrappedException(t);
        } finally {
            lock.unlock();
        }

        txns.updateCache(workspaceCache(), events, txn);
View Full Code Here

            }

        } catch (RuntimeException e) {
            throw e;
        } catch (Exception e) {
            throw new WrappedException(e);
        } finally {
            try {
                thatLock.unlock();
            } finally {
                thisLock.unlock();
View Full Code Here

            }

        } catch (RuntimeException e) {
            throw e;
        } catch (Exception e) {
            throw new WrappedException(e);
        } finally {
            try {
                thatLock.unlock();
            } finally {
                thisLock.unlock();
View Full Code Here

TOP

Related Classes of org.modeshape.jcr.cache.WrappedException

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.