Examples of EditorProvider


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

     */
    private CommitHook getCommitHook(@Nullable final String path) {
        List<CommitHook> hooks = newArrayList();

        if (path != null) {
            hooks.add(new EditorHook(new EditorProvider() {
                @Override
                public Editor getRootEditor(NodeState before, NodeState after, NodeBuilder builder) {
                    return new ItemSaveValidator(path);
                }
            }));
View Full Code Here

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

    @Override
    @CheckForNull
    public Editor getRootEditor(
            NodeState before, NodeState after, NodeBuilder builder)
            throws CommitFailedException {
        EditorProvider provider =
                CompositeEditorProvider.compose(getServices());
        return provider.getRootEditor(before, after, builder);
    }
View Full Code Here

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

     * @return this builder
     */
    @Nonnull
    public Oak with(@Nonnull final Editor editor) {
        checkNotNull(editor);
        return with(new EditorProvider() {
            @Override @Nonnull
            public Editor getRootEditor(
                    NodeState before, NodeState after,
                    NodeBuilder builder, CommitInfo info) {
                return editor;
View Full Code Here

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

    @Override
    @CheckForNull
    public Editor getRootEditor(
            NodeState before, NodeState after, NodeBuilder builder,
            CommitInfo info) throws CommitFailedException {
        EditorProvider provider =
                CompositeEditorProvider.compose(getServices());
        return provider.getRootEditor(before, after, builder, info);
    }
View Full Code Here

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

     * @return this builder
     */
    @Nonnull
    public Oak with(@Nonnull final Editor editor) {
        checkNotNull(editor);
        return with(new EditorProvider() {
            @Override @Nonnull
            public Editor getRootEditor(
                    NodeState before, NodeState after, NodeBuilder builder) {
                return editor;
            }
View Full Code Here

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

    public void save(final String path) throws RepositoryException {
        if (denotesRoot(path)) {
            save();
        } else {
            try {
                root.commit(null, new EditorHook(new EditorProvider() {
                    @Override
                    public Editor getRootEditor(NodeState before, NodeState after, NodeBuilder builder) {
                        return new ItemSaveValidator(path);
                    }
                }));
View Full Code Here

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

    }

    private static class TestHook extends EditorHook {

        TestHook(final String prefix) {
            super(new EditorProvider() {
                @CheckForNull
                @Override
                public Editor getRootEditor(NodeState before,
                                            NodeState after,
                                            NodeBuilder builder,
View Full Code Here

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

    }

    private static class TestHook extends EditorHook {

        TestHook(final String prefix) {
            super(new EditorProvider() {
                @CheckForNull
                @Override
                public Editor getRootEditor(NodeState before,
                                            NodeState after,
                                            NodeBuilder builder,
View Full Code Here

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

     * @return this builder
     */
    @Nonnull
    public Oak with(@Nonnull final Editor editor) {
        checkNotNull(editor);
        return with(new EditorProvider() {
            @Override @Nonnull
            public Editor getRootEditor(
                    NodeState before, NodeState after,
                    NodeBuilder builder, CommitInfo info) {
                return editor;
View Full Code Here

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

            throw new RepositoryException("Failed to copy content", e);
        }
    }

    private static EditorProvider createTypeEditorProvider() {
        return new EditorProvider() {
            @Override
            public Editor getRootEditor(NodeState before, NodeState after, NodeBuilder builder, CommitInfo info)
                    throws CommitFailedException {
                Editor rootEditor = new TypeEditorProvider(false)
                        .getRootEditor(before, after, builder, info);
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.