package com.celements.cells.attribute;

import java.util.List;

import javax.annotation.Nullable;
import javax.validation.constraints.NotNull;

public interface AttributeBuilder {

  AttributeBuilder addEmptyAttribute(@NotNull String attrName);

  AttributeBuilder addNonEmptyAttribute(@NotNull String attrName, @Nullable String attrValue);

  AttributeBuilder addNonEmptyAttribute(@NotNull String attrName,
      @NotNull Iterable<String> attrValues);

  @NotNull
  List<CellAttribute> build();

  @NotNull
  AttributeBuilder addId(@Nullable String idname);

  @NotNull
  AttributeBuilder addCssClasses(@Nullable String cssClasses);

  @NotNull
  AttributeBuilder addStyles(@Nullable String cssStyles);

}

@@ -180,70 +180,750 @@
 %0A%0A  
-AttributeBuilder addEmptyAttribute(@NotNull String attrName);%0A
+/**%0A   * addAttribute adds %3Ccode%3EattrName%3C/code%3E with %3Ccode%3EattrValue%3C/code%3E.%0A   * If %3Ccode%3EattrValue%3C/code%3E is null or empty it adds an empty value.%0A   */%0A  @NotNull%0A  AttributeBuilder addAttribute(@NotNull String attrName, @Nullable String attrValue);%0A%0A  /**%0A   * addEmptyAttribute adds %3Ccode%3EattrName%3C/code%3E with an absent value.%0A   * For XHTML this should be rendered as e.g. %3Ccode%3Eselected=%22selected%22%3C/code%3E and for HTML5 as%0A   * e.g. %3Ccode%3Eselected%3C/code%3E%0A   */%0A  @NotNull%0A  AttributeBuilder addEmptyAttribute(@NotNull String attrName);%0A%0A  /**%0A   * addNonEmptyAttribute only adds %3Ccode%3EattrName%3C/code%3E if %3Ccode%3EattrValue%3C/code%3E is not null and%0A   * not empty. If %3Ccode%3EattrValue%3C/code%3E is null or empty it just returns.%0A   */%0A  @NotNull
 %0A  A
@@ -1015,16 +1015,27 @@
 alue);%0A%0A
+  @NotNull%0A
   Attrib

add addAttribute to AttributeBuilder