Class ExtDataBuilder

    • Constructor Detail

      • ExtDataBuilder

        public ExtDataBuilder​(DataExtension extension)
    • Method Detail

      • valueBuilder

        public ValueBuilder valueBuilder​(java.lang.String text)
        Description copied from interface: ExtensionDataBuilder
        Creates a new ValueBuilder in order to use addValue methods.

        Using same text for two values can be problematic as the text is used for id in the database.

        If you need to use InvalidateMethod with built values, lowercase 'text' and remove all whitespace. Example valueBuilder("Times Jumped"); @InvalidateMethod("timesjumped")

        Specified by:
        valueBuilder in interface ExtensionDataBuilder
        Parameters:
        text - Text that should be displayed next to the value.
        Returns:
        a new value builder.
      • addValue

        public <T> ExtensionDataBuilder addValue​(java.lang.Class<T> ofType,
                                                 java.util.function.Supplier<DataValue<T>> dataValue)
        Description copied from interface: ExtensionDataBuilder
        Compared to the other addValue method, this method allows you to use NotReadyException when building your data.
        Specified by:
        addValue in interface ExtensionDataBuilder
        Type Parameters:
        T - Type of the data.
        Parameters:
        ofType - Class for type of the data, matches what Provider annotations want.
        dataValue - Use ValueBuilder to create one.
        Returns:
        This builder.
      • getExtensionName

        public java.lang.String getExtensionName()