Interface ExtensionDataBuilder
public interface ExtensionDataBuilder
Builder API for Extension data.
Requires Capability DATA_EXTENSION_BUILDER_API
Obtain an instance with DataExtension.newExtensionDataBuilder()
Used with DataBuilderProvider
.
See documentation on how to use the API.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAll
(ExtensionDataBuilder builder) Adds all values and tables in another builder to this builder.default ExtensionDataBuilder
Add a table.default ExtensionDataBuilder
Add a table to a specific tab.Add a value.Compared to the other addValue method, this method allows you to useNotReadyException
when building your data.invalidateValue
(String text) Invalidate a value similar toInvalidateMethod
annotation, but with the text given tovalueBuilder(String)
.valueBuilder
(String text) Creates a newValueBuilder
in order to use addValue methods.
-
Method Details
-
valueBuilder
Creates a newValueBuilder
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. ExamplevalueBuilder("Times Jumped"); @InvalidateMethod("timesjumped")
- Parameters:
text
- Text that should be displayed next to the value.- Returns:
- a new value builder.
- Throws:
IllegalArgumentException
- If text is null or empty String.
-
addValue
Add a value.- Type Parameters:
T
- Type of the data.- Parameters:
ofType
- Class for type of the data, matches what Provider annotations want.dataValue
- UseValueBuilder
to create one.- Returns:
- This builder.
- Throws:
IllegalArgumentException
- If either parameter is null
-
addValue
Compared to the other addValue method, this method allows you to useNotReadyException
when building your data.- Type Parameters:
T
- Type of the data.- Parameters:
ofType
- Class for type of the data, matches what Provider annotations want.dataValue
- UseValueBuilder
to create one.- Returns:
- This builder.
- Throws:
IllegalArgumentException
- If either parameter is null
-
invalidateValue
Invalidate a value similar toInvalidateMethod
annotation, but with the text given tovalueBuilder(String)
.- Parameters:
text
- The same text that was given to the value builder.- Returns:
- This builder.
-
addTable
Add a table.- Parameters:
name
- Name of the table, used in the database.table
- Table built usingTable.builder()
color
- Color of the table- Returns:
- This builder.
-
addTable
Add a table to a specific tab.- Parameters:
name
- Name of the table, used in the database.table
- Table built usingTable.builder()
color
- Color of the tabletab
- Name of the tab, remember to defineTabInfo
.- Returns:
- This builder.
-
addAll
Adds all values and tables in another builder to this builder.- Parameters:
builder
- Builder to combine with this one.
-