Package org.nuxeo.ecm.social.workspace.adapters

Examples of org.nuxeo.ecm.social.workspace.adapters.SocialWorkspace


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

    @OperationMethod
    public Blob run() throws Exception {
        SocialWorkspace socialWorkspace = socialWorkspaceService.getDetachedSocialWorkspace(
                session, new PathRef(contextPath));
        List<String> users = socialWorkspace.searchMembers(pattern);
        return buildResponse(users);
    }
View Full Code Here


        if (StringUtils.isBlank(contextPath)) {
            return EMPTY_LIST;
        }

        SocialWorkspace socialWorkspace = socialWorkspaceService.getDetachedSocialWorkspace(
                session, new PathRef(contextPath));

        String finalPath = "/";
        if (socialWorkspace != null) {
            finalPath = socialWorkspace.getDocument().getPathAsString();

            if (onlyPublicDocuments != null
                    && Boolean.parseBoolean(onlyPublicDocuments)) {
                finalPath = socialWorkspace.getPublicSectionPath();
            }

            String s = " ecm:path STARTSWITH " + NXQL.escapeString(finalPath);

            if (query != null) {
View Full Code Here

    public void run() {
        if (StringUtils.isBlank(contextPath)) { // nothing to do
            return;
        }

        SocialWorkspace socialWorkspace = socialWorkspaceService.getDetachedSocialWorkspace(
                session, new PathRef(contextPath));
        socialWorkspace.handleSubscriptionRequest(session.getPrincipal());
    }
View Full Code Here

        Long targetLimit = null;
        if (limit != null) {
            targetLimit = limit.longValue();
        }

        SocialWorkspace socialWorkspace = socialWorkspaceService.getDetachedSocialWorkspace(
                session, new PathRef(contextPath));

        Locale locale = language != null && !language.isEmpty() ? new Locale(
                language) : Locale.ENGLISH;

        Map<String, Serializable> props = new HashMap<String, Serializable>();
        props.put(SOCIAL_WORKSPACE_ID_PROPERTY, socialWorkspace.getId());
        props.put(REPOSITORY_NAME_PROPERTY,
                socialWorkspace.getDocument().getRepositoryName());
        props.put(LOCALE_PROPERTY, locale);
        props.put(CORE_SESSION_PROPERTY, (Serializable) session);
        props.put(ACTIVITY_LINK_BUILDER_NAME_PROPERTY, activityLinkBuilder);
        PageProvider<ActivityMessage> pageProvider = (PageProvider<ActivityMessage>) pageProviderService.getPageProvider(
                PROVIDER_NAME, null, targetLimit, 0L, props);
View Full Code Here

        DocumentModel currentDoc = navigationContext.getCurrentDocument();
        if (isSocialWorkspaceContainer(currentDoc)) {
            return currentDoc.getRef();
        }

        SocialWorkspace socialWorkspace = socialWorkspaceActions.getSocialWorkspace();
        if (NEWS_ITEM_TYPE.equals(type)) {
            return new PathRef(socialWorkspace.getNewsItemsRootPath());
        }

        if (SOCIAL_WORKSPACE_TYPE.equals(type)) {
            return socialWorkspaceActions.getSocialWorkspaceContainer().getRef();
        }

        return socialWorkspace.getDocument().getRef();
    }
View Full Code Here

        return SocialWorkspaceHelper.toSocialWorkspace(doc);
    }

    public boolean isCurrentUserAdministratorOrMemberOfCurrentSocialWorkspace() {
        DocumentModel doc = navigationContext.getCurrentDocument();
        SocialWorkspace socialWorkspace = socialWorkspaceService.getDetachedSocialWorkspace(doc);
        return socialWorkspace != null
                && socialWorkspace.isAdministratorOrMember(currentUser);
    }
View Full Code Here

                && socialWorkspace.isAdministratorOrMember(currentUser);
    }

    public boolean isCurrentUserAdministratorOfCurrentSocialWorkspace() {
        DocumentModel doc = navigationContext.getCurrentDocument();
        SocialWorkspace socialWorkspace = socialWorkspaceService.getDetachedSocialWorkspace(doc);
        return socialWorkspace != null
                && socialWorkspace.isAdministrator(currentUser);
    }
View Full Code Here

        if (!SocialWorkspaceHelper.isSocialDocument(document)) {
            return;
        }

        SocialWorkspace socialWorkspace = getSocialWorkspaceService().getDetachedSocialWorkspace(
                document);
        if (socialWorkspace == null) {
            // not in a social workspace
            return;
        }
View Full Code Here

            return;
        }

        CoreSession session = ctx.getCoreSession();
        DocumentModel documentParent = session.getDocument(document.getParentRef());
        SocialWorkspace sws = getSocialWorkspaceService().getSocialWorkspace(
                documentParent);

        if (sws == null) {
            return;
        }
View Full Code Here

        if (!isSocialWorkspace(doc)) {
            return;
        }

        doc.putContextData(ScopeType.REQUEST, DO_NOT_PROCESS, true);
        SocialWorkspace socialWorkspace = toSocialWorkspace(doc);
        if (DOCUMENT_CREATED.equals(event.getName())) {
            handleSocialWorkspaceCreation(socialWorkspace, ctx);
        } else if (DOCUMENT_UPDATED.equals(event.getName())) {
            updateSocialWorkspaceVisibility(socialWorkspace);
        } else if (DOCUMENT_REMOVED.equals(event.getName())) {
View Full Code Here

TOP

Related Classes of org.nuxeo.ecm.social.workspace.adapters.SocialWorkspace

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.