Projects >> nuxeo >>bd22c19e51dfa7970175f5fd0bc112634ac05c89

Chunk
Conflicting content
    }

    protected void getSectionsSelectModel() throws ClientException {
<<<<<<< HEAD:nuxeo-platform-publishing-web/src/main/java/org/nuxeo/ecm/platform/publishing/PublishActionsBean.java
        // get the section list from an unrestricted session
        new SelectionModelGetter().runUnrestricted();
    }

    private void accumulateAvailableSections(DocumentModelTree sections,
            String sectionRootPath, String sectionNameType)
            throws ClientException {

        Object[] params = { sectionRootPath, sectionNameType };

        PagedDocumentsProvider sectionsProvider = null;
        try {
            sectionsProvider = queryModelActions.get(DOMAIN_SECTIONS).getResultsProvider(
                    documentManager, params);
        } catch (QueryException e) {
            throw new ClientException(String.format("Invalid search query. "
                    + "Check the \"%s\" QueryModel configuration",
                    DOMAIN_SECTIONS), e);
        }
        sectionsProvider.rewind();
        DocumentModelList mainSections = sectionsProvider.getCurrentPage();

        while (sectionsProvider.isNextPageAvailable()) {
            mainSections.addAll(sectionsProvider.getNextPage());
        }

        int firstLevel = sectionRootPath.split("/").length + 1;

        DocumentModelTreeImpl nodes = new DocumentModelTreeImpl();
        for (DocumentModel currentSection : mainSections) {
            if (documentManager.hasPermission(currentSection.getRef(),
                    SecurityConstants.READ)) {
                int currentLevel = currentSection.getPathAsString().split("/").length;
                nodes.add(currentSection, currentLevel - firstLevel);
            }
        }
        // sort sections using titles
        DocumentModelTreeNodeComparator comp = new DocumentModelTreeNodeComparator(
                nodes.getPathTitles());
        Collections.sort((ArrayList) nodes, comp);

        // populate sections
        for (DocumentModelTreeNode node : nodes) {
            sections.add(node);
        }
=======
        SelectionModelGetter selectionModelGetter = new SelectionModelGetter(
                documentManager, navigationContext.getCurrentDocument(),
                sectionRootTypes, sectionTypes,
                queryModelActions.get("DOMAIN_SECTIONS"));
        selectionModelGetter.runUnrestricted();
        sectionsModel = selectionModelGetter.getDataModel();
>>>>>>> 7116d5bfbd49e3a5f026c5e52d7b58060b06b83e:nuxeo-platform-publishing/nuxeo-platform-publishing-web/src/main/java/org/nuxeo/ecm/platform/publishing/PublishActionsBean.java
    }

    // TODO move to protected
Solution content
    }

    protected void getSectionsSelectModel() throws ClientException {
        SelectionModelGetter selectionModelGetter = new SelectionModelGetter(
                documentManager, navigationContext.getCurrentDocument(),
                sectionRootTypes, sectionTypes,
                queryModelActions.get("DOMAIN_SECTIONS"));
        selectionModelGetter.runUnrestricted();
        sectionsModel = selectionModelGetter.getDataModel();
    }

    // TODO move to protected
File
PublishActionsBean.java
Developer's decision
Version 2
Kind of conflict
Array initializer
Attribute
Comment
For statement
Method invocation
Method signature
Try statement
Variable
While statement