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

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


        String root = getRootUrl(repositoryId);
        if (root == null) {
            return null;
        }

        UrlBuilder result = new UrlBuilder(root);
        result.addParameter(OBJECT_ID, objectId);

        return result;
    }
View Full Code Here


    /**
     * Return an object URL with the given selector.
     */
    public UrlBuilder getObjectUrl(String repositoryId, String objectId, String selector) {
        UrlBuilder result = getObjectUrl(repositoryId, objectId);
        if (result == null) {
            return null;
        }

        result.addParameter(CMIS_SELECTOR, selector);

        return result;
    }
View Full Code Here

        if (link == null) {
            throw new CmisObjectNotFoundException("Unknown repository or checkedout collection not supported!");
        }

        UrlBuilder url = new UrlBuilder(link);

        // set up object and writer
        final AtomEntryWriter entryWriter = new AtomEntryWriter(createIdObject(objectId.getValue()));

        // post move request
View Full Code Here

        String wcLink = getLink(repositoryId, objectId, Constants.REL_WORKINGCOPY, Constants.MEDIATYPE_ENTRY);
        if (wcLink != null) {
            link = wcLink;
        }

        delete(new UrlBuilder(link));
    }
View Full Code Here

        String wcLink = getLink(repositoryId, objectId.getValue(), Constants.REL_WORKINGCOPY, Constants.MEDIATYPE_ENTRY);
        if (wcLink != null) {
            link = wcLink;
        }

        UrlBuilder url = new UrlBuilder(link);
        url.addParameter(Constants.PARAM_CHECKIN_COMMENT, checkinComment);
        url.addParameter(Constants.PARAM_MAJOR, major);
        url.addParameter(Constants.PARAM_CHECK_IN, "true");

        // 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, Constants.REL_VERSIONHISTORY, Constants.MEDIATYPE_FEED);
        }

        UrlBuilder url = new UrlBuilder(link);
        url.addParameter(Constants.PARAM_FILTER, filter);
        url.addParameter(Constants.PARAM_ALLOWABLE_ACTIONS, includeAllowableActions);

        // read and parse
        HttpUtils.Response resp = read(url);
        AtomFeed feed = parse(resp.getStream(), AtomFeed.class);
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 ((objectId == null) || (objectId.getValue() == null) || (objectId.getValue().length() == 0)) {
            throw new CmisInvalidArgumentException("Object id must be set!");
        }

        // build URL
        UrlBuilder url = getObjectUrl(repositoryId, objectId.getValue());

        // prepare form data
        final FormDataWriter formData = new FormDataWriter(Constants.CMISACTION_CHECK_OUT);

        // send and parse
View Full Code Here

        objectId.setValue(newObj == null ? null : newObj.getId());
    }

    public void cancelCheckOut(String repositoryId, String objectId, ExtensionsData extension) {
        // build URL
        UrlBuilder url = getObjectUrl(repositoryId, objectId);

        // prepare form data
        final FormDataWriter formData = new FormDataWriter(Constants.CMISACTION_CANCEL_CHECK_OUT);

        // send
View Full Code Here

        if ((objectId == null) || (objectId.getValue() == null) || (objectId.getValue().length() == 0)) {
            throw new CmisInvalidArgumentException("Object id must be set!");
        }

        // build URL
        UrlBuilder url = getObjectUrl(repositoryId, objectId.getValue());

        // prepare form data
        final FormDataWriter formData = new FormDataWriter(Constants.CMISACTION_CHECK_IN, contentStream);
        formData.addParameter(Constants.PARAM_MAJOR, major);
        formData.addPropertiesParameters(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.