Class Page

java.lang.Object
pt.ist.fenixframework.core.AbstractDomainObject
org.fenixedu.cms.domain.Page_Base
org.fenixedu.cms.domain.Page
All Implemented Interfaces:
Serializable, Cloneable, Sluggable, pt.ist.fenixframework.DomainObject

public class Page extends Page_Base implements Sluggable, Cloneable
Model for a page on a given Site.
See Also:
  • Field Details

  • Constructor Details

    • Page

      public Page(Site site, org.fenixedu.commons.i18n.LocalizedString name)
      the logged User creates a new Page.
      Parameters:
      site - site
      name - name
  • Method Details

    • getSite

      public Site getSite()
      Overrides:
      getSite in class Page_Base
    • setName

      public void setName(org.fenixedu.commons.i18n.LocalizedString name)
      Overrides:
      setName in class Page_Base
    • setSlug

      public void setSlug(String slug)
      Specified by:
      setSlug in interface Sluggable
      Overrides:
      setSlug in class Page_Base
    • isValidSlug

      public boolean isValidSlug(String slug)
      A slug is valid if there are no other page on that site that have the same slug.
      Specified by:
      isValidSlug in interface Sluggable
      Parameters:
      slug - slug
      Returns:
      true if it is a valid slug.
    • componentForOid

      public Component componentForOid(String oid)
      Searches a Component of this page by oid.
      Parameters:
      oid - the oid of the Component to be searched.
      Returns:
      the Component with the given oid if it is a component of this page and null otherwise.
    • removeComponents

      public void removeComponents(Component components)
      Overrides:
      removeComponents in class Page_Base
    • addComponents

      public void addComponents(Component components)
      Overrides:
      addComponents in class Page_Base
    • delete

      public void delete()
    • archive

      public void archive()
    • recover

      public void recover()
    • getAddress

      public String getAddress()
      Returns:
      the URL link for this page.
    • getCanViewGroup

      public org.fenixedu.bennu.core.groups.Group getCanViewGroup()
      returns the group of people who can view this site.
      Returns:
      group the access group for this site
    • setCanViewGroup

      public void setCanViewGroup(org.fenixedu.bennu.core.groups.Group group)
      sets the access group for this site
      Parameters:
      group - the group of people who can view this site
    • create

      public static Page create(Site site, Menu menu, MenuItem parent, org.fenixedu.commons.i18n.LocalizedString name, boolean published, String template, org.fenixedu.bennu.core.domain.User creator, Component... components)
    • setPublished

      public void setPublished(boolean published)
      Overrides:
      setPublished in class Page_Base
    • setTemplate

      public void setTemplate(CMSTemplate template)
      Overrides:
      setTemplate in class Page_Base
    • isPublished

      public boolean isPublished()
    • getRssUrl

      public String getRssUrl()
    • getEditUrl

      public String getEditUrl()
    • getTemplateFromSuper

      public CMSTemplate getTemplateFromSuper()
    • getTemplate

      public CMSTemplate getTemplate()
      Overrides:
      getTemplate in class Page_Base
    • isStaticPage

      public boolean isStaticPage()
    • getStaticPost

      public Optional<Post> getStaticPost()
    • clone

      public Page clone(CloneCache cloneCache)
      Specified by:
      clone in interface Cloneable
    • isEmbedded

      public boolean isEmbedded()