Interface Pipe

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String NN_CONF
      Node name for the pipe's configuration
      static String PN_DISTRIBUTION_AGENT
      Distribution agent (for distributing output resources)
      static String PN_EXPR
      expression of the pipe, usage depends on the pipe implementation
      static String PN_NAME
      Name of the pipe
      static String PN_PATH
      resource's path associated to the path, usage depends on the pipe implementation
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void after()
      to be executed before output is retrieved
      void before()
      to be executed before output is retrieved
      PipeBindings getBindings()
      returns the pipe's bindings
      String getDistributionAgent()
      Get Distribution agent
      @Nullable org.apache.sling.api.resource.Resource getInput()
      Get pipe current's resource *before* next execution, meaning either the configured resource, either previous' pipe output resource
      String getName()
      Return the name of that pipe
      Iterator<org.apache.sling.api.resource.Resource> getOutput()
      Executes the pipe, can be contained in a parent or not
      Object getOutputBinding()
      returns the binding output used in container pipe's expression
      SuperPipe getParent()  
      org.apache.sling.api.resource.Resource getResource()
      get the pipe configuration resource
      boolean isDryRun()
      returns true if that pipe is set not to write content
      boolean modifiesContent()
      returns true if that pipe modifies content during its execution
      void setParent​(SuperPipe pipe)
      sets the parent pipe this pipe is referred by
    • Method Detail

      • modifiesContent

        boolean modifiesContent()
        returns true if that pipe modifies content during its execution
        Returns:
        true for write / false for read
      • isDryRun

        boolean isDryRun()
        returns true if that pipe is set not to write content
        Returns:
        true if dry run, false otherwise
      • getName

        String getName()
        Return the name of that pipe
        Returns:
        name of the pipe
      • setParent

        void setParent​(SuperPipe pipe)
        sets the parent pipe this pipe is referred by
        Parameters:
        pipe - referrer that refers to this instance
      • getParent

        SuperPipe getParent()
        Returns:
        pipe's parent (can be null)
      • getInput

        @Nullable
        @Nullable org.apache.sling.api.resource.Resource getInput()
        Get pipe current's resource *before* next execution, meaning either the configured resource, either previous' pipe output resource
        Returns:
        input, configured or previous pipe
      • getResource

        org.apache.sling.api.resource.Resource getResource()
        get the pipe configuration resource
        Returns:
        Pipe configruation root resource
      • getOutputBinding

        Object getOutputBinding()
        returns the binding output used in container pipe's expression
        Returns:
        object, either value map or something else, that will be used in nashorn for computing expressions
      • getBindings

        PipeBindings getBindings()
        returns the pipe's bindings
        Returns:
        PipeBindings instance containing all bindings of that pipe
      • getOutput

        Iterator<org.apache.sling.api.resource.Resource> getOutput()
        Executes the pipe, can be contained in a parent or not
        Returns:
        iterator of resource resulting from execution of this pipe
      • before

        void before()
        to be executed before output is retrieved
      • after

        void after()
        to be executed before output is retrieved
      • getDistributionAgent

        String getDistributionAgent()
        Get Distribution agent
        Returns:
        configured distribution agent