Interface ResourceCollection


@ProviderType public interface ResourceCollection
The ResourceCollection represents a collection of jcr resources (nodes) which can be added/removed. The collection is also able to listen to (jcr) modifications undertaken by a certain user. this modifications respectively the modified resource is added to the list as well.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Name of the node containing filter definitions' items
    static final String
    Property name of a filter's item root path
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns collection path
    boolean
     
    list(String[] allowedNodeOrResourceTypes)
    All collection members are returned
    void
    remove(Node node)
    Remove member
  • Field Details

  • Method Details

    • list

      @Nonnull List<Node> list(String[] allowedNodeOrResourceTypes) throws RepositoryException
      All collection members are returned
      Parameters:
      allowedNodeOrResourceTypes - list of node primary or sling resource types to be considered. The selection by resource type doesn't include inheritance
      Returns:
      a list of all members
      Throws:
      RepositoryException - in case an error occurs while fetching the list.
    • remove

      void remove(Node node)
      Remove member
      Parameters:
      node - node to remove
    • getPath

      String getPath()
      Returns collection path
      Returns:
      collection path
    • hasNode

      boolean hasNode(String path)
      Parameters:
      path - path to be find
      Returns:
      true if member exist, false otherwise