Class CMSComponent

java.lang.Object
io.goobi.viewer.model.cms.pages.content.CMSComponent
All Implemented Interfaces:
Serializable, Comparable<CMSComponent>

public class CMSComponent extends Object implements Comparable<CMSComponent>, Serializable
See Also:
  • Constructor Details Link icon

  • Method Details Link icon

    • getPersistentComponent Link icon

      public PersistentCMSComponent getPersistentComponent()
      Returns:
      the persistentComponent
    • setPublicationState Link icon

      public void setPublicationState(ContentItemPublicationState publicationState)
      Parameters:
      publicationState -
    • getPublicationState Link icon

      public ContentItemPublicationState getPublicationState()
    • setOrder Link icon

      public void setOrder(int order)
      Parameters:
      order -
    • getOrder Link icon

      public Integer getOrder()
    • addContentItem Link icon

      public boolean addContentItem(CMSContentItem item)
      Parameters:
      item -
      Returns:
      true if item added successfully; false otherwise
    • removeContentItem Link icon

      public boolean removeContentItem(CMSContentItem item)
      Parameters:
      item -
      Returns:
      true if item removed successfully; false otherwise
    • getContentItems Link icon

      public List<CMSContentItem> getContentItems()
    • getFirstContentItem Link icon

      public CMSContentItem getFirstContentItem()
    • getFirstContentOfType Link icon

      public <T extends CMSContent> T getFirstContentOfType(Class<? extends CMSContent> clazz)
    • getAllContentOfType Link icon

      public <T extends CMSContent> List<T> getAllContentOfType(Class<? extends CMSContent> clazz)
    • getFirstContentItem Link icon

      public CMSContentItem getFirstContentItem(String className)
    • getContentItem Link icon

      public CMSContentItem getContentItem(String componentId)
    • getTranslatableContentItems Link icon

      public List<CMSContentItem> getTranslatableContentItems()
    • getJsfComponent Link icon

      public JsfComponent getJsfComponent()
    • getLabel Link icon

      public String getLabel()
    • getDescription Link icon

      public String getDescription()
    • getIconPath Link icon

      public String getIconPath()
    • getTemplateFilename Link icon

      public String getTemplateFilename()
    • isPageScope Link icon

      public boolean isPageScope()
    • compareTo Link icon

      public int compareTo(CMSComponent o)
      Specified by:
      compareTo in interface Comparable<CMSComponent>
    • getUiComponent Link icon

      public jakarta.faces.component.UIComponent getUiComponent() throws PresentationException
      Throws:
      PresentationException
    • setUiComponent Link icon

      public void setUiComponent(jakarta.faces.component.UIComponent uiComponent)
      Parameters:
      uiComponent -
    • getBackendUiComponent Link icon

      public jakarta.faces.component.UIComponent getBackendUiComponent() throws PresentationException
      Throws:
      PresentationException
    • setBackendUiComponent Link icon

      public void setBackendUiComponent(jakarta.faces.component.UIComponent backendUiComponent)
      Parameters:
      backendUiComponent -
    • getAttribute Link icon

      public CMSComponentAttribute getAttribute(String key)
      Parameters:
      key -
      Returns:
      CMSComponentAttribute
    • getBooleanAttributeValue Link icon

      public boolean getBooleanAttributeValue(String key, boolean defaultValue)
      Parameters:
      key -
      defaultValue -
      Returns:
      a boolean
    • getAttributeValue Link icon

      public String getAttributeValue(String key)
      Parameters:
      key -
      Returns:
      String
    • setAttribute Link icon

      public void setAttribute(String key, String value)
      Parameters:
      key -
      value -
    • toggleAttribute Link icon

      public void toggleAttribute(String key, String value)
      Parameters:
      key -
      value -
    • getAttributes Link icon

      public Map<String,CMSComponentAttribute> getAttributes()
    • isPublished Link icon

      public boolean isPublished()
    • setPublished Link icon

      public void setPublished(boolean published)
      Parameters:
      published -
    • isPrivate Link icon

      public boolean isPrivate()
    • setPrivate Link icon

      public void setPrivate(boolean privat)
      Parameters:
      privat -
    • togglePrivate Link icon

      public void togglePrivate()
    • togglePublished Link icon

      public void togglePublished()
    • hasAccess Link icon

      public boolean hasAccess(User user)
      Parameters:
      user -
      Returns:
      a boolean
    • getContentData Link icon

      public String getContentData(String itemId)
      Parameters:
      itemId -
      Returns:
      String
    • getContentData Link icon

      public String getContentData(String itemId, Integer width, Integer height)
      Parameters:
      itemId -
      width -
      height -
      Returns:
      String
    • hasContent Link icon

      public boolean hasContent(String itemId)
      Check whether a contentItem with the given itemId exists and is not empty
      Parameters:
      itemId -
      Returns:
      true if the contentItem with the given itemId exists and its CMSContent.isEmpty() method returns false
    • getContent Link icon

      public CMSContent getContent(String itemId)
    • setPreview Link icon

      public void setPreview(boolean preview)
      Set wether this component should be displayed when the owning page is embedded in another page, rather than on the owning page itself
      Parameters:
      preview -
    • isPreview Link icon

      public boolean isPreview()
      whether this component should be displayed when the owning page is embedded in another page, rather than on the owning page itself
      Returns:
      true if scope is CMSComponentScope.PREVIEW; false otherwise
    • getScope Link icon

      public CMSComponentScope getScope()
    • setScope Link icon

      public void setScope(CMSComponentScope scope)
    • getPersistenceId Link icon

      public long getPersistenceId()
    • getOwningPage Link icon

      public CMSPage getOwningPage()
    • isPaged Link icon

      public boolean isPaged()
    • getProperties Link icon

      public List<CMSComponent.Property> getProperties()
    • hasProperty Link icon

      public boolean hasProperty(CMSComponent.Property property)
    • toString Link icon

      public String toString()
      Overrides:
      toString in class Object