Package org.apache.chemistry.opencmis.commons.exceptions

Examples of org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException


            Node node = getNode();
            if (node.isCheckedOut()) {
                return new JcrPrivateWorkingCopy(getNode(), typeManager, pathManager, typeHandlerManager);
            }
            else {
                throw new CmisObjectNotFoundException("Not checked out document has no private working copy");
            }
        }
        catch (RepositoryException e) {
            log.debug(e.getMessage(), e);
            throw new CmisRuntimeException(e.getMessage(), e);
View Full Code Here


            Version version = versionHistory.getVersion(name);
            return new JcrVersion(node, version, typeManager, pathManager, typeHandlerManager);
        }
        catch (UnsupportedRepositoryOperationException e) {
            log.debug(e.getMessage(), e);
            throw new CmisObjectNotFoundException(e.getMessage(), e);
        }
        catch (VersionException e) {
            log.debug(e.getMessage(), e);
            throw new CmisObjectNotFoundException(e.getMessage(), e);
        }
        catch (RepositoryException e) {
            log.debug(e.getMessage(), e);
            throw new CmisRuntimeException(e.getMessage(), e);
        }
View Full Code Here

            return result;
        }
        catch (PathNotFoundException e) {
            log.debug(e.getMessage(), e);
            throw new CmisObjectNotFoundException(e.getMessage(), e);
        }
        catch (RepositoryException e) {
            log.debug(e.getMessage(), e);
            throw new CmisRuntimeException(e.getMessage(), e);
        }
View Full Code Here

    public JcrFolder asFolder() {
        if (isFolder()) {
            return (JcrFolder) this;
        }
        else {
            throw new CmisObjectNotFoundException("Not a folder: " + this);
        }
    }
View Full Code Here

    public JcrVersionBase asVersion() {
        if (isVersionable()) {
            return (JcrVersionBase) this;
        }
        else {
            throw new CmisObjectNotFoundException("Not a version: " + this);
        }
    }
View Full Code Here

        try {
            return create(node.getNode(path));
        }
        catch (PathNotFoundException e) {
            log.debug(e.getMessage(), e);
            throw new CmisObjectNotFoundException(e.getMessage(), e);
        }
        catch (RepositoryException e) {
            log.debug(e.getMessage(), e);
            throw new CmisRuntimeException(e.getMessage(), e);
        }
View Full Code Here

        try {
            return create(node.getParent()).asFolder();
        }
        catch (ItemNotFoundException e) {
            log.debug(e.getMessage(), e);
            throw new CmisObjectNotFoundException(e.getMessage(), e);
        }
        catch (RepositoryException e) {
            log.debug(e.getMessage(), e);
            throw new CmisRuntimeException(e.getMessage(), e);
        }
View Full Code Here

            }

            // get the property definitions
            TypeDefinition type = typeManager.getType(typeId);
            if (type == null) {
                throw new CmisObjectNotFoundException("Type '" + typeId + "' is unknown!");
            }

            PropertyUpdater propertyUpdater = new PropertyUpdater();
            // update properties
            for (PropertyData<?> prop : properties.getProperties().values()) {
View Full Code Here

            log.debug(e.getMessage(), e);
            throw new CmisPermissionDeniedException(e.getMessage(), e);
        }
        catch (NoSuchWorkspaceException e) {
            log.debug(e.getMessage(), e);
            throw new CmisObjectNotFoundException(e.getMessage(), e);
        }
        catch (RepositoryException e) {
            log.debug(e.getMessage(), e);
            throw new CmisRuntimeException(e.getMessage(), e);
        }
View Full Code Here

    public TypeDefinition getTypeDefinition(Session session, String typeId) {
        log.debug("getTypeDefinition");

        TypeDefinition type = typeManager.getType(typeId);
        if (type == null) {
            throw new CmisObjectNotFoundException("Type '" + typeId + "' is unknown!");
        }

        return JcrTypeManager.copyTypeDefinition(type);
    }
View Full Code Here

TOP

Related Classes of org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException

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.