Class Component

java.lang.Object
pt.ist.fenixframework.core.AbstractDomainObject
org.fenixedu.cms.domain.component.Component_Base
org.fenixedu.cms.domain.component.Component
All Implemented Interfaces:
Serializable, Cloneable, pt.ist.fenixframework.DomainObject
Direct Known Subclasses:
ListCategoryPosts_Base, StaticPost_Base, StrategyBasedComponent_Base

public abstract class Component extends Component_Base implements Cloneable
See Also:
  • Field Details

  • Constructor Details

    • Component

      public Component()
      The logged User creates a new component.
  • Method Details

    • register

      public static void register(Class<?> c)
      Registers a new class has a component.
      Parameters:
      c - the class being registered as a component.
    • forType

      public static ComponentDescriptor forType(String type)
      Searches for the class of a component with a given type.
      Parameters:
      type - the type of the component.
      Returns:
      the class of the component with the given type.
    • availableComponents

      public static com.google.gson.JsonArray availableComponents(Site site)
    • getName

      public String getName()
      Returns:
      the name of the component.
    • getDescription

      public String getDescription()
      Returns:
      the description of the component.
    • getType

      public String getType()
      Overrides:
      getType in class Component_Base
      Returns:
      the type of the component.
    • handle

      public abstract void handle(Page page, TemplateContext componentContext, TemplateContext globalContext)
      Provides the necessary info needed to render the component on a given page and context.
      Parameters:
      page - the page where the component will be rendered.
      componentContext - local context for the component.
      globalContext - global context where the component is being rendered.
    • clone

      public abstract Component clone(CloneCache cloneCache)
      Specified by:
      clone in interface Cloneable
    • delete

      public void delete()
    • componentType

      public Class<?> componentType()
    • forType

      public static Component forType(Class<? extends CMSComponent> type)
    • json

      public abstract com.google.gson.JsonObject json()