package com.celements.pagetype.java;

import java.util.Set;

import org.xwiki.component.annotation.ComponentRole;
import org.xwiki.model.reference.DocumentReference;

import com.celements.cells.attribute.AttributeBuilder;
import com.celements.pagetype.category.IPageTypeCategoryRole;
import com.google.common.base.Optional;

@ComponentRole
public interface IJavaPageTypeRole {

  /**
   * must be a unique name accross an installation. Two implementations with identical
   * names will randomly overwrite each other.
   */
  public String getName();

  public Set<IPageTypeCategoryRole> getCategories();

  public Set<String> getCategoryNames();

  public boolean hasPageTitle();

  public boolean displayInFrameLayout();

  public String getRenderTemplateForRenderMode(String renderMode);

  public boolean isVisible();

  public boolean isUnconnectedParent();

  public Optional<String> defaultTagName();

  public void collectAttributes(AttributeBuilder attrBuilder, DocumentReference cellDocRef);

}

@@ -54,24 +54,72 @@
 til.Set;%0D%0A%0D%0A
+import javax.validation.constraints.NotNull;%0D%0A%0D%0A
 import org.x
@@ -156,24 +156,24 @@
 onentRole;%0D%0A
-
 import org.x
@@ -583,16 +583,28 @@
 %0A   */%0D%0A
+  @NotNull%0D%0A
   public
@@ -617,32 +617,44 @@
 g getName();%0D%0A%0D%0A
+  @NotNull%0D%0A
   public Set%3CIPa
@@ -685,32 +685,44 @@
 ategories();%0D%0A%0D%0A
+  @NotNull%0D%0A
   public Set%3CStr
@@ -821,32 +821,44 @@
 ameLayout();%0D%0A%0D%0A
+  @NotNull%0D%0A
   public String 
@@ -983,24 +983,36 @@
 arent();%0D%0A%0D%0A
+  @NotNull%0D%0A
   public Opt
@@ -1078,16 +1078,25 @@
 ributes(
+@NotNull 
 Attribut
@@ -1116,16 +1116,32 @@
 Builder,
+%0D%0A      @NotNull
  Documen

add NotNull annotations.