Feed Classes

This chapter provides an overview of the feed classes and discusses:

Click to jump to parent topicUnderstanding the Feed Classes

This chapter documents the following feed classes from the PTFP_FEED application package:

The subpackages and classes not documented in this chapter include:

See Also

PeopleTools 8.51 PeopleBook: Feed Publishing Framework

PeopleTools 8.51 PeopleBook: PeopleSoft Integration Broker

Click to jump to parent topicImporting 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.

Click to jump to parent topicFeed Class

This section provides an overview of the Feed class and discusses:

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.

Click to jump to parent topicFeed Class Constructor

This section presents the constructor for the Feed class. Use the FeedFactory class to create an instance of the Feed class.

Click to jump to top of pageClick to jump to parent topicFeed

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

createFeed

Constructors

Import Declarations

Click to jump to parent topicFeed Class Methods

In this section, the Feed class methods are presented in alphabetical order.

Click to jump to top of pageClick to jump to parent topicdelete

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

deleteFeed

Click to jump to top of pageClick to jump to parent topicequals

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

Feed class: ID property, ObjectType property.

Click to jump to top of pageClick to jump to parent topicexecute

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

getFeedDoc

FeedDoc Class

Click to jump to top of pageClick to jump to parent topicgetAttribute

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.

Click to jump to top of pageClick to jump to parent topicload

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;

Click to jump to top of pageClick to jump to parent topicpopulatePrefData

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;

Click to jump to top of pageClick to jump to parent topicpublishToSites

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;

Click to jump to top of pageClick to jump to parent topicresetFeedAttributes

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

FeedAttributes

Click to jump to top of pageClick to jump to parent topicresetFeedSecurities

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

FeedSecurities

Click to jump to top of pageClick to jump to parent topicsave

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;

Click to jump to top of pageClick to jump to parent topicsaveAs

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;

Click to jump to top of pageClick to jump to parent topicsetAttribute

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;

Click to jump to top of pageClick to jump to parent topicsetDataSourceById

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

DataSource Class

Click to jump to top of pageClick to jump to parent topicunpublishFromSites

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;

Click to jump to parent topicFeed Class Properties

In this section, the Feed class properties are presented in alphabetical order.

Click to jump to top of pageClick to jump to parent topicAuthorized

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;

Click to jump to top of pageClick to jump to parent topicCategoryID

Description

Use this property to set or return the category ID for the feed definition as a string.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicCreateDTTM

Description

This property returns the date and time the feed definition was created as a datetime value.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicCreateNode

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.

Click to jump to top of pageClick to jump to parent topicCreateOprID

Description

This property returns user ID of the user who created the feed definition, as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicCreatePortal

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.

Click to jump to top of pageClick to jump to parent topicDataSource

Description

Use this property to set or return a DataSource object for the feed definition.

This property is read-write.

See Also

DataSource Class

Click to jump to top of pageClick to jump to parent topicDataTypeID

Description

This property returns the data type ID for the feed definition's data source, as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicDescription

Description

Use this property to set or return the description of the feed definition as a string.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicFeedAttributes

Description

Use this property to set or return a FeedAttributes collection.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicFeedAuthorizationOprID

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.

Click to jump to top of pageClick to jump to parent topicFeedAuthorizationOprPWD

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.

Click to jump to top of pageClick to jump to parent topicFeedAuthorizationType

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_
ANONYMOUS

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.

Click to jump to top of pageClick to jump to parent topicFeedCacheTime

Description

This property is not used currently.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicFeedCacheType

Description

This property is not used currently.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicFeedContentUrl

Description

This property returns a string representing the content URL to open the content page of the feed.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFeedFactory

Description

Use this property to set or return the FeedFactory object used by this Feed object.

This property is read-write.

See Also

FeedFactory Class

Click to jump to top of pageClick to jump to parent topicFeedFormat

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.

Click to jump to top of pageClick to jump to parent topicFeedSecurities

Description

Use this property to set or return a FeedSecurities collection.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicFeedSecurityType

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_
SELECTED

Specifies role or permission list based access to the feed. The role or permission list is stored with the feed definition

&utility.FEEDSECUTYPE_
REALTIME

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.

Click to jump to top of pageClick to jump to parent topicFeedUrl

Description

This property returns a string representing the feed URL to open the feed document.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicHasAdminParams

Description

This property returns a Boolean value indicating whether the feed definition has administrator-specified data source parameters.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicHasUserParams

Description

This property returns a Boolean value indicating whether the feed definition has user-specified data source parameters.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicIBOperationName

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.

Click to jump to top of pageClick to jump to parent topicID

Description

This property returns the ID for the feed definition as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicLastPubDTTM

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.

Click to jump to top of pageClick to jump to parent topicLastUpdDTTM

Description

This property returns the last update date and time for the feed definition, as a datetime value.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicLastUpdOprID

Description

This property returns the user ID of the user to have last updated the feed definition, as string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicNameSpaceID

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.

Click to jump to top of pageClick to jump to parent topicObjectType

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.

Click to jump to top of pageClick to jump to parent topicOperatingMode

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_
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 no 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.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicOwnerID

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.

Click to jump to top of pageClick to jump to parent topicPublishedInSites

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.

Click to jump to top of pageClick to jump to parent topicTitle

Description

Use this property to set or return the title of the feed definition as a string.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicUtility

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

Utility Class

Click to jump to parent topicFeedFactory Class

This section provides an overview of the FeedFactory class and discusses:

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

Click to jump to parent topicFeedFactory Class Constructor

This section presents the constructor for the FeedFactory class.

Click to jump to top of pageClick to jump to parent topicFeedFactory

Example

import PTFP_FEED:FeedFactory; Local PTFP_FEED:FeedFactory &PTFP_FEED_FACTORY = create PTFP_FEED:FeedFactory();

See Also

Constructors

Import Declarations

Click to jump to parent topicFeedFactory Class Methods

In this section, the FeedFactory class methods are presented in alphabetical order.

Click to jump to top of pageClick to jump to parent topicconvertFeedLinksToHoverMenu

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);

Click to jump to top of pageClick to jump to parent topicconvertFeedLinksToOPML

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);

Click to jump to top of pageClick to jump to parent topiccreateFeed

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

Feed Class

Click to jump to top of pageClick to jump to parent topicdeleteFeed

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

delete

Click to jump to top of pageClick to jump to parent topicgenFeedUrl

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

Utility class: FEEDSECUTYPE_PUBLIC property, FEEDSECUTYPE_REALTIME property, FEEDSECUTYPE_SELECTED property.

Click to jump to top of pageClick to jump to parent topicgenUniqueFeedId

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");

Click to jump to top of pageClick to jump to parent topicgetAllPagedFeedLinks

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

Paged Feeds

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

getRelativePageLinkForFeed

Click to jump to top of pageClick to jump to parent topicgetCategory

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:

Example

import PTFP_FEED:FeedFactory; Local PTFP_FEED:FeedFactory &thisFeedFactory = create PTFP_FEED:FeedFactory(); Local array of string &catagories = &thisFeedFactory.getCategory⇒ ("category_ID", True);

Click to jump to top of pageClick to jump to parent topicgetDataSource

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

DataSource Class Constructor

Click to jump to top of pageClick to jump to parent topicgetFeed

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

Feed Class Constructor

OPERATINGMODE_AUTHORIZATION, OPERATINGMODE_DEFAULT, OPERATINGMODE_DELETION, OPERATINGMODE_EXECUTION, OPERATINGMODE_EXECUTION_NOENTRY.

Click to jump to top of pageClick to jump to parent topicgetFeedDoc

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

execute

FeedDoc Class

Click to jump to top of pageClick to jump to parent topicgetFeedLink

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");

Click to jump to top of pageClick to jump to parent topicgetFeedLinks

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);

Click to jump to top of pageClick to jump to parent topicgetRelatedFeedsHoverMenu

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));

Click to jump to top of pageClick to jump to parent topicgetRelativePageLinkForFeed

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

Paged Feeds

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

getAllPagedFeedLinks

Click to jump to parent topicFeedFactory Class Properties

In this section, the FeedFactory class properties are presented in alphabetical order.

Click to jump to top of pageClick to jump to parent topicDataSources

Description

This property returns a collection of all data source definitions (a collection of DataSource objects).

This property is read-only.

See Also

DataSource Class

Click to jump to top of pageClick to jump to parent topicFeeds

Description

This property returns a collection of all feed definitions (a collection of Feed objects).

This property is read-only.

See Also

Feed Class

Click to jump to top of pageClick to jump to parent topicUtility

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

Utility Class

Click to jump to parent topicDataSource Class

This section provides an overview of the DataSource class and discusses:

The DataSource class is an abstract base class and should not be used directly. All feed data sources should extend this class.

Click to jump to parent topicDataSource Class Constructor

This section presents the constructor for the DataSource class. Use the FeedFactory class to create an instance of the DataSource class.

Click to jump to top of pageClick to jump to parent topicDataSource

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

getDataSource

Constructors

Import Declarations

Click to jump to parent topicDataSource Class Methods

In this section, the DataSource class methods are presented in alphabetical order.

Click to jump to top of pageClick to jump to parent topicaddParameter

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

DataSourceParameter Class

DSPARAMETER_MAXROW, DSPARAMETER_SF_MAXMINUTES, DSPARAMETER_SF_PAGING.

Click to jump to top of pageClick to jump to parent topicequals

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

DataSource class: ID property, ObjectType property.

Click to jump to top of pageClick to jump to parent topicgetAttributeById

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.

Click to jump to top of pageClick to jump to parent topicgetContentUrl

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;

Click to jump to top of pageClick to jump to parent topicgetDataSecurity

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.

Click to jump to top of pageClick to jump to parent topicgetParameterById

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

DataSourceParameter Class

DSPARAMETER_MAXROW, DSPARAMETER_SF_MAXMINUTES, DSPARAMETER_SF_PAGING.

Click to jump to top of pageClick to jump to parent topicgetParameterDetail

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.

Click to jump to top of pageClick to jump to parent topicgetSettingById

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

DataSourceSetting Class

Click to jump to top of pageClick to jump to parent topicgetSettingDetail

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.

Click to jump to top of pageClick to jump to parent topicisCurrentUserAdmin

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;

Click to jump to top of pageClick to jump to parent topicisCurrentUserAuthorized

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;

Click to jump to top of pageClick to jump to parent topiconDelete

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.

Click to jump to top of pageClick to jump to parent topiconSave

Syntax

onSave()

Description

Use this method to update related data after a feed definition has been saved.

Parameters

None.

Click to jump to top of pageClick to jump to parent topicresetParameters

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

Parameters

Click to jump to parent topicDataSource Class Properties

In this section, the DataSource class properties are presented in alphabetical order.

Click to jump to top of pageClick to jump to parent topicAdminPersonalizationPage

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.

Click to jump to top of pageClick to jump to parent topicAllowCustomParameters

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.

Click to jump to top of pageClick to jump to parent topicAllowRealTimeFeedSecurity

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.

Click to jump to top of pageClick to jump to parent topicDataSourceType

Description

This property returns the data source type as a string. The default value is a constant: BaseDataSource.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicDefaultFeedAttributes

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.

Click to jump to top of pageClick to jump to parent topicDefaultIBOperationName

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.

Click to jump to top of pageClick to jump to parent topicDescription

Description

Use this property to set or return the description of the data type as a string.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicHasParameters

Description

This property whether the data source has parameters, as a Boolean value.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicHasSettings

Description

This property whether the data source has settings, as a Boolean value.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicIBOperations

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.

Click to jump to top of pageClick to jump to parent topicID

Description

This property returns the ID for the data type as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicLongDescription

Description

Use this property to set or return the long description of the data type as a string.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicObjectType

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.

Click to jump to top of pageClick to jump to parent topicParameters

Description

This property returns the DataSoureParameter collection of this data source.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicParametersCompleted

Description

This property indicates whether all required data source parameters have values, as a Boolean value.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicParent

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

Feed Class

Click to jump to top of pageClick to jump to parent topicPortalSpecificPersonalization

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.

Click to jump to top of pageClick to jump to parent topicSettings

Description

This property returns the DataSourceSetting collection.

This property is read-only.

See Also

DataSourceSetting Class

Click to jump to top of pageClick to jump to parent topicSettingsCompleted

Description

This property returns a Boolean value indicating whether all required data source settings are selected.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicUserPersonalizationPage

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.

Click to jump to top of pageClick to jump to parent topicUtility

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

Utility Class

Click to jump to parent topicDataSourceParameter Class

This section provides an overview of the DataSourceParameter class and discusses:

The DataSourceParameter class represent a data source parameter that used by the DataSource object to refine the feed data selection.

Click to jump to parent topicDataSourceParameter Class Constructor

This section presents the constructor for the DataSourceParameter class.

Click to jump to top of pageClick to jump to parent topicDataSourceParameter

Example

import PTFP_FEED:DataSource:DataSourceParameter; Local PTFP_FEED:DataSource:DataSourceParameter &DSP = create PTFP_FEED:DataSource:⇒ DataSourceParameter("DSP_ID", ​&Parent_DS);

See Also

Constructors

Import Declarations

Click to jump to parent topicDataSourceParameter Class Methods

In this section, the DataSourceParameter class methods are presented in alphabetical order.

Click to jump to top of pageClick to jump to parent topicaddUserValue

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

Click to jump to top of pageClick to jump to parent topicclone

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.

Click to jump to top of pageClick to jump to parent topicequals

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

DataSourceParameter class: ID property, ObjectType property.

Click to jump to top of pageClick to jump to parent topicresetUserValues

Syntax

resetUserValues()

Description

Use this method to reset the UserValues collection.

Parameters

None.

Returns

An empty UserValues collection if successful, null otherwise.

See Also

UserValues

Click to jump to top of pageClick to jump to parent topicsetRangeFromFieldTranslates

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.

Click to jump to top of pageClick to jump to parent topicvalidateValue

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.

Click to jump to parent topicDataSourceParameter Class Properties

In this section, the DataSourceParameter class properties are presented in alphabetical order.

Click to jump to top of pageClick to jump to parent topicAllowChangesToRequired

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.

Click to jump to top of pageClick to jump to parent topicDefaultValue

Description

Use this property to set or return a string representing the default value for this data source parameter.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicDefaultValueForDisplay

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.

Click to jump to top of pageClick to jump to parent topicDescription

Description

Use this property to set or return the description of the data source parameter as a string.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicEditType

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_
TRANSLATETABLE

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.

Click to jump to top of pageClick to jump to parent topicEvaluatedValue

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.

Click to jump to top of pageClick to jump to parent topicFieldType

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_
LONGCHARACTER

Long character field

2

&utility.FIELDTYPE_NUMBER

Number field

3

&utility.FIELDTYPE_
SIGNEDNUMBER

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.

Click to jump to top of pageClick to jump to parent topicID

Description

This property returns the ID for this data source parameter as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicName

Description

Use this property to set or return the name of this data source parameter as a string.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicObjectType

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.

Click to jump to top of pageClick to jump to parent topicParent

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

DataSource Class

Click to jump to top of pageClick to jump to parent topicPromptTable

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.

Click to jump to top of pageClick to jump to parent topicRange

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.

Click to jump to top of pageClick to jump to parent topicRequired

Description

Use this property to set or return whether this data source parameter is required, as a Boolean value.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicSkipValidityChecks

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.

Click to jump to top of pageClick to jump to parent topicUsageType

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_
NOTUSED

This parameter is not used.

&utility.USAGETYPE_SYSVAR

This parameter gets its value from a system variable.

&utility.USAGETYPE_
USERSPECIFIED

The value of this parameter can be specified by the user.

&utility.USAGETYPE_
INTERNAL

This parameter is for internal use.

&utility.USAGETYPE_
ADMINSPECIFIED

The value of this parameter can be changed only by users having administrator access to the data.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicUserValues

Description

This property returns the valid values (that is, the UserValues collection).

This property is read-only.

Click to jump to top of pageClick to jump to parent topicUtility

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

Utility Class

Click to jump to top of pageClick to jump to parent topicValue

Description

Use this property to set or return the value of the data source parameter as a string.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicValueForDisplay

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.

Click to jump to parent topicDataSourceParameterValue Class

This section provides an overview of the DataSourceParameterValue class and discusses:

The DataSourceParameterValue class represents a valid value for a data source parameter.

Click to jump to parent topicDataSourceParameterValue Class Constructor

This section presents the constructor for the DataSourceParameterValue class.

Click to jump to top of pageClick to jump to parent topicDataSourceParameterValue

Example

Local PTFP_FEED:DataSource:DataSourceParameterValue &DSP_Value = create PTFP_FEED:⇒ DataSource:DataSourceParameterValue("ID", ​&Parent_DSP);

See Also

Constructors

Import Declarations

Click to jump to parent topicDataSourceParameterValue Class Methods

In this section, the DataSourceParameterValue class methods are presented in alphabetical order.

Click to jump to top of pageClick to jump to parent topicclone

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.

Click to jump to top of pageClick to jump to parent topicequals

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

DataSourceParameterValue class: ID property, ObjectType property.

Click to jump to parent topicDataSourceParameterValue Class Properties

In this section, the DataSourceParameterValue class properties are presented in alphabetical order.

Click to jump to top of pageClick to jump to parent topicDescription

Description

Use this property to set or return the description of this data source parameter value as a string.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicID

Description

This property returns the ID for this data source parameter value as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicName

Description

Use this property to set or return the name of this data source parameter value as a string.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicObjectType

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.

Click to jump to top of pageClick to jump to parent topicOrderNumber

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.

Click to jump to top of pageClick to jump to parent topicParent

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

DataSourceParameter Class

Click to jump to top of pageClick to jump to parent topicValue

Description

Use this property to set or return the value of the data source parameter value as a string.

This property is read-write.

Click to jump to parent topicDataSourceSetting Class

This section provides an overview of the DataSourceSetting class and discusses:

The DataSourceSetting class represents a data source setting that is used to uniquely define a feed's data source of a given type.

Click to jump to parent topicDataSourceSetting Class Constructor

This section presents the constructor for the DataSourceSetting class.

Click to jump to top of pageClick to jump to parent topicDataSourceSetting

Example

import PTFP_FEED:DataSource:DataSourceSetting; Local PTFP_FEED:DataSource:DataSourceSetting &this_DSS = create PTFP_FEED:⇒ DataSource:DataSourceSetting("DSS_ID", ​&DS);

See Also

Constructors

Import Declarations

Click to jump to parent topicDataSourceSetting Class Methods

In this section, the DataSourceSetting class methods are presented in alphabetical order.

Click to jump to top of pageClick to jump to parent topicclone

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.

Click to jump to top of pageClick to jump to parent topicequals

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

DataSourceSetting class: ID property, ObjectType property.

Click to jump to top of pageClick to jump to parent topicsetRangeFromFieldTranslates

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.

Click to jump to parent topicDataSourceSetting Class Properties

In this section, the DataSourceSetting class properties are presented in alphabetical order.

Click to jump to top of pageClick to jump to parent topicDefaultValue

Description

Use this property to set or return a string representing the default value for a data source setting.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicDisplayOnly

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.

Click to jump to top of pageClick to jump to parent topicEditType

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_
TRANSLATETABLE

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.

Click to jump to top of pageClick to jump to parent topicEnabled

Description

Use this property to set or return a Boolean value indicating whether the setting is enabled.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicFieldType

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_
LONGCHARACTER

Long character field

2

&utility.FIELDTYPE_NUMBER

Number field

3

&utility.FIELDTYPE_
SIGNEDNUMBER

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.

Click to jump to top of pageClick to jump to parent topicID

Description

This property returns the ID for the data source setting as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicLongName

Description

Use this property to set or return the label of the name as a string.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicName

Description

Use this property to set or return the name of the data source setting as a string.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicObjectType

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.

Click to jump to top of pageClick to jump to parent topicParent

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

DataSource Class

Click to jump to top of pageClick to jump to parent topicPromptTable

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.

Click to jump to top of pageClick to jump to parent topicRange

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.

Click to jump to top of pageClick to jump to parent topicRefreshOnChange

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.

Click to jump to top of pageClick to jump to parent topicRelatedFieldValue

Description

Use this property to set or return the related display field value as a string.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicRequired

Description

Use this property to set or return a Boolean value indicating whether this data source setting is required.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicShowRelatedField

Description

Use this property to set or return a Boolean value indicating whether to show the related display field.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicUtility

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

Utility Class

Click to jump to top of pageClick to jump to parent topicValue

Description

Use this property to set or return the value of the data source setting as a string.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicVisible

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.

Click to jump to parent topicUtility Class

This section provides an overview of the Utility class and discusses:

The Utility class provides methods and constants used by other classes of the Feed Publishing Framework

Click to jump to parent topicUtility Class Constructor

This section presents the constructor for the Utility class.

Click to jump to top of pageClick to jump to parent topicUtility

Example

import PTFP_FEED:UTILITY:Utility; Local PTFP_FEED:UTILITY:Utility &utility = create PTFP_FEED:UTILITY:Utility();

See Also

Constructors

Import Declarations

Click to jump to parent topicUtility Class Methods

In this section, the Utility class methods are presented in alphabetical order.

Click to jump to top of pageClick to jump to parent topicdateStringToUserPref

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.

Click to jump to top of pageClick to jump to parent topicdatetimeToString

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.

Click to jump to top of pageClick to jump to parent topicdateToString

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.

Click to jump to top of pageClick to jump to parent topicdecodeXML

Syntax

decodeXML(String)

Description

Use this method to decode the following encoded XML characters in the source string:

Encoded Character

Decoded Character

&lt;

< (less than)

&gt;

> (greater than)

&amp;

& (ampersand)

&apos;

' (apostrophe)

&quot;

" (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, split2D.

Click to jump to top of pageClick to jump to parent topicencodeXML

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)

&lt;

> (greater than)

&gt;

& (ampersand)

&amp;

' (apostrophe)

&apos;

" (quotation mark)

&quot;

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

decodeXML, join2D.

Click to jump to top of pageClick to jump to parent topicevaluateSysVar

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.

Click to jump to top of pageClick to jump to parent topicgenNameSpaceID

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 “_”.

Click to jump to top of pageClick to jump to parent topicgetExceptionText

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.

Click to jump to top of pageClick to jump to parent topicgetFeedDoc

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

FeedDoc Class

Click to jump to top of pageClick to jump to parent topicgetFeedMimeType

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

Click to jump to top of pageClick to jump to parent topicgetFieldTranslates

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.

Click to jump to top of pageClick to jump to parent topicgetNodeValue

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

setNodeValue, split, split2D.

Click to jump to top of pageClick to jump to parent topicgetUserDateFormat

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.

Click to jump to top of pageClick to jump to parent topicgetUserDatetimeFormat

Syntax

getUserDatetimeFormat()

Description

Use this method to construct and return the datetime format string based on the user's personalization settings.

Parameters

None.

Returns

A string containing the format mask representing the user's preferred datetime format—for example: MM-dd-yyyy hh:mm a.

Click to jump to top of pageClick to jump to parent topicgetUserInfo

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:

Click to jump to top of pageClick to jump to parent topichttpStringToDatetime

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.

Click to jump to top of pageClick to jump to parent topicjoin

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

setNodeValue, split.

Click to jump to top of pageClick to jump to parent topicjoin2D

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.

Click to jump to top of pageClick to jump to parent topicsetMessageHeadersAndMimeType

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

httpStringToDatetime

Implementing a Real-Time Feed Request Handler

Incremental Feeds

Click to jump to top of pageClick to jump to parent topicsetNodeValue

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

getNodeValue, join, join2D.

Click to jump to top of pageClick to jump to parent topicshowException

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.

Click to jump to top of pageClick to jump to parent topicshowInvalidValueException

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

showException

Click to jump to top of pageClick to jump to parent topicsplit

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

getNodeValue, join.

Click to jump to top of pageClick to jump to parent topicsplit2D

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.

Click to jump to top of pageClick to jump to parent topicstringToDate

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.

Click to jump to top of pageClick to jump to parent topicstringToDatetime

Syntax

stringToDatetime(DatetimeString)

Description

Use this method to convert a date string in the "yyyy-MM-dd HH:mm:ss" format to a datetime.

Parameters

DatetimeString

Specifies the string to be converted to a datetime.

Returns

A datetime.

Click to jump to top of pageClick to jump to parent topicvalidateSysVar

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" */

Click to jump to top of pageClick to jump to parent topicviewStringAsAttachment

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.

Click to jump to parent topicUtility 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

Click to jump to top of pageClick to jump to parent topicATTACHMENT_URL

Description

Use this property to return the attachment location from the PTFP_DOCINDB URL definition, as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicAUTHTYPE_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.

Click to jump to top of pageClick to jump to parent topicAUTHTYPE_ROLE

Description

Use this property to return the value that represents the role-based authentication type, as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicDSPARAMETER_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.

Click to jump to top of pageClick to jump to parent topicDSPARAMETER_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.

Click to jump to top of pageClick to jump to parent topicDSPARAMETER_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

SF_MAXMINUTES_ALLMSGS

Click to jump to top of pageClick to jump to parent topicDSPARAMETER_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.

Click to jump to top of pageClick to jump to parent topicEDITTYPE_NOTABLEEDIT

Description

Use this property to return a number representing the field edit type as no prompt table edit.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicEDITTYPE_PROMPTTABLE

Description

Use this property to return a number representing the field edit type as prompt table edit.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicEDITTYPE_TRANSLATETABLE

Description

Use this property to return a number representing the field edit type as translate table edit.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicEDITTYPE_YESNO

Description

Use this property to return a number representing the field edit type as a Yes/No edit.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFEEDATTRIBUTE_AUTHOR

Description

Use this property to return the AUTHOR feed attribute name as a string.

This property is read-only.

See Also

XMLCHILDELEMENTS_PERSON

Click to jump to top of pageClick to jump to parent topicFEEDATTRIBUTE_CLOUD

Description

Use this property to return the CLOUD feed attribute name as a string.

This property is read-only.

See Also

XMLCHILDELEMENTS_CLOUD

Click to jump to top of pageClick to jump to parent topicFEEDATTRIBUTE_COMPLETE

Description

Use this property to return the COMPLETE feed attribute name as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFEEDATTRIBUTE_CONTRIBUTOR

Description

Use this property to return the CONTRIBUTOR feed attribute name as a string.

This property is read-only.

See Also

XMLCHILDELEMENTS_PERSON

Click to jump to top of pageClick to jump to parent topicFEEDATTRIBUTE_COPYRIGHT

Description

Use this property to return the COPYRIGHT feed attribute name as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFEEDATTRIBUTE_EXPIRES

Description

Use this property to return the EXPIRES feed attribute name as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFEEDATTRIBUTE_ICONURL

Description

Use this property to return the ICONURL feed attribute name as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFEEDATTRIBUTE_LOGOURL

Description

Use this property to return the LOGOURL feed attribute name as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFEEDATTRIBUTE_MANAGINGEDITOR

Description

Use this property to return the MANAGINGEDITOR feed attribute name as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFEEDATTRIBUTE_MAXAGE

Description

Use this property to return the MAXAGE feed attribute name as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFEEDATTRIBUTE_PERSINSTRUCTION

Description

Use this property to return the PERSINSTRUCTION feed attribute name as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFEEDATTRIBUTE_RATING

Description

Use this property to return the RATING feed attribute name as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFEEDATTRIBUTE_SKIPDAYS

Description

Use this property to return the SKIPDAYS feed attribute name as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFEEDATTRIBUTE_SKIPHOURS

Description

Use this property to return the SKIPHOURS feed attribute name as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFEEDATTRIBUTE_TEXTINPUT

Description

Use this property to return the TEXTINPUT feed attribute name as a string.

This property is read-only.

See Also

XMLCHILDELEMENTS_TEXTINPUT

Click to jump to top of pageClick to jump to parent topicFEEDATTRIBUTE_TTL

Description

Use this property to return the TTL feed attribute name as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFEEDATTRIBUTE_WEBMASTER

Description

Use this property to return the WEBMASTER feed attribute name as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFEEDATTRIBUTE_XSL

Description

Use this property to return the XSL feed attribute name as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFEEDAUTHTYPE_ALL

Description

Use this property to return a string representing the feed authorization type as all.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFEEDAUTHTYPE_ANONYMOUS

Description

Use this property to return a string representing the feed authorization type as anonymous.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFEEDAUTHTYPE_DEFAULT

Description

Use this property to return a string representing the feed authorization type as default.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFEEDCACHETYPE_NONE

Description

Use this property to return a string representing the feed cache type as none.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFEEDCACHETYPE_PRIVATE

Description

Use this property to return a string representing the feed cache type as private.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFEEDCACHETYPE_PUBLIC

Description

Use this property to return a string representing the feed cache type as public.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFEEDCACHETYPE_ROLE

Description

Use this property to return a string representing the feed cache type as role-based.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFEEDFORMAT_ATOM10

Description

Use this property to return a string representing the feed format as Atom 1.0.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFEEDSECUTYPE_PUBLIC

Description

Use this property to return a string representing the feed security type as public access.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFEEDSECUTYPE_REALTIME

Description

Use this property to return a string representing the feed security type as real-time security.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFEEDSECUTYPE_SELECTED

Description

Use this property to return a string representing the feed security type as select security access.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFEEDTYPE_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.

Click to jump to top of pageClick to jump to parent topicFEEDTYPE_PREPUBLISHED

Description

Use this property to return a string representing the feed type as scheduled (formerly known as prepublished).

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFIELDTYPE_CHARACTER

Description

Use this property to return a number representing the field type as character.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFIELDTYPE_DATE

Description

Use this property to return a number representing the field type as date.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFIELDTYPE_DATETIME

Description

Use this property to return a number representing the field type as datetime.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFIELDTYPE_LONGCHARACTER

Description

Use this property to return a number representing the field type as long character.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFIELDTYPE_NUMBER

Description

Use this property to return a number representing the field type as number.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFIELDTYPE_SIGNEDNUMBER

Description

Use this property to return a number representing the field type as signed number.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFIELDTYPE_TIME

Description

Use this property to return a number representing the field type as time.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicIBSOTYPE_ASYNC

Description

Use this property to return a string representing the Integration Broker service operation type as asynchronous.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicIBSOTYPE_SYNC

Description

Use this property to return a string representing the Integration Broker service operation type as synchronous.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicIBSOTYPE_UNKNOWN

Description

Use this property to return a string representing the Integration Broker service operation type as unknown.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicICONURL_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.

Click to jump to top of pageClick to jump to parent topicICONURL_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.

Click to jump to top of pageClick to jump to parent topicINCREMENTALOPTION_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

DSPARAMETER_INCREMENTAL

Incremental Feeds

Click to jump to top of pageClick to jump to parent topicINCREMENTALOPTION_YES

Description

Use this property to return an integer indicating that the feed is an incremental feed.

This property is read-only.

See Also

DSPARAMETER_INCREMENTAL

Incremental Feeds

Click to jump to top of pageClick to jump to parent topicLINKTYPE_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

getRelativePageLinkForFeed

Paged Feeds

Click to jump to top of pageClick to jump to parent topicLINKTYPE_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

getRelativePageLinkForFeed

Paged Feeds

Click to jump to top of pageClick to jump to parent topicLINKTYPE_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

getRelativePageLinkForFeed

Paged Feeds

Click to jump to top of pageClick to jump to parent topicLINKTYPE_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

getRelativePageLinkForFeed

Paged Feeds

Click to jump to top of pageClick to jump to parent topicMIMETYPE_ATOM

Description

Use this property to return a string containing the MIME type for Atom feed format data.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicMIMETYPE_OPML

Description

Use this property to return a string containing the MIME type for OPML format data.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicMIMETYPE_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.

Click to jump to top of pageClick to jump to parent topicOPERATINGMODE_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.

Click to jump to top of pageClick to jump to parent topicOPERATINGMODE_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.

Click to jump to top of pageClick to jump to parent topicOPERATINGMODE_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.

Click to jump to top of pageClick to jump to parent topicOPERATINGMODE_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.

Click to jump to top of pageClick to jump to parent topicOPERATINGMODE_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.

Click to jump to top of pageClick to jump to parent topicQUERYPARAMETER_CHILDFEEDID

Description

Use this property to return the ChildFeedID query parameter name as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicQUERYPARAMETER_DATATYPEID

Description

Use this property to return the PTFP_DATA_TYPE query parameter as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicQUERYPARAMETER_DEFLOCALNODE

Description

Use this property to return the To query parameter as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicQUERYPARAMETER_DSSCOUNT

Description

Use this property to return the PTFP_DSS_COUNT query parameter as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicQUERYPARAMETER_DSSNAME

Description

Use this property to return the PTFP_DSS_NAME query parameter as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicQUERYPARAMETER_DSSVALUE

Description

Use this property to return the PTFP_DSS_VALUE query parameter as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicQUERYPARAMETER_FEEDFORMAT

Description

Use this property to return the FeedFormat query parameter as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicQUERYPARAMETER_FEEDID

Description

Use this property to return the FEED_ID query parameter as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicQUERYPARAMETER_FEEDLIST

Description

Use this property to return the FEEDLIST query parameter as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicQUERYPARAMETER_FEEDTYPE

Description

Use this property to return the PTFP_FEED_TYPE query parameter as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicQUERYPARAMETER_IBTRANSID

Description

Use this property to return the IB_TRANS_ID query parameter as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicQUERYPARAMETER_IFMODIFIEDSINCE

Description

Use this property to return the If-None-Match query parameter as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicQUERYPARAMETER_IFNONEMATCH

Description

Use this property to return the PAGE_NUM query parameter as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicQUERYPARAMETER_KEYWORD

Description

Use this property to return the PTFP_FEED_KEYWORD query parameter as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicQUERYPARAMETER_LANGUAGE

Description

Use this property to return the languageCd query parameter as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicQUERYPARAMETER_NODENAME

Description

Use this property to return the NODE_NAME query parameter as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicQUERYPARAMETER_PAGENUM

Description

Use this property to return this query parameter as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicQUERYPARAMETER_PORTALNAME

Description

Use this property to return the PORTAL_NAME query parameter as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicQUERYPARAMETER_PTPPB_SEARCH_MODE

Description

Use this property to return the PTPPB_SEARCH_MODE query parameter as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicQUERYPARAMETER_PTPPB_SEARCH_TEXT

Description

Use this property to return the SEARCH_TEXT query parameter as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicRequestInfo

Description

Use this property to set or return a FeedRequest object.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicSF_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

DSPARAMETER_SF_MAXMINUTES

Click to jump to top of pageClick to jump to parent topicSF_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

DSPARAMETER_MAXROW

Click to jump to top of pageClick to jump to parent topicSF_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

DSPARAMETER_MAXROW

Click to jump to top of pageClick to jump to parent topicSF_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

DSPARAMETER_SF_PAGING

Click to jump to top of pageClick to jump to parent topicSF_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

DSPARAMETER_SF_PAGING

Click to jump to top of pageClick to jump to parent topicSYSVAR_INVALID

Description

Use this property to return the string that indicates that a system variable is invalid.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicUSAGETYPE_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.

Click to jump to top of pageClick to jump to parent topicUSAGETYPE_FIXED

Description

Use this property to return a string indicating that the data source parameter usage type is fixed.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicUSAGETYPE_INTERNAL

Description

Use this property to return a string indicating that the data source parameter usage type is internal.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicUSAGETYPE_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.

Click to jump to top of pageClick to jump to parent topicUSAGETYPE_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.

Click to jump to top of pageClick to jump to parent topicUSAGETYPE_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.

Click to jump to top of pageClick to jump to parent topicXMLCHILDELEMENTS_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

FEEDATTRIBUTE_CLOUD

Click to jump to top of pageClick to jump to parent topicXMLCHILDELEMENTS_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.

Click to jump to top of pageClick to jump to parent topicXMLCHILDELEMENTS_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

FEEDATTRIBUTE_TEXTINPUT

Click to jump to top of pageClick to jump to parent topicXMLELEMENT_DAY

Description

Use this property to return as a string the representing the day XML element.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicXMLELEMENT_DESCRIPTION

Description

Use this property to return as a string the representing the description XML element.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicXMLELEMENT_DOMAIN

Description

Use this property to return as a string the representing the domain XML element.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicXMLELEMENT_EMAIL

Description

Use this property to return as a string the representing the email XML element.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicXMLELEMENT_HOUR

Description

Use this property to return as a string the representing the hour XML element.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicXMLELEMENT_LINK

Description

Use this property to return as a string the representing the link XML element.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicXMLELEMENT_NAME

Description

Use this property to return as a string the representing the name XML element.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicXMLELEMENT_PATH

Description

Use this property to return as a string the representing the path XML element.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicXMLELEMENT_PORT

Description

Use this property to return as a string the representing the port XML element.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicXMLELEMENT_PROTOCOL

Description

Use this property to return as a string the representing the protocol XML element.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicXMLELEMENT_REGISTERPROCEDURE

Description

Use this property to return as a string the representing the register protocol XML element.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicXMLELEMENT_TITLE

Description

Use this property to return as a string the representing the title XML element.

This property is read-only.

Click to jump to parent topicFeedDoc Class

This section provides an overview of the FeedDoc class and discusses:

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.

Click to jump to parent topicFeedDoc Class Constructor

This section presents the constructor for the FeedDoc class.

Click to jump to top of pageClick to jump to parent topicFeedDoc

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

getFeedDoc

Constructors

Import Declarations

Click to jump to parent topicFeedDoc Class Methods

In this section, the FeedDoc class methods are presented in alphabetical order.

Click to jump to top of pageClick to jump to parent topicaddCategory

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

deleteCategory, Categories.

Click to jump to top of pageClick to jump to parent topicaddEntry

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.

FeedEntry Class

Click to jump to top of pageClick to jump to parent topicdatetimeToString

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.

Click to jump to top of pageClick to jump to parent topicdeleteCategory

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

addCategory

Click to jump to top of pageClick to jump to parent topicdeleteEntry

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

addEntry

FeedEntry Class, delete.

Click to jump to top of pageClick to jump to parent topicequals

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.

Click to jump to top of pageClick to jump to parent topicgetEntry

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

addEntry

FeedEntry Class

Click to jump to top of pageClick to jump to parent topicresetEntries

Syntax

resetEntries()

Description

Use this method to reset the FeedEntry collection.

Parameters

None.

Returns

An empty FeedEntry collection.

See Also

addEntry, Entries.

FeedEntry Class

Click to jump to top of pageClick to jump to parent topicstringToDatetime

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.

Returns

A datetime.

Click to jump to parent topicFeedDoc Class Properties

In this section, the FeedDoc class properties are presented in alphabetical order.

Click to jump to top of pageClick to jump to parent topicAllowMoreEntries

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

addEntry, MaxEntries.

FeedEntry Class

Click to jump to top of pageClick to jump to parent topicApplicationRelease

Description

Use this property to return the release label from the PSRELEASE table as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicCategories

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

addCategory

Click to jump to top of pageClick to jump to parent topicContentUrl

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

FeedContentUrl

Click to jump to top of pageClick to jump to parent topicCopyright

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.

Click to jump to top of pageClick to jump to parent topicDescription

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

Description

Click to jump to top of pageClick to jump to parent topicEntries

Description

Use this property to return a collection of FeedEntry objects.

This property is read-only.

See Also

addEntry, deleteEntry, resetEntries.

Click to jump to top of pageClick to jump to parent topicExpires

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.

Click to jump to top of pageClick to jump to parent topicFeedFormat

Description

Use this property to return the feed format for the feed document as a string.

This property is read-only.

See Also

FeedFormat

Click to jump to top of pageClick to jump to parent topicFeedUrl

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

FeedUrl

Click to jump to top of pageClick to jump to parent topicFirstUrl

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.

Paged Feeds

Click to jump to top of pageClick to jump to parent topicGenerator

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

ApplicationRelease

Click to jump to top of pageClick to jump to parent topicID

Description

Use this property to return the ID for this feed document as a string.

This property is read-only.

See Also

FeedDoc

Click to jump to top of pageClick to jump to parent topicLastUrl

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.

Paged Feeds

Click to jump to top of pageClick to jump to parent topicLogo

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.

Click to jump to top of pageClick to jump to parent topicMaxAge

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

Utility class: DSPARAMETER_SF_MAXMINUTES property.

Click to jump to top of pageClick to jump to parent topicMaxEntries

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

AllowMoreEntries

FeedEntry Class

Click to jump to top of pageClick to jump to parent topicNextUrl

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.

Paged Feeds

Click to jump to top of pageClick to jump to parent topicObjectType

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.

Click to jump to top of pageClick to jump to parent topicPreviousUrl

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

FirstUrl, LastUrl, NextUrl.

Paged Feeds

Click to jump to top of pageClick to jump to parent topicRootElement

Description

Use this property to return the root element for this feed document as an XmlNode object.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicTitle

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

Title

Click to jump to top of pageClick to jump to parent topicUpdated

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.

Click to jump to parent topicFeedEntry Class

This section provides an overview of the FeedEntry class and discusses:

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.

Click to jump to parent topicFeedEntry Class Constructor

This section presents the constructor for the FeedEntry class.

Click to jump to top of pageClick to jump to parent topicFeedEntry

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

getFeedDoc

addEntry

Constructors

Import Declarations

Click to jump to parent topicFeedEntry Class Methods

In this section, the FeedEntry class methods are presented in alphabetical order.

Click to jump to top of pageClick to jump to parent topicaddCategory

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

deleteCategory, Categories.

Click to jump to top of pageClick to jump to parent topicaddContributor

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.

email

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.

Click to jump to top of pageClick to jump to parent topicaddEnclosure

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

deleteEnclosure, Enclosures.

Click to jump to top of pageClick to jump to parent topicdelete

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

deleteEntry

Click to jump to top of pageClick to jump to parent topicdeleteCategory

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

addCategory

Click to jump to top of pageClick to jump to parent topicdeleteContributor

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

addContributor

Click to jump to top of pageClick to jump to parent topicdeleteEnclosure

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

addEnclosure

Click to jump to top of pageClick to jump to parent topicequals

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.

Click to jump to parent topicFeedEntry Class Properties

In this section, the FeedEntry class properties are presented in alphabetical order.

Click to jump to top of pageClick to jump to parent topicAuthor

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.

Click to jump to top of pageClick to jump to parent topicCategories

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

addCategory

Click to jump to top of pageClick to jump to parent topicComments

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.

Click to jump to top of pageClick to jump to parent topicContentUrl

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.

Click to jump to top of pageClick to jump to parent topicContributors

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

addContributor

Click to jump to top of pageClick to jump to parent topicCopyright

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.

Click to jump to top of pageClick to jump to parent topicDescription

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.

Click to jump to top of pageClick to jump to parent topicEnclosures

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

addEnclosure

Click to jump to top of pageClick to jump to parent topicExpires

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.

Click to jump to top of pageClick to jump to parent topicFeedDoc

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

FeedDoc Class

Click to jump to top of pageClick to jump to parent topicFullContent

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.

Click to jump to top of pageClick to jump to parent topicGUID

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

FeedEntry class: ContentUrl property.

Click to jump to top of pageClick to jump to parent topicID

Description

Use this property to return the ID for this feed entry as a string.

This property is read-only.

See Also

FeedEntry

Click to jump to top of pageClick to jump to parent topicMaxAge

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

Utility class: DSPARAMETER_SF_MAXMINUTES property.

Click to jump to top of pageClick to jump to parent topicObjectType

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.

Click to jump to top of pageClick to jump to parent topicPublished

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.

Click to jump to top of pageClick to jump to parent topicTitle

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.

Click to jump to top of pageClick to jump to parent topicUpdated

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.

Click to jump to parent topicAdditional Feed Examples

This section provides examples of the following: Implementing a real-time feed request handler.

Click to jump to top of pageClick to jump to parent topicImplementing 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;