Package org.apache.chemistry.opencmis.commons.impl

Examples of org.apache.chemistry.opencmis.commons.impl.UrlBuilder


    @SuppressWarnings("unchecked")
    protected List<RepositoryInfo> getRepositoriesInternal(String repositoryId) {
        List<RepositoryInfo> repInfos = new ArrayList<RepositoryInfo>();

        // retrieve service doc
        UrlBuilder url = new UrlBuilder(getServiceDocURL());
        url.addParameter(Constants.PARAM_REPOSITORY_ID, repositoryId);

        // read and parse
        HttpUtils.Response resp = read(url);
        ServiceDoc serviceDoc = parse(resp.getStream(), ServiceDoc.class);
View Full Code Here


                : Constants.TEMPLATE_OBJECT_BY_PATH), parameters);
        if (link == null) {
            throw new CmisObjectNotFoundException("Unknown repository!");
        }

        UrlBuilder url = new UrlBuilder(link);
        // workaround for missing template parameter in the CMIS spec
        if (returnVersion != null && returnVersion != ReturnVersion.THIS) {
            url.addParameter(Constants.PARAM_RETURN_VERSION, returnVersion);
        }

        // read and parse
        HttpUtils.Response resp = read(url);
        AtomEntry entry = parse(resp.getStream(), AtomEntry.class);
View Full Code Here

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

        // read and parse
        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!");
View Full Code Here

        if (link == null) {
            throwLinkException(repositoryId, objectId, Constants.REL_ACL, Constants.MEDIATYPE_ACL);
        }

        UrlBuilder aclUrl = new UrlBuilder(link);
        aclUrl.addParameter(Constants.PARAM_ACL_PROPAGATION, aclPropagation);

        // set up object and writer
        final CmisAccessControlListType aclJaxb = convert(acl);

        // update
View Full Code Here

        if (link == null) {
            throwLinkException(repositoryId, objectId, Constants.REL_ACL, Constants.MEDIATYPE_ACL);
        }

        UrlBuilder url = new UrlBuilder(link);
        url.addParameter(Constants.PARAM_ONLY_BASIC_PERMISSIONS, onlyBasicPermissions);

        // read and parse
        HttpUtils.Response resp = read(url);
        AtomAcl acl = parse(resp.getStream(), AtomAcl.class);
View Full Code Here

        if (link == null) {
            throwLinkException(repositoryId, folderId, Constants.REL_DOWN, Constants.MEDIATYPE_CHILDREN);
        }

        UrlBuilder url = new UrlBuilder(link);
        url.addParameter(Constants.PARAM_VERSIONIG_STATE, versioningState);

        // set up object and writer
        CmisObjectType object = new CmisObjectType();
        object.setProperties(convert(properties));
        object.setPolicyIds(convertPolicyIds(policies));
View Full Code Here

        if (link == null) {
            throwLinkException(repositoryId, folderId, Constants.REL_DOWN, Constants.MEDIATYPE_CHILDREN);
        }

        UrlBuilder url = new UrlBuilder(link);

        // set up object and writer
        CmisObjectType object = new CmisObjectType();
        object.setProperties(convert(properties));
        object.setPolicyIds(convertPolicyIds(policies));
View Full Code Here

        if (link == null) {
            throwLinkException(repositoryId, folderId, Constants.REL_DOWN, Constants.MEDIATYPE_CHILDREN);
        }

        UrlBuilder url = new UrlBuilder(link);

        // set up object and writer
        CmisObjectType object = new CmisObjectType();
        object.setProperties(convert(properties));
        object.setPolicyIds(convertPolicyIds(policies));
View Full Code Here

        if (link == null) {
            throwLinkException(repositoryId, sourceId, Constants.REL_RELATIONSHIPS, Constants.MEDIATYPE_FEED);
        }

        UrlBuilder url = new UrlBuilder(link);

        // set up object and writer
        CmisObjectType object = new CmisObjectType();
        object.setProperties(convert(properties));
        object.setPolicyIds(convertPolicyIds(policies));
View Full Code Here

        if (link == null) {
            throwLinkException(repositoryId, objectId.getValue(), Constants.REL_SELF, Constants.MEDIATYPE_ENTRY);
        }

        UrlBuilder url = new UrlBuilder(link);
        if (changeToken != null) {
            url.addParameter(Constants.PARAM_CHANGE_TOKEN, changeToken.getValue());
        }

        // set up object and writer
        CmisObjectType object = new CmisObjectType();
        object.setProperties(convert(properties));
View Full Code Here

TOP

Related Classes of org.apache.chemistry.opencmis.commons.impl.UrlBuilder

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.