Represents a single blog as a content resource, appearing in the site tree as a folder whose children are the blog's articles. It handles admin form posts for renaming the blog, adding, editing and removing tags and categories, and copying the blog to another website, and it exposes articles filtered and sorted by tag or category for use in templates. Each child resource is a BlogArticleFolder wrapping one BlogArticle entity.

Group: Resources

Extends: AbstractCollectionResource

Implements: WebsiteBranchResource, ContentDirectoryResource, GetableResource, TitledPage, PostableResource, MoveableResource, DeletableCollectionResource, BlogResource, ParameterisedResource, WebsiteResource


Properties

PropertyReturnsDescription
articlesBlogsResourceListAll matching articles in this blog, applying the same tag and category request parameter filtering as getArticles(boolean), and also applying the current user's preferred tags when no tag parameter is present.
articleTemplateStringThe template used to render an individual article in this blog.
blogRootDirDirectoryNode
blogSiteWebsiteThe website this blog belongs to.
branchBranchThe live branch of this blog's underlying repository.
branchesList<String>Names of this blog's website's branches that have not been hidden.
breadCrumbsMap<String,String>The breadcrumb trail for this blog, as a map of path to display label, used by the admin template layer to build breadcrumb navigation. Currently always a single entry pointing back to the blogs listing.
categoriesList<String>All category titles defined on this blog, regardless of whether any article currently uses them.
categoryCountsList<ItemCount>Categories used by this blog's articles, each paired with the number of articles in that category, sorted alphabetically by category title. Each entry is an ItemCount with item and count properties.
categoryCountsByCountList<ItemCount>Categories used by this blog's articles, each paired with the number of articles in that category, sorted by that count. Each entry is an ItemCount with item and count properties.
childrenList<? extends Resource>All article resources in this blog, one BlogArticleFolder per BlogArticle. On a live (non-versioned) address only currently published articles are included; on a versioned draft address all articles are included regardless of publish state. The result is computed once and cached for the life of this instance.
contentManagedPermissionsbooleanWhether permissions on this blog's contents are managed independently per item rather than inherited as a whole. Always false for a blog folder.
dataSessionDataSession
directoryNodeDirectoryNodeThe underlying directory node backing this resource in the content repository. Not supported for a blog folder; calling it always throws.
domainNameStringThe domain name this blog's website is served on, resolved against the website's live branch so that unpublished articles remain accessible on the versioned address.
draftbooleanWhether this blog is being viewed in a draft context where unpublished articles should be visible: true when viewed under an organisation folder, or when viewed under a versioned website address, false otherwise. The result is computed once and cached for the life of this instance.
externalUrlStringThe full public URL of this blog, including protocol and host, built from the website's domain name and its force-HTTPS setting.
filesList<ContentResource>The child resources of this blog that are files rather than directories, excluding the internal .mil metadata folder.
hashStringThe content hash of the current commit on this blog's live branch, used to detect whether its content has changed.
homeTemplateStringThe template used to render this blog's home page, listing its articles.
itemTypeStringThe item type identifier of the underlying blog entity, used to distinguish blogs from other repository types.
modifiedByProfileThe profile who authored the most recent commit on this blog's live branch.
nameStringThe URL-safe, unique name of the blog, used as the path segment under which it is served (for example /blogs/{name}/).
ownerProfileProfileThe profile that owns this blog's repository, where the repository's base entity is itself a profile.
paramNamesList<String>The names of the template parameters available on this blog's home template.
parentCommonCollectionResourceThe collection resource that contains this blog, typically the blogs application folder for a website or organisation.
preferredTagsList<String>The tag titles the current user has previously chosen to follow for this blog's website, read from their saved tag preferences.
recentArticlesResourceListThe five most recently created articles in this blog, filtered the same way as getArticles: only published articles on a live address, or all articles when viewed on a versioned draft address. The result is computed once and cached for the life of this instance.
repositoryRepositoryThe underlying repository backing this blog's content and version history.
subFoldersList<ContentDirectoryResource>The child resources of this blog that are themselves directories, excluding the internal .mil metadata folder.
tagCountsList<ItemCount>Tags used by this blog's articles, each paired with the number of articles carrying that tag, sorted alphabetically by tag title. Each entry is an ItemCount with item and count properties.
tagCountsByCountList<ItemCount>Tags used by this blog's articles, each paired with the number of articles carrying that tag, sorted by that count. Each entry is an ItemCount with item and count properties.
tagsList<String>All tag titles defined on this blog, regardless of whether any article currently uses them.
titleStringThe display title of the blog, shown in menus and page headings. Falls back to whatever value was set when the blog was created; may differ from its URL-safe name.
websiteWebsiteThe website this blog belongs to, same as getBlogSite.
websiteNameStringThe name of the website this blog belongs to.

Methods

getTitle() · getChildren() · getParent() · getName() · getTags() · getCategories() · category(String cat) · isContentManagedPermissions() · getRecentArticles() · getWebsiteName() · getBlogSite() · getArticles() · getArticles(boolean ignorePrefs) · getArticles(List<String> tags) · getArticles(List<String> tags, List<String> categories) · getPreferredTags() · getCategoryCounts() · getCategoryCountsByCount() · getTagCounts() · getTagCountsByCount() · getDirectoryNode() · getSubFolders() · getFiles() · getHash() · getModifiedBy() · getBranch() · getRepository() · getOwnerProfile() · getItemType() · isDraft() · getDomainName() · getVersionedDomainName(Branch b) · getExternalUrl() · getVersionedExternalUrl(Branch b) · getBranches() · getHomeTemplate() · getArticleTemplate() · getParamNames() · getWebsite() · getBreadCrumbs()

getTitle()

Returns: String

The display title of the blog, shown in menus and page headings. Falls back to whatever value was set when the blog was created; may differ from its URL-safe name.

getChildren()

Returns: List<? extends Resource>

All article resources in this blog, one BlogArticleFolder per BlogArticle. On a live (non-versioned) address only currently published articles are included; on a versioned draft address all articles are included regardless of publish state. The result is computed once and cached for the life of this instance.

getParent()

Returns: CommonCollectionResource

The collection resource that contains this blog, typically the blogs application folder for a website or organisation.

getName()

Returns: String

The URL-safe, unique name of the blog, used as the path segment under which it is served (for example /blogs/{name}/).

getTags()

Returns: List<String>

All tag titles defined on this blog, regardless of whether any article currently uses them.

getCategories()

Returns: List<String>

All category titles defined on this blog, regardless of whether any article currently uses them.

category(String cat)

Returns: BlogCategory

Looks up a category defined on this blog by its title.

ParameterDescription
catthe category title to look up

isContentManagedPermissions()

Returns: boolean

Whether permissions on this blog's contents are managed independently per item rather than inherited as a whole. Always false for a blog folder.

getRecentArticles()

Returns: ResourceList

The five most recently created articles in this blog, filtered the same way as getArticles: only published articles on a live address, or all articles when viewed on a versioned draft address. The result is computed once and cached for the life of this instance.

getWebsiteName()

Returns: String

The name of the website this blog belongs to.

getBlogSite()

Returns: Website

The website this blog belongs to.

getArticles()

Returns: BlogsResourceList

All matching articles in this blog, applying the same tag and category request parameter filtering as getArticles(boolean), and also applying the current user's preferred tags when no tag parameter is present.

getArticles(boolean ignorePrefs)

Returns: BlogsResourceList

All matching articles in this blog, filtered by the 'tag' and 'cat' request parameters if present. Each may hold a comma separated list of tag or category names to match. When no 'tag' parameter is present and ignorePrefs is false, the current user's preferred tags (see getPreferredTags) are used instead.

ParameterDescription
ignorePrefstrue to skip applying the current user's preferred tags when no 'tag' parameter is present

getArticles(List<String> tags)

Returns: BlogsResourceList

All matching articles in this blog, filtered by tag titles rather than by request parameters. The returned list has additional methods for further filtering and sorting.

ParameterDescription
tagsthe tag titles to match, or null to include articles regardless of tag

getArticles(List<String> tags, List<String> categories)

Returns: BlogsResourceList

All articles in this blog that match both the given tags and the given categories, and that the current user is in the target group for. The result is computed once and cached for the life of this instance.

ParameterDescription
tagsthe tag titles to match, or null to match regardless of tag
categoriesthe category titles to match, or null to match regardless of category

getPreferredTags()

Returns: List<String>

The tag titles the current user has previously chosen to follow for this blog's website, read from their saved tag preferences.

getCategoryCounts()

Returns: List<ItemCount>

Categories used by this blog's articles, each paired with the number of articles in that category, sorted alphabetically by category title. Each entry is an ItemCount with item and count properties.

getCategoryCountsByCount()

Returns: List<ItemCount>

Categories used by this blog's articles, each paired with the number of articles in that category, sorted by that count. Each entry is an ItemCount with item and count properties.

getTagCounts()

Returns: List<ItemCount>

Tags used by this blog's articles, each paired with the number of articles carrying that tag, sorted alphabetically by tag title. Each entry is an ItemCount with item and count properties.

getTagCountsByCount()

Returns: List<ItemCount>

Tags used by this blog's articles, each paired with the number of articles carrying that tag, sorted by that count. Each entry is an ItemCount with item and count properties.

getDirectoryNode()

Returns: DirectoryNode

The underlying directory node backing this resource in the content repository. Not supported for a blog folder; calling it always throws.

getSubFolders()

Returns: List<ContentDirectoryResource>

The child resources of this blog that are themselves directories, excluding the internal .mil metadata folder.

getFiles()

Returns: List<ContentResource>

The child resources of this blog that are files rather than directories, excluding the internal .mil metadata folder.

getHash()

Returns: String

The content hash of the current commit on this blog's live branch, used to detect whether its content has changed.

getModifiedBy()

Returns: Profile

The profile who authored the most recent commit on this blog's live branch.

getBranch()

Returns: Branch

The live branch of this blog's underlying repository.

getRepository()

Returns: Repository

The underlying repository backing this blog's content and version history.

getOwnerProfile()

Returns: Profile

The profile that owns this blog's repository, where the repository's base entity is itself a profile.

getItemType()

Returns: String

The item type identifier of the underlying blog entity, used to distinguish blogs from other repository types.

isDraft()

Returns: boolean

Whether this blog is being viewed in a draft context where unpublished articles should be visible: true when viewed under an organisation folder, or when viewed under a versioned website address, false otherwise. The result is computed once and cached for the life of this instance.

getDomainName()

Returns: String

The domain name this blog's website is served on, resolved against the website's live branch so that unpublished articles remain accessible on the versioned address.

getVersionedDomainName(Branch b)

Returns: String

The domain name this blog's website is served on for a specific branch, resolved as a versioned address so unpublished articles on that branch remain accessible.

ParameterDescription
bthe branch to resolve the domain name for

getExternalUrl()

Returns: String

The full public URL of this blog, including protocol and host, built from the website's domain name and its force-HTTPS setting.

getVersionedExternalUrl(Branch b)

Returns: String

The full public URL of this blog for a specific branch, built from that branch's versioned domain name.

ParameterDescription
bthe branch to build the URL for

getBranches()

Returns: List<String>

Names of this blog's website's branches that have not been hidden.

getHomeTemplate()

Returns: String

The template used to render this blog's home page, listing its articles.

getArticleTemplate()

Returns: String

The template used to render an individual article in this blog.

getParamNames()

Returns: List<String>

The names of the template parameters available on this blog's home template.

getWebsite()

Returns: Website

The website this blog belongs to, same as getBlogSite.

getBreadCrumbs()

Returns: Map<String,String>

The breadcrumb trail for this blog, as a map of path to display label, used by the admin template layer to build breadcrumb navigation. Currently always a single entry pointing back to the blogs listing.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.