Package org.nuxeo.ecm.core.api

Examples of org.nuxeo.ecm.core.api.DocumentModel.addFacet()


    public void shouldCreatePrivateProxyForSocialDocumentWithFacetAdded()
            throws Exception {
        DocumentModel socialDocumentFacetedNotePrivate = session.createDocumentModel(
                socialWorkspaceDoc.getPathAsString(), "Social Document Note1",
                "Note");
        socialDocumentFacetedNotePrivate.addFacet(SOCIAL_DOCUMENT_FACET);
        socialDocumentFacetedNotePrivate = session.createDocument(socialDocumentFacetedNotePrivate);
        session.save();
        eventService.waitForAsyncCompletion();
        session.save();
        socialDocumentFacetedNotePrivate = session.getDocument(socialDocumentFacetedNotePrivate.getRef());
View Full Code Here


        checkRestricted(socialDocument.getRestrictedDocument());

        DocumentModel socialDocumentFacetedNotePublic = session.createDocumentModel(
                socialWorkspaceDoc.getPathAsString(), "Social Document Note2",
                "Note");
        socialDocumentFacetedNotePublic.addFacet(SOCIAL_DOCUMENT_FACET);
        socialDocumentFacetedNotePublic.setPropertyValue(
                SOCIAL_DOCUMENT_IS_PUBLIC_PROPERTY, true);
        socialDocumentFacetedNotePublic = session.createDocument(socialDocumentFacetedNotePublic);
        session.save();
        eventService.waitForAsyncCompletion();
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.