This chapter provides an overview of the feed classes and discusses:
Importing feed classes
Feed class
FeedFactory class
DataSource class
DataSourceParameter class
DataSourceParameterValue class
DataSourceSetting class
Utility class
FeedDoc class
FeedEntry class
Additional feed examples
Understanding the Feed Classes
This chapter documents the following feed classes from the PTFP_FEED application package:
Feed class
FeedFactory class
DataSource subpackage:
DataSource class
DataSourceParameter class
DataSourceParameterValue class
DataSourceSetting class
UTILITY subpackage: Utility class
XML_FEED subpackage
FeedDoc class
FeedEntry class
The subpackages and classes not documented in this chapter include:
DataSource subpackage:
FeedDataSource
GenericDataSource
PSQueryDataSource
WorklistDataSource
EXCEPTION subpackage:
DuplicateIDException class
FeedException class
ImmutableException class
InitializationException class
InvalidMethodException class
InvalidTypeException class
InvalidValueException class
NotAllowedException class
NotFoundException class
PrivilegeException class
PropertyNotSetException class
Interface subpackage:
IBGetFeed class
IBGetFeedList class
IBGetPrePubFeed class
UTILITY subpackage
Attribute class
Authorization class
Collection class
FeedRequest class
HoverMenu class
IBOperation class
Link class
PSComponent class
PublishAsRequest class
RelatedFeedsRequest class
SearchRequest class
XML_ATOM10 subpackage
A10_FeedDoc class
A10_FeedEntry class
XML_OPML subpackage
OPMLDoc class
OPMLEntry class
OPMLFolder class
See Also
PeopleTools 8.52: Feed Publishing Framework PeopleBook
PeopleTools 8.52: PeopleSoft Integration Broker PeopleBook
Importing Feed Classes
The feed classes are application classes, not built-in classes, like Rowset, Field, Record, and so on. Before you can use these classes in your PeopleCode program, you must import them into your program.
An import statement either names a particular application class or imports all the classes in a package.
Using the asterisks after the package name makes all the application classes directly contained in the named package available. Application classes contained in subpackages of the named package are not made available.
Feed Class
This section provides an overview of the Feed class and discusses:
Feed class constructor.
Feed class methods.
Feed class properties.
The Feed class provides the object representation of a feed. The class provides all the basic services for the feed definition and execution of a feed.
Feed Class ConstructorThis section presents the constructor for the Feed class. Use the FeedFactory class to create an instance of the Feed class.

Feed
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:Feed; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:Feed &thisFeed = &thisFeedFactory.createFeed("feed_ID");
See Also
Feed Class Methods
In this section, the Feed class methods are presented in alphabetical order.

delete
Syntax
delete()
Description
Use this method to delete a feed definition from the database.
Parameters
None.
Returns
A Boolean value: True if the deletion was successful, False otherwise.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:Feed; Local boolean &succeed; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:Feed &thisFeed = &thisFeedFactory.getFeed("feed_ID", ⇒ &thisFeedFactory.Utility.OPERATINGMODE_DELETION); If &thisFeed <> Null And &thisFeed.Authorized Then &succeed = &thisFeed.delete(); End-If;
See Also

equals
Syntax
equals(&Object)
Description
Use this method to evaluate the equivalency of an object with the current feed. Equivalency is established based on the value of two properties: the object's ID and the ObjectType.
Parameters
|
&Object |
Specifies the object to be compared to the current Feed object. |
Returns
A Boolean value: True if the items are equivalent, False otherwise.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:Feed; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:Feed &thisFeed1 = &thisFeedFactory.getFeed("feed_ID", ⇒ &thisFeedFactory.Utility.OPERATINGMODE_DEFAULT); Local PTFP_FEED:Feed &thisFeed2 = &thisFeedFactory.getFeed("feed_ID", ⇒ &thisFeedFactory.Utility.OPERATINGMODE_DEFAULT); If &thisFeed1.equals(&thisFeed2) Then /* Do some process */ End-If;
See Also
ID, ObjectType.

execute
Syntax
execute()
Description
Use this method to execute the current feed definition to get a FeedDoc object.
Parameters
None.
Returns
A FeedDoc object.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:Feed; import PTFP_FEED:XML_FEED:FeedDoc; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:Feed &thisFeed = &thisFeedFactory.getFeed("feed_ID", ⇒ &thisFeedFactory.Utility.OPERATINGMODE_EXECUTION); Local PTFP_FEED:XML_FEED:FeedDoc &thisFeedDoc; If &thisFeed <> Null Then &thisFeed.populatePrefData( Null); &thisFeedDoc = &thisFeed.execute(); End-If;
See Also

getAttribute
Syntax
getAttribute(attribute_ID)
Description
Use this method to get a feed attribute by ID.
Parameters
|
attribute_ID |
Specifies the ID of the Attribute object as a string. |
Returns
A feed Attribute object.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:Feed; import PTFP_FEED:UTILITY:Attribute; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:Feed &thisFeed = &thisFeedFactory.getFeed("feed_ID", ⇒ &thisFeedFactory.Utility.OPERATINGMODE_DEFAULT); Local PTFP_FEED:UTILITY:Attribute &logo; If &thisFeed <> Null Then &logo = &thisFeed.getAttribute(&thisFeedFactory.Utility.FEEDATTRIBUTE_LOGOURL); End-If;
See Also
FEEDATTRIBUTE_AUTHOR, FEEDATTRIBUTE_CLOUD, FEEDATTRIBUTE_COMPLETE, FEEDATTRIBUTE_CONTRIBUTOR, FEEDATTRIBUTE_COPYRIGHT, FEEDATTRIBUTE_EXPIRES, FEEDATTRIBUTE_ICONURL, FEEDATTRIBUTE_LOGOURL, FEEDATTRIBUTE_MANAGINGEDITOR, FEEDATTRIBUTE_MAXAGE, FEEDATTRIBUTE_PERSINSTRUCTION, FEEDATTRIBUTE_RATING, FEEDATTRIBUTE_SKIPDAYS, FEEDATTRIBUTE_SKIPHOURS, FEEDATTRIBUTE_TEXTINPUT, FEEDATTRIBUTE_TTL, FEEDATTRIBUTE_WEBMASTER, FEEDATTRIBUTE_XSL.

load
Syntax
load()
Description
Use this method to load the feed definition from the database.
Parameters
None.
Returns
A Boolean value: True if the feed definition was loaded successfully, False otherwise.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:Feed; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:Feed &thisFeed = &thisFeedFactory.getFeed("feed_ID", ⇒ &thisFeedFactory.Utility.OPERATINGMODE_DEFAULT); If &thisFeed <> Null Then &succeed = &thisFeed.load(); End-If;

loadFromTemplate
Syntax
loadFromTemplate(template_ID)
Description
Use this method to load the specified feed template definition from the database.
Parameters
|
template_ID |
Specifies the feed template ID as a string. |
Returns
A Boolean value: True if the feed template definition was loaded successfully, False otherwise.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:Feed; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:Feed &thisFeed = &thisFeedFactory.getFeed("feed_ID", ⇒ &thisFeedFactory.Utility.OPERATINGMODE_DEFAULT); If &thisFeed <> Null Then &succeed = &thisFeed.loadFromTemplate("template_ID"); End-If;

PopulateDSParamsWithDefaults
Syntax
PopulateDSParamsWithDefaults()
Description
Use this method to populate the data source parameter collection for this feed with default values only.
Parameters
None.
Returns
None.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:Feed; import PTFP_FEED:EXCEPTION:FeedException; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:Feed &thisFeed = &thisFeedFactory.getFeed("feed_ID", ⇒ &thisFeedFactory.Utility.OPERATINGMODE_DEFAULT); /* Reset the Data Source Parameters of the Feed to their defaults. */ try &thisFeed.PopulateDSParamsWithDefaults(); catch PTFP_FEED:EXCEPTION:FeedException &ex; end-try;
See Also

populatePrefData
Syntax
populatePrefData(&FeedRequest)
Description
Use this method to populate the administrator- or user-specified data source parameter values from the feed definition or from the feed request if parameters are specified there.
Parameters
|
&FeedRequest |
Specifies a FeedRequest object. |
Returns
None.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:Feed; import PTFP_FEED:XML_FEED:FeedDoc; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:Feed &thisFeed = &thisFeedFactory.getFeed("feed_ID", ⇒ &thisFeedFactory.Utility.OPERATINGMODE_EXECUTION); Local PTFP_FEED:XML_FEED:FeedDoc &thisFeedDoc; If &thisFeed <> Null Then &thisFeed.populatePrefData( Null); &thisFeedDoc = &thisFeed.execute(); End-If;

publishToSites
Syntax
publishToSites(Sites)
Description
Use this method to publish the feed definition to the specified sites.
Parameters
|
Sites |
Specifies as an array of string the list of sites to which to publish the feed definition. |
Returns
None.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:Feed; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:Feed &thisFeed = &thisFeedFactory.getFeed("feed_ID", ⇒ &thisFeedFactory.Utility.OPERATINGMODE_DEFAULT); If &thisFeed <> Null Then &thisFeed.publishToSites(CreateArray("EMPLOYEE", "CUSTOMER")); End-If;

resetFeedAttributes
Syntax
resetFeedAttributes()
Description
Use this method to reset the FeedAttributes collection.
Parameters
None.
Returns
An empty FeedAttributes collection.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:Feed; import PTFP_FEED:UTILITY:Collection; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:Feed &thisFeed = &thisFeedFactory.getFeed("feed_ID", ⇒ &thisFeedFactory.Utility.OPERATINGMODE_DEFAULT); Local PTFP_FEED:UTILITY:Collection &coll; If &thisFeed <> Null Then &coll = &thisFeed.resetFeedAttributes(); End-If;
See Also

resetFeedSecurities
Syntax
resetFeedSecurities()
Description
Use this method to reset the FeedSecurities collection.
Parameters
None.
Returns
An empty FeedSecurities collection.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:Feed; import PTFP_FEED:UTILITY:Collection; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:Feed &thisFeed = &thisFeedFactory.getFeed("feed_ID", ⇒ &thisFeedFactory.Utility.OPERATINGMODE_DEFAULT); Local PTFP_FEED:UTILITY:Collection &coll; If &thisFeed <> Null Then &coll = &thisFeed.resetFeedSecurities(); End-If;
See Also

save
Syntax
save()
Description
Use this method to save the feed definition to the database.
Parameters
None.
Returns
A Boolean value: True if the save was successful, False otherwise.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:Feed; import PTFP_FEED:UTILITY:Attribute; Local boolean &succeed; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:Feed &thisFeed = &thisFeedFactory.getFeed("feed_ID", ⇒ &thisFeedFactory.Utility.OPERATINGMODE_DEFAULT); Local PTFP_FEED:UTILITY:Attribute &logo; If &thisFeed <> Null Then &logo = &thisFeed.setAttribute(&thisFeedFactory.Utility.⇒ FEEDATTRIBUTE_LOGOURL, "", "http://myserver.com/logo.jpg"); &succeed = &thisFeed.save(); End-If;

saveAs
Syntax
saveAs(new_ID, CopyPrefData)
Description
Use this method to save the feed definition to the database using the given new ID.
Parameters
|
new_ID |
Specifies the new feed ID as a string. |
|
CopyPrefData |
Specifies as a Boolean value whether to copy administrator and user personalization data. |
Returns
A new Feed object.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:Feed; Local boolean &succeed; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:Feed &thisFeed = &thisFeedFactory.getFeed("feed_ID", ⇒ &thisFeedFactory.Utility.OPERATINGMODE_DEFAULT); Local PTFP_FEED:Feed &newFeed; If &thisFeed <> Null Then &newFeed = &thisFeed.saveAs("new_feed_id", True); End-If;

saveAsTemplate
Syntax
saveAsTemplate(new_ID, CopyPrefData)
Description
Use this method to save the feed definition to the database as a feed template definition using the given new ID.
Parameters
|
new_ID |
Specifies the new feed template ID as a string. |
|
CopyPrefData |
Specifies as a Boolean value whether to copy administrator and user personalization data. |
Returns
A Boolean value: True if the save was successful, False otherwise.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:Feed; Local boolean &succeed; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:Feed &thisFeed = &thisFeedFactory.getFeed("feed_ID", ⇒ &thisFeedFactory.Utility.OPERATINGMODE_DEFAULT); Local PTFP_FEED:Feed &newFeed; If &thisFeed <> Null Then &newFeed = &thisFeed.saveAsTemplate("new_feed_template_id", True); End-If;

setAttribute
Syntax
setAttribute(attribute_ID, Value, XML)
Description
Use this method to set the properties of a feed attribute. If the attribute ID does not exist, then a new attribute is created. If both Value and XML are empty, the attribute is deleted.
Parameters
|
attribute_ID |
Specifies the ID of the attribute as a string. |
|
Value |
Specifies the value of the attribute as a string. Use Value for translatable values such as the copyright and so on. |
|
XML |
Specifies the XML value of the attribute as a string. Use XML for nontranslatable values or values longer than 254 characters such as a URL. |
Returns
An Attribute object.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:Feed; import PTFP_FEED:UTILITY:Attribute; Local boolean &succeed; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:Feed &thisFeed = &thisFeedFactory.getFeed("feed_ID", ⇒ &thisFeedFactory.Utility.OPERATINGMODE_DEFAULT); Local PTFP_FEED:UTILITY:Attribute &logo; If &thisFeed <> Null Then &logo = &thisFeed.setAttribute(&thisFeedFactory.Utility.⇒ FEEDATTRIBUTE_LOGOURL, "", "http://myserver.com/logo.jpg"); &succeed = &thisFeed.save(); End-If;

setDataSourceById
Syntax
setDataSourceById(DataType_ID)
Description
Use this method to set the data source for the Feed object by data type ID.
Parameters
|
DataType_ID |
Specifies the data type ID to set as the data source. |
Returns
A DataSource object if successful, null otherwise.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:Feed; import PTFP_FEED:DataSource:DataSource; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:Feed &thisFeed = &thisFeedFactory.createFeed("feed_ID"); Local PTFP_FEED:DataSource:DataSource &thisDS; &thisDS = &thisFeed.setDataSourceByID("FEED");
See Also

unpublishFromSites
Syntax
unpublishFromSites(Sites)
Description
Use this method to remove the published feed definition from the specified sites.
Parameters
|
Sites |
Specifies as an array of string the list of sites from which the feed definition is to be removed. |
Returns
None.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:Feed; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:Feed &thisFeed = &thisFeedFactory.getFeed("feed_ID", ⇒ &thisFeedFactory.Utility.OPERATINGMODE_DEFAULT); If &thisFeed <> Null Then &thisFeed.unpublishFromSites(CreateArray("EMPLOYEE", "CUSTOMER")); End-If;
Feed Class Properties
In this section, the Feed class properties are presented in alphabetical order.

Authorized
Description
This property returns a Boolean value indicating whether the current user is authorized to view the feed definition.
This property is read-only.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:Feed; Local boolean &succeed; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:Feed &thisFeed = &thisFeedFactory.getFeed("feed_ID", ⇒ &thisFeedFactory.Utility.OPERATINGMODE_DELETION); If &thisFeed <> Null And &thisFeed.Authorized Then &succeed = &thisFeed.delete(); End-If;

CategoryID
Description
Use this property to set or return the category ID for the feed definition as a string.
This property is read-write.

CreateDTTM
Description
This property returns the date and time the feed definition was created as a DateTime value.
This property is read-only.

CreateNode
Description
Use this property to set or return the node on which the feed definition was created, as a string.
This property is read-write.

CreateOprID
Description
This property returns user ID of the user who created the feed definition, as a string.
This property is read-only.

CreatePortal
Description
Use this property to set or return the portal on which the feed definition was created, as a string.
This property is read-write.

DataSource
Description
Use this property to set or return a DataSource object for the feed definition.
This property is read-write.
See Also

DataTypeID
Description
This property returns the data type ID for the feed definition's data source, as a string.
This property is read-only.

Description
Description
Use this property to set or return the description of the feed definition as a string.
This property is read-write.

FeedAttributes
Description
Use this property to set or return a FeedAttributes collection.
This property is read-write.

FeedAuthorizationOprID
Description
Use this property to set or return the user ID to be used to execute the Feed object, as a string. This value overrides the current user ID depending on the authorization type.
This property is read-write.

FeedAuthorizationOprPWD
Description
Use this property to set or return the password to be used to execute the Feed object, as a string. This value overrides the password for the current user ID depending on the authorization type.
This property is read-write.

FeedAuthorizationType
Description
Use this property to set or return the authorization type to be used to execute the Feed object, as a string. This value overrides the current authorization type. The values are:
|
Value |
Description |
|
&utility.FEEDAUTHTYPE_DEFAULT |
The current authenticated user is used to execute the Feed object. |
|
&utility.FEEDAUTHTYPE_ |
The specified user is used to execute the Feed object for anonymous requests. |
|
&utility.FEEDAUTHTYPE_ALL |
The specified user is used to execute the Feed object for all requests. |
This property is read-write.

FeedCacheTime
Description
This property is not used currently.
This property is read-write.

FeedCacheType
Description
This property is not used currently.
This property is read-write.

FeedContentUrl
Description
This property returns a string representing the content URL to open the content page of the feed.
This property is read-only.

FeedFactory
Description
Use this property to set or return the FeedFactory object used by this Feed object.
This property is read-write.
See Also

FeedFormat
Description
Use this property to set or return the feed format as a string. The values are:
|
Value |
Description |
|
&utility.FEEDFORMAT_ATOM10 |
Specifies the Atom 1.0 format. |
This property is read-write.

FeedSecurities
Description
Use this property to set or return a FeedSecurities collection.
This property is read-write.

FeedSecurityType
Description
Use this property to set or return the security type for the feed as a string. The values are
|
Value |
Description |
|
&utility.FEEDSECUTYPE_PUBLIC |
Specifies public access to the feed. |
|
&utility.FEEDSECUTYPE_ |
Specifies role or permission list based access to the feed. The role or permission list is stored with the feed definition |
|
&utility.FEEDSECUTYPE_ |
Specifies real-time security in which the DataSource object is used to validate user access when the feed is requested. |
This property is read-write.

FeedTemplate
Description
Use this property to set or return a Boolean value indicating whether the current feed definition is a feed template definition.
This property is read-write.
See Also
FeedTemplate, FEEDTEMPLATE_YES.

FeedUrl
Description
This property returns a string representing the feed URL to open the feed document.
This property is read-only.

HasAdminParams
Description
This property returns a Boolean value indicating whether the feed definition has administrator-specified data source parameters.
This property is read-only.

HasUserParams
Description
This property returns a Boolean value indicating whether the feed definition has user-specified data source parameters.
This property is read-only.

IBOperationName
Description
Use this property to set or return a string representing the Integration Broker service operation name that handles requests for this feed.
This property is read-write.

ID
Description
This property returns the ID for the feed definition as a string.
This property is read-only.

LastPubDTTM
Description
This property returns the DateTime value at which the data source's execute method was called to publish feed messages to the Integration Broker queues—that is, the last publication date and time for the feed. The initial value for this property is set to 01-01-1900 12:00AM.
This property is not valid for real-time feeds or for scheduled, generic Integration Broker feeds. It is updated for all other types of scheduled feeds.
This property is read-only.

LastUpdDTTM
Description
This property returns the last update date and time for the feed definition, as a DateTime value.
This property is read-only.

LastUpdOprID
Description
This property returns the user ID of the user to have last updated the feed definition, as string.
This property is read-only.

NameSpaceID
Description
Use this property to set or return the name space ID for the feed definition, as a string. The default name space ID is based on the feed ID as follows: PTFP_node_name_feed_ID.
This property is read-write.

ObjectType
Description
This property returns the object type for the feed definition as a string. For a feed, this is a constant value: Feed.
This property is read-only.

OperatingMode
Description
This property returns the operating mode for the Feed object as a number. The values are:
|
Numeric Value |
Constant Value |
Description |
|
0 |
&utility.OPERATINGMODE_ |
A Feed object in this mode allows all operations such as save, delete, and so on. |
|
10 |
&utility.OPERATINGMODE_ |
A Feed object in this mode is for execution to get the feed document. Other operations such as save and delete are not allowed. |
|
11 |
&utility.OPERATINGMODE_ |
A Feed object in this mode is for execution to get a feed document with no feed entries. Otherwise, this mode is the same as the OPERATINGMODE_EXECUTION mode. |
|
100 |
&utility.OPERATINGMODE_ |
A Feed object in this mode is for validating user access to the feed. Most other operations such as execute, save, and delete are not allowed. |
|
1000 |
&utility.OPERATINGMODE_ |
A Feed object in this mode is to delete the feed definition. Most other operations such as execute and save are not allowed. |
This property is read-only.

OwnerID
Description
Use this property to set or return object owner ID as a string. For example, for delivered feed definitions, the owner ID is set to PT, CPA, and so on.
This property is read-write.

PublishedInSites
Description
This property returns the list of sites in which this feed has been published as an array of string.
This property is read-only.

Title
Description
Use this property to set or return the title of the feed definition as a string.
This property is read-write.

Utility
Description
Use this property to set or return the Utility object used by the Feed object.
This property is read-write.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:Feed; import PTFP_FEED:UTILITY:Utility; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:Feed &thisFeed = &thisFeedFactory.getFeed("feed_ID", ⇒ &thisFeedFactory.Utility.OPERATINGMODE_DEFAULT); Local PTFP_FEED:UTILITY:Utility &utility; If &thisFeed <> Null Then &utility = &thisFeed.Utility; End-If;
See Also
FeedFactory Class
This section provides an overview of the FeedFactory class and discusses:
FeedFactory class constructor.
FeedFactory class methods.
FeedFactory class properties.
The FeedFactory class provides methods for instantiating objects—such as, Feed objects, DataSource objects, Link objects, and Link collections—rather than instantiating these objects directly. Using the methods of the FeedFactory class avoids creating invalid objects. The FeedFactory class also provides methods to search feed definitions and return the search results as a feed HoverMenu object or OPML file
FeedFactory Class ConstructorThis section presents the constructor for the FeedFactory class.

FeedFactory
Example
import PTFP_FEED:FeedFactory; Local PTFP_FEED:FeedFactory &PTFP_FEED_FACTORY = create PTFP_FEED:FeedFactory();
See Also
FeedFactory Class Methods
In this section, the FeedFactory class methods are presented in alphabetical order.

convertFeedLinksToHoverMenu
Syntax
convertFeedLinksToHoverMenu(&Links, Flat)
Description
Use this method to convert a feed Link collection to a HoverMenu object.
Parameters
|
&Links |
Specifies the feed links as a Link collection. |
|
Flat |
A Boolean value that indicates whether to organize links in subfolders based on their categories (False), or into a root folder if there are no categories (True). The default value is False. |
Returns
A HoverMenu object if successful.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:UTILITY:SearchRequest; import PTFP_FEED:UTILITY:Collection; import PTFP_FEED:UTILITY:HoverMenu; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:UTILITY:Collection &results; Local PTFP_FEED:UTILITY:SearchRequest &request; Local PTFP_FEED:UTILITY:HoverMenu &menu; &request = create PTFP_FEED:UTILITY:SearchRequest("SearchResults"); &request.PortalName = %Portal; &results = &thisFeedFactory.getFeedLinks(&request); &menu = &thisFeedFactory.convertFeedLinksToHoverMenu(&results, True);

convertFeedLinksToOPML
Syntax
convertFeedLinksToOPML(&Links, Flat)
Description
Use this method to convert a feed Link collection to an OPMLDoc object.
Parameters
|
&Links |
Specifies the feed links as a Link collection. |
|
Flat |
A Boolean value that indicates whether to organize links in subfolders based on their categories (False), or into a root folder if there are no categories (True). The default value is False. |
Returns
An OPMLDoc object if successful.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:UTILITY:SearchRequest; import PTFP_FEED:UTILITY:Collection; import PTFP_FEED:XML_OPML:OPMLDoc; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:UTILITY:Collection &results; Local PTFP_FEED:UTILITY:SearchRequest &request; Local PTFP_FEED:XML_OPML:OPMLDoc &opmlDoc; &request = create PTFP_FEED:UTILITY:SearchRequest("SearchResults"); &request.PortalName = %Portal; &results = &thisFeedFactory.getFeedLinks(&request); &opmlDoc = &thisFeedFactory.convertFeedLinksToOPML(&results, True);

createFeed
Syntax
createFeed(feed_ID)
Description
Use this method to create a new Feed object with the given ID.
Parameters
|
feed_ID |
Specifies the feed ID of the new feed definition. |
Returns
A Feed object if successful, null otherwise.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:Feed; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:Feed &thisFeed = &thisFeedFactory.createFeed("feed_ID");
See Also

deleteFeed
Syntax
deleteFeed(feed_ID)
Description
Use this method to delete the feed definition.
Parameters
|
feed_ID |
Specifies the feed definition to be deleted. |
Returns
A Boolean value: True if the feed deletion was successful, False otherwise.
Example
import PTFP_FEED:FeedFactory; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local boolean &succeed = &thisFeedFactory.deleteFeed("feed_ID");
See Also

genFeedUrl
Syntax
genFeedUrl(feed_ID, OperationName, SecurityType)
Description
Use this method to generate the feed URL based on the feed ID and Integration Broker service operation name. If the service operation name is empty, the default service operation, PTFP_GETFEED, is used.
Parameters
|
feed_ID |
Specifies the ID for the feed definition as a string. |
|
OperationName |
Specifies the Integration Broker service operation name as a string. The default service operation is PTFP_GETFEED. |
|
SecurityType |
Specifies the security type for the feed as a string. |
Returns
A feed URL as a string.
Example
import PTFP_FEED:FeedFactory; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local string &url = &thisFeedFactory.genFeedUrl("feed_ID", "PTFP_GETFEED", ⇒ &thisFeedFactory.Utility.FEEDSECUTYPE_PUBLIC);
See Also
FEEDSECUTYPE_PUBLIC, FEEDSECUTYPE_REALTIME, FEEDSECUTYPE_SELECTED.

genUniqueFeedId
Syntax
genUniqueFeedId(seed)
Description
Use this method to generate an unique feed ID from the specified seed string.
Parameters
|
seed |
Specifies the seed as a string. |
Returns
A feed ID as a string.
Example
import PTFP_FEED:FeedFactory; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local string &id = &thisFeedFactory.genUniqueFeedId("feed_ID");

getAllPagedFeedLinks
Syntax
getAllPagedFeedLinks(feed_ID, fromDTTM, allLanguages)
Description
Use this method to get all the paged feed URLs for the specified scheduled feed definition starting from the specified date and time. If allLanguages is set to True, then feed URLs corresponding to all languages are also provided.
This method returns an array of paged feed URLs; each URL represents a specific page (message segment) of the paged feed.
Note. This method is supported for scheduled feeds only.
See Also
Parameters
|
feed_ID |
Specifies the ID for the scheduled feed definition as a string. |
|
fromDTTM |
Specifies the start date and time as a DateTime value. |
|
allLanguages |
A Boolean value that indicates whether to provide paged feed URLs for all languages. |
Returns
An array of string.
Example
import PTFP_FEED:FeedFactory; Local PTFP_FEED:FeedFactory &feedFactory_inst; Local datetime &fromDttm; Local array of string &feedLinks; &feedFactory_inst = create PTFP_FEED:FeedFactory(); &fromDttm = DateTimeValue("01/01/1900 00:00:00"); &feedLinks = &feedFactory_inst.getAllPagedFeedLinks("ADMN_USER_PROFILE", ⇒ &fromDttm, True);
See Also

getCategory
Syntax
getCategory(category_ID, ActiveOnly)
Description
Use this method to retrieve all of the category information for a category ID. The information is returned as an array of string with four elements.
Parameters
|
category_ID |
Specifies the category ID as a string. |
|
ActiveOnly |
Indicates as a Boolean value whether to retrieve the description only if the category is active. |
Returns
An array of string with four elements:
Category ID
Short description
Long description
Status
Example
import PTFP_FEED:FeedFactory; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local array of string &catagories = &thisFeedFactory.getCategory⇒ ("category_ID", True);

getDataSource
Syntax
getDataSource(DataType_ID)
Description
Use this method to create a DataSource object with the given data type ID.
Parameters
None.
|
DataType_ID |
Specifies the data type ID for the data source, as a string. |
Returns
A DataSource object if successful, null otherwise.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:DataSource:DataSource; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:DataSource:DataSource &thisDS; &thisDS = &thisFeedFactory.getDataSource("FEED");
See Also

getFeed
Syntax
getFeed(feed_ID, mode)
Description
Use this method to create a Feed object with the given feed ID.
Parameters
|
feed_ID |
Specifies the feed ID as a string. |
|
mode |
Specifies the operating mode for the feed as a number. See the values below. |
The values for the mode parameter are:
|
Numeric Value |
Constant Value |
Description |
|
0 |
&utility.OPERATINGMODE_DEFAULT |
A Feed object in this mode allows all operations such as save, delete, and so on. |
|
10 |
&utility.OPERATINGMODE_EXECUTION |
A Feed object in this mode is for execution to get the feed document. Other operations such as save and delete are not allowed. |
|
11 |
&utility.OPERATINGMODE_EXECUTION_NOENTRY |
A Feed object in this mode is for execution to get a feed document with just an empty feed header (that is, without feed entries). Otherwise, this mode is the same as the OPERATINGMODE_EXECUTION mode. |
|
100 |
&utility.OPERATINGMODE_AUTHORIZATION |
A Feed object in this mode is for validating user access to the feed. Most other operations such as execute, save, and delete are not allowed. |
|
1000 |
&utility.OPERATINGMODE_DELETION |
A Feed object in this mode is to delete the feed definition. Most other operations such as execute and save are not allowed. |
Returns
A Feed object if successful, null otherwise.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:Feed; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:Feed &thisFeed; &thisFeed = &thisFeedFactory.getFeed("feed_ID", &thisFeedFactory.Utility.⇒ OPERATINGMODE_DEFAULT);
See Also
OPERATINGMODE_AUTHORIZATION, OPERATINGMODE_DEFAULT, OPERATINGMODE_DELETION, OPERATINGMODE_EXECUTION, OPERATINGMODE_EXECUTION_NOENTRY.

getFeedDoc
Syntax
getFeedDoc(&feedRequest)
Description
Use this method to get the feed document of the feed specified by the FeedRequest object.
Parameters
|
&feedRequest |
Specifies the feed request as a FeedRequest object. |
Returns
A FeedDoc object if successful, null otherwise.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:XML_FEED:FeedDoc; import PTFP_FEED:UTILITY:FeedRequest; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:UTILITY:FeedRequest &request; Local PTFP_FEED:XML_FEED:FeedDoc &thisFeedDoc; &request = create PTFP_FEED:UTILITY:FeedRequest("FeedRequest"); &request.FeedID = "feed_ID"; &thisFeedDoc = &thisFeedFactory.getFeedDoc(&request);
See Also

getFeedLink
Syntax
getFeedLink(feed_ID)
Description
Use this method to create a Link object for the specified feed ID.
Parameters
|
feed_ID |
Specifies the feed ID as a string. |
Returns
A Link object if successful, null otherwise.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:UTILITY:Link; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:UTILITY:Link &thisFeedLink; &thisFeedLink = &thisFeedFactory.getFeedLink("feed_ID");

getFeedLinks
Syntax
getFeedLinks(&searchRequest)
Description
Use this method to search feed definitions based on user permissions and the search criteria specified in the SearchRequest object. The method returns a collection of feed Link objects. The list is sorted by the feed definition's last updated time by default.
Parameters
|
&searchRequest |
Specifies the search criteria as a SearchRequest object. |
Returns
A Link collection.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:UTILITY:SearchRequest; import PTFP_FEED:UTILITY:Collection; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:UTILITY:Collection &results; Local PTFP_FEED:UTILITY:SearchRequest &request; &request = create PTFP_FEED:UTILITY:SearchRequest("SearchResults"); &request.PortalName = %Portal; &results = &thisFeedFactory.getFeedLinks(&request);

getFeedTemplates
Syntax
getFeedTemplates(&searchRequest)
Description
Use this method to search feed template definitions based on user permissions and the search criteria specified in the SearchRequest object. The method returns a collection of feed template definitions. The list is sorted by the feed template definition's last updated time by default.
Parameters
|
&searchRequest |
Specifies the search criteria as a SearchRequest object. |
Returns
A collection of Feed objects.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:UTILITY:SearchRequest; import PTFP_FEED:UTILITY:Collection; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:UTILITY:SearchRequest &request; Local PTFP_FEED:UTILITY:Collection &feedTemplates; Local array of string &thisDSS; &request = create PTFP_FEED:UTILITY:SearchRequest("SearchResults"); &request.DataTypeID = "datatype_id"; &thisDSS = CreateArray("datasourcesetting_name", "datasourcesetting_value"); &request.DataSourceSettings.Push(&thisDSS); &feedTemplates = &PTFP_FEED_FACTORY.getFeedTemplates(&request);

getRelatedFeedsHoverMenu
Syntax
getRelatedFeedsHoverMenu(&Requests)
Description
Use this method to create a related feeds HoverMenu object from the specified FeedRequest objects.
Parameters
|
&Requests |
Specifies the related feeds requests as an array of RelatedFeedsRequest objects. |
Returns
A HoverMenu object.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:UTILITY:RelatedFeedsRequest; import PTFP_FEED:UTILITY:HoverMenu; import PTFP_FEED:UTILITY:Collection; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:UTILITY:Collection &results; Local PTFP_FEED:UTILITY:RelatedFeedsRequest &request; Local PTFP_FEED:UTILITY:HoverMenu &menu; &request = create PTFP_FEED:UTILITY:RelatedFeedsRequest("FEED"); &request.DataTypeID = "FEED"; &menu = &thisFeedFactory.getRelatedFeedsHoverMenu(CreateArray(&request));

getRelativePageLinkForFeed
Syntax
getRelativePageLinkForFeed(feed_ID, currentFeedURL, linkOption, fromDTTM)
Description
Use this method to get the specified relative paged feed URL (first, previous, next or last) for the current paged feed URL.
This method returns a paged feed URL as a string.
Note. This method is supported for scheduled feeds only.
See Also
Parameters
|
feed_ID |
Specifies the ID for the scheduled feed definition as a string. |
|
currentFeedURL |
Specifies the paged feed URL for the current page as a string. |
|
linkOption |
Specifies which page link as a string. See the values below. |
|
fromDTTM |
Specifies the start date and time as a DateTime value. |
|
Value |
Description |
|
&utlity.LINKTYPE_FIRST |
Indicates the first page of the paged feed. |
|
&utlity.LINKTYPE_PREVIOUS |
Indicates the previous page of the paged feed. |
|
&utlity.LINKTYPE_NEXT |
Indicates the next page of the paged feed. |
|
&utlity.LINKTYPE_LAST |
Indicates the last page of the paged feed. |
Returns
A string.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:UTILITY:Utility; import PTFP_FEED:UTILITY:Link; Local PTFP_FEED:FeedFactory &feedFactory_inst; Local PTFP_FEED:UTILITY:Utility &utility; Local PTFP_FEED:UTILITY:Link &link; Local datetime &fromDttm; Local string &feedLink, &nextFeedLink, &prevFeedLink, &firstFeedLink, ⇒ &lastFeedLink; &feedFactory_inst = create PTFP_FEED:FeedFactory(); &utility = &feedFactory_inst.Utility; &fromDttm = DateTimeValue("01/01/1900 00:00:00"); &link = &feedFactory_inst.getFeedLink("ADMN_USER_PROFILE"); If All(&link) Then &feedLink = &link.Href; &nextFeedLink = &feedFactory_inst.getRelativePageLinkForFeed⇒ ("ADMN_USER_PROFILE", &feedLink, &utility.LINKTYPE_NEXT, &fromDttm); &prevFeedLink = &feedFactory_inst.getRelativePageLinkForFeed⇒ ("ADMN_USER_PROFILE", &feedLink, &utility.LINKTYPE_PREVIOUS, &fromDttm); &firstFeedLink = &feedFactory_inst.getRelativePageLinkForFeed⇒ ("ADMN_USER_PROFILE", &feedLink, &utility.LINKTYPE_FIRST, &fromDttm); &lastFeedLink = &feedFactory_inst.getRelativePageLinkForFeed⇒ ("ADMN_USER_PROFILE", &feedLink, &utility.LINKTYPE_LAST, &fromDttm); End-If;
See Also
FeedFactory Class Properties
In this section, the FeedFactory class properties are presented in alphabetical order.

DataSources
Description
This property returns a collection of all data source definitions (a collection of DataSource objects).
This property is read-only.
See Also

Feeds
Description
This property returns a collection of all feed definitions (a collection of Feed objects).
This property is read-only.
See Also

Utility
Description
This property returns the Utility object used by this FeedFactory object.
This property is read-only.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:UTILITY:Utility; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:UTILITY:Utility &utility; &utility = &thisFeedFactory.Utility;
See Also
DataSource Class
This section provides an overview of the DataSource class and discusses:
DataSource class constructor.
DataSource class methods.
DataSource class properties.
The DataSource class is an abstract base class and should not be used directly. All feed data sources should extend this class.
DataSource Class ConstructorThis section presents the constructor for the DataSource class. Use the FeedFactory class to create an instance of the DataSource class.

DataSource
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:DataSource:DataSource; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:DataSource:DataSource &thisDS = &thisFeedFactory.⇒ getDataSource("DS_ID");
See Also
DataSource Class Methods
In this section, the DataSource class methods are presented in alphabetical order.

addParameter
Syntax
addParameter(DSparam_ID, Value)
Description
Use this method to create a DataSourceParameter object with the given ID and value.
Parameters
|
DSparam_ID |
Specifies the ID of the data source parameter as a string. |
|
Value |
Specifies the value of the data source parameter as a string. |
Returns
A DataSourceParameter object if successful, false otherwise.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:DataSource:DataSource; import PTFP_FEED:DataSource:DataSourceParameter; import PTFP_FEED:UTILITY:Utility; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:DataSource:DataSource &thisDS = &thisFeedFactory.⇒ getDataSource("DS_ID"); Local PTFP_FEED:DataSource:DataSourceParameter &thisDSP; If (&thisDS <> Null) Then Local PTFP_FEED:UTILITY:Utility &utility = &thisDS.Utility; &thisDSP = &thisDS.addParameter(&utility.DSPARAMETER_MAXROW, "0"); If (&thisDSP <> Null) Then &thisDSP.Name = &thisDSP.ID; &thisDSP.Description = "Description"; &thisDSP.FieldType = &utility.FIELDTYPE_NUMBER; &thisDSP.DefaultValue = "10"; &thisDSP.Value = &thisDSP.DefaultValue; &thisDSP.Required = True; End-If; End-If;
See Also
DSPARAMETER_MAXROW, DSPARAMETER_SF_MAXMINUTES, DSPARAMETER_SF_PAGING.

equals
Syntax
equals(&Object)
Description
Use this method to evaluate the equivalency of an object with the current data source. Equivalency is established based on the value of two properties: the object's ID and the ObjectType.
Parameters
|
&Object |
Specifies the object to be compared to the current DataSource object. |
Returns
A Boolean value: True if the items are equivalent, False otherwise.
See Also
ID, ObjectType.

getAttributeById
Syntax
getAttributeById(attribute_ID)
Description
Use this method to return the default feed attribute value of this data type by ID.
Parameters
|
attribute_ID |
Specifies the ID of the attribute as a string. |
Returns
An Attribute object if successful, null otherwise.
See Also
FEEDATTRIBUTE_AUTHOR, FEEDATTRIBUTE_CLOUD, FEEDATTRIBUTE_COMPLETE, FEEDATTRIBUTE_CONTRIBUTOR, FEEDATTRIBUTE_COPYRIGHT, FEEDATTRIBUTE_EXPIRES, FEEDATTRIBUTE_ICONURL, FEEDATTRIBUTE_LOGOURL, FEEDATTRIBUTE_MANAGINGEDITOR, FEEDATTRIBUTE_MAXAGE, FEEDATTRIBUTE_PERSINSTRUCTION, FEEDATTRIBUTE_RATING, FEEDATTRIBUTE_SKIPDAYS, FEEDATTRIBUTE_SKIPHOURS, FEEDATTRIBUTE_TEXTINPUT, FEEDATTRIBUTE_TTL, FEEDATTRIBUTE_WEBMASTER, FEEDATTRIBUTE_XSL.

getContentUrl
Syntax
getContentUrl()
Description
Use this method to return the content URL of the feed as a string.
Parameters
None.
Returns
The content URL of the feed as a string.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:DataSource:DataSource; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:DataSource:DataSource &thisDS = &thisFeedFactory.⇒ getDataSource("DS_ID"); Local string &FeedContentUrl = ""; If (&thisDS <> Null) Then &FeedContentUrl = &thisDS.getContentUrl(); End-If;

getDataSecurity
Syntax
getDataSecurity()
Description
Use this method to return the role- and permission list-based data security as a collection of Authorization objects.
Parameters
None.
Returns
Null if the data security type is public, otherwise a collection of Authorization objects. Each Authorization object represents a role or permission list that has access to the data.

getParameterById
Syntax
getParameterById(DSP_ID)
Description
Use this method to return the DataSourceParameter object with the given ID.
Parameters
|
DSP_ID |
Specifies the ID of the data source parameter as a string. |
Returns
A DataSourceParameter object, null if the data source parameter with the specified ID does not exist.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:DataSource:DataSource; import PTFP_FEED:DataSource:DataSourceParameter; import PTFP_FEED:UTILITY:Utility; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:DataSource:DataSource &thisDS = &thisFeedFactory.⇒ getDataSource("DS_ID"); Local PTFP_FEED:DataSource:DataSourceParameter &thisDSP; If (&thisDS <> Null) Then Local PTFP_FEED:UTILITY:Utility &utility = &thisDS.Utility; &thisDSP = &thisDS.getParameterById(&utility.DSPARAMETER_MAXROW); /* Do some processing with the data source parameter here */ End-If;
See Also
DSPARAMETER_MAXROW, DSPARAMETER_SF_MAXMINUTES, DSPARAMETER_SF_PAGING.

getParameterDetail
Syntax
getParameterDetail()
Description
Use this method to return the detailed explanation text of all data source parameters for the specific combination of data source settings.
Parameters
None.
Returns
A string with the detailed explanation text in HTML.

getSettingById
Syntax
getSettingById(DSS_ID)
Description
Use this method to return a DataSourceSetting object for the given ID.
Parameters
|
DSS_ID |
Specifies the ID of the data source setting as a string. |
Returns
A DataSourceSetting object if successful, null if the data source setting with the specified ID does not exist.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:DataSource:DataSource; import PTFP_FEED:DataSource:DataSourceSetting; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:DataSource:DataSource &thisDS = &thisFeedFactory.⇒ getDataSource("DS_ID"); Local PTFP_FEED:DataSource:DataSourceSetting &thisDSS; If (&thisDS <> Null) Then &thisDSS = &thisDS.getSettingById("DSS_ID"); /* Do some processing with the data source setting here */ End-If;
See Also

getSettingDetail
Syntax
getSettingDetail()
Description
Use this method to return the detailed explanation text of all data source settings.
Parameters
None.
Returns
A string with the detailed explanation text in HTML.

isCurrentUserAdmin
Syntax
isCurrentUserAdmin()
Description
Use this method to determine whether the current user has administrator access to the feed data.
Parameters
None.
Returns
A Boolean value: True if the user has administrator access, False otherwise.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:DataSource:DataSource; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:DataSource:DataSource &thisDS = &thisFeedFactory.⇒ getDataSource("DS_ID"); Local boolean &authorized = False; If (&thisDS <> Null) Then &authorized = &thisDS.isCurrentUserAdmin(); /* Do some processing here */ End-If;

isCurrentUserAuthorized
Syntax
isCurrentUserAuthorized()
Description
Use this method to determine whether the current user is authorized to view the feed data.
Parameters
None.
Returns
A Boolean value: True if the user is authorized to view the feed data, False otherwise.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:DataSource:DataSource; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:DataSource:DataSource &thisDS = &thisFeedFactory.⇒ getDataSource("DS_ID"); Local boolean &authorized = False; If (&thisDS <> Null) Then &authorized = &thisDS.isCurrentUserAuthorized(); /* Do some processing here */ End-If;

onDelete
Syntax
onDelete()
Description
Use this method to update related data prior to deleting a feed definition. Raise an exception to stop the deleting action.
Parameters
None.
Returns
None.

onSave
Syntax
onSave()
Description
Use this method to update related data after a feed definition has been saved.
Parameters
None.

resetParameters
Syntax
resetParameters()
Description
Use this method to reset the Parameters collection.
Parameters
None.
Returns
An empty DataSourceParameter collection.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:DataSource:DataSource; import PTFP_FEED:UTILITY:Collection; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:DataSource:DataSource &thisDS = &thisFeedFactory.⇒ getDataSource("DS_ID"); Local PTFP_FEED:UTILITY:Collection &thisList; If (&thisDS <> Null) Then &thisList = &thisDS.resetParameters(); End-If;
See Also
DataSource Class Properties
In this section, the DataSource class properties are presented in alphabetical order.

AdminPersonalizationPage
Description
Use this property to set or return a PSComponent object representing a data type-specific administrator personalization page for entering administrator-specified data source parameter values.
This property is read-write.

AllowCustomParameters
Description
This property indicates whether to allow user add or delete data source parameters, as a Boolean value. The default false, custom parameters are not allowed.
This property is read-only.

AllowRealTimeFeedSecurity
Description
This property indicates whether to allow real-time feed security, as a Boolean value. The default false, real-time feed security is not allowed.
This property is read-only.

DataSourceType
Description
This property returns the data source type as a string. The default value is a constant: BaseDataSource.
This property is read-only.

DefaultFeedAttributes
Description
Use this property to set or return the default feed attributes of this data type as an Attribute collection.
This property is read-write.

DefaultIBOperationName
Description
This property returns a string representing the name of the default service operation that handles feed requests of this data type.
This property is read-only.

Description
Description
Use this property to set or return the description of the data type as a string.
This property is read-write.

HasParameters
Description
This property whether the data source has parameters, as a Boolean value.
This property is read-only.

HasSettings
Description
This property whether the data source has settings, as a Boolean value.
This property is read-only.

IBOperations
Description
Use this property to set or return an IBOperation collection with the service operation names that could be used to handle feed requests of this feed type.
This property is read-write.

ID
Description
This property returns the ID for the data type as a string.
This property is read-only.

LongDescription
Description
Use this property to set or return the long description of the data type as a string.
This property is read-write.

ObjectType
Description
This property returns the object type for the data source as a string. For a data source, this is a constant value: DataSource.
This property is read-only.

Parameters
Description
This property returns the DataSoureParameter collection of this data source.
This property is read-only.

ParametersCompleted
Description
This property indicates whether all required data source parameters have values, as a Boolean value.
This property is read-only.

Parent
Description
Use this property to set or return the Feed object that use this DataSource object to collect data.
This property is read-write.
See Also

PortalSpecificPersonalization
Description
This property returns a Boolean value indicating whether the personalization data is portal specific. The default is False, personalization data is not portal specific.
This property is read-only.

Settings
Description
This property returns the DataSourceSetting collection.
This property is read-only.
See Also

SettingsCompleted
Description
This property returns a Boolean value indicating whether all required data source settings are selected.
This property is read-only.

UserPersonalizationPage
Description
Use this property to set or return a PSComponent object representing a data type-specific user personalization page for entering user specified data source parameter values.
This property is read-write.

Utility
Description
Use this property to set or return the Utility object that used by this DataSource object. By default, the parent's (that is, the feed's) Utility object is used.
This property is read-write.
See Also
DataSourceParameter Class
This section provides an overview of the DataSourceParameter class and discusses:
DataSourceParameter class constructor.
DataSourceParameter class methods.
DataSourceParameter class properties.
The DataSourceParameter class represent a data source parameter that used by the DataSource object to refine the feed data selection.
DataSourceParameter Class ConstructorThis section presents the constructor for the DataSourceParameter class.

DataSourceParameter
Example
import PTFP_FEED:DataSource:DataSourceParameter; Local PTFP_FEED:DataSource:DataSourceParameter &DSP = create PTFP_FEED:DataSource:⇒ DataSourceParameter("DSP_ID", &Parent_DS);
See Also
DataSourceParameter Class Methods
In this section, the DataSourceParameter class methods are presented in alphabetical order.

addUserValue
Syntax
addUserValue(DSPValue_ID, Value)
Description
Use this method to add a user value to this data source parameter.
Parameters
|
DSPValue_ID |
Specifies the ID of the user value as a string. |
|
Value |
Specifies the value of the user value as a string. |
Returns
A DataSourceParameterValue object if successful, false otherwise.
See Also
DataSourceParameterValue Class Constructor

clone
Syntax
clone()
Description
Use this method to make a copy of this DataSourceParameter object.
Parameters
None.
Returns
A DataSourceParameter object exactly matching the current object.

equals
Syntax
equals(&Object)
Description
Use this method to evaluate the equivalency of an object with the current data source parameter. Equivalency is established based on the value of two properties: the object's ID and the ObjectType.
Parameters
|
&Object |
Specifies the object to be compared to the current DataSourceParameter object. |
Returns
A Boolean value: True if the items are equivalent, False otherwise.
See Also
ID, ObjectType.

resetUserValues
Syntax
resetUserValues()
Description
Use this method to reset the UserValues collection.
Parameters
None.
Returns
An empty UserValues collection if successful, null otherwise.
See Also

setRangeFromFieldTranslates
Syntax
setRangeFromFieldTranslates(FieldName)
Description
Use this method to auto-populate the range values based on the translate values for the specified field.
Parameters
|
FieldName |
Specifies the name of the field as a string. |
Returns
None.

validateValue
Syntax
validateValue(Value, CheckPrompt)
Description
Use this method to validate the value according to its field type, the edit type, and the usage type. Date or date time values are translated to the standard format as a string. Exceptions or errors are raised for invalid values.
Parameters
|
Value |
Specifies the value to be validated as a string. |
|
CheckPrompt |
Specifies a Boolean value indicating whether the value should be checked against the valid values list of this data source parameter. The type of check depends on the edit type of this data source parameter, the valid values list could be a user-specified values list, translate values of a field, or values in a prompt table. When CheckPrompt is True, check the value; when False, check the data type of the value only. |
Returns
A string with the validated value.
DataSourceParameter Class Properties
In this section, the DataSourceParameter class properties are presented in alphabetical order.

AllowChangesToRequired
Description
Use this property to set or return a Boolean value indicating whether it is allowed to change the required flag of this parameter.
This property is read-write.

DefaultValue
Description
Use this property to set or return a string representing the default value for this data source parameter.
This property is read-write.

DefaultValueForDisplay
Description
This property returns a string representing the default value for a data source parameter for display purposes. This is the same as the DefaultValue property except that a date value is in the user-preferred format.
This property is read-only.

Description
Description
Use this property to set or return the description of the data source parameter as a string.
This property is read-write.

EditType
Description
Use this property to set or return the table edit type of the data source parameter, as a number. The values are:
|
Numeric Value |
Constant Value |
Description |
|
1 |
&utility.EDITTYPE_NOTABLEEDIT |
This is the default edit type. A valid values list can be specified using the UserValues collection. |
|
2 |
&utility.EDITTYPE_PROMPTTABLE |
This data source parameter takes value from a prompt table. Only a SQL table or SQL view can be used as the prompt table. |
|
3 |
&utility.EDITTYPE_ |
This data source parameter only takes values specific in the Range array of this data source parameter |
|
4 |
&utility.EDITTYPE_YESNO |
This data source parameter only takes a Yes or No value. |
This property is read-write.

EvaluatedValue
Description
This property returns a string representing the evaluated value of the data source parameter. This is the same as the Value property except that a system variable is evaluated to its current runtime value.
This property is read-only.

FieldType
Description
Use this property to set or return the field type as a number. The values are:
|
Numeric Value |
Constant Value |
Description |
|
0 |
&utility.FIELDTYPE_CHARACTER |
Character field |
|
1 |
&utility.FIELDTYPE_ |
Long character field |
|
2 |
&utility.FIELDTYPE_NUMBER |
Number field |
|
3 |
&utility.FIELDTYPE_ |
Signed number field |
|
4 |
&utility.FIELDTYPE_DATE |
Date field |
|
5 |
&utility.FIELDTYPE_TIME |
Time field |
|
6 |
&utility.FIELDTYPE_DATETIME |
DateTime field |
This property is read-write.

ID
Description
This property returns the ID for this data source parameter as a string.
This property is read-only.

Name
Description
Use this property to set or return the name of this data source parameter as a string.
This property is read-write.

ObjectType
Description
This property returns the object type for the data source parameter as a string. For a DataSourceParameter object, this is a constant value: DataSourceParameter.
This property is read-only.

Parent
Description
Use this property to set or return a pointer to the DataSource object to which this parameter belongs.
This property is read-write.
See Also

PromptTable
Description
Use this property to set or return the name of the prompt table as a string. Only a SQL table or SQL view should be used as the prompt table.
This property is read-write.

Range
Description
Use this property to set or return the list of valid values as an array of array of string.
This property is read-write.

Required
Description
Use this property to set or return whether this data source parameter is required, as a Boolean value.
This property is read-write.

SkipValidityChecks
Description
Use this property to set or return whether to skip validity checks of the values for this data source parameter, as a Boolean value.
This property is read-write.

UsageType
Description
Use this property to set or return the usage type for this data source parameter as a string. The values are:
|
Value |
Description |
|
&utility.USAGETYPE_FIXED |
This parameter takes a fixed value. |
|
&utility.USAGETYPE_ |
This parameter is not used. |
|
&utility.USAGETYPE_SYSVAR |
This parameter gets its value from a system variable. |
|
&utility.USAGETYPE_ |
The value of this parameter can be specified by the user. |
|
&utility.USAGETYPE_ |
This parameter is for internal use. |
|
&utility.USAGETYPE_ |
The value of this parameter can be changed only by users having administrator access to the data. |
This property is read-write.

UserValues
Description
This property returns the valid values (that is, the UserValues collection).
This property is read-only.

Utility
Description
Use this property to set or return the Utility object used by the DataSourceParameter object. By default, the parent's (that is, the data source's) Utility object is used.
This property is read-write.
Example
import PTFP_FEED:DataSource:DataSourceParameter; import PTFP_FEED:UTILITY:Utility; Local PTFP_FEED:DataSource:DataSourceParameter &thisDSP; Local PTFP_FEED:UTILITY:Utility &utility; &thisDSP = create PTFP_FEED:DataSource:DataSourceParameter("dsp_ID", Null); &utility = &thisDSP.Utility; &thisDSP.Name = &thisDSP.ID; &thisDSP.Description = MsgGetText(219, 3005, "Message Not Found - Max Entries"); &thisDSP.FieldType = &utility.FIELDTYPE_NUMBER; &thisDSP.DefaultValue = "10"; &thisDSP.Value = &thisDSP.DefaultValue; &thisDSP.Required = True; &thisDSP.EditType = &utility.EDITTYPE_NOTABLEEDIT; &thisDSP.PromptTable = ""; /* Should only use SQL Table or View */ &thisDSP.Range = Null; /* Only set the range if the edit type is translatable */ &thisDSP.UsageType = &utility.USAGETYPE_FIXED; &thisDSP.UserValues = Null; &thisDSP.AllowChangesToRequired = False;
See Also

Value
Description
Use this property to set or return the value of the data source parameter as a string.
This property is read-write.

ValueForDisplay
Description
This property returns a string representing the value for a data source parameter for display purposes. This is the same as the Value property except that a date value is in the user-preferred format.
This property is read-only.
DataSourceParameterValue Class
This section provides an overview of the DataSourceParameterValue class and discusses:
DataSourceParameterValue class constructor.
DataSourceParameterValue class methods.
DataSourceParameterValue class properties.
The DataSourceParameterValue class represents a valid value for a data source parameter.
DataSourceParameterValue Class ConstructorThis section presents the constructor for the DataSourceParameterValue class.

DataSourceParameterValue
Example
Local PTFP_FEED:DataSource:DataSourceParameterValue &DSP_Value = create PTFP_FEED:⇒ DataSource:DataSourceParameterValue("ID", &Parent_DSP);
See Also
DataSourceParameterValue Class Methods
In this section, the DataSourceParameterValue class methods are presented in alphabetical order.

clone
Syntax
clone()
Description
Use this method to make a copy of this DataSourceParameterValue object.
Parameters
None.
Returns
A DataSourceParameterValue object exactly matching the current object.

equals
Syntax
equals(&Object)
Description
Use this method to evaluate the equivalency of an object with the current data source parameter value. Equivalency is established based on the value of two properties: the object's ID and the ObjectType.
Parameters
|
&Object |
Specifies the object to be compared to the current DataSourceParameterValue object. |
Returns
A Boolean value: True if the items are equivalent, False otherwise.
See Also
ID, ObjectType.
DataSourceParameterValue Class Properties
In this section, the DataSourceParameterValue class properties are presented in alphabetical order.

Description
Description
Use this property to set or return the description of this data source parameter value as a string.
This property is read-write.

ID
Description
This property returns the ID for this data source parameter value as a string.
This property is read-only.

Name
Description
Use this property to set or return the name of this data source parameter value as a string.
This property is read-write.

ObjectType
Description
This property returns the object type for the data source parameter value as a string. For a DataSourceParameterValue object, this is a constant value: DataSourceParameterValue.
This property is read-only.

OrderNumber
Description
Use this property to set or return the order number for this data source parameter value as a number.
This property is read-write.

Parent
Description
Use this property to set or return a pointer to the DataSourceParameter object to which this value belongs.
This property is read-write.
See Also

Value
Description
Use this property to set or return the value of the data source parameter value as a string.
This property is read-write.
DataSourceSetting Class
This section provides an overview of the DataSourceSetting class and discusses:
DataSourceSetting class constructor.
DataSourceSetting class methods.
DataSourceSetting class properties.
The DataSourceSetting class represents a data source setting that is used to uniquely define a feed's data source of a given type.
DataSourceSetting Class ConstructorThis section presents the constructor for the DataSourceSetting class.

DataSourceSetting
Example
import PTFP_FEED:DataSource:DataSourceSetting; Local PTFP_FEED:DataSource:DataSourceSetting &this_DSS = create PTFP_FEED:⇒ DataSource:DataSourceSetting("DSS_ID", &DS);
See Also
DataSourceSetting Class Methods
In this section, the DataSourceSetting class methods are presented in alphabetical order.

clone
Syntax
clone()
Description
Use this method to make a copy of this DataSourceSetting object.
Parameters
None.
Returns
A DataSourceSetting object exactly matching the current object.

equals
Syntax
equals(&Object)
Description
Use this method to evaluate the equivalency of an object with the current data source setting. Equivalency is established based on the value of two properties: the object's ID and the ObjectType.
Parameters
|
&Object |
Specifies the object to be compared to the current DataSourceSetting object. |
Returns
A Boolean value: True if the items are equivalent, False otherwise.
See Also
ID, ObjectType.

setRangeFromFieldTranslates
Syntax
setRangeFromFieldTranslates(FieldName)
Description
Use this method to auto-populate the range values based on the valid translate values for the field.
Parameters
|
FieldName |
Specifies the name of the field as a string. |
Returns
None.
DataSourceSetting Class Properties
In this section, the DataSourceSetting class properties are presented in alphabetical order.

DefaultValue
Description
Use this property to set or return a string representing the default value for a data source setting.
This property is read-write.

DisplayOnly
Description
Use this property to set or return a Boolean value indicating whether the Value property is displayed as display only.
This property is read-write.

EditType
Description
Use this property to set or return the table edit type of the data source setting, as a number. The values are:
|
Numeric Value |
Constant Value |
Description |
|
1 |
&utility.EDITTYPE_NOTABLEEDIT |
This is the default edit type. A valid values list can be specified using the UserValues collection. |
|
2 |
&utility.EDITTYPE_PROMPTTABLE |
This data source parameter takes value from a prompt table. Only a SQL table or SQL view can be used as the prompt table. |
|
3 |
&utility.EDITTYPE_ |
This data source parameter only takes values specific in the Range array of this data source parameter |
|
4 |
&utility.EDITTYPE_YESNO |
This data source parameter only takes a Yes or No value. |
This property is read-write.

Enabled
Description
Use this property to set or return a Boolean value indicating whether the setting is enabled.
This property is read-write.

FieldType
Description
Use this property to set or return the field type as a number. The values are:
|
Numeric Value |
Constant Value |
Description |
|
0 |
&utility.FIELDTYPE_CHARACTER |
Character field |
|
1 |
&utility.FIELDTYPE_ |
Long character field |
|
2 |
&utility.FIELDTYPE_NUMBER |
Number field |
|
3 |
&utility.FIELDTYPE_ |
Signed number field |
|
4 |
&utility.FIELDTYPE_DATE |
Date field |
|
5 |
&utility.FIELDTYPE_TIME |
Time field |
|
6 |
&utility.FIELDTYPE_DATETIME |
DateTime field |
This property is read-write.

ID
Description
This property returns the ID for the data source setting as a string.
This property is read-only.

LongName
Description
Use this property to set or return the label of the name as a string.
This property is read-write.

Name
Description
Use this property to set or return the name of the data source setting as a string.
This property is read-write.

ObjectType
Description
This property returns the object type for the data source setting as a string. For a DataSourceSetting object, this is a constant value: DataSourceSetting.
This property is read-only.

Parent
Description
Use this property to set or return a pointer to the DataSource object to which this setting belongs.
This property is read-write.
See Also

PromptTable
Description
Use this property to set or return the name of the prompt table as a string. Only a SQL table or SQL view should be used.
This property is read-write.

Range
Description
Use this property to set or return the list of valid values as an array of array of string.
This property is read-write.

RefreshOnChange
Description
Use this property to set or return a Boolean value indicating whether to call the parent DataSource object’s processSettingsChange method when the value changes.
This property is read-write.

RelatedFieldValue
Description
Use this property to set or return the related display field value as a string.
This property is read-write.

Required
Description
Use this property to set or return a Boolean value indicating whether this data source setting is required.
This property is read-write.

ShowRelatedField
Description
Use this property to set or return a Boolean value indicating whether to show the related display field.
This property is read-write.

Utility
Description
Use this property to set or return the Utility object used by the DataSourceSetting object. By default, the parent's (that is, the data source's) Utility object is used.
This property is read-write.
Example
import PTFP_FEED:DataSource:DataSourceSetting; import PTFP_FEED:UTILITY:Utility; Local PTFP_FEED:DataSource:DataSourceSetting &thisDSS; Local PTFP_FEED:UTILITY:Utility &utility; &thisDSS = create PTFP_FEED:DataSource:DataSourceSetting("dss_ID", Null); &utility = &thisDSS.Utility; &thisDSS.Name = &thisDSS.ID; &thisDSS.LongName = "Data Type Name"; &thisDSS.FieldType = &utility.FIELDTYPE_CHARACTER; &thisDSS.DefaultValue = ""; &thisDSS.RelatedFieldValue = ""; &thisDSS.EditType = &utility.EDITTYPE_PROMPTTABLE; &thisDSS.PromptTable = Record.PTFP_DTYPE_PVW; /* Only use SQL Table or View */ &thisDSS.Range = Null; /* Only set the range if the edit type is translatable */ &thisDSS.Required = True; &thisDSS.Enabled = True; &thisDSS.Visible = True; &thisDSS.DisplayOnly = False; &thisDSS.ShowRelatedField = True; &thisDSS.RefreshOnChange = True;
See Also

Value
Description
Use this property to set or return the value of the data source setting as a string.
This property is read-write.

Visible
Description
Use this property to set or return a Boolean value indicating whether to show the Value field when it’s enabled.
This property is read-write.
Utility Class
This section provides an overview of the Utility class and discusses:
Utility class constructor.
Utility class methods.
Utility class properties.
The Utility class provides methods and constants used by other classes of the Feed Publishing Framework
Utility Class ConstructorThis section presents the constructor for the Utility class.

Utility
Example
import PTFP_FEED:UTILITY:Utility; Local PTFP_FEED:UTILITY:Utility &utility = create PTFP_FEED:UTILITY:Utility();
See Also
Utility Class Methods
In this section, the Utility class methods are presented in alphabetical order.

dateStringToUserPref
Syntax
dateStringToUserPref(DateString)
Description
Use this method to transform a date string from the "yyyy-MM-dd" format to the user-preferred date format.
Parameters
|
DateString |
Specifies the date string to be transformed. |
Returns
A string containing the date in the user-preferred date format.

datetimeToString
Syntax
datetimeToString(Datetime)
Description
Use this method to transform a DateTime value to a string in “yyyy-MM-dd HH:mm:ss” format.
Parameters
|
Datetime |
Specifies the DateTime value to be transformed. |
Returns
A string in “yyyy-MM-dd HH:mm:ss” format or an empty string if the DateTime value is empty.

dateToString
Syntax
dateToString(Date)
Description
Use this method to transform a date value to a string in “yyyy-MM-dd” format.
Parameters
|
Date |
Specifies the date value to be transformed. |
Returns
A string in “yyyy-MM-dd” format or an empty string if the date value is empty.

decodeXML
Syntax
decodeXML(String)
Description
Use this method to decode the following encoded XML characters in the source string:
|
Encoded Character |
Decoded Character |
|
< |
< (less than) |
|
> |
> (greater than) |
|
& |
& (ampersand) |
|
' |
' (apostrophe) |
|
" |
" (quotation mark) |
Parameters
|
String |
Specifies the source XML string with encoded characters to be decoded. |
Returns
A string containing the source XML string with encoded characters decoded.
Example
For &i = 1 To &elementList.Len &valueList = CreateArrayRept("", &pChildTags.Len); For &j = 1 To &pChildTags.Len &thisValue = %This.getNodeValue(&elementList [&i], &pChildTags [&j]); &valueList [&j] = %This.decodeXML(&thisValue); End-For; &return_value.Push(&valueList); End-For;
See Also

encodeXML
Syntax
encodeXML(String)
Description
Use this method to encode the following special characters in the source string as encoded XML characters:
|
Character |
Encoded Character |
|
< (less than) |
< |
|
> (greater than) |
> |
|
& (ampersand) |
& |
|
' (apostrophe) |
' |
|
" (quotation mark) |
" |
Parameters
|
String |
Specifies the source string with special characters to be encoded. |
Returns
A string containing the source string with the special characters encoded.
Example
If (&pValues [&i] <> Null) And (&pChildTags <> Null) Then /* get the children */ For &j = 1 To &pValues [&i].Len If &j > &pChildTags.Len Then Break; End-If; &thisElement = &thisElement | %This.setNodeValue(%This.encodeXML⇒ (&pValues [&i][&j]), &pChildTags [&j]); End-For; End-If;
See Also

evaluateSysVar
Syntax
evaluateSysVar(SysVar)
Description
Use this method to evaluate and return the value of a system variable.
Parameters
|
SysVar |
Specifies the system variable to be evaluated as a string. |
Returns
A string representation of the evaluated system variable, or the system variable name if it cannot be evaluated.

genNameSpaceID
Syntax
genNameSpaceID(NameSpace_ID)
Description
Use this method to replace special characters in the original ID string with “_”, so that it only contains “A–Z”, “0–9” and “_”.
Parameters
|
NameSpace_ID |
Specifies the name space ID to be converted as a string. |
Returns
A string containing the generated name space ID using only “A–Z”, “0–9” and “_”.

getExceptionText
Syntax
getExceptionText(&Exception)
Description
Use this method to return the exception error message.
Parameters
|
&Exception |
Specifies the exception as an Exception object. |
Returns
The exception error message as a string.

getFeedDoc
Syntax
getFeedDoc(feed_ID, Format, &Attributes)
Description
Use this method to create a FeedDoc object of the given feed format.
Parameters
|
feed_ID |
Specifies the ID of the feed definition as a string. |
|
Format |
Specifies the feed format as a string. The values are: |
|
Value |
Description |
|
&utility.FEEDFORMAT_ATOM10 |
An Atom 1.0 format feed. |
|
&Attributes |
Specifies the feed-level properties as an Attribute collection. |
Returns
A FeedDoc object of the given feed format with properties filled in from the Attribute collection.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:XML_FEED:FeedDoc; import PTFP_FEED:XML_FEED:FeedEntry; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:XML_FEED:FeedDoc &this_FeedDoc = &thisFeedFactory.Utility.⇒ getFeedDoc("feed_ID", &thisFeedFactory.Utility.FEEDFORMAT_ATOM10, Null); Local PTFP_FEED:XML_FEED:FeedEntry &this_Entry = &this_FeedDoc.⇒ addEntry("entry_ID");
See Also

getFeedMimeType
Syntax
getFeedMimeType(Format)
Description
Use this method to return the MIME type of the given feed format.
Parameters
|
Format |
Specifies the feed format as a string. The values are: |
|
Value |
Description |
|
&utility.FEEDFORMAT_ATOM10 |
An Atom 1.0 format feed. |
Returns
A string containing the MIME type as follows:
|
Feed Format Constant |
MIME Type Constant |
MIME Type |
|
&utility.FEEDFORMAT_ATOM10 |
MIMETYPE_ATOM |
application/atom+xml |
|
undefined |
MIMETYPE_XML |
application/xml |

getFieldTranslates
Syntax
getFieldTranslates(FieldName)
Description
Use this method to return the valid translate values of a field.
Parameters
|
FieldName |
Specifies the field name for which to retrieve translate values, as a string. |
Returns
An array of array of string.

getNodeValue
Syntax
getNodeValue(String, Tag)
Description
Use this method to extract the value from the first element enclosed by the given tag in the source string.
Parameters
|
String |
Specifies the string to check. |
|
Tag |
Specifies the tag to search for as a string. |
Returns
A string containing the value from the first element enclosed by the specified tag.
Example
import PTFP_FEED:UTILITY:Utility; Local PTFP_FEED:UTILITY:Utility &utility = create PTFP_FEED:UTILITY:Utility(); &str = "<div><p>value1</p><p>value2</p></div>"; &str1 = &utility.getNodeValue(&str, "p"); /* &str1="value1" */
See Also

getUserDateFormat
Syntax
getUserDateFormat()
Description
Use this method to construct and return the date format string based on the user's personalization settings.
Parameters
None.
Returns
A string containing the format mask representing the user's preferred date format—for example: MM-dd-yyyy.

getUserDatetimeFormat
Syntax
getUserDatetimeFormat()
Description
Use this method to construct and return the date/time format string based on the user's personalization settings.
Parameters
None.
Returns
A string containing the format mask representing the user's preferred date/time format—for example: MM-dd-yyyy hh:mm a.

getUserInfo
Syntax
getUserInfo(user_ID)
Description
Use this method to return the user name and email address of the given user ID.
Parameters
|
user_ID |
Specifies the user ID for which to retrieve the user information, as a string. |
Returns
An array of string containing two elements:
User name (or the user ID if this is empty).
Email address (or an empty string if this is empty).

httpStringToDatetime
Syntax
httpStringToDatetime(string)
Description
Use this method to convert an HTTP date/time string in the "dow, dd mmm yyyy hh:mm:ss GMT" format to a DateTime value.
Parameters
|
string |
Specifies the HTTP date/time string in the "dow, dd mmm yyyy hh:mm:ss GMT" format. |
Returns
A DateTime value.

join
Syntax
join(&Array, Tag)
Description
Use this method to concatenate the string array together enclosing each string element in the specified tag.
Parameters
|
&Array |
Specifies the array of string to be concatenated together. |
|
Tag |
Specifies the tag to enclose each string element. |
Returns
A string containing the concatenation of each of the string elements enclosed by the specified tag.
Example
import PTFP_FEED:UTILITY:Utility; Local PTFP_FEED:UTILITY:Utility &utility = create PTFP_FEED:UTILITY:Utility(); &str = &utility.join(CreateArray("value1", "value2"), "p"); /* &str="<p>value1</p><p>value2</p>" */
See Also

join2D
Syntax
join2D(&Array, Tag, ChildTags)
Description
Use this method to concatenate the array of array of string together enclosing each element in the specified tag. Each child element is XML encoded and enclosed in the child tag.
Parameters
|
&Array |
Specifies the array of array of string to be concatenated together. |
|
Tag |
Specifies the tag to enclose each string element, as a string. |
|
ChildTags |
Specifies the tags to enclose each child element, as an array of string. |
Returns
A string containing the concatenation of each of the string elements enclosed by the specified tag. Each child element is XML encoded and enclosed in the child tag.
Example
import PTFP_FEED:UTILITY:Utility; Local PTFP_FEED:UTILITY:Utility &utility = create PTFP_FEED:UTILITY:Utility(); &str = &utility.join2D(CreateArray(CreateArray("value1", "value2")), "div", ⇒ CreateArray("b", "i")); /* &str="<div><b>value1</b><i>value2</i></div>" */
See Also
encodeXML, setNodeValue, split.

setMessageHeadersAndMimeType
Syntax
setMessageHeadersAndMimeType(&Message, &feeddoc, &FeedRequest)
Description
Use this method to return the specified Message object with the MIME type set, and populated with the specified FeedDoc. If the feed is an incremental feed, then incremental feed information is set as connector properties for the message.
Parameters
|
&Message |
Specifies the Message object to be returned. |
|
&feeddoc |
Specifies the feed document to be returned specified as an XmlDoc object. |
|
&FeedRequest |
Specifies the feed as a FeedRequest object. |
Returns
A Message object.
See Also
Implementing a Real-Time Feed Request Handler

setNodeValue
Syntax
setNodeValue(Value, Tag)
Description
Use this method to form an element using the given value and tag name.
Parameters
|
Value |
Specifies the string value to enclose in the tags. |
|
Tag |
Specifies the tag to enclose the value within, as a string. |
Returns
A string element containing the value enclosed within the given tag.
Example
import PTFP_FEED:UTILITY:Utility; Local PTFP_FEED:UTILITY:Utility &utility = create PTFP_FEED:UTILITY:Utility(); &str1 = &utility.setNodeValue("value", "p"); /* &str="<p>value</p>" */
See Also

showException
Syntax
showException(Exception)
Description
Use this method to raise an error when the component variable &PTFP_THROWPAGELETEXCEPTIONS is false, otherwise throw the exception.
Parameters
|
Exception |
Specifies the exception as an Exception. |
Returns
None.

showInvalidValueException
Syntax
showInvalidValueException(Name, Value)
Description
Use this method to show an invalid value exception using the showException method.
Parameters
|
Name |
Specifies the name of the property as a string. |
|
Value |
Specifies the value that is invalid as a string. |
Returns
None
See Also

split
Syntax
split()
Description
Use this method to extract the elements from the string that are enclosed in the specified tag.
Parameters
|
String |
Specifies the string to check. |
|
Tag |
Specifies the tag to search for as a string. |
Returns
An array of string containing the string elements enclosed by the specified tag.
Example
import PTFP_FEED:UTILITY:Utility; Local PTFP_FEED:UTILITY:Utility &utility = create PTFP_FEED:UTILITY:Utility(); &str = "<p>value1</p><p>value2</p>"; &arr = &utility.split(&str, "p"); /* &arr[1]="value1", &arr[2]="value2" */
See Also

split2D
Syntax
split2D()
Description
Use this method to extract the elements from the string that are enclosed in the specified tag. Child elements enclosed by the child tags are also extracted. All elements are XML decoded.
Parameters
|
String |
Specifies the string to check. |
|
Tag |
Specifies the tag that encloses each string element, as a string. This tag can be an empty string. |
|
ChildTags |
Specifies the tags that enclose each child element, as an array of string. |
Returns
An array of array of string containing the extracted string elements enclosed by the specified tags. Child elements are enclosed by the child tags. All elements are XML decoded.
Example
import PTFP_FEED:UTILITY:Utility; Local PTFP_FEED:UTILITY:Utility &utility = create PTFP_FEED:UTILITY:Utility(); &str = "<div><b>value1</b><i>value2</i></div>"; &arr = &utility.split2D(&str, "div", CreateArray("b", "i")); /* &arr[1][1]="value1", &arr[1][2]="value2" */
See Also
decodeXML, getNodeValue, join2D, split
decodeXML, getNodeValue, join2D, split.

stringToDate
Syntax
stringToDate(DateString)
Description
Use this method to convert a date string in the "yyyy-MM-dd" format to a date.
Parameters
|
DateString |
Specifies the string to be converted to a date. |
Returns
A date.

stringToDatetime
Syntax
stringToDatetime(DatetimeString)
Description
Use this method to convert a date string in the "yyyy-MM-dd HH:mm:ss" format to a DateTime value.
Parameters
|
DatetimeString |
Specifies the string to be converted to a DateTime value. |
Returns
A DateTime value.

validateSysVar
Syntax
validateSysVar(SysVar)
Description
Use this method to return the valid, correctly capitalized name of a system variable.
Parameters
|
SysVar |
Specifies the system variable name to be validated as a string. |
Returns
A string containing the validated and correctly capitalized system variable name, INVALID SYSVAR if the system variable does not exist.
Example
In the following example, %AuthenticationToken is returned as the validated system variable name.
import PTFP_FEED:UTILITY:Utility; Local PTFP_FEED:UTILITY:Utility &utility = create PTFP_FEED:UTILITY:Utility(); &str = &utility.validateSysVar("%AUTHENTICATIONtoken"); /* &str="%AUTHENTICATIONTOKEN" */

viewStringAsAttachment
Syntax
viewStringAsAttachment(String, FileName, ViewAttachment)
Description
Use this method to transform the given string into an attachment file that is sent to the browser.
Parameters
|
String |
Specifies the specifies the contents of the attachment file as a string. |
|
FileName |
Specifies the attachment file name as a string. |
|
ViewAttachment |
Specifies the as a Boolean value whether the attachment is to be viewed directly or detached for download. |
Returns
None.
Utility Class Properties
In this section, the Utility class properties are presented in alphabetical order.
Note. Properties in this class with capitalized names—such as, ATTACHMENT_URL, AUTHTYPE_PERM, and so on—are constants.
Some properties of the Utility class—such as, QUERYPARAMETER_FEEDID , QUERYPARAMETER_FEEDFORMAT, and so on—are referred to as query parameters. Typically, these query parameters are used in the implementation of a feed request handler. An example of a feed request handler that uses query parameters is provided at the end of this chapter.
See Also
Implementing a Real-Time Feed Request Handler

ATTACHMENT_URL
Description
Use this property to return the attachment location from the PTFP_DOCINDB URL definition, as a string.
This property is read-only.

AUTHTYPE_PERM
Description
Use this property to return the value that represents the permission list-based authentication type, as a string.
This property is read-only.

AUTHTYPE_ROLE
Description
Use this property to return the value that represents the role-based authentication type, as a string.
This property is read-only.

DSPARAMETER_INCREMENTAL
Description
Use this property to return a string representing the name of the incremental feed data source parameter.
This property is read-only.
See Also
INCREMENTALOPTION_NO, INCREMENTALOPTION_YES.

DSPARAMETER_MAXROW
Description
Use this property to return a string representing the name of the maximum rows data source parameter for scheduled feeds.
Note. Use either the SF_MAXROWOPTION_ALLMSGS property or the SF_MAXROWOPTION_LATESTMSG property to return the value of the maximum rows data source parameter for scheduled feeds.
This property is read-only.
See Also
SF_MAXROWOPTION_ALLMSGS, SF_MAXROWOPTION_LATESTMSG.

DSPARAMETER_SF_MAXMINUTES
Description
Use this property to return a string representing the name of the maximum minutes data source parameter for scheduled feeds.
Note. Use the SF_MAXMINUTES_ALLMSGS property to return the value of the maximum minutes data source parameter for scheduled feeds.
This property is read-only.
See Also

DSPARAMETER_SF_PAGING
Description
Use this property to return a string representing the name of the paging data source parameter for scheduled feeds.
Note. Use either the SF_PAGINGOPTION_NOPAGING property or the SF_PAGINGOPTION_SEGMENTED property to return the value of the paging data source parameter for scheduled feeds.
This property is read-only.
See Also
SF_PAGINGOPTION_NOPAGING, SF_PAGINGOPTION_SEGMENTED.

EDITTYPE_NOTABLEEDIT
Description
Use this property to return a number representing the field edit type as no prompt table edit.
This property is read-only.

EDITTYPE_PROMPTTABLE
Description
Use this property to return a number representing the field edit type as prompt table edit.
This property is read-only.

EDITTYPE_TRANSLATETABLE
Description
Use this property to return a number representing the field edit type as translate table edit.
This property is read-only.

EDITTYPE_YESNO
Description
Use this property to return a number representing the field edit type as a Yes/No edit.
This property is read-only.

FEEDATTRIBUTE_AUTHOR
Description
Use this property to return the AUTHOR feed attribute name as a string.
This property is read-only.
See Also

FEEDATTRIBUTE_CLOUD
Description
Use this property to return the CLOUD feed attribute name as a string.
This property is read-only.
See Also

FEEDATTRIBUTE_COMPLETE
Description
Use this property to return the COMPLETE feed attribute name as a string.
This property is read-only.

FEEDATTRIBUTE_CONTRIBUTOR
Description
Use this property to return the CONTRIBUTOR feed attribute name as a string.
This property is read-only.
See Also

FEEDATTRIBUTE_COPYRIGHT
Description
Use this property to return the COPYRIGHT feed attribute name as a string.
This property is read-only.

FEEDATTRIBUTE_EXPIRES
Description
Use this property to return the EXPIRES feed attribute name as a string.
This property is read-only.

FEEDATTRIBUTE_ICONURL
Description
Use this property to return the ICONURL feed attribute name as a string.
This property is read-only.

FEEDATTRIBUTE_LOGOURL
Description
Use this property to return the LOGOURL feed attribute name as a string.
This property is read-only.

FEEDATTRIBUTE_MANAGINGEDITOR
Description
Use this property to return the MANAGINGEDITOR feed attribute name as a string.
This property is read-only.

FEEDATTRIBUTE_MAXAGE
Description
Use this property to return the MAXAGE feed attribute name as a string.
This property is read-only.

FEEDATTRIBUTE_PERSINSTRUCTION
Description
Use this property to return the PERSINSTRUCTION feed attribute name as a string.
This property is read-only.

FEEDATTRIBUTE_RATING
Description
Use this property to return the RATING feed attribute name as a string.
This property is read-only.

FEEDATTRIBUTE_SKIPDAYS
Description
Use this property to return the SKIPDAYS feed attribute name as a string.
This property is read-only.

FEEDATTRIBUTE_SKIPHOURS
Description
Use this property to return the SKIPHOURS feed attribute name as a string.
This property is read-only.

FEEDATTRIBUTE_TEXTINPUT
Description
Use this property to return the TEXTINPUT feed attribute name as a string.
This property is read-only.
See Also

FEEDATTRIBUTE_TTL
Description
Use this property to return the TTL feed attribute name as a string.
This property is read-only.

FEEDATTRIBUTE_WEBMASTER
Description
Use this property to return the WEBMASTER feed attribute name as a string.
This property is read-only.

FEEDATTRIBUTE_XSL
Description
Use this property to return the XSL feed attribute name as a string.
This property is read-only.

FEEDAUTHTYPE_ALL
Description
Use this property to return a string representing the feed authorization type as all.
This property is read-only.

FEEDAUTHTYPE_ANONYMOUS
Description
Use this property to return a string representing the feed authorization type as anonymous.
This property is read-only.

FEEDAUTHTYPE_DEFAULT
Description
Use this property to return a string representing the feed authorization type as default.
This property is read-only.

FEEDCACHETYPE_NONE
Description
Use this property to return a string representing the feed cache type as none.
This property is read-only.

FEEDCACHETYPE_PRIVATE
Description
Use this property to return a string representing the feed cache type as private.
This property is read-only.

FEEDCACHETYPE_PUBLIC
Description
Use this property to return a string representing the feed cache type as public.
This property is read-only.

FEEDCACHETYPE_ROLE
Description
Use this property to return a string representing the feed cache type as role-based.
This property is read-only.

FEEDFORMAT_ATOM10
Description
Use this property to return a string representing the feed format as Atom 1.0.
This property is read-only.

FEEDSECUTYPE_PUBLIC
Description
Use this property to return a string representing the feed security type as public access.
This property is read-only.

FEEDSECUTYPE_REALTIME
Description
Use this property to return a string representing the feed security type as real-time security.
This property is read-only.

FEEDSECUTYPE_SELECTED
Description
Use this property to return a string representing the feed security type as select security access.
This property is read-only.

FEEDTEMPLATE_NO
Description
Use this property to return a string indicating that the feed definition is not a feed template definition—that is, it is the definition for a feed.
This property is read-only.
See Also

FEEDTEMPLATE_YES
Description
Use this property to return a string indicating that the feed definition is a feed template definition.
This property is read-only.
See Also

FEEDTYPE_DYNAMIC
Description
Use this property to return a string representing the feed type as real time (formerly known as dynamic).
This property is read-only.

FEEDTYPE_PREPUBLISHED
Description
Use this property to return a string representing the feed type as scheduled (formerly known as prepublished).
This property is read-only.

FIELDTYPE_CHARACTER
Description
Use this property to return a number representing the field type as character.
This property is read-only.

FIELDTYPE_DATE
Description
Use this property to return a number representing the field type as date.
This property is read-only.

FIELDTYPE_DATETIME
Description
Use this property to return a number representing the field type as DateTime.
This property is read-only.

FIELDTYPE_LONGCHARACTER
Description
Use this property to return a number representing the field type as long character.
This property is read-only.

FIELDTYPE_NUMBER
Description
Use this property to return a number representing the field type as number.
This property is read-only.

FIELDTYPE_SIGNEDNUMBER
Description
Use this property to return a number representing the field type as signed number.
This property is read-only.

FIELDTYPE_TIME
Description
Use this property to return a number representing the field type as time.
This property is read-only.

IBSOTYPE_ASYNC
Description
Use this property to return a string representing the Integration Broker service operation type as asynchronous.
This property is read-only.

IBSOTYPE_SYNC
Description
Use this property to return a string representing the Integration Broker service operation type as synchronous.
This property is read-only.

IBSOTYPE_UNKNOWN
Description
Use this property to return a string representing the Integration Broker service operation type as unknown.
This property is read-only.

ICONURL_FEED_A
Description
Use this property to return the active feed icon URL for PTFP_FEED_ACTIVE, as a string.
This property is read-only.

ICONURL_FEED_IA
Description
Use this property to return the inactive feed icon URL for PTFP_FEED_INACTIVE, as a string.
This property is read-only.

INCREMENTALOPTION_NO
Description
Use this property to return an integer indicating that the feed is not an incremental feed.
This property is read-only.
See Also

INCREMENTALOPTION_YES
Description
Use this property to return an integer indicating that the feed is an incremental feed.
This property is read-only.
See Also

LINKTYPE_FIRST
Description
Use this property for a paged feed to return a string indicating that link type is first.
This property is read-only.
See Also

LINKTYPE_LAST
Description
Use this property for a paged feed to return a string indicating that link type is last.
This property is read-only.
See Also

LINKTYPE_NEXT
Description
Use this property for a paged feed to return a string indicating that link type is next.
This property is read-only.
See Also

LINKTYPE_PREVIOUS
Description
Use this property for a paged feed to return a string indicating that link type is previous.
This property is read-only.
See Also

MIMETYPE_ATOM
Description
Use this property to return a string containing the MIME type for Atom feed format data.
This property is read-only.

MIMETYPE_OPML
Description
Use this property to return a string containing the MIME type for OPML format data.
This property is read-only.

MIMETYPE_XML
Description
Use this property to return a string containing the MIME type as XML for unknown feed format data.
This property is read-only.

OPERATINGMODE_AUTHORIZATION
Description
Use this property to return a number representing the Feed object operating mode as for user authorization only.
Note. Most other operations such as execute, save, and delete are not allowed.
This property is read-only.

OPERATINGMODE_DEFAULT
Description
Use this property to return a number representing the Feed object operating mode as default.
Note. A Feed object in this mode allows all operations such as save, delete, and so on.
This property is read-only.

OPERATINGMODE_DELETION
Description
Use this property to return a number representing the Feed object operating mode as for feed deletion only.
Note. Most other operations such as execute and save are not allowed.
This property is read-only.

OPERATINGMODE_EXECUTION
Description
Use this property to return a number representing the Feed object operating mode as for feed execution only.
Note. Other operations such as save and delete are not allowed.
This property is read-only.

OPERATINGMODE_EXECUTION_NOENTRY
Description
Use this property to return a number representing the Feed object operating mode as for feed execution only to return just an empty feed header (that is, without feed entries).
Note. Otherwise, this mode is the same as the OPERATINGMODE_EXECUTION mode.
This property is read-only.

QUERYPARAMETER_CHILDFEEDID
Description
Use this property to return the ChildFeedID query parameter name as a string.
This property is read-only.

QUERYPARAMETER_DATATYPEID
Description
Use this property to return the PTFP_DATA_TYPE query parameter as a string.
This property is read-only.

QUERYPARAMETER_DEFLOCALNODE
Description
Use this property to return the To query parameter as a string.
This property is read-only.

QUERYPARAMETER_DSSCOUNT
Description
Use this property to return the PTFP_DSS_COUNT query parameter as a string.
This property is read-only.

QUERYPARAMETER_DSSNAME
Description
Use this property to return the PTFP_DSS_NAME query parameter as a string.
This property is read-only.

QUERYPARAMETER_DSSVALUE
Description
Use this property to return the PTFP_DSS_VALUE query parameter as a string.
This property is read-only.

QUERYPARAMETER_FEEDFORMAT
Description
Use this property to return the FeedFormat query parameter as a string.
This property is read-only.

QUERYPARAMETER_FEEDID
Description
Use this property to return the FEED_ID query parameter as a string.
This property is read-only.

QUERYPARAMETER_FEEDLIST
Description
Use this property to return the FEEDLIST query parameter as a string.
This property is read-only.

QUERYPARAMETER_FEEDTYPE
Description
Use this property to return the PTFP_FEED_TYPE query parameter as a string.
This property is read-only.

QUERYPARAMETER_IBTRANSID
Description
Use this property to return the IB_TRANS_ID query parameter as a string.
This property is read-only.

QUERYPARAMETER_IFMODIFIEDSINCE
Description
Use this property to return the If-None-Match query parameter as a string.
This property is read-only.

QUERYPARAMETER_IFNONEMATCH
Description
Use this property to return the PAGE_NUM query parameter as a string.
This property is read-only.

QUERYPARAMETER_KEYWORD
Description
Use this property to return the PTFP_FEED_KEYWORD query parameter as a string.
This property is read-only.

QUERYPARAMETER_LANGUAGE
Description
Use this property to return the languageCd query parameter as a string.
This property is read-only.

QUERYPARAMETER_NODENAME
Description
Use this property to return the NODE_NAME query parameter as a string.
This property is read-only.

QUERYPARAMETER_PAGENUM
Description
Use this property to return this query parameter as a string.
This property is read-only.

QUERYPARAMETER_PORTALNAME
Description
Use this property to return the PORTAL_NAME query parameter as a string.
This property is read-only.

QUERYPARAMETER_PTPPB_SEARCH_MODE
Description
Use this property to return the PTPPB_SEARCH_MODE query parameter as a string.
This property is read-only.

QUERYPARAMETER_PTPPB_SEARCH_TEXT
Description
Use this property to return the SEARCH_TEXT query parameter as a string.
This property is read-only.

RequestInfo
Description
Use this property to set or return a FeedRequest object.
This property is read-write.

SF_MAXMINUTES_ALLMSGS
Description
Use this property to return a number representing all messages as the value for the maximum minutes data source parameter for scheduled feeds.
Note. Use the DSPARAMETER_SF_MAXMINUTES property to return the name of the maximum minutes data source parameter for scheduled feeds.
This property is read-only.
See Also

SF_MAXROWOPTION_ALLMSGS
Description
Use this property to return a number representing all messages as the value for the maximum row data source parameter for scheduled feeds.
Note. Use the DSPARAMETER_MAXROW property to return the name of the maximum row data source parameter for scheduled feeds.
This property is read-only.
See Also

SF_MAXROWOPTION_LATESTMSG
Description
Use this property to return a number representing latest message as the value for the maximum row data source parameter for scheduled feeds.
Note. Use the DSPARAMETER_MAXROW property to return the name of the maximum row data source parameter for scheduled feeds.
This property is read-only.
See Also

SF_PAGINGOPTION_NOPAGING
Description
Use this property to return a number representing no paging as the value for the paging data source parameter for scheduled feeds.
Note. Use the DSPARAMETER_SF_PAGING property to return the name of the paging data source parameter for scheduled feeds.
This property is read-only.
See Also

SF_PAGINGOPTION_SEGMENTED
Description
Use this property to return a number representing segmented message as the value for the paging data source parameter for scheduled feeds.
Note. Use the DSPARAMETER_SF_PAGING property to return the name of the paging data source parameter for scheduled feeds.
Important! Using SF_PAGINGOPTION_SEGMENTED returns the oldest
page (message segment) as the initial page of the feed. The links to the
other pages (next, previous, first, and last) are available in the FeedDoc
wherever applicable.
This option is best suited for when the feed output is large and the
feed itself is to be consumed by a crawler or a feed reader application that
understand these links.
This property is read-only.
See Also

SYSVAR_INVALID
Description
Use this property to return the string that indicates that a system variable is invalid.
This property is read-only.

USAGETYPE_ADMINSPECIFIED
Description
Use this property to return a string indicating that the data source parameter usage type is administrator specified.
This property is read-only.

USAGETYPE_FIXED
Description
Use this property to return a string indicating that the data source parameter usage type is fixed.
This property is read-only.

USAGETYPE_INTERNAL
Description
Use this property to return a string indicating that the data source parameter usage type is internal.
This property is read-only.

USAGETYPE_NOTUSED
Description
Use this property to return a string indicating that the data source parameter usage type is not used.
This property is read-only.

USAGETYPE_SYSVAR
Description
Use this property to return a string indicating that the data source parameter usage type is system variable.
This property is read-only.

USAGETYPE_USERSPECIFIED
Description
Use this property to return a string indicating that the data source parameter usage type is user specified.
This property is read-only.

XMLCHILDELEMENTS_CLOUD
Description
Use this property to return an array of string containing the list of children XML tags used by the FEEDATTRIBUTE_CLOUD feed attribute.
This property is read-only.
See Also

XMLCHILDELEMENTS_PERSON
Description
Use this property to return an array of string containing the list of children XML tags used by the FEEDATTRIBUTE_AUTHOR and FEEDATTRIBUTE_CONTRIBUTOR feed attributes.
This property is read-only.
See Also
FEEDATTRIBUTE_AUTHOR, FEEDATTRIBUTE_CONTRIBUTOR.

XMLCHILDELEMENTS_TEXTINPUT
Description
Use this property to return an array of string containing the list of children XML tags used by the FEEDATTRIBUTE_TEXTINPUT feed attribute.
This property is read-only.
See Also

XMLELEMENT_DAY
Description
Use this property to return as a string the representing the day XML element.
This property is read-only.

XMLELEMENT_DESCRIPTION
Description
Use this property to return as a string the representing the description XML element.
This property is read-only.

XMLELEMENT_DOMAIN
Description
Use this property to return as a string the representing the domain XML element.
This property is read-only.

XMLELEMENT_EMAIL
Description
Use this property to return as a string the representing the email XML element.
This property is read-only.

XMLELEMENT_HOUR
Description
Use this property to return as a string the representing the hour XML element.
This property is read-only.

XMLELEMENT_LINK
Description
Use this property to return as a string the representing the link XML element.
This property is read-only.

XMLELEMENT_NAME
Description
Use this property to return as a string the representing the name XML element.
This property is read-only.

XMLELEMENT_PATH
Description
Use this property to return as a string the representing the path XML element.
This property is read-only.

XMLELEMENT_PORT
Description
Use this property to return as a string the representing the port XML element.
This property is read-only.

XMLELEMENT_PROTOCOL
Description
Use this property to return as a string the representing the protocol XML element.
This property is read-only.

XMLELEMENT_REGISTERPROCEDURE
Description
Use this property to return as a string the representing the register protocol XML element.
This property is read-only.

XMLELEMENT_TITLE
Description
Use this property to return as a string the representing the title XML element.
This property is read-only.
FeedDoc Class
This section provides an overview of the FeedDoc class and discusses:
FeedDoc class constructor.
FeedDoc class methods.
FeedDoc class properties.
The FeedDoc class extends the XmlDoc base class to provide a generic interface class for feed documents. Therefore, for each feed format type, a format-specific feed document class is required to extend the base FeedDoc class. As a base class, the FeedDoc class has abstract methods and properties, which are identified as such in the following sections.
FeedDoc Class ConstructorThis section presents the constructor for the FeedDoc class.

FeedDoc
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:XML_FEED:FeedDoc; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:XML_FEED:FeedDoc &this_FeedDoc = &thisFeedFactory.⇒ getFeedDoc("feed_ID", &thisFeedFactory.Utility.FEEDFORMAT_ATOM10, Null);
See Also
FeedDoc Class Methods
In this section, the FeedDoc class methods are presented in alphabetical order.

addCategory
Syntax
addCategory(category)
Description
Use this method to add a category attribute to the feed document as a string.
Note. This is an abstract method.
Parameters
|
category |
Specifies the category as a string. |
Returns
A Boolean value: True if the add was successful, False otherwise.
See Also

addEntry
Syntax
addEntry(entry_ID)
Description
Use this method to create a FeedEntry object with the given ID.
Note. This is an abstract method.
Parameters
|
entry_ID |
Specifies the ID of the feed entry as a string. |
Returns
A FeedEntry object if successful, False otherwise.
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:XML_FEED:FeedDoc; import PTFP_FEED:XML_FEED:FeedEntry; Local boolean &succeeded; Local array of string &tempArray; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:XML_FEED:FeedDoc &thisFeedDoc = &thisFeedFactory.Utility.⇒ getFeedDoc("feed_ID", &thisFeedFactory.Utility.FEEDFORMAT_ATOM10, Null); Local PTFP_FEED:XML_FEED:FeedEntry &thisEntry = &thisFeedDoc.addEntry("entry_ID"); &thisEntry.Title = &contentTitle; &thisEntry.Description = &contentEntryDesc; &succeeded = &thisEntry.addCategory(&contentFolderTitle); &thisEntry.ContentUrl = &contentUrl; &thisEntry.GUID = &contentUrl; &thisEntry.Published = &contentCreatedDateTime; &thisEntry.Updated = &contentLastUpdatedDateTime; &thisEntry.Author = &thisFeedFactory.Utility.getUserInfo(&contentCreatedByOprid); &tempArray = &thisFeedFactory.Utility.getUserInfo(&contentLastUpdatedByOprid); &succeeded = &thisEntry.addContributor(&tempArray [1], &tempArray [2]); &succeeded = &thisEntry.addEnclosure(&contentAttachmentUrl, ⇒ "application/octet-stream", 123456);
See Also
deleteEntry, getEntry, resetEntries, Entries.

datetimeToString
Syntax
datetimeToString(Datetime)
Description
Use this method to transform a DateTime value to a string in a feed-specific format— for example, in the “yyyy-MM-dd HH:mm:ss.SSS” format.
Note. This is an abstract method.
Parameters
|
Datetime |
Specifies the DateTime value to be transformed. |
Returns
A string in a feed-specific format or an empty string if the DateTime value is empty.

deleteCategory
Syntax
deleteCategory(category)
Description
Use this method to delete a category attribute from a FeedDoc object.
Note. This is an abstract method.
Parameters
|
category |
Specifies the category as a string. |
Returns
A Boolean value: True if the delete was successful, False otherwise.
See Also

deleteEntry
Syntax
deleteEntry(entry_ID)
Description
Use this method to delete the feed entry and the FeedEntry object with the given ID.
Parameters
|
entry_ID |
Specifies the ID of the feed entry as a string. |
Returns
A Boolean value: True if the delete was successful, False otherwise.
See Also

equals
Syntax
equals(&Object)
Description
Use this method to evaluate the equivalency of an object with the current feed document. Equivalency is established based on the value of two properties: the object's ID and the ObjectType.
Parameters
|
&Object |
Specifies the object to be compared to the current FeedDoc object. |
Returns
A Boolean value: True if the items are equivalent, False otherwise.
See Also
ID, ObjectType.

getEntry
Syntax
getEntry(entry_ID)
Description
Use this method to return a FeedEntry object with the given ID.
Parameters
|
entry_ID |
Specifies the ID of the feed entry as a string. |
Returns
A FeedEntry object if successful, Null otherwise.
See Also

resetEntries
Syntax
resetEntries()
Description
Use this method to reset the FeedEntry collection.
Parameters
None.
Returns
An empty FeedEntry collection.
See Also

stringToDatetime
Syntax
stringToDatetime(DatetimeString)
Description
Use this method to covert a date/time string of a feed-specific format to a DateTime value.
Note. This is an abstract method.
Parameters
|
DatetimeString |
Specifies the string to be converted to a DateTime value. |
Returns
A DateTime value.
FeedDoc Class Properties
In this section, the FeedDoc class properties are presented in alphabetical order.

AllowMoreEntries
Description
Use this property to return a Boolean value indicating whether more feed entries are allowed for this FeedDoc object.
This property is read-only.
See Also

ApplicationRelease
Description
Use this property to return the release label from the PSRELEASE table as a string.
This property is read-only.

Categories
Description
Use this property to return the categories for the FeedDoc object as an array of string.
This property is read-only.
Note. This is an abstract property.
See Also

ContentUrl
Description
Use this property to set or return the content URL for the feed document as a string.
This property is read-write.
Note. This is an abstract property.
Example
&newDoc.ContentUrl = %This.FeedContentUrl;
See Also

Copyright
Description
Use this property to set or return the copyright for the feed document as a string.
This property is read-write.
Note. This is an abstract property.

Description
Description
Use this property to set or return the description for the feed document as a string.
This property is read-write.
Note. This is an abstract property.
Example
&newDoc.Description = %This.Description;
See Also

Entries
Description
Use this property to return a collection of FeedEntry objects.
This property is read-only.
See Also
addEntry, deleteEntry, resetEntries.

Expires
Description
Use this property to set or return the expiration date and time for the feed document as a DateTime value.
This property is read-write.
See Also
datetimeToString, stringToDatetime.

FeedFormat
Description
Use this property to return the feed format for the feed document as a string.
This property is read-only.
See Also

FeedUrl
Description
Use this property to set or return feed URL as a string.
This property is read-write.
Note. This is an abstract property.
Example
&newDoc.FeedUrl = &feedUrl;
See Also

FirstUrl
Description
Use this property to set or return the URL for the first page of a paged feed as a string.
This property is read-write.
See Also
LastUrl, NextUrl, PreviousUrl.

Generator
Description
Use this property to set or return the generator of this feed document as a string.
This property is read-write.
Note. This is an abstract property.
See Also

ID
Description
Use this property to return the ID for this feed document as a string.
This property is read-only.
See Also

LastUrl
Description
Use this property to set or return the URL for the last page of a paged feed as a string.
This property is read-write.
See Also
FirstUrl, NextUrl, PreviousUrl.

Logo
Description
Use this property to set or return the logo for this feed document as a string.
This property is read-write.
Note. This is an abstract property.

MaxAge
Description
Use this property to set or return the maximum age (in milliseconds) of the feed document as a number.
Note. This property can be defined for scheduled feeds only if the DSPARAMETER_SF_MAXMINUTES data source parameter is set. This property is not enforced by all feed readers.
This property is read-write.
See Also

MaxEntries
Description
Use this property to set or return the maximum number of feed entries for the feed document as a number.
This property is read-write.
The default value is 0, which is an unlimited number of entries.
See Also

NextUrl
Description
Use this property to set or return the URL for the next page of a paged feed as a string.
This property is read-write.
See Also
FirstUrl, LastUrl, PreviousUrl.

ObjectType
Description
Use this property to return the object type for the feed document as a string. For a feed document, this is a constant value: FeedDoc.
This property is read-only.

PreviousUrl
Description
Use this property to set or return the URL for the previous page of a paged feed as a string.
This property is read-write.
See Also

RootElement
Description
Use this property to return the root element for this feed document as an XmlNode object.
This property is read-only.

Title
Description
Use this property to set or return the title for the feed document as a string.
This property is read-write.
Note. This is an abstract property.
Example
&newDoc.Title = %This.Title;
See Also

Updated
Description
Use this property to set or return the date and time the feed document was last updated as a DateTime value.
This property is read-write.
Note. This is an abstract property.
FeedEntry Class
This section provides an overview of the FeedEntry class and discusses:
FeedEntry class constructor.
FeedEntry class methods.
FeedEntry class properties.
The FeedEntry class provides a generic interface class for feed entries. Therefore, for each feed format type, a format-specific feed entry class is required to extend the base FeedEntry class. As a base class, the FeedEntry class has abstract methods and properties, which are identified as such in the following sections.
FeedEntry Class ConstructorThis section presents the constructor for the FeedEntry class.

FeedEntry
Example
import PTFP_FEED:FeedFactory; import PTFP_FEED:XML_FEED:FeedDoc; import PTFP_FEED:XML_FEED:FeedEntry; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local PTFP_FEED:XML_FEED:FeedDoc &this_FeedDoc = &thisFeedFactory.Utility.⇒ getFeedDoc("feed_ID", &thisFeedFactory.Utility.FEEDFORMAT_ATOM10, Null); Local PTFP_FEED:XML_FEED:FeedEntry &this_Entry = &this_FeedDoc.⇒ addEntry("entry_ID");
See Also
FeedEntry Class Methods
In this section, the FeedEntry class methods are presented in alphabetical order.

addCategory
Syntax
addCategory(category)
Description
Use this method to add a category attribute to the feed entry as a string.
Note. This is an abstract method.
Parameters
|
category |
Specifies the category as a string. |
Returns
A Boolean value: True if the add was successful, False otherwise.
See Also

addContributor
Syntax
addContributor(name, email)
Description
Use this method to add a contributor attribute to the feed entry.
Note. This is an abstract method.
Parameters
|
name |
Specifies the name of the contributor as a string. |
|
|
Specifies the email address for the contributor as a string. |
Returns
A Boolean value: True if the add was successful, False otherwise.
See Also
deleteContributor, Contributors.

addEnclosure
Syntax
addEnclosure(URL, type, length)
Description
Use this method to add an enclosure attribute to the feed entry.
Note. This is an abstract method.
Parameters
|
URL |
Specifies the URL for the enclosure as a string. |
|
type |
Specifies the type of the enclosure as a string. |
|
length |
Specifies the length for the enclosure in bytes as a number. |
Returns
A Boolean value: True if the add was successful, False otherwise.
See Also

delete
Syntax
delete()
Description
Use this method to delete the feed entry from a feed document.
Parameters
None.
Returns
None.
Example
Local boolean &deleted = False; Local PTFP_FEED:UTILITY:Collection &Entries = %This.Entries; Local PTFP_FEED:XML_FEED:FeedEntry &thisEntry = %This.getEntry(&pId); If (&thisEntry <> Null) And ( Not &Entries.Immutable) Then &deleted = &Entries.deleteById(&pId); If &deleted Then &thisEntry.delete(); End-If; End-If;
See Also

deleteCategory
Syntax
deleteCategory(category)
Description
Use this method to delete a category attribute from a FeedEntry object.
Note. This is an abstract method.
Parameters
|
category |
Specifies the category as a string. |
Returns
A Boolean value: True if the delete was successful, False otherwise.
See Also

deleteContributor
Syntax
deleteContributor(name)
Description
Use this method to delete a contributor attribute from a feed entry.
Note. This is an abstract method.
Parameters
|
name |
Specifies the name of the contributor as a string. |
Returns
A Boolean value: True if the delete was successful, False otherwise.
See Also

deleteEnclosure
Syntax
deleteEnclosure(URL)
Description
Use this method to delete an enclosure attribute from a feed entry.
Note. This is an abstract method.
Parameters
|
URL |
Specifies the URL for the enclosure as a string. |
Returns
A Boolean value: True if the delete was successful, False otherwise.
See Also

equals
Syntax
equals(&Object)
Description
Use this method to evaluate the equivalency of an object with the current feed entry. Equivalency is established based on the value of two properties: the object's ID and the ObjectType.
Parameters
|
&Object |
Specifies the object to be compared to the current FeedEntry object. |
Returns
A Boolean value: True if the objects are equivalent, False otherwise.
See Also
ID, ObjectType.
FeedEntry Class Properties
In this section, the FeedEntry class properties are presented in alphabetical order.

Author
Description
Use this property to set or return the author attribute for the feed entry as an array of string. The first element of the array is the author's name; the second element is the author's email address.
This property is read-write.
Note. This is an abstract property.

Categories
Description
Use this property to return the categories for the feed entry as an array of string.
This property is read-only.
Note. This is an abstract property.
See Also

Comments
Description
Use this property to set or return a comments attribute for the feed entry as a string.
This property is read-write.
Note. This is an abstract property.

ContentUrl
Description
Use this property to set or return the content URL for the feed entry as a string.
This property is read-write.
Note. This is an abstract property.

Contributors
Description
Use this property to return the contributors for the feed entry as an array of array of string. The first element of the subarray is the contributor's name; the second element is the contributor's email address.
This property is read-only.
Note. This is an abstract property.
See Also

Copyright
Description
Use this property to set or return the copyright for the feed entry as a string.
This property is read-write.
Note. This is an abstract property.

Description
Description
Use this property to set or return the description for the feed entry as a string.
This property is read-write.
Note. This is an abstract property.

Enclosures
Description
Use this property to return the enclosures for the feed entry as an array of array of string. The first element of the subarray is the enclosure's URL; the second element is the enclosure's type; and the third element is the enclosure's length.
This property is read-only.
Note. This is an abstract property.
See Also

Expires
Description
Use this property to set or return the expiration date and time for the feed entry as a DateTime value.
This property is read-write.
See Also
datetimeToString, stringToDatetime.

FeedDoc
Description
Use this property to return the FeedDoc object that is the parent of this feed entry.
This property is read-only.
Example
&return_value = %This.FeedDoc.stringToDatetime(&expires_inst.NodeValue);
See Also

FullContent
Description
Use this property to set or return the content for the feed entry as a string.
This property is read-write.
Note. This is an abstract property.

GUID
Description
Use this property to set or return a globally unique ID (GUID) for the feed entry.
This property is read-write.
Note. This is an abstract property. For some feed formats, GUID is set to be the content URL for the feed entry.
See Also

ID
Description
Use this property to return the ID for this feed entry as a string.
This property is read-only.
See Also

MaxAge
Description
Use this property to set or return the maximum age (in milliseconds) of the feed entry as a number.
Note. This property can be defined for scheduled feeds only if the DSPARAMETER_SF_MAXMINUTES data source parameter is set. This property is not enforced by all feed readers.
This property is read-write.
See Also

ObjectType
Description
Use this property to return the object type for the feed entry as a string. For a feed entry, this is a constant value: FeedEntry .
This property is read-only.

Published
Description
Use this property to set or return the initial publication date and time for this feed entry as a DateTime value.
This property is read-write.
Note. This is an abstract property.

Title
Description
Use this property to set or return the title for the feed entry as a string.
This property is read-write.
Note. This is an abstract property.

Updated
Description
Use this property to set or return the date and time the feed entry was last updated as a DateTime value. Initially, the Updated and Published properties have equivalent values. However, if the feed entry is changed, then Updated is different from Published.
This property is read-write.
Note. This is an abstract property.
Additional Feed ExamplesThis section provides examples of the following: Implementing a real-time feed request handler.

Implementing a Real-Time Feed Request Handler
The following example implements a real-time feed request handler from the IRequestHandler superclass.
Important! For typical real-time feed requests, the default feed service operation (PTFP_GETFEED) and feed request handler should be sufficient. Unless there is specific functionality that is needed for a real-time feed request, use the default feed service operation. For scheduled feeds, the default service operation and hence the request handler cannot be modified.
import PS_PT:Integration:IRequestHandler; import PTFP_FEED:UTILITY:Utility; import PTFP_FEED:XML_FEED:FeedDoc; import PTFP_FEED:UTILITY:FeedRequest; import PTFP_FEED:Interface:IBGetFeedList; import PTFP_FEED:FeedFactory; import PTFP_FEED:EXCEPTION:*; class MyFeedHandler implements PS_PT:Integration:IRequestHandler /* --- Properties --- */ /* --- Methods --- */ method MyFeedHandler(); method OnRequest(&pRequestMsg As Message) Returns Message; method OnError(&pRequestMsg As Message) Returns string; end-class; /** onRequest is defined. Other methods shown as stubs. **/ method MyFeedHandler /* method stub */ end-method; method OnError /+ &pRequestMsg as Message +/ /+ Returns String +/ /+ Extends/implements PS_PT:Integration:IRequestHandler.OnError +/ Local string &errstring; /* method stub */ Return &errstring; end-method; /** * onRequest * * @param pRequestMsg Request Message. * * @exception FeedException thrown if switch user failed. * * @return Message Feed Document. * */ method OnRequest /+ &pRequestMsg as Message +/ /+ Returns Message +/ /+ Extends/implements PS_PT:Integration:IRequestHandler.OnRequest +/ Local boolean &succeeded; Local integer &i; Local string &temp, &name, &value; Local string &errorText; Local string &ibTransID, &pageNum, &HTTP_IfNoneMatch, &HTTP_IfModifiedSince,⇒ &DefaultLocalNode; Local Message &responseMsg; Local XmlDoc &xmlDoc; Local PTFP_FEED:FeedFactory &feedFactory_inst; Local PTFP_FEED:UTILITY:Utility &utility = &feedFactory_inst.Utility; Local PTFP_FEED:XML_FEED:FeedDoc &feedDoc; Local PTFP_FEED:UTILITY:FeedRequest &request; Local PTFP_FEED:Interface:IBGetFeedList &feedListObj; /* Ccreate the Search Request object */ &request = create PTFP_FEED:UTILITY:FeedRequest("FeedRequest"); /* Get the search criteria */ For &i = 1 To &pRequestMsg.IBInfo.IBConnectorInfo.GetNumberOfQueryStringArgs() &name = &pRequestMsg.IBInfo.IBConnectorInfo.GetQueryStringArgName(&i); &value = &pRequestMsg.IBInfo.IBConnectorInfo.GetQueryStringArgValue(&i); &succeeded = &request.addParameter(&name, &value); Evaluate Upper(&name) When Upper(&utility.QUERYPARAMETER_FEEDLIST) /* Feed List Request, forward the call */ &feedListObj = create PTFP_FEED:Interface:IBGetFeedList(); Return &feedListObj.OnRequest(&pRequestMsg); When Upper(&utility.QUERYPARAMETER_PORTALNAME) &request.PortalName = &value; Break; When Upper(&utility.QUERYPARAMETER_NODENAME) &request.NodeName = &value; Break; When Upper(&utility.QUERYPARAMETER_DATATYPEID) &request.DataTypeID = &value; Break; When Upper(&utility.QUERYPARAMETER_FEEDID) &request.FeedID = &value; Break; When Upper(&utility.QUERYPARAMETER_LANGUAGE) &request.LanguageCode = &value; Break; When Upper(&utility.QUERYPARAMETER_IBTRANSID) &ibTransID = &value; Break; When Upper(&utility.QUERYPARAMETER_PAGENUM) &pageNum = &value; Break; When Upper(&utility.QUERYPARAMETER_DEFLOCALNODE) &DefaultLocalNode = &value; Break; /* HTTP Conditonal Headers */ When Upper(&utility.QUERYPARAMETER_IFNONEMATCH) &HTTP_IfNoneMatch = &value; Break; When Upper(&utility.QUERYPARAMETER_IFMODIFIEDSINCE) &HTTP_IfModifiedSince = &value; Break; End-Evaluate; End-For; /* Get the current user PS_TOKEN */ &request.PS_TOKEN = GenToken(); /* Get the FeedDoc */ &errorText = ""; try &feedDoc = &feedFactory_inst.getFeedDoc(&request); catch PTFP_FEED:EXCEPTION:NotFoundException &ex1 &errorText = MsgGetExplainText(219, 3112, "(Message not found) Not Found"); catch PTFP_FEED:EXCEPTION:PrivilegeException &ex2 &errorText = MsgGetExplainText(219, 3113, "(Message not found) ⇒ Not Authorized"); catch PTFP_FEED:EXCEPTION:FeedException &ex3 &errorText = &utility.getExceptionText(&ex3); end-try; /* Create the response message */ &responseMsg = CreateMessage(Operation.PTFP_GETFEED, %IntBroker_Response); If None(&errorText) Then &responseMsg = &utility.setMessageHeadersAndMimeType(&responseMsg, &feedDoc,⇒ &request); Else &temp = "<?xml version='1.0' encoding='UTF-8'?><ErrorMessage>" | &errorText⇒ | "</ErrorMessage>"; &xmlDoc = CreateXmlDoc(&temp); &responseMsg.SetXmlDoc(&xmlDoc); &responseMsg.SegmentContentType = &utility.MIMETYPE_XML; End-If; Return &responseMsg; end-method;