Content Management Guide

     Previous  Next    Open TOC in new window    View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

Using Content Types in Your WLP Repository

Content types are used to define the metadata that you can associate with content. When content contributors add content to your content repository, they can associate the content with a content type.

For example, when adding an image file to the repository, a content contributor may choose to associate the image file with the “image” content type. The image content-type may include properties such as width and height, color or gray scale, and alternative text.

You can use content types and their associated properties to search for content within the repository. By thoughtfully planning your content types, you make it easier for portal developers to retrieve and deliver content within your portal application.

The WLP repository includes some predefined content types; you can create your own types to meet your business needs. As a best practice, design and add most of your content types before releasing the content repository to content contributors to add content. Although you can add or update content types at any time during your development process, you cannot delete a content type after it has been associated with content.

If your WLP repository uses library services, you can associated content types with content workflows. Content workflows enforce an approval and publication process for content. When you associate a content workflow with a content type, all content of that content type follows the same publication process, unless the content item has been assigned its own workflow. For example, the default workflow includes the following process: Draft > Ready for Review > Published > Retired. For more information about content workflows, see Using Content Workflows in Your WLP Repository.

This chapter includes the following sections:

 


Content Types Overview

Its recommended that you create most of your content types before any content is added to your repository. However, you can add new content types at any time. There are five important aspects of content types:

Using Content Type Inheritance

When you create a content type, you can indicate whether it inherits properties from a parent content type. When you indicate that a content type inherits properties from another type, all properties from the parent type are added to the child type. This can be useful when creating content types that require the same subset of properties. For information on creating a content type that inherits properties from another type, see Working with Content Types.

Tip: To associate a content type with a folder, you must have that content type inherit from the pre-defined CM_FOLDER_BADGE content type. For more information about folders, see Using Content Folders in Your WLP Repository..

For example, you can create a content type for all product content in your repository. This PRODUCT content type includes properties that relate to most products such as such as SKU, price, and manufacturer. Then, when you create a content type for a specific product, such as a Computer content type, you can indicate that the computer content type inherits property definitions from a parent content type called Product. This adds all of the properties from the Product content type (SKU, price, and manufacturer) to the Computer content type (the child content type). In addition to the properties inherited from the Product content type, you can add computer-specific properties to the Computer content type such as Memory, Hard Disk Space, and Processor.

With content type inheritance, each time you edit a parent content type, the children content type is also modified. Using the previous example, if you added a new property to the PRODUCT content type, that property would automatically be added to the COMPUTER content type.

Using Abstract Content Types

Abstract content types allow you to create re-usable property sets to use as building blocks in other content types. An abstract content type can only be used is within another content type, by using a nested content type or with inheritance. If you mark a content type as “abstract”, you prevent content contributors from creating content based on that content type. Use abstract content types to ensure consistency across other content types.

For example, if you want to include address information in multiple content types, you can create an abstract content type called “address” and then add that content type to another content type. For more information about nested content types, see Using Nested Content Type Properties.

For more information about creating abstract content types, see Making a Content Type Abstract.

Using Content Workflows with Content Types

When you create a content type, you can associate a content workflow with that type. This means that all content of that content type will be automatically associated with that workflow. For example, if you have a content type specific to public relations content, you can associate that content type with the custom workflow that you designed for public relations content. For more information about creating custom workflows, see Using Content Workflows in Your WLP Repository.

Note: Content workflows are only available if your WLP repository uses library services. For more information about library services, see Overview of Library Services.

 


Working with Content Types

Content types are stored and managed within the Virtual Content Repository, which is accessed with the WebLogic Portal Administration Console. You can add, modify, and delete content types.

Note: You can allow or prevent users from being able to create and modify content types using Delegated Administration. For detailed information about setting up Delegated Administration on content resources, see the WebLogic Portal Security Guide.

Creating a Content Type

You create content types within the WebLogic Portal Administration Console.

To create a new content type:

  1. From the main menu of the WebLogic Portal Administration Console, select Content > Content Management.
  2. Select Manage | Types.
  3. In the resources tree, select the repository in which you want to create a type. Figure 6-1 shows an example window.
  4. Figure 6-1 Types Tab within the Manage | Types View


    Types Tab within the Manage | Types View

  5. Within Browse Types, click Add Type.
  6. In the Add Type dialog, enter a name and description for your content type.
  7. Figure 6-2 Add Type Dialog


    Add Type Dialog

  8. Optionally, select a content type from which to inherit additional content properties. For more information, see Using Content Type Inheritance.
  9. Note: If you want to associate a content type with a folder, you must create a content type that inherits from the CM_FOLDER_BADGE content type.
  10. Optionally, select a workflow to use for this content type.
  11. Default is the name of the default workflow that comes with your WLP repository. If other workflows have been created for this repository, they display in the drop-down list in addition. For more information about workflows, see Using Content Workflows in Your WLP Repository.

  12. When finished, click Create Type.

The Browse tab displays the new type.

Making a Content Type Abstract

You can make a content type abstract. For more information about abstract content types, see Using Abstract Content Types.

When you create an abstract content type, users cannot associate content with that content type unless it is inherited or used as a nested property. For more information about inheritance and nested content types, see Working with Content Types.

To make a content type as abstract:

  1. From the main menu of the WebLogic Portal Administration Console, select Content > Content Management.
  2. Select Manage | Types.
  3. In the resources tree, select the repository in which your content type resides.
  4. Click the content type you want to make abstract.
  5. In the Summary tab, click Name & Status.
  6. In the Edit dialog, select the Is Abstract check box.
  7. Click Save.

Deleting a Content Type

You can delete a content type from your repository under certain circumstances. Specifically, you cannot delete a content type under the following conditions:

To delete a content type:

  1. In the main menu of the WebLogic Portal Administration Console, select Content > Content Management.
  2. Click Manage | Types.
  3. In the resources tree, right-click the content type and select Delete from the pop-up menu.
  4. A pop-up window displays asking you to confirm that you want to delete the content type. If you want to proceed, click Delete.
  5. In the Delete confirmation dialog, click Delete.

 


Understanding Content Type Properties

When creating content types, it is important to understand the properties you can use to define content. The property types you use determine how content is used in your portal. The more properties that are associated with a piece of content, the more granular your searches can be when retrieving content associated with that type.

You can also use content properties in conjunction with interaction management tools, such as content selectors and campaigns, to define when content expires and stops displaying to your users. For more information, see Defining Content Properties for Interaction Management.

Note: For more information about interaction management, see the WebLogic Portal Interaction Management Guide.

Property definitions for content type properties include multiple attributes, such as data types, primary properties, default values, and read-only and searchable options.

Supported Data Types

Properties can be of different data types. Each data type represents a unique definition that helps you capture specific information about content. For example, to associate content files with content, you must define a property that uses the binary data type. Users can then associate binary files (documents, graphics, and so on) with content. You can also define properties as string data types, which allows users to associate a description of the file with the content.

Table 6-1 lists the data types that can be used.

Table 6-1 Supported Data Types 
Data Type
Value Definition
Boolean
A data type that can have one of two values: true or false.
Long Integer
A 64-bit integer
Number with Decimal (Double)
A 64-bit integer that includes one decimal.
String
A variable length character string. The length of this string is dependent on limitations of the database you are using.
Date/Time
A data type that contains the date and time. When this definition is used, users can define the value using a calendar and time entry control.
Binary
A data type that contains a binary file.
Nested Content Type
A data type that contains another content type.
Nested Content Type properties cannot be marked as primary.
For more information about nested content types, see Using Nested Content Type Properties.
Link
A data type that contains a link to another content item within the Virtual Content Repository.

Using Nested Content Type Properties

You can create a property that nests a content type within the content type you are creating. When nesting a content type as a property, the properties of that nested type are grouped together to make up the value of the nested property. For example, if you create content types that require an address to be entered, you can create an address content type and then nest that content type within each content type where an address needs to be entered. Figure 6-3 shows how a nested content type displays when filling in content properties.

For details on adding a nested type property, see Define the Properties of a Content Type.

Figure 6-3 Example of a Nested Content Type Property

Example of a Nested Content Type Property

Property Options

When you define a property, you define how that property definition behaves within the context of your content type. For example, you can make a property required or read-only. Table 6-2 lists the property options that are available.

Table 6-2 Available Property Options 
Property Option
Usage
Required
Makes this property mandatory when creating content.
Read Only
Makes this property read-only. If a property is marked as read-only, its value cannot be edited.
Primary Property
Makes this property the primary property for the content type. Use primary properties within content searches and placeholders to optimize queries. For example, you can retrieve a list of content according to the primary property of its content type.
A content type can have only one primary property.
Searchable
Makes this property accessible through developer content queries. Sometimes, you will not want properties to be searchable. For example, salary data might be confidential and not searchable.
Is Explicit
Map this property value directly to a value contained in the content management database where your content is stored.
When you enable Is Explicit, you must indicate the database column within the CM_NODE database table to which you want to derive the property value. For more information about the content management tables, see the WebLogic Portal Database Guide.

Note: When a database schema modification occurs as part of adding an explicit property definition that requires modifying the CM_NODE table, you must restart the WebLogic Portal server(s).

Using Primary Properties

Portal developers use primary properties when retrieving content to display to portal users. To display binary content in your content selectors and placeholders, you must assign binary properties as the Primary Property.

Primary Properties with Nested Content Types or Content Type Inheritance

When you create a content type that inherits its properties from another content type, if the inherited content type contains a primary property, it will be unmarked as primary. See Figure 6-4.

Figure 6-4 Unmarked Primary Property

Unmarked Primary Property

It is not possible to have a content type inherit a primary property or to include a primary property within a nested content type.

Setting Property Choice Lists and Default Property Values

You can set default values for the properties you define within your content types. Default values ensure consistent data entry when content contributors add content to your repository. You can also provide choice lists and limit the entries to the values included in the choice list. For information on how to do so, see Define the Properties of a Content Type.

Using Link Properties

You can create properties that allow content contributors to associate content items. Content contributors can link to content within the same or different repositories within the Virtual Content Repository. For example, if you have related content items that are stored in different folders, you can use content link properties to create relationships among content items. These relationships are used by developers in their content queries when retrieving content to display in your portal.

Link properties can also be multi-valued to allow content contributors to link to multiple content items. For detailed instructions on adding a link property, see Define the Properties of a Content Type.

Defining Content Properties for Interaction Management

Targeting users with content is one of the most important aspects of including content in your portal. You can do this by using interaction management tools such as placeholders, content selectors, campaigns, and JSP tags. For more information about using these tools, see the WebLogic Portal Interaction Management Guide.

For example, each time an employee visits your intranet portal, you can display a different picture from the company picnic. Another example is running a campaign asking employees to renew their benefits in the internal Human Resources portal from November 1 to 30. During this period the campaign displays an Open Enrollment graphic in the portal header.

Adding specific properties to your content types can ensure that developers can take full advantage of the available interaction management tools. For example, if you want to use goal setting to end campaigns based on the number of times content is clicked, you must use the adTargetUrl, adTargetContent, or adMapName properties.

Tip: Use an abstract content type to add interaction management properties to multiple content types within your repository. To do this, create a content type that includes each interaction management property and then make the type abstract. You can then add this abstract type to any content type within your repository. See Using Abstract Content Types.

Table 6-3 describes the available properties for content types.

Table 6-3 Interaction Management Properties for Content 
Content Property
Type
Description
adTargetUrl
String
Makes an image clickable and provides a target for the clickthrough, expressed as a URL. The Event Service records the clickthrough.

Note: Depending on how you want to identify the destination of the ad clickthrough, use adTargetUrl, adTargetContent, or adMapName.

adTargetContent
String
Makes an image clickable and provides a target for the clickthrough, expressed as the content management system’s content ID. The Event Service records the clickthrough.
To view a content item’s unique ID, select the content item in the WebLogic Portal Administration Console and view the description in the Edit Content window.

Note: Depending on how you want to identify the destination of the ad clickthrough, use adTargetUrl, adTargetContent, or adMapName.

adMapName
String
Makes an image clickable using an image map; you can specify one or more targets. The value for this attribute is used in two locations:
  • In the anchor tag that makes the image clickable:
    <a href=value> <img> </a>
  • In the map definition: <map name=value>
If you specify a value for adMapName, you must also specify a value for adMap.

Note: Depending on how you want to identify the destination of the ad clickthrough, use adTargetUrl, adTargetContent, or adMapName.

adMap
String
Supplies the XHTML definition of an image map. If you specify a value for adMap, you must also specify a value for adMapName.
adWinTarget
String
Displays the target in a new pop-up window, using JavaScript to define the pop-up window. The only value supported for this attribute is newwindow.
adWinClose
String
Specifies the name of a link that closes a pop-up window. The link appears at the end of the window content.
For example, if you provide Close this window as the value for this attribute, then “Close this window” appears as a hyperlink in the last line of the pop-up window. If a visitor clicks the link, the window closes.
adAltText
String
Specifies a text string for the alt attribute of the <img> tag. If you do not include this attribute, the <img> tag does not specify an alt attribute.
adBorder
Integer
Specifies the value for the border attribute of the <img> tag. If you do not include this attribute, the border attribute is given a value of zero.

Define the Properties of a Content Type

After creating a content type, you need to define the content properties for that type.

  1. From the main menu of the WebLogic Portal Administration Console, select Content > Content Management.
  2. Select Manage | Types.
  3. In the resources tree, select the content type to which you want to add a property. See Figure 6-5.
  4. Figure 6-5 The Types Tab within the Manage Types Window


    The Types Tab within the Manage Types Window

  5. Click Add Property. See Figure 6-6.
  6. Figure 6-6 Add Property Dialog


    Add Property Dialog

  7. Select the type of property you want to add: Basic Property, Link or Nested-Type Property.
    • To add a Basic Property, select a data type from the drop-down list. For more information about data types, see Supported Data Types.
    • To add a Link property, select Link.
    • To add a Nested-Type Property, select a content type from the list.
    • Note: Nested type properties allow you to include another content type within the type you are creating. When you do this, all properties from the nested property type are added to the content type you are creating.
  8. Click Next. The Add Property Dialog appears, as shown in Figure 6-7.
  9. Figure 6-7 Add Property Dialog


    Add Property Dialog

  10. Enter a name for the property you are creating.
  11. Select the property options you want to assign to this property. For more information about these options, see Property Options.
  12. If you want this property to hold more than one value, select Allow Multiple Values.
  13. If you want users to select from a list of values that you provide, select Restrict Values. This means they can only enter a value which is included on the list you provide.
  14. To add values, click Add Value Choices.
  15. In the Value Choices dialog, enter the values you need and, if required, select a default value.
  16. Click Save.

Re-ordering Content Within a Folder Using Properties

You can change the default order used to display content within a folder by modifying the beatools_defaultview property of a folder’s content type.

To change the default order used to display content within a particular folder:

  1. From the main menu of the WebLogic Portal Administration Console, select Content > Content Management.
  2. Select Manage | Content.
  3. In the resources tree, select the folder that you want to modify.
  4. Click the Summary tab.
  5. If using library services, click Check Out in the Versioning & Workflow section.
  6. Click the Properties tab.
  7. For the beatools_defaultview property, select the Edit check box and click Edit.
  8. In the Other Properties section, select a new value for the beatools_defaultview as shown in Figure 6-8.
    • Order allows users to use a custom order; see Re-Ordering Content.
    • Name sorts the content in alphabetical order by name.
    • Last Modified sorts the content by the date it was last modified.
    • Figure 6-8 Available Property Values for the beatools_defaultview Property


      Available Property Values for the beatools_defaultview Property

  9. When finished making your selection, click Save.
  10. If using library services, check in your changes.

 


Out-of-the-Box Content Types

The WLP repository includes five ready-to-use content types. You can use these content types when you add content to your repository or you can create your own.

Although the provided content types may not meet all of your needs, they do provide examples of the properties you can include in your own custom types. In some cases, such as the ad content type, the properties used are required to take full advantage of interaction management features. For more information about interaction management, see the WebLogic Portal Interaction Management Guide.

The following are included content types and the corresponding property definitions. You can re-create these properties in your own types.

Ad Content Type

This content type is used for advertising content. It includes properties that open and close pop-up windows as well as alternative text when the portal user’s browser does not support viewing the content. Table 6-4 provides information about the properties includes in the ad content type.

Table 6-4 Ad Content Type Properties 
Property Name
Data Type
Description
content
Binary
Content binary file.
height
Long
Preferred height, in pixels.
width
Long
Preferred width, in pixels.
adTargetURL
String
The target URL for image clicks.
adWinTarget
String
If set, target render will be in a pop-up window with this name.
adWinClose
String
If set, and adWinTarget set, a close link will be included.
adWinTitle
String
If adWinTarget set, the name of the window.
adClickTarget
String
The target for a click.
adUseXhtml
String
Set to true to produce XHTML, set to false to produce HTML.
adAltText
String
The alternative text for an image.
adMapName
String
The HTML image map name for the image (required if using the adMap property).
adMap
String
The XHTML content for an image.
adBorder
String
The value of the border attribute around the image.
audience
String
Target audience for the content. Default choices are external and internal.

Article Content Type

The article content type is designed to be used for web articles. You can either associate the article file or include the text of the article as a property. Other helpful properties include start and end dates. These dates can be used when configuring campaigns. Table 6-5 details the properties includes in the article content type.

Table 6-5 Article Content Type Properties 
Property Name
Data Type
Description
contributor
String
Contributor of the article.
startDate
Date
Start date to display the article.
description
String
Description of the article.
endDate
Date
Date to stop displaying article.
file
Binary
Binary file of the article.
headline
String
Article headline.
language
String
Language in which the article is written.
articlePriority
String
Article priority.
sizeInBytes
Long
Size of article.
source
String
Source associated with the article.
status
String
Status of the article.
subject
String
Subject of the article.
textContent
String
Text content of the article, if applicable.
url
String
URL associated with the article.
title
String
Article title.

Book Content Type

Use the book content type for books that you may want to suggest to your portal users. The book content type properties allow you to associate sample content from the book as well as author and publication details. Table 6-6 shows the properties included in the book content type.

Table 6-6 Book Content Type Properties 
Property Name
Data Type
Description
abstract
Binary
Abstract of the book.
application
String
Application area of the book.
author
String
Author of the book.
city
String
City of publication.
country
String
Country of publication.
edition
String
Book edition.
email
String
Publisher e-mail information.
file
Binary
Sample chapter or any file associated with book.
isbn
String
ISBN number of the book.
keywords
String
Keywords associated with book.
link
String
Link associated with book.
note
String
Comments associated with book.
pub_date
Date
Date the book was published.
state
String
State the book was published.

Image Content Type

The image content type can be associated with simple image content. Table 6-7 shows the properties for the image content type.

Table 6-7 Image Content Type Properties 
Property Name
Data Type
Description
image_name
String
Name of image.
file
Binary
Image file.
description
String
Description of the image.

Message Content Type

Use the message content type to store message content such as alerts. Table 6-8 provides information about the properties includes in the message content type.

Table 6-8 Message Content Type Properties 
Property Name
Data Type
Description
subject
String
Subject of message.
date
Date
Date the message was posted.
from
String
Message originator.
organization
String
Organization associated with message.
group
String
Group associated with message.
id
String
Message ID.
body
String
Body text of message.
attachment
String
Attachments to message, usually a binary file.
to
String
Message destination.
message_name
String
Name of message.
link
String
Link to related URL.

CM_FOLDER_BADGE Content Type

The CM_FOLDER_BADGE content type is automatically associated with any folders you create. The properties of this type define the content as a folder instead of a content item. If you want to create content types that are associated with folders, those content types must inherit from the CM_FOLDER_BADGE content type. For more information about type inheritance, see Using Content Type Inheritance.


  Back to Top       Previous  Next