Package org.nuxeo.ecm.core.api

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


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

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

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

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

    protected static DocumentRef getDocumentRef(String ref) {
        DocumentRef docRef;
        if (ref != null && ref.startsWith("/")) { // doc identified by absolute
            // path
            docRef = new PathRef(ref);
        } else { // // doc identified by id
            docRef = new IdRef(ref);
        }
        return docRef;
    }
View Full Code Here

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

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

        Map<String, Serializable> props = new HashMap<String, Serializable>();
        props.put(LOCALE_PROPERTY, locale);
        props.put(SOCIAL_WORKSPACE_ID_PROPERTY, socialWorkspace.getId());
        props.put(REPOSITORY_NAME_PROPERTY,
View Full Code Here

    @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

    @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

        }

        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

        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

TOP

Related Classes of org.nuxeo.ecm.core.api.PathRef

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.