Interface ItemEvent

  • All Known Subinterfaces:
    CustomizableItemEvent

    public interface ItemEvent
    Used to provide update information to the calls to the isSelected method of MetadataProvider. Contains an update event for an Item, as dispatched by the Preprocessor in order to be processed by an ItemEventBuffer. All the fields pertaining to the updated Item state are reported, regardless that they are changing or confirmed with the event.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      byte[] getValueAsByteArray​(java.lang.String fieldName)
      Returns the value of a named Field as a byte array (null is a legal value too).
      java.lang.String getValueAsString​(java.lang.String fieldName)
      Returns the value of a named Field as a String object (null is a legal value too).
      boolean isSnapshot()
      Allows to distinguish between events that carry the Item initial state (the Snapshot) and events that carry state Updates.
    • Method Detail

      • getValueAsString

        @Nullable
        java.lang.String getValueAsString​(@Nonnull
                                          java.lang.String fieldName)
        Returns the value of a named Field as a String object (null is a legal value too). Returns null also if the Field is not part of the current Item state.
        Note that, in case the Data Adapter had supplied the Field value as a byte array, getting the String value of the Field involves a conversion operation through ISO-8859-1 encoding.
        Parameters:
        fieldName - A Field name.
        Returns:
        a String containing the Field value, or null.
      • getValueAsByteArray

        @Nullable
        byte[] getValueAsByteArray​(@Nonnull
                                   java.lang.String fieldName)
        Returns the value of a named Field as a byte array (null is a legal value too). Returns null also if the Field is not part of the current Item state.
        Note that, in case the Data Adapter had supplied the Field value as a String, getting the byte array value of the Field involves a conversion operation. Application code should avoid a similar case; anyway, UTF-8 encoding is used to this purpose.
        Parameters:
        fieldName - A Field name.
        Returns:
        a byte array containing the Field value, or null.
      • isSnapshot

        boolean isSnapshot()
        Allows to distinguish between events that carry the Item initial state (the Snapshot) and events that carry state Updates.
        Returns:
        true if the event carries initial state information.