Class AbstractRepeaterEntry

java.lang.Object
org.ametys.plugins.repository.data.holder.group.impl.AbstractComposite
org.ametys.plugins.repository.data.holder.group.impl.AbstractRepeaterEntry
All Implemented Interfaces:
DataHolder, Composite, RepeaterEntry
Direct Known Subclasses:
ModelAwareRepeaterEntry

public abstract class AbstractRepeaterEntry extends AbstractComposite implements RepeaterEntry
Abstract class for repeater entries
  • Field Details

  • Constructor Details

    • AbstractRepeaterEntry

      public AbstractRepeaterEntry(RepositoryData repositoryData)
      Creates a repeater entry
      Parameters:
      repositoryData - the repository data of the repeater entry
  • Method Details

    • getPosition

      public int getPosition()
      Description copied from interface: RepeaterEntry
      Retrieves the position of this entry in the repeater
      Specified by:
      getPosition in interface RepeaterEntry
      Returns:
      the position of this entry in the repeater
    • setPosition

      protected void setPosition(int newPosition, Repeater repeater) throws IllegalArgumentException
      Sets the position of the entry in the repeater. The position starts at index 1. The position can be an integer between 1 and the repeater size to move an entry from the beginning Or the position can an integer between 0 and - the repeater size to move an entry from the end (0 means at the end, -1 means before the last one and so on)
      Parameters:
      newPosition - The new position of the entry
      repeater - the repeater containing this entry
      Throws:
      IllegalArgumentException - if the position is not between the negative and positive repeater size