Interface RepositoryModelItemType

All Superinterfaces:
ModelItemType, PluginAware
All Known Subinterfaces:
ComplexRepositoryElementType<T>, RepositoryElementType<T>, RepositoryModelItemGroupType
All Known Implementing Classes:
BinaryRepositoryElementType, BooleanRepositoryElementType, CompositeRepositoryModelItemType, ContentContentElementType, ContentRepositoryElementType, DateRepositoryElementType, DateTimeRepositoryElementType, DoubleRepositoryElementType, FileContentElementType, FileRepositoryElementType, GeocodeRepositoryElementType, HTMLRichTextContentElementType, HTMLRichTextRepositoryElementType, LongRepositoryElementType, MultilingualStringRepositoryElementType, PasswordRepositoryElementType, ReferenceContentElementType, ReferenceRepositoryElementType, RepeaterRepositoryModelItemType, RichTextContentElementType, RichTextRepositoryElementType, StringRepositoryElementType, UserRepositoryElementType

public interface RepositoryModelItemType extends ModelItemType
Interface for types of model items stored in the repository
  • Field Details

  • Method Details

    • isCompatible

      default boolean isCompatible(RepositoryData parentData, String name) throws UnknownDataException
      Checks if the value in the given repository data is compatible with the item type
      Parameters:
      parentData - repository data containing the data to check
      name - the name of the data to check
      Returns:
      true if the data type matches the current type, false otherwise
      Throws:
      UnknownDataException - if there is no data in the parent repository data with this name
    • getRepositoryDataType

      Retrieves the type of repository data used for this type
      Returns:
      the type of repository data used for this type
    • isMultiple

      default boolean isMultiple(RepositoryData parentData, String name) throws UnknownDataException
      Checks if the value in the given repository data is multiple
      Parameters:
      parentData - repository data containing the data to check
      name - the name of the data to check
      Returns:
      true if the stored data is multiple, false otherwise
      Throws:
      UnknownDataException - if there is no data in the parent repository data with this name
    • hasValue

      default boolean hasValue(RepositoryData parentData, String name) throws BadItemTypeException
      Check if there is a value, even empty, in the given repository data
      Parameters:
      parentData - repository data containing the value
      name - the name of the element to check
      Returns:
      true if there is value, false otherwise
      Throws:
      BadItemTypeException - if the reading value doesn't match this element type
    • hasNonEmptyValue

      boolean hasNonEmptyValue(RepositoryData parentData, String name) throws BadItemTypeException
      Check if there is a non empty value in the given repository data
      Parameters:
      parentData - repository data containing the value
      name - the name of the element to check
      Returns:
      true if there is a non empty value, false otherwise
      Throws:
      BadItemTypeException - if the reading value doesn't match this element type
    • remove

      default void remove(ModifiableRepositoryData parentData, String name)
      Remove the value into the given repository data
      Parameters:
      parentData - repository where the value to remove is stored.
      name - the name of the element to remove