Examples of CmisObjectType


Examples of org.apache.chemistry.opencmis.commons.impl.jaxb.CmisObjectType

        }

        UrlBuilder url = new UrlBuilder(link);

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

        final AtomEntryWriter entryWriter = new AtomEntryWriter(object);

        // post the new folder object
        HttpUtils.Response resp = post(url, Constants.MEDIATYPE_ENTRY, new HttpUtils.Output() {
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.impl.jaxb.CmisObjectType

        }

        UrlBuilder url = new UrlBuilder(link);

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

        final AtomEntryWriter entryWriter = new AtomEntryWriter(object);

        // post the new folder object
        HttpUtils.Response resp = post(url, Constants.MEDIATYPE_ENTRY, new HttpUtils.Output() {
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.impl.jaxb.CmisObjectType

        }

        UrlBuilder url = new UrlBuilder(link);

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

        final AtomEntryWriter entryWriter = new AtomEntryWriter(object);

        // post the new folder object
        HttpUtils.Response resp = post(url, Constants.MEDIATYPE_ENTRY, new HttpUtils.Output() {
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.impl.jaxb.CmisObjectType

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

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

        final AtomEntryWriter entryWriter = new AtomEntryWriter(object);

        // update
        HttpUtils.Response resp = put(url, Constants.MEDIATYPE_ENTRY, new HttpUtils.Output() {
            public void write(OutputStream out) throws Exception {
                entryWriter.write(out);
            }
        });

        // 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());

        if (changeToken != null) {
            changeToken.setValue(null); // just in case
        }

        lockLinks();
        try {
            // clean up cache
            removeLinks(repositoryId, entry.getId());

            // walk through the entry
            for (AtomElement element : entry.getElements()) {
                if (element.getObject() instanceof AtomLink) {
                    addLink(repositoryId, entry.getId(), (AtomLink) element.getObject());
                } else if (element.getObject() instanceof CmisObjectType) {
                    // extract new change token
                    if (changeToken != null) {
                        object = (CmisObjectType) element.getObject();

                        if (object.getProperties() != null) {
                            for (CmisProperty property : object.getProperties().getProperty()) {
                                if (PropertyIds.CHANGE_TOKEN.equals(property.getPropertyDefinitionId())
                                        && (property instanceof CmisPropertyString)) {

                                    CmisPropertyString changeTokenProperty = (CmisPropertyString) property;
                                    if (!changeTokenProperty.getValue().isEmpty()) {
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.impl.jaxb.CmisObjectType

        // walk through the entry and find the current ACL
        for (AtomElement element : entry.getElements()) {
            if (element.getObject() instanceof CmisObjectType) {
                // extract current ACL
                CmisObjectType object = (CmisObjectType) element.getObject();
                originalAces = convert(object.getAcl(), object.isExactACL());

                break;
            }
        }
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.impl.jaxb.CmisObjectType

    /**
     * Writes an object.
     */
    public void writeObject(ObjectData object, ObjectInfo info, String contentSrc, String contentType,
            String pathSegment, String relativePathSegment) throws XMLStreamException, JAXBException {
        CmisObjectType objectJaxb = convert(object);
        if (objectJaxb == null) {
            return;
        }

        writeAuthor(info.getCreatedBy());
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.impl.jaxb.CmisObjectType

    /**
     * Writes a delete object.
     */
    public void writeDeletedObject(ObjectData object) throws XMLStreamException, JAXBException {
        CmisObjectType objectJaxb = convert(object);
        if (objectJaxb == null) {
            return;
        }

        long now = System.currentTimeMillis();
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.impl.jaxb.CmisObjectType

    /**
     * Writes an entry that is attached to an object.
     */
    private static void writePolicyEntry(CmisService service, AtomEntry entry, String objectId, ObjectData policy,
            String repositoryId, UrlBuilder baseUrl) throws Exception {
        CmisObjectType resultJaxb = convert(policy);
        if (resultJaxb == null) {
            return;
        }

        ObjectInfo info = service.getObjectInfo(repositoryId, policy.getId());
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.impl.jaxb.CmisObjectType

        feed.endDocument();
    }

    private static void writeQueryResultEntry(AtomEntry entry, ObjectData result, String id, GregorianCalendar now)
            throws Exception {
        CmisObjectType resultJaxb = convert(result);
        if (resultJaxb == null) {
            return;
        }

        // start
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.impl.jaxb.CmisObjectType

    /**
     * Writes an object.
     */
    public void writeObject(ObjectData object, ObjectInfo info, String contentSrc, String contentType,
            String pathSegment, String relativePathSegment) throws XMLStreamException, JAXBException {
        CmisObjectType objectJaxb = convert(object);
        if (objectJaxb == null) {
            return;
        }

        writeAuthor(info.getCreatedBy());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.