Oracle® Fusion Middleware Content Management Guide for Oracle WebLogic Portal 10g Release 3 (10.3.4) Part Number E14230-02 |
|
|
View PDF |
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 Chapter 5, "Using Content Workflows in Your WLP Repository."
This chapter includes the following sections:
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:
Property definitions. Property definitions define what type of information can be associated with content. You define the type of information to enter, any default values, whether a property is required, and so on. For more information about content type properties, see Section 6.3, "Understanding Content Type Properties."
Abstract Content types. You can create an abstract content type that can be used as a building block within other content types, but not be directly associated with content. You also create non-abstract content types that have no such restriction. For more information, see Section 6.1.2, "Using Abstract Content Types."
Content type inheritance.You can use content type inheritance to add properties to different content types. For example, you can create a content type that inherits some of its property definitions from another content type. For more information about type inheritance, see Section 6.1.1, "Using Content Type Inheritance."
Content workflow. You can associate a content types with a content workflows, which means that when you add content of a certain type, the associated workflow is initiated. By default, content types use the default workflow. For more information about content workflows, see Chapter 5, "Using Content Workflows in Your WLP Repository."
Note:
You must be using library services to use content workflows. For more information about library services, see Section 10.2, "Working with WLP Repository Content When Using Library Services."Nested Content Type Properties. You can create a property that nests a content type within the content type you are creating. When you nest a content type as a property, the properties of that nested type are viewed as multiple values for that property. For more information about nested content type properties, see Section 6.3.2, "Using Nested Content Type Properties."
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 Section 6.2, "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 Chapter 4, "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.
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 Section 6.3.2, "Using Nested Content Type Properties."
For more information about creating abstract content types, see Section 6.2.2, "Making a Content Type Abstract."
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 Chapter 5, "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 Section 10.2.1, "Overview of Library Services."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 Oracle Fusion Middleware Security Guide for Oracle WebLogic Portal.You create content types within the WebLogic Portal Administration Console.
To create a new content type:
From the main menu of the WebLogic Portal Administration Console, select Content > Content Management.
Select Manage | Types.
In the resources tree, select the repository in which you want to create a type. Figure 6-1 shows an example window.
Figure 6-1 Types Tab within the Manage | Types View
Within Browse Types, click Add Type.
In the Add Type dialog, enter a name and description for your content type.
Optionally, select a content type from which to inherit additional content properties. For more information, see Section 6.1.1, "Using Content Type Inheritance."
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.Optionally, select a workflow to use for this content type.
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 Chapter 5, "Using Content Workflows in Your WLP Repository."
When finished, click Create Type.
The Browse tab displays the new type.
You can make a content type abstract. For more information about abstract content types, see Section 6.1.2, "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 Section 6.2, "Working with Content Types."
To make a content type as abstract:
From the main menu of the WebLogic Portal Administration Console, select Content > Content Management.
Select Manage | Types.
In the resources tree, select the repository in which your content type resides.
Click the content type you want to make abstract.
In the Summary tab, click Name & Status.
In the Edit dialog, select the Is Abstract check box.
Click Save.
You can delete a content type from your repository under certain circumstances. Specifically, you cannot delete a content type under the following conditions:
The content type has been associated with content.
The content type has been inherited by another content type.
The content type is used as a nested content type property.
To delete a content type:
In the main menu of the WebLogic Portal Administration Console, select Content > Content Management.
Click Manage | Types.
In the resources tree, right-click the content type and select Delete from the pop-up menu.
A pop-up window displays asking you to confirm that you want to delete the content type. If you want to proceed, click Delete.
In the Delete confirmation dialog, click Delete.
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 Section 6.3.7, "Defining Content Properties for Interaction Management."
Note:
For more information about interaction management, see the Oracle Fusion Middleware Interaction Management Guide for Oracle WebLogic Portal.Property definitions for content type properties include multiple attributes, such as data types, primary properties, default values, and read-only and searchable options.
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 Section 6.3.2, "Using Nested Content Type Properties." |
Link |
A data type that contains a link to another content item within the Virtual Content Repository. |
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 Section 6.3.8, "Define the Properties of a Content Type."
Figure 6-3 Example of a Nested Content Type Property
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 Oracle Fusion Middleware Database Administration Guide for Oracle WebLogic Portal. 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). |
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.
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.
It is not possible to have a content type inherit a primary property or to include a primary property within a nested content type.
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 Section 6.3.8, "Define the Properties of a Content Type."
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 Section 6.3.8, "Define the Properties of a Content Type."
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 Oracle Fusion Middleware Interaction Management Guide for Oracle WebLogic Portal.
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 Section 6.1.2, "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:
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 |
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 |
adAltText |
String |
Specifies a text string for the |
adBorder |
Integer |
Specifies the value for the border attribute of the |
After creating a content type, you need to define the content properties for that type.
From the main menu of the WebLogic Portal Administration Console, select Content > Content Management.
Select Manage | Types.
In the resources tree, select the content type to which you want to add a property. See Figure 6-5.
Figure 6-5 The Types Tab within the Manage Types Window
Click Add Property. See Figure 6-6.
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 Section 6.3.1, "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.Click Next. The Add Property Dialog appears, as shown in Figure 6-7.
Enter a name for the property you are creating.
Select the property options you want to assign to this property. For more information about these options, see Section 6.3.3, "Property Options."
If you want this property to hold more than one value, select Allow Multiple Values.
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.
To add values, click Add Value Choices.
In the Value Choices dialog, enter the values you need and, if required, select a default value.
Click Save.
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:
From the main menu of the WebLogic Portal Administration Console, select Content > Content Management.
Select Manage | Content.
In the resources tree, select the folder that you want to modify.
Click the Summary tab.
If using library services, click Check Out in the Versioning & Workflow section.
Click the Properties tab.
For the beatools_defaultview property, select the Edit check box and click Edit.
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 Section 10.2.7, "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\
When finished making your selection, click Save.
If using library services, check in your changes.
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 Oracle Fusion Middleware Interaction Management Guide for Oracle WebLogic Portal.
The following are included content types and the corresponding property definitions. You can re-create these properties in your own types.
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. |
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. |
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. |
|
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. |
The image content type can be associated with simple image content. Table 6-7 shows the properties for the image 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. |
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 Section 6.1.1, "Using Content Type Inheritance."