Class DelegatingDocumentNodeState

  • All Implemented Interfaces:
    org.apache.jackrabbit.oak.spi.state.NodeState

    public class DelegatingDocumentNodeState
    extends AbstractDocumentNodeState
    NodeState wrapper which wraps another NodeState (mostly SegmentNodeState) so as to expose it as an AbstractDocumentNodeState by extracting the meta properties which are stored as hidden properties
    • Method Detail

      • wrapIfPossible

        public static org.apache.jackrabbit.oak.spi.state.NodeState wrapIfPossible​(org.apache.jackrabbit.oak.spi.state.NodeState delegate,
                                                                                   NodeStateDiffer differ)
        Wraps a given root NodeState as a DelegatingDocumentNodeState if it has required meta properties otherwise just returns the passed NodeState
        Parameters:
        delegate - nodeState to wrap
        Returns:
        wrapped state or original state
      • hasMetaProps

        public static boolean hasMetaProps​(org.apache.jackrabbit.oak.spi.state.NodeState delegate)
      • exists

        public boolean exists()
      • getProperties

        @NotNull
        public @NotNull Iterable<? extends org.apache.jackrabbit.oak.api.PropertyState> getProperties()
      • hasChildNode

        public boolean hasChildNode​(@NotNull
                                    @NotNull String name)
      • getChildNodeEntries

        @NotNull
        public @NotNull Iterable<? extends org.apache.jackrabbit.oak.spi.state.ChildNodeEntry> getChildNodeEntries()
      • builder

        @NotNull
        public @NotNull org.apache.jackrabbit.oak.spi.state.NodeBuilder builder()
      • getProperty

        public org.apache.jackrabbit.oak.api.PropertyState getProperty​(@NotNull
                                                                       @NotNull String name)
        Specified by:
        getProperty in interface org.apache.jackrabbit.oak.spi.state.NodeState
        Overrides:
        getProperty in class org.apache.jackrabbit.oak.spi.state.AbstractNodeState
      • getPropertyCount

        public long getPropertyCount()
        Specified by:
        getPropertyCount in interface org.apache.jackrabbit.oak.spi.state.NodeState
        Overrides:
        getPropertyCount in class org.apache.jackrabbit.oak.spi.state.AbstractNodeState
      • hasProperty

        public boolean hasProperty​(@NotNull
                                   @NotNull String name)
        Specified by:
        hasProperty in interface org.apache.jackrabbit.oak.spi.state.NodeState
        Overrides:
        hasProperty in class org.apache.jackrabbit.oak.spi.state.AbstractNodeState
      • getBoolean

        public boolean getBoolean​(@NotNull
                                  @NotNull String name)
        Specified by:
        getBoolean in interface org.apache.jackrabbit.oak.spi.state.NodeState
        Overrides:
        getBoolean in class org.apache.jackrabbit.oak.spi.state.AbstractNodeState
      • getLong

        public long getLong​(String name)
        Specified by:
        getLong in interface org.apache.jackrabbit.oak.spi.state.NodeState
        Overrides:
        getLong in class org.apache.jackrabbit.oak.spi.state.AbstractNodeState
      • getString

        public String getString​(String name)
        Specified by:
        getString in interface org.apache.jackrabbit.oak.spi.state.NodeState
        Overrides:
        getString in class org.apache.jackrabbit.oak.spi.state.AbstractNodeState
      • getStrings

        @NotNull
        public @NotNull Iterable<String> getStrings​(@NotNull
                                                    @NotNull String name)
        Specified by:
        getStrings in interface org.apache.jackrabbit.oak.spi.state.NodeState
        Overrides:
        getStrings in class org.apache.jackrabbit.oak.spi.state.AbstractNodeState
      • getName

        public String getName​(@NotNull
                              @NotNull String name)
        Specified by:
        getName in interface org.apache.jackrabbit.oak.spi.state.NodeState
        Overrides:
        getName in class org.apache.jackrabbit.oak.spi.state.AbstractNodeState
      • getNames

        @NotNull
        public @NotNull Iterable<String> getNames​(@NotNull
                                                  @NotNull String name)
        Specified by:
        getNames in interface org.apache.jackrabbit.oak.spi.state.NodeState
        Overrides:
        getNames in class org.apache.jackrabbit.oak.spi.state.AbstractNodeState
      • getChildNodeCount

        public long getChildNodeCount​(long max)
        Specified by:
        getChildNodeCount in interface org.apache.jackrabbit.oak.spi.state.NodeState
        Overrides:
        getChildNodeCount in class org.apache.jackrabbit.oak.spi.state.AbstractNodeState
      • getChildNodeNames

        public Iterable<String> getChildNodeNames()
        Specified by:
        getChildNodeNames in interface org.apache.jackrabbit.oak.spi.state.NodeState
        Overrides:
        getChildNodeNames in class org.apache.jackrabbit.oak.spi.state.AbstractNodeState