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

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


            Boolean includePolicyIds, Boolean includeACL, ExtensionsData extension) {

        ObjectDataImpl od = new ObjectDataImpl();

        if (so == null) {
            throw new CmisObjectNotFoundException("Illegal object id: null");
        }

        // build properties collection
        List<String> requestedIds = FilterParser.getRequestedIdsFromFilter(filter);
        Properties props = getPropertiesFromObject(so, typeDef, requestedIds, true);
View Full Code Here


            if (info.getId().equals(repositoryId)) {
                return info;
            }
        }

        throw new CmisObjectNotFoundException("Repository not found!");
    }
View Full Code Here

        ObjectStore fs = fStoreManager.getObjectStore(repositoryId);
        StoredObject so = fs.getObjectById(folderId);
        Folder folder = null;

        if (so == null) {
            throw new CmisObjectNotFoundException("Unknown object id: " + folderId);
        }

        if (so instanceof Folder) {
            folder = (Folder) so;
        }
View Full Code Here

            getRepositoriesInternal(repositoryId);
            result = getRepositoryUrlCache().getRepositoryUrl(repositoryId, selector);
        }

        if (result == null) {
            throw new CmisObjectNotFoundException("Unknown repository!");
        }

        return result;
    }
View Full Code Here

            getRepositoriesInternal(repositoryId);
            result = getRepositoryUrlCache().getRepositoryUrl(repositoryId);
        }

        if (result == null) {
            throw new CmisObjectNotFoundException("Unknown repository!");
        }

        return result;
    }
View Full Code Here

            getRepositoriesInternal(repositoryId);
            result = getRepositoryUrlCache().getObjectUrl(repositoryId, objectId, selector);
        }

        if (result == null) {
            throw new CmisObjectNotFoundException("Unknown repository!");
        }

        return result;
    }
View Full Code Here

            getRepositoriesInternal(repositoryId);
            result = getRepositoryUrlCache().getObjectUrl(repositoryId, objectId);
        }

        if (result == null) {
            throw new CmisObjectNotFoundException("Unknown repository!");
        }

        return result;
    }
View Full Code Here

            getRepositoriesInternal(repositoryId);
            result = getRepositoryUrlCache().getPathUrl(repositoryId, objectId, selector);
        }

        if (result == null) {
            throw new CmisObjectNotFoundException("Unknown repository!");
        }

        return result;
    }
View Full Code Here

                } else if (CmisNameConstraintViolationException.EXCEPTION_NAME.equalsIgnoreCase((String) jsonError)) {
                    return new CmisNameConstraintViolationException(message, errorContent, t);
                } else if (CmisNotSupportedException.EXCEPTION_NAME.equalsIgnoreCase((String) jsonError)) {
                    return new CmisNotSupportedException(message, errorContent, t);
                } else if (CmisObjectNotFoundException.EXCEPTION_NAME.equalsIgnoreCase((String) jsonError)) {
                    return new CmisObjectNotFoundException(message, errorContent, t);
                } else if (CmisPermissionDeniedException.EXCEPTION_NAME.equalsIgnoreCase((String) jsonError)) {
                    return new CmisPermissionDeniedException(message, errorContent, t);
                } else if (CmisStorageException.EXCEPTION_NAME.equalsIgnoreCase((String) jsonError)) {
                    return new CmisStorageException(message, errorContent, t);
                } else if (CmisStreamNotSupportedException.EXCEPTION_NAME.equalsIgnoreCase((String) jsonError)) {
                    return new CmisStreamNotSupportedException(message, errorContent, t);
                } else if (CmisUpdateConflictException.EXCEPTION_NAME.equalsIgnoreCase((String) jsonError)) {
                    return new CmisUpdateConflictException(message, errorContent, t);
                } else if (CmisVersioningException.EXCEPTION_NAME.equalsIgnoreCase((String) jsonError)) {
                    return new CmisVersioningException(message, errorContent, t);
                }
            }
        }

        // fall back to status code
        switch (code) {
        case 400:
            return new CmisInvalidArgumentException(message, errorContent, t);
        case 401:
            return new CmisUnauthorizedException(message, errorContent, t);
        case 403:
            return new CmisPermissionDeniedException(message, errorContent, t);
        case 404:
            return new CmisObjectNotFoundException(message, errorContent, t);
        case 405:
            return new CmisNotSupportedException(message, errorContent, t);
        case 407:
            return new CmisProxyAuthenticationException(message, errorContent, t);
        case 409:
View Full Code Here

        try {
            return getNode().getNode(Node.JCR_CONTENT);
        }
        catch (RepositoryException e) {
            log.debug(e.getMessage(), e);
            throw new CmisObjectNotFoundException(e.getMessage(), e);
        }
    }
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.