org.modeshape.jcr.query.engine.process

## Class SecureSequence

- java.lang.Object
- - org.modeshape.jcr.query.NodeSequence
  - - org.modeshape.jcr.query.engine.process.DelegatingSequence
    - - org.modeshape.jcr.query.engine.process.SecureSequence

-     public class SecureSequence
      extends DelegatingSequence

  A `NodeSequence` implementation which only returns nodes on which an existing query context has `ModeShapePermissions.READ` permissions.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.modeshape.jcr.query.NodeSequence

      `NodeSequence.AlternateSizeBatch, NodeSequence.Batch, NodeSequence.LimitBatch, NodeSequence.MultiWidthBatch, NodeSequence.Restartable, NodeSequence.RowAccessor, NodeSequence.RowFilter, NodeSequence.SingleWidthBatch`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected JcrQueryContext` | `context`

    - ### Fields inherited from class org.modeshape.jcr.query.engine.process.DelegatingSequence

      `delegate`

    - ### Fields inherited from class org.modeshape.jcr.query.NodeSequence

      `LOGGER, NO_PASS_ROW_FILTER, PASS_ROW_FILTER`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SecureSequence(NodeSequence delegate, JcrQueryContext context)` Creates a new secure sequence over an existing sequence.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getRowCount()` Get the number of rows in this sequence.
    `NodeSequence.Batch` | `nextBatch()` Get the next batch of `NodeKey` instances.
    `String` | `toString()`

    - ### Methods inherited from class org.modeshape.jcr.query.engine.process.DelegatingSequence

      `close, isEmpty, width`

    - ### Methods inherited from class org.modeshape.jcr.query.NodeSequence

      `append, batchFilteredWith, batchOf, batchOf, batchOf, batchOfKeys, batchOfKeys, batchOfKeys, batchOfKeys, batchWithCount, copy, emptyBatch, emptySequence, filter, keyFor, limit, limit, merging, requireBoth, requireEither, skip, slice, slicingBatch, withBatch, withBatches, withBatches, withNode, withNodeKeys, withNodeKeys, withNodeKeys, withNodeKeys, withNodes, withNodes`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### context

          protected final JcrQueryContext context

  - ### Constructor Detail

    - #### SecureSequence

          public SecureSequence(NodeSequence delegate,
                        JcrQueryContext context)

      Creates a new secure sequence over an existing sequence.
      Parameters:
        `delegate` - a `NodeSequence` which is being wrapped; may not be null
        `context` - the `JcrQueryContext` for which the permissions are checked.

  - ### Method Detail

    - #### nextBatch

          public NodeSequence.Batch nextBatch()

      Description copied from class: `NodeSequence`
      Get the next batch of `NodeKey` instances.
      Overrides:
        `nextBatch` in class `DelegatingSequence`
      Returns:
        the next batch, or null if there are no more batches.

    - #### getRowCount

          public long getRowCount()

      Description copied from class: `NodeSequence`
      Get the number of rows in this sequence. If the actual number of rows is not known, this method returns -1.
      Overrides:
        `getRowCount` in class `DelegatingSequence`
      Returns:
        the number of rows, or -1 if the number of rows is not known or cannot be found with significant overhead

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.