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

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


            // get the response
            return new Response(respCode, conn.getResponseMessage(), conn.getHeaderFields(), inputStream,
                    conn.getErrorStream());
        } catch (Exception e) {
            throw new CmisConnectionException("Cannot access " + url + ": " + e.getMessage(), e);
        }
    }
View Full Code Here


                } else if (he.getStatusCode() == 407) {
                    throw new CmisProxyAuthenticationException(message, e);
                }
            }

            throw new CmisConnectionException(message, e);
        }

        return serviceObject;
    }
View Full Code Here

        AtomPubParser parser = new AtomPubParser(stream);

        try {
            parser.parse();
        } catch (Exception e) {
            throw new CmisConnectionException("Parsing exception!", e);
        }

        AtomBase parseResult = parser.getResults();

        if (!clazz.isInstance(parseResult)) {
            throw new CmisConnectionException("Unexpected document! Received "
                    + (parseResult == null ? "something unknown" : parseResult.getType()) + "!");
        }

        return (T) parseResult;
    }
View Full Code Here

        HttpUtils.Response resp = read(url);
        AtomEntry entry = parse(resp.getStream(), AtomEntry.class);

        // we expect a CMIS entry
        if (entry.getId() == null) {
            throw new CmisConnectionException("Received Atom entry is not a CMIS entry!");
        }

        lockLinks();
        ObjectData result = null;
        try {
View Full Code Here

        HttpUtils.Response resp = read(new UrlBuilder(link));
        AtomEntry entry = parse(resp.getStream(), AtomEntry.class);

        // we expect a CMIS entry
        if (entry.getId() == null) {
            throw new CmisConnectionException("Received Atom entry is not a CMIS entry!");
        }

        lockTypeLinks();
        TypeDefinition result = null;
        try {
View Full Code Here

            // get the response
            return new Response(respCode, conn.getResponseMessage(), conn.getHeaderFields(), inputStream,
                    conn.getErrorStream());
        } catch (Exception e) {
            throw new CmisConnectionException("Cannot access " + url + ": " + e.getMessage(), e);
        }
    }
View Full Code Here

        // parse new entry
        AtomEntry entry = parse(resp.getStream(), AtomEntry.class);

        // we expect a CMIS entry
        if (entry.getId() == null) {
            throw new CmisConnectionException("Received Atom entry is not a CMIS entry!");
        }

        // set object id
        objectId.setValue(entry.getId());
View Full Code Here

        Object obj = null;
        try {
            JSONParser parser = new JSONParser();
            obj = parser.parse(new InputStreamReader(stream, charset));
        } catch (Exception e) {
            throw new CmisConnectionException("Parsing exception!", e);
        } finally {
            try {
                stream.close();
            } catch (Exception e) {
            }
View Full Code Here

            }

            return repInfos;
        }

        throw new CmisConnectionException("Repository Infos could not be read!");
    }
View Full Code Here

        // parse new entry
        AtomEntry entry = parse(resp.getStream(), AtomEntry.class);

        // we expect a CMIS entry
        if (entry.getId() == null) {
            throw new CmisConnectionException("Received Atom entry is not a CMIS entry!");
        }

        // set object id
        objectId.setValue(entry.getId());
View Full Code Here

TOP

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

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.