Package org.apache.jackrabbit.oak.spi.commit

Examples of org.apache.jackrabbit.oak.spi.commit.Editor


            String name, NodeState before, NodeState after)
            throws CommitFailedException {
        List<Editor> children = newArrayListWithCapacity(1 + editors.size());
        children.add(new IndexUpdate(this, name));
        for (Editor editor : editors) {
            Editor child = editor.childNodeChanged(name, before, after);
            if (child != null) {
                children.add(child);
            }
        }
        return CompositeEditor.compose(children);
View Full Code Here


    @Override @CheckForNull
    public Editor childNodeDeleted(String name, NodeState before)
            throws CommitFailedException {
        List<Editor> children = newArrayListWithCapacity(editors.size());
        for (Editor editor : editors) {
            Editor child = editor.childNodeDeleted(name, before);
            if (child != null) {
                children.add(child);
            }
        }
        return CompositeEditor.compose(children);
View Full Code Here

    public Editor getIndexEditor(
            String type, NodeBuilder builder, NodeState root, IndexUpdateCallback callback)
            throws CommitFailedException {
        List<Editor> indexes = Lists.newArrayList();
        for (IndexEditorProvider provider : providers) {
            Editor e = provider.getIndexEditor(type, builder, root, callback);
            if (e != null) {
                indexes.add(e);
            }
        }
        return CompositeEditor.compose(indexes);
View Full Code Here

public class OrderedPropertyIndexEditorProvider implements IndexEditorProvider, OrderedIndex {
  
   @Override
   @CheckForNull
   public Editor getIndexEditor(@Nonnull String type, @Nonnull NodeBuilder definition, @Nonnull NodeState root, @Nonnull IndexUpdateCallback callback) throws CommitFailedException {
      Editor editor = (TYPE.equals(type)) ? new OrderedPropertyIndexEditor(definition,root,callback) : null;
      return editor;
   }
View Full Code Here

            // no primary type on the root node, set the hardcoded default
            primary = "rep:root";
            builder.setProperty(JCR_PRIMARYTYPE, primary, NAME);
        }

        Editor editor = new VisibleEditor(
                new TypeEditor(strict, afterTypes, primary, mixins, builder));
        if (modifiedTypes.isEmpty()) {
            return editor;
        } else {
            // Some node types were modified, so scan the entire repository
View Full Code Here

            NodeBuilder definition = definitions.getChildNode(name);
            if (Objects.equal(async, definition.getString(ASYNC_PROPERTY_NAME))) {
                String type = definition.getString(TYPE_PROPERTY_NAME);
                boolean shouldReindex = shouldReindex(definition,
                        before, name);
                Editor editor = provider.getIndexEditor(type, definition, root, updateCallback);
                if (editor == null) {
                    // trigger reindexing when an indexer becomes available
                    definition.setProperty(REINDEX_PROPERTY_NAME, true);
                } else if (shouldReindex) {
                    if (definition.getBoolean(REINDEX_ASYNC_PROPERTY_NAME)
View Full Code Here

    public Editor childNodeAdded(String name, NodeState after)
            throws CommitFailedException {
        List<Editor> children = newArrayListWithCapacity(1 + editors.size());
        children.add(new IndexUpdate(this, name));
        for (Editor editor : editors) {
            Editor child = editor.childNodeAdded(name, after);
            if (child != null) {
                children.add(child);
            }
        }
        return CompositeEditor.compose(children);
View Full Code Here

            String name, NodeState before, NodeState after)
            throws CommitFailedException {
        List<Editor> children = newArrayListWithCapacity(1 + editors.size());
        children.add(new IndexUpdate(this, name));
        for (Editor editor : editors) {
            Editor child = editor.childNodeChanged(name, before, after);
            if (child != null) {
                children.add(child);
            }
        }
        return CompositeEditor.compose(children);
View Full Code Here

    @Override @CheckForNull
    public Editor childNodeDeleted(String name, NodeState before)
            throws CommitFailedException {
        List<Editor> children = newArrayListWithCapacity(editors.size());
        for (Editor editor : editors) {
            Editor child = editor.childNodeDeleted(name, before);
            if (child != null) {
                children.add(child);
            }
        }
        return CompositeEditor.compose(children);
View Full Code Here

    @Override
    @CheckForNull
    public Editor getIndexEditor(@Nonnull String type, @Nonnull NodeBuilder definition,
                    @Nonnull NodeState root) throws CommitFailedException {
        Editor indexEditor = null;
        if (solrServerProvider != null && oakSolrConfigurationProvider != null && solrIndexEditorProvider == null) {
            solrIndexEditorProvider = new SolrIndexEditorProvider(solrServerProvider, oakSolrConfigurationProvider);
            indexEditor = solrIndexEditorProvider.getIndexEditor(type, definition, root);
        }
        return indexEditor;
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.spi.commit.Editor

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.