Package org.fenixedu.cms.domain
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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static Comparator<Page>CREATION_DATE_COMPARATORstatic Comparator<Page>PAGE_NAME_COMPARATORstatic StringSIGNAL_ARCHIVEDstatic StringSIGNAL_CREATEDstatic StringSIGNAL_DELETEDstatic StringSIGNAL_EDITEDstatic StringSIGNAL_RECOVERED
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddComponents(Component components)voidarchive()Pageclone(CloneCache cloneCache)ComponentcomponentForOid(String oid)Searches aComponentof this page by oid.static Pagecreate(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)voiddelete()StringgetAddress()org.fenixedu.bennu.core.groups.GroupgetCanViewGroup()returns the group of people who can view this site.StringgetEditUrl()StringgetRssUrl()SitegetSite()Optional<Post>getStaticPost()CMSTemplategetTemplate()CMSTemplategetTemplateFromSuper()booleanisEmbedded()booleanisPublished()booleanisStaticPage()booleanisValidSlug(String slug)A slug is valid if there are no other page on that site that have the same slug.voidrecover()voidremoveComponents(Component components)voidsetCanViewGroup(org.fenixedu.bennu.core.groups.Group group)sets the access group for this sitevoidsetName(org.fenixedu.commons.i18n.LocalizedString name)voidsetPublished(boolean published)voidsetSlug(String slug)voidsetTemplate(CMSTemplate template)-
Methods inherited from class org.fenixedu.cms.domain.Page_Base
addMenuItems, getArchivedSite, getComponentsSet, getCreatedBy, getCreationDate, getEmbedded, getMenuItemsSet, getModificationDate, getName, getPublished, getRelationCMSTemplatePage, getRelationComponentPage, getRelationPageMenuItem, getRelationPageUser, getRelationPageViewGroup, getRelationSiteArchivedPage, getRelationSitePage, getSlug, getTemplateType, getViewGroup, removeMenuItems, setArchivedSite, setCreatedBy, setCreationDate, setEmbedded, setModificationDate, setSite, setTemplateType, setViewGroup
-
Methods inherited from class pt.ist.fenixframework.core.AbstractDomainObject
checkForDeletionBlockers, deleteDomainObject, ensureOid, equals, getDeletionBlockers, getDomainModel, getExternalId, getOid, hashCode, init$Instance, makeSerializedForm, toString, writeReplace
-
-
-
-
Field Detail
-
SIGNAL_CREATED
public static final String SIGNAL_CREATED
- See Also:
- Constant Field Values
-
SIGNAL_DELETED
public static final String SIGNAL_DELETED
- See Also:
- Constant Field Values
-
SIGNAL_EDITED
public static final String SIGNAL_EDITED
- See Also:
- Constant Field Values
-
SIGNAL_ARCHIVED
public static final String SIGNAL_ARCHIVED
- See Also:
- Constant Field Values
-
SIGNAL_RECOVERED
public static final String SIGNAL_RECOVERED
- See Also:
- Constant Field Values
-
CREATION_DATE_COMPARATOR
public static final Comparator<Page> CREATION_DATE_COMPARATOR
-
PAGE_NAME_COMPARATOR
public static Comparator<Page> PAGE_NAME_COMPARATOR
-
-
Constructor Detail
-
Page
public Page(Site site, org.fenixedu.commons.i18n.LocalizedString name)
the loggedUsercreates a new Page.- Parameters:
site- sitename- name
-
-
Method Detail
-
setName
public void setName(org.fenixedu.commons.i18n.LocalizedString name)
-
setSlug
public void setSlug(String slug)
-
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:
isValidSlugin interfaceSluggable- Parameters:
slug- slug- Returns:
- true if it is a valid slug.
-
componentForOid
public Component componentForOid(String oid)
Searches aComponentof this page by oid.
-
removeComponents
public void removeComponents(Component components)
- Overrides:
removeComponentsin classPage_Base
-
addComponents
public void addComponents(Component components)
- Overrides:
addComponentsin classPage_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:
setPublishedin classPage_Base
-
setTemplate
public void setTemplate(CMSTemplate template)
- Overrides:
setTemplatein classPage_Base
-
isPublished
public boolean isPublished()
-
getRssUrl
public String getRssUrl()
-
getEditUrl
public String getEditUrl()
-
getTemplateFromSuper
public CMSTemplate getTemplateFromSuper()
-
getTemplate
public CMSTemplate getTemplate()
- Overrides:
getTemplatein classPage_Base
-
isStaticPage
public boolean isStaticPage()
-
clone
public Page clone(CloneCache cloneCache)
-
isEmbedded
public boolean isEmbedded()
-
-