Interface StructureGenerator.Inserter

All Superinterfaces:
StructureGenerator
All Known Subinterfaces:
ActionHandlingGenerator.Inserter
All Known Implementing Classes:
AbstractGenerator.Inserter
Enclosing interface:
StructureGenerator

@PublicSpi public static interface StructureGenerator.Inserter extends StructureGenerator
An implementor inserts new items into the containing structure.
  • Method Details

    • createFragment

      void createFragment(@NotNull Map<String,Object> parameters, @NotNull StructureGenerator.GenerationContext context, @NotNull ItemForestBuilder builder)

      Builds a forest fragment. The Structure core inserts the fragment right after the row with this Inserter.

      Security Note

      In spite of StructureItemType#isVisible() method hides items those a user is not permitted to see, the Inserter implementation ought to check an item visibility before insertion. If the implementation inserts an invisible item, the Structure hides it from the user, but the Structure does not hide the item from a subsequent generator (if any). So the generator may disclose a private data from the item by aggregating it or in some similar way.
      Parameters:
      parameters - configuration parameters. See StructureGenerator.buildParametersFromForm(Map, ErrorCollection)
      context - a generation context
      builder - a forest builder