Creating the Feed Data Source Application Class
The feed data source application class manages all aspects of data collection and data security. This application class encapsulates all business logic about how to define feed definitions and how to gather feed data.
This section discusses the steps involved to create a feed data source application class for your new feed data type.
Implement a new class that extends the PTFP_FEED:DataSource:DataSource base class.
This example illustrates the DataSource base class in the PTFP_FEED application package.

When implementing the methods of the DataSource class, consider these method types:
Required methods
Recommended methods
Optional methods
Required Methods
This table describes the DataSource methods that you must implement:
Method |
Purpose |
---|---|
|
Clone the data source object. |
|
Return the feed content URL. |
|
Return the allowed list of viewer roles, permission lists, or both. |
|
Validate whether the current user has permission to view the feed. |
|
Initialize the data source setting collection and other class properties. |
|
Validate data source setting values and generate a data source parameter list accordingly. |
|
Collect data based on user permissions and fill in the feed document. |
Recommended Methods
This table describes the DataSource methods that you should consider implementing:
Method |
Purpose |
---|---|
|
Validate whether the current user has permission to administer the feed. |
|
The clone method uses protected methods for copying class properties. |
Optional Methods
This table describes the DataSource methods that you might consider implementing:
Method |
Purpose |
---|---|
|
Perform tasks after saving the feed definition. |
|
Perform tasks before deleting the feed definition. |
|
Return data source setting details as HTML. |
|
Return data source parameter details as HTML. |
You should use these protected methods to set read-only flags:
setDataSourceType
setSettingsCompleted
setAllowRealTimeFeedSecurity