Examples of PathRef


Examples of org.nuxeo.ecm.core.api.PathRef

        DocumentModelList result = (DocumentModelList) service.run(ctx, chain);
        assertEquals(2, result.size());

        // remove current user from admins of sws2
        DocumentModel sws = session.getDocument(new PathRef("/sws2"));
        SocialWorkspace socialWorkspace = toSocialWorkspace(sws);

        oParams.set("query", "select * from Article where ecm:isProxy = 1");
        result = (DocumentModelList) service.run(ctx, chain);
        assertEquals(1, result.size()); // return only the public article
View Full Code Here

Examples of org.nuxeo.ecm.core.api.PathRef

        activity.setPublishedDate(now.plusHours(4).toDate());
        activityStreamService.addActivity(activity);
    }

    protected void createDocumentsWithBender() throws ClientException {
        DocumentModel workspacesDocument = session.getDocument(new PathRef(
                "/default-domain/workspaces"));
        ACP acp = workspacesDocument.getACP();
        ACL acl = acp.getOrCreateACL();
        acl.add(new ACE("Bender", EVERYTHING, true));
        acl.add(new ACE("Leela", READ, true));
View Full Code Here

Examples of org.nuxeo.ecm.core.api.PathRef

                socialWorkspaceDoc.getRef(), EVERYTHING));
    }

    @Test
    public void testPublicSocialWorkspaceRights() throws Exception {
        PathRef publicSectionPathRef = new PathRef(
                socialWorkspace.getPublicSectionPath());
        assertTrue(session.exists(publicSectionPathRef));
        assertNotNull(session.getDocument(publicSectionPathRef));
        PathRef publicDashboardPathRef = new PathRef(
                socialWorkspace.getPublicDashboardSpacePath());
        assertTrue(session.exists(publicDashboardPathRef));
        assertNotNull(session.getDocument(publicDashboardPathRef));

        // public section
View Full Code Here

Examples of org.nuxeo.ecm.core.api.PathRef

                publicDashboardPathRef, EVERYTHING));
    }

    @Test
    public void testPrivateSocialWorkspaceRights() throws Exception {
        PathRef privateSectionPathRef = new PathRef(
                socialWorkspace.getPrivateSectionPath());
        assertTrue(session.exists(privateSectionPathRef));
        assertNotNull(session.getDocument(privateSectionPathRef));
        PathRef privateDashboardPathRef = new PathRef(
                socialWorkspace.getPrivateDashboardSpacePath());
        assertTrue(session.exists(privateDashboardPathRef));
        assertNotNull(session.getDocument(privateDashboardPathRef));

        // private section
View Full Code Here

Examples of org.nuxeo.ecm.core.api.PathRef

                privateDashboardPathRef, EVERYTHING));
    }

    @Test
    public void testNewsItemsRootRights() throws Exception {
        PathRef newsItemsRootPathRef = new PathRef(
                socialWorkspace.getNewsItemsRootPath());

        assertTrue(session.exists(newsItemsRootPathRef));
        assertNotNull(session.getDocument(newsItemsRootPathRef));
View Full Code Here

Examples of org.nuxeo.ecm.core.api.PathRef

                socialWorkspace.getAdministratorsGroupName());
    }

    @Test
    public void testPublicSectionRights() throws Exception {
        PathRef publicSectionPathRef = new PathRef(
                socialWorkspace.getPublicSectionPath());
        assertTrue(session.exists(publicSectionPathRef));
        assertNotNull(session.getDocument(publicSectionPathRef));

        assertFalse(session.hasPermission(nobody, publicSectionPathRef, READ));
View Full Code Here

Examples of org.nuxeo.ecm.core.api.PathRef

        socialWorkspaceService.addSocialWorkspaceMembers(sw, "john_doe_group");
    }

    @Test
    public void testSocialWorkspaceContainer() throws ClientException {
        assertTrue(session.exists(new PathRef("/collaboration")));
        DocumentModel container = socialWorkspaceService.getSocialWorkspaceContainer(session);
        assertEquals("Collaboration", container.getTitle());
        assertEquals("/",
                session.getDocument(container.getParentRef()).getPathAsString());
    }
View Full Code Here

Examples of org.nuxeo.ecm.core.api.PathRef

    @Before
    public void setup() throws Exception {
        socialWorkspace = createSocialWorkspace("SocialWorkspace for test");
        socialWorkspaceDoc = socialWorkspace.getDocument();

        publicSection = session.getDocument(new PathRef(
                socialWorkspace.getPublicSectionPath()));
        privateSection = session.getDocument(new PathRef(
                socialWorkspace.getPrivateSectionPath()));
    }
View Full Code Here

Examples of org.nuxeo.ecm.core.api.PathRef

    @Before
    public void setup() throws Exception {
        socialWorkspace = createSocialWorkspace("Socialworkspace for test");
        socialWorkspaceDoc = socialWorkspace.getDocument();

        publicSection = session.getDocument(new PathRef(
                socialWorkspace.getPublicSectionPath()));
        privateSection = session.getDocument(new PathRef(
                socialWorkspace.getPrivateSectionPath()));
    }
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.