88 Community Blogs: Data Model

This chapter provides information about the Community Blogs flex family hierarchy and the assets that are created for it during the process of installing the Community Blogs module.

This chapter contains the following sections:

88.1 Overview of the Blog Flex Family

The Blog flex family provides the data structure for storing blog assets and authors. The Blog flex family member organization is shown in Figure 88-1. Blog assets are stored in a four-level hierarchy.

Figure 88-1 Blog Asset Hierarchy

Description of Figure 88-1 follows
Description of "Figure 88-1 Blog Asset Hierarchy"

  • Blog Asset is used to create the unit of content that will be displayed on the website.

  • Blog Category is used to name the blog categories.

  • Blog Category Definition is used to place blog categories in hierarchical order. By default the blog category definitions are: GrandParentBlogCategory (first level), ParentBlogCategory (second level), and BlogCategory (third level):

    Description of blogs_flexhierarchy2.gif follows
    Description of the illustration blogs_flexhierarchy2.gif

  • Blog Asset Definition is used to determine a blog asset's parent. By default, a blog asset's parent is a category at the BlogCategory level (third level). The Blog Asset Definition also specifies which blog attributes make up the Blog Asset form.

  • Blog Attribute is used to create attributes, which you specify as fields for the Blog Asset and Blog Author forms.

Blog authors are stored in a flat structure, under a single category named BlogAuthors:

  • Blog Author is used to create author assets. Authors' names (and optionally images) will be displayed with the blogs they create.

  • Blog Author Category is used to name the categories of blog authors. By default, there is only one author category, named BlogAuthors, which is used to contain all the author assets.

  • Blog Author Category Definition is used to place blog author categories in hierarchical order. By default, there is only one blog author category definition (BlogAuthorCategory), which creates a flat structure (all blog author categories at the same level).

  • Blog Author Definition is used to place author assets under the parent named BlogAuthors. The Blog Author Definition also specifies which blog attributes make up the Blog Author form.

Blog filters are used for data transformation:

  • Blog Filter is used to take the data from one blog attribute, transform or evaluate it in some way, and then store the results in another blog attribute when you save the blog asset. The resulting value from a blog filter action is called a derived attribute value.

88.2 Flex Family Members

The rest of this chapter provides detailed descriptions of the default Blog flex family members:

88.2.1 Default Blog Attributes

The Blog Attribute asset type contains the following default attributes:

  • Abstract: Defines the Abstract field for the blog asset form.

  • AssetId: Is used to get the parent asset ID of the blog asset. Since the blog asset can be assigned to multiple blog categories under the same parent blog category, this attribute is used to find all blog categories to which the current blog asset belongs.

  • Author: Defines the Author field of the blog asset form.

  • BlogAuthorFullName: Defines the Full Name field of the blog author form.

  • BlogAuthorImage: Defines the Author Profile Image field of the blog author form.

  • BlogAuthorImageHeight: Is used to identify the default height of an uploaded author image.

  • BlogAuthorImageMimeType: Is used by the Blog Author filters to identify the media type (for example, jpeg or .gif) of an uploaded author image.

  • BlogAuthorImageWidth: Is used to identify the default width of an uploaded author image.

  • BlogAuthorLargeThumbImage: Is used to render the large thumbnail of the author image in the blog author form.

  • BlogAuthorLThumbHeight: Is used to specify the appropriate height for the large thumbnail of the uploaded author image.

  • BlogAuthorLThumbWidth: Is used to specify the appropriate width for the large thumbnail of the uploaded author image.

  • BlogAuthorSmallThumbImage: Is used to render the small thumbnail of the uploaded author image.

  • BlogAuthorSThumbHeight: Is used to specify the appropriate height for the small thumbnail of the uploaded author image.

  • BlogAuhtorSThumbWidth: Is used to specify the appropriate width for the small thumbnail of the uploaded author image.

  • Body: Defines the Blog Body field for the blog asset form.

  • Category: Defines the Blog Category field for the blog asset form.

  • Date: Defines the Blog Date and Time field for the blog asset form.

  • GrandParentCategory: Is used to retrieve the top most category to which the blog asset belongs. The GrandParentCategory encapsulates the parent and asset categories.

  • GrandParentDescription: Contains the description for the grandparent category to which the blog asset belongs.

  • ParentCategory: Is similar in concept to the GrandParentCategory, only it contains the category information about the parent.

  • ParentDescription: Contains the description of the parent category to which the blog asset belongs.

The default attributes can be used as a quick start for your own site's blog functionality. You can also create new attributes, and modify or delete the default attributes to fit your requirements. For more information, see Section 90.1, "Customizing the Blog Asset Form" in Chapter 90, "Community Blogs: Customizing Blog Components."

88.2.2 Default Blog Category Definitions and Blog Categories

The Blog Category Definition asset type contains the following definitions: GrandParentBlogCategory, ParentBlogCategory, and BlogCategory. Each definition specifies the level at which a category can be placed (Figure 88-2).

Figure 88-2 Category Levels

Description of Figure 88-2 follows
Description of "Figure 88-2 Category Levels"

BlogCategory defines the third level of categories. All blog assets belong to categories at the BlogCategory level. A given blog asset can belong to many blog categories under the same ParentBlogCategory.

The Blog Category asset type is used to name categories and place them in hierarchical order (by means of the blog category definitions described above). The Blog Category asset type contains the following grandparent categories: Sports Blogs and Technology Blogs (as shown in Figure 88-3). Each grandparent category can contain multiple parent categories. Each parent category can contain multiple blog categories, and each blog category can contain multiple blog assets. Figure 88-3 displays a sample tree with the default categories and blog assets.

Note:

Blog assets cannot have more than one distinct inherited value for a single-valued attribute. Therefore, if you are going to assign a blog asset to more than one blog category, make sure the blog categories are under the same parent blog category.

Figure 88-3 Sample Blog Category Hierarchy

Description of Figure 88-3 follows
Description of "Figure 88-3 Sample Blog Category Hierarchy"

When creating blog categories for the blog assets of your website, you can reuse the hierarchy that is defined by the default blog category definitions. To display the hierarchy of blog categories and blog assets in the WebCenter Sites tree (as shown in Figure 88-3), you will need to create a blog tree tab. For instructions on enabling blog components see the Oracle Fusion Middleware WebCenter Sites Administrator's Guide.

88.2.3 Default Blog Asset Definition and Blog Assets

The Blog flex family contains one blog asset definition, named BlogAssetDef, which specifies that a blog asset can belong to multiple blog categories (third-level categories) under the same parent blog category (second-level category). BlogAssetDef also specifies attributes that make up the blog asset's form:

  • Abstract

  • Author

  • Body

  • Date

  • Title

The Blog Asset asset type supplies the form that content providers fill out to create blog assets. Figure 88-4 displays BlogAssetDef and shows how its parameters are used in the Blog Asset form.

Figure 88-4 Relationship Between Blog Asset Definition and Blog Asset Form

Description of Figure 88-4 follows
Description of "Figure 88-4 Relationship Between Blog Asset Definition and Blog Asset Form"

If you create your own attributes for the blog asset form, you will need to add those attributes to the default blog asset definition. For instructions on creating new attributes and adding them to the blog asset definition, see Section 90.1, "Customizing the Blog Asset Form" in Chapter 90, "Community Blogs: Customizing Blog Components."

88.2.4 Default Blog Author Category Definition and Blog Author Category

By default, the Blog flex family contains one blog author category definition, named BlogAuthorCategory, which defines a flat structure for storing blog authors. The Blog Author Category asset type is used to name the categories. Only one blog author category exists, named BlogAuthors, which is used to contain all the author assets created (or shared) on the site.

Figure 88-5 Sample Blog Author Category Hierarchy

Description of Figure 88-5 follows
Description of "Figure 88-5 Sample Blog Author Category Hierarchy"

88.2.5 Default Blog Author Definition and Blog Authors

The Blog flex family contains one blog author definition, BlogAuthorDef, which specifies that blog author assets can belong to only the BlogAuthors category. BlogAuthorDef also specifies attributes that make up the blog author form:

  • Full Name

  • Author Profile Image

In addition, BlogAuthorDef specifies filters that retrieve the author's full name, and large and small thumbnails of the image (optional).

The Blog Author asset type supplies the form that administrators fill out to create blog author assets for display next to published blogs. Blog authors can modify their names and images.

Figure 88-6 displays BlogAuthorDef and shows how its parameters are used in the blog author form.

Figure 88-6 Relationship Between Blog Author Definition and Blog Author Form

Description of Figure 88-6 follows
Description of "Figure 88-6 Relationship Between Blog Author Definition and Blog Author Form"

88.2.6 Default Blog Filters

The Blog flex family contains default filters, which use the field copier filter to copy the content of the system-defined attributes into user-defined flex attributes.

The default blog filters are:

  • GetAssetId: Applied to the Blog Category Definition to retrieve the ID of the blog asset.

  • GetAuthorUsername: Defined in the Blog Author Definition and applied to the Blog Author to dynamically generate the full name of a given blog's author.

  • GetCategory: Applied to the Blog Category Definition to retrieve the appropriate category associated with the blog asset.

  • GetGrandParentCategory: Applied to the GrandParentBlogCategory to retrieve the grandparent category associated with a given blog asset.

  • GetGrandParentDesc: Applied to the GrandParentBlogCategory to retrieve the grandparent category's attributes.

  • GetLargeThumbnail: Defined in the Blog Author Definition and applied to the Blog Author to dynamically generate the large thumbnail image of a given blog's author.

  • GetParentCategory: Applied to the ParentBlogCategory to retrieve the parent category associated with a given blog asset.

  • GetParentDesc: Applied to the ParentBlogCategory to retrieve the parent category's attributes.

  • GetSmallThumbnail: Defined in the Blog Author Definition and applied to the Blog Author to dynamically generate the small thumbnail image of a given blog's author.

For instructions on creating additional filters for blog assets, see Section 17.2, "Defining a Flex Filter Class and Creating a Flex Filter Asset."