Package org.fenixedu.cms.domain
Class Site
java.lang.Object
pt.ist.fenixframework.core.AbstractDomainObject
org.fenixedu.cms.domain.Site_Base
org.fenixedu.cms.domain.Site
- All Implemented Interfaces:
Serializable,Cloneable,Sluggable,Wrappable,pt.ist.fenixframework.DomainObject
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class pt.ist.fenixframework.core.AbstractDomainObject
pt.ist.fenixframework.core.AbstractDomainObject.SerializedForm -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Comparator<Site>static final Comparator<Site>static final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionarchivedPageForSlug(String slug) archivedPostForSlug(String slug) categoryForSlug(String slug) booleanclone(CloneCache cloneCache) voiddelete()static Sitesearches for aSiteby slug.org.fenixedu.bennu.core.groups.Groupreturns the group of people who can view this site.getOrCreateCategoryForSlug(String slug, org.fenixedu.commons.i18n.LocalizedString name) getTheme()booleanbooleanisValidSlug(String slug) makeWrap()menuForOid(String oid) menuForSlug(String slug) pageForSlug(String slug) postForSlug(String slug) voidpushActivity(SiteActivity siteActivity) voidsetCanViewGroup(org.fenixedu.bennu.core.groups.Group group) sets the access group for this sitevoidvoidsetName(org.fenixedu.commons.i18n.LocalizedString name) saves the name of the site and creates a new slug for the site.voidsetNameToSuper(org.fenixedu.commons.i18n.LocalizedString name) voidvoidvoidUpdates the site's slug and it's respective MenuFunctionality.Methods inherited from class org.fenixedu.cms.domain.Site_Base
addActivityLines, addArchivedPages, addArchivedPosts, addCategories, addFiles, addMenus, addPages, addPost, addRoles, getActivityLinesSet, getAlternativeSite, getAnalyticsAccountId, getAnalyticsCode, getArchivedPagesSet, getArchivedPostsSet, getBennu, getBuilder, getCategoriesSet, getCreatedBy, getCreationDate, getDefaultRoleTemplate, getDescription, getEmbedded, getFilesSet, getFolder, getFunctionality, getInitialPage, getLastActivityLine, getMenusSet, getName, getPagesSet, getPostSet, getPrimaryBennu, getPublished, getRelationActivitySite, getRelationBennuSite, getRelationCategorySite, getRelationFileHasPostFiles, getRelationFolderHasSites, getRelationLastActivitySite, getRelationMenuSite, getRelationPrimarySite, getRelationSiteArchivedPage, getRelationSiteArchivedPosts, getRelationSiteBuilderSite, getRelationSiteCMSTheme, getRelationSiteHasDefaultRoleTemplates, getRelationSiteHasRoles, getRelationSiteInitialPage, getRelationSiteMenuFunctionality, getRelationSitePage, getRelationSitePost, getRelationSiteUser, getRelationSiteViewersGroup, getRelationSiteViewGroup, getRolesSet, getSlug, getStyle, getThemeType, getViewerGroup, getViewGroup, removeActivityLines, removeArchivedPages, removeArchivedPosts, removeCategories, removeFiles, removeMenus, removePages, removePost, removeRoles, setAlternativeSite, setAnalyticsAccountId, setAnalyticsCode, setBennu, setBuilder, setCreatedBy, setCreationDate, setDefaultRoleTemplate, setDescription, setEmbedded, setFunctionality, setInitialPage, setLastActivityLine, setPrimaryBennu, setPublished, setStyle, setThemeType, setViewerGroup, setViewGroupMethods inherited from class pt.ist.fenixframework.core.AbstractDomainObject
checkForDeletionBlockers, deleteDomainObject, ensureOid, equals, getDeletionBlockers, getDomainModel, getExternalId, getOid, hashCode, init$Instance, makeSerializedForm, toString, writeReplace
-
Field Details
-
SIGNAL_CREATED
- See Also:
-
SIGNAL_DELETED
- See Also:
-
SIGNAL_EDITED
- See Also:
-
NAME_COMPARATOR
-
CREATION_DATE_COMPARATOR
-
-
Constructor Details
-
Site
protected Site() -
Site
public Site(org.fenixedu.commons.i18n.LocalizedString name, org.fenixedu.commons.i18n.LocalizedString description) the loggedUsercreates a newSite.- Parameters:
name- namedescription- description
-
-
Method Details
-
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
-
fromSlug
searches for aSiteby slug.- Parameters:
slug- the slug of theSitewanted.- Returns:
- the
Sitewith the given slug if it exists - Throws:
CmsDomainException- if the site doesn't exist
-
pageForSlug
-
archivedPageForSlug
-
postForSlug
-
archivedPostForSlug
-
categoryForSlug
- Parameters:
slug- the slug of theCategorywanted.- Returns:
- the
Categorywith the given slug if it exists on this site. - Throws:
CmsDomainException- if the category is not found
-
getOrCreateCategoryForSlug
-
setSlug
-
setNameToSuper
public void setNameToSuper(org.fenixedu.commons.i18n.LocalizedString name) -
setName
public void setName(org.fenixedu.commons.i18n.LocalizedString name) saves the name of the site and creates a new slug for the site. -
updateMenuFunctionality
public void updateMenuFunctionality()Updates the site's slug and it's respective MenuFunctionality. It should be used after setting the site's description, name and slug. -
getOrderedMenusSet
-
clone
-
delete
public void delete() -
getViewPostPage
-
isDefault
public boolean isDefault()- Returns:
- true if a site is the default site, meaning if this site should respond to '/' requests
-
getViewCategoryPage
- Returns:
- the
ListCategoryPostsof thisSiteif it is defined, or null otherwise.
-
getStaticDirectory
- Returns:
- the static directory of this
Site.
-
isValidSlug
- Specified by:
isValidSlugin interfaceSluggable
-
getBaseUrl
-
getLatestPosts
-
getFullUrl
-
getRssUrl
-
getEditUrl
-
setFolder
-
checkHasEitherFunctionalityOrFolder
public boolean checkHasEitherFunctionalityOrFolder() -
getDefaultRoleTemplateRole
-
makeWrap
-
getSortedPages
-
setTheme
-
getTheme
-
pushActivity
-
getLastFiveDaysOfActivity
-
getStaticPostsStream
-
getNonStaticPostsStream
-
getNonStaticArchivedPostsStream
-