Package org.nuxeo.ecm.social.workspace.service

Examples of org.nuxeo.ecm.social.workspace.service.SocialWorkspaceService


    @Param(name = "pattern", required = false)
    protected String pattern;

    @OperationMethod
    public DocumentModelList run() throws Exception {
        SocialWorkspaceService service = Framework.getService(SocialWorkspaceService.class);

        DocumentModelList result = new DocumentModelListImpl();
        for (SocialWorkspace sw : service.searchDetachedPublicSocialWorkspaces(
                session, pattern)) {
            result.add(sw.getDocument());
        }
        return result;
    }
View Full Code Here


    public static final String DC_DESCRIPTION = "dc:description";

    @Override
    public void execute(CoreSession session) {
        try {
            SocialWorkspaceService socialWorkspaceService = Framework.getLocalService(SocialWorkspaceService.class);
            SocialWorkspaceContainerDescriptor socialWorkspaceContainer = socialWorkspaceService.getSocialWorkspaceContainerDescriptor();
            DocumentRef docRef = new PathRef(socialWorkspaceContainer.getPath());
            if (!session.exists(docRef)) {
                Path path = new Path(socialWorkspaceContainer.getPath());
                String parentPath = path.removeLastSegments(1).toString();
                String name = path.lastSegment();
View Full Code Here

        assertNotNull(adapter.getCreated());
    }

    @Test
    public void testSocialWorkspaceService() throws Exception {
        SocialWorkspaceService service = Framework.getService(SocialWorkspaceService.class);
        assertEquals(3, service.getValidationDays());
    }
View Full Code Here

    @Test
    public void shouldReturnPublicSocialWorkspace() throws Exception {
        try (CoreSession newSession = openSessionAs("John")) {

            SocialWorkspaceService service = Framework.getService(SocialWorkspaceService.class);
            List<SocialWorkspace> socialWorkspaces = service.getDetachedPublicSocialWorkspaces(newSession);
            assertEquals(1, socialWorkspaces.size());

            String query = String.format("Select * From %s ",
                    SocialConstants.SOCIAL_WORKSPACE_TYPE);
            DocumentModelList docs = newSession.query(query);
            assertEquals(0, docs.size());

            DatabaseHelper.DATABASE.sleepForFulltext(); // we'll do a search
            socialWorkspaces = service.searchDetachedPublicSocialWorkspaces(
                    newSession, "marketing");
            assertEquals(1, socialWorkspaces.size());
        }
    }
View Full Code Here

TOP

Related Classes of org.nuxeo.ecm.social.workspace.service.SocialWorkspaceService

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.