Package javax.jcr

Examples of javax.jcr.RepositoryException


            method.checkSuccess();

            Document reportDoc = method.getResponseBodyAsDocument();
            return retrieveQNodeTypeDefinitions(sessionInfo, reportDoc);
        } catch (IOException e) {
            throw new RepositoryException(e);
        } catch (DavException e) {
            throw ExceptionConverter.generate(e);
        } finally {
            if (method != null) {
                method.releaseConnection();
View Full Code Here


                        String xml = createXMLFragment(jcrName, ntName, uuid);
                        InputStream in = new ByteArrayInputStream(xml.getBytes());
                        try {
                            s.importXML(parent.getPath(), in, ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW);
                        } catch (IOException e) {
                            throw new RepositoryException(e.getMessage(), e);
                        }
                    }
                    return null;
                }
            });
View Full Code Here

        } else {
            // check status of item state
            if (status == Status.NEW) {
                String msg = "Cannot refresh a new item (" + safeGetJCRPath() + ").";
                log.debug(msg);
                throw new RepositoryException(msg);
            }

            /*
            Reset all transient modifications from this item and its descendants.
            */
 
View Full Code Here

                    ? NameConstants.ANY_NAME
                    : resolver.getQName(propDef.getName());
            // check if propDef provides declaring node type and if it matches 'this' one.
            if (propDef.getDeclaringNodeType() != null) {
                if (!declName.equals(resolver.getQName(propDef.getDeclaringNodeType().getName()))) {
                    throw new RepositoryException("Property definition specified invalid declaring nodetype: "
                            + propDef.getDeclaringNodeType().getName() + ", but should be " + declName);
                }
            }
            QValue[] defVls = propDef.getDefaultValues() == null
                    ? QValue.EMPTY_ARRAY
View Full Code Here

                    ? NameConstants.ANY_NAME
                    : resolver.getQName(nodeDef.getName());
            // check if propDef provides declaring node type and if it matches 'this' one.
            if (nodeDef.getDeclaringNodeType() != null) {
                if (!declName.equals(resolver.getQName(nodeDef.getDeclaringNodeType().getName()))) {
                    throw new RepositoryException("Childnode definition specified invalid declaring nodetype: "
                            + nodeDef.getDeclaringNodeType().getName() + ", but should be " + declName);
                }
            }
            Name defaultPrimaryType = nodeDef.getDefaultPrimaryTypeName() == null
                    ? null
View Full Code Here

                        } else {
                            throw new ItemNotFoundException("Cannot identify item with uniqueID " + uniqueID);
                        }

                    } catch (IOException e) {
                        throw new RepositoryException(e.getMessage());
                    } catch (DavException e) {
                        throw ExceptionConverter.generate(e);
                    } finally {
                        if (rm != null) {
                            rm.releaseConnection();
View Full Code Here

            PropertyId propertyId = service.getIdFactory().createPropertyId(parentId, name);

            cache.add(response.getHref(), propertyId);
            return propertyId;
        } catch (NameException e) {
            throw new RepositoryException(e);
        }
    }
View Full Code Here

            jcrPath = uri;
        }
        try {
            return service.getNamePathResolver(sessionInfo).getQPath(Text.unescape(jcrPath));
        } catch (NameException e) {
            throw new RepositoryException(e);
        }
    }
View Full Code Here

                throw new ItemNotFoundException("Unable to retrieve the node with id " + uri);
            }
            return buildNodeId(parentId, responses[0], sessionInfo.getWorkspaceName(), service.getNamePathResolver(sessionInfo));

        } catch (IOException e) {
            throw new RepositoryException(e);
        } catch (DavException e) {
            throw ExceptionConverter.generate(e);
        } finally {
            if (method != null) {
                method.releaseConnection();
View Full Code Here

            PropertyId propertyId = service.getIdFactory().createPropertyId(parentId, name);
            cache.add(uri, propertyId);

            return propertyId;
        } catch (NameException e) {
            throw new RepositoryException(e);
        }
    }
View Full Code Here

TOP

Related Classes of javax.jcr.RepositoryException

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.