Examples of PathRef


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

    @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

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

    @OperationMethod
    public Blob run() throws Exception {
        NuxeoPrincipal currentUser = (NuxeoPrincipal) session.getPrincipal();
        SocialWorkspace socialWorkspace = socialWorkspaceService.getDetachedSocialWorkspace(
                session, new PathRef(contextPath));

        List<String> targets = relationshipService.getTargetsOfKind(
                ActivityHelper.createDocumentActivityObject(
                        socialWorkspace.getDocument().getRepositoryName(),
                        socialWorkspace.getId()),
View Full Code Here

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

        }

        SocialWorkspace socialWorkspace = socialWorkspaceService.getDetachedSocialWorkspace(sourceDocument);

        if (socialWorkspace != null) {
            DocumentModel dashboardSpacesRoot = documentManager.getDocument(new PathRef(
                    socialWorkspace.getDashboardSpacesRootPath()));
            webActions.setCurrentTabIds(SocialWorkspaceActions.MAIN_TABS_COLLABORATION);
            return navigationContext.navigateToDocument(dashboardSpacesRoot,
                    COLLABORATION_VIEW_ID);
        } else {
View Full Code Here

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

        String view = DASHBOARD_VIEW_ID;
        if (sw == null) {
            dashboard = navigationContext.getCurrentDocument();
            view = "view_collaboration";
        } else {
            dashboard = documentManager.getDocument(new PathRef(sw.getDashboardSpacesRootPath()));
        }

        return restHelper.getDocumentUrl(dashboard, view, false);
    }
View Full Code Here

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

    public String navigateToCollaborationView() throws ClientException {
        DocumentModel currentDocument = navigationContext.getCurrentDocument();
        if (isSocialWorkspace(currentDocument)) {
            SocialWorkspace socialWorkspace = toSocialWorkspace(currentDocument);
            DocumentModel dashboardSpacesRoot = documentManager.getDocument(new PathRef(
                    socialWorkspace.getDashboardSpacesRootPath()));
            webActions.setCurrentTabIds(SocialWorkspaceActions.MAIN_TABS_COLLABORATION);
            return navigationContext.navigateToDocument(dashboardSpacesRoot,
                    COLLABORATION_VIEW_ID);
        } else if (isSocialDocument(currentDocument)) {
View Full Code Here

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

            throws ClientException {
        DocumentModel currentDocument = navigationContext.getCurrentDocument();

        SocialWorkspace socialWorkspace = socialWorkspaceService.getDetachedSocialWorkspace(currentDocument);
        if (socialWorkspace != null) {
            DocumentModel dashboardSpacesRoot = documentManager.getDocument(new PathRef(
                    socialWorkspace.getDashboardSpacesRootPath()));
            return navigationContext.navigateToDocument(dashboardSpacesRoot,
                    listingView);
        } else {
            return navigationContext.navigateToDocument(currentDocument);
View Full Code Here

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

            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();
        }
View Full Code Here

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

                    "Given document is not into a social workspace");
        }
    }

    protected DocumentModel getPrivateSection() throws ClientException {
        DocumentRef pathRef = new PathRef(
                socialWorkspace.getPrivateSectionPath());
        if (privateSocialSection == null) {
            privateSocialSection = getSession().getDocument(pathRef);
        }
        return privateSocialSection;
View Full Code Here

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

        }
        return privateSocialSection;
    }

    protected DocumentModel getPublicSection() throws ClientException {
        DocumentRef pathRef = new PathRef(
                socialWorkspace.getPublicSectionPath());
        if (publicSocialSection == null) {
            publicSocialSection = getSession().getDocument(pathRef);
        }
        return publicSocialSection;
View Full Code Here

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

    }

    @Override
    public DocumentModel getSocialWorkspaceContainer(CoreSession session) {
        try {
            return session.getDocument(new PathRef(
                    socialWorkspaceContainer.getPath()));
        } catch (ClientException e) {
            throw new ClientRuntimeException(e);
        }
    }
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.