variables.cacheTimeStampLabel = "CacheBuildDateTime";
// Get the feed data struct from application.ptSocialMediaCache[arguments.serviceType];
return readCacheServiceTypeData(cacheVarName=arguments.cacheVarName,cacheServiceType=arguments.serviceType);
var serviceData = getCachedServiceData(serviceType=arguments.serviceType,cacheVarName=arguments.cacheVarName);
// Get the feed data array from application.ptSocialMediaCache[arguments.serviceType][arguments.feedid];
if ( StructKeyExists(serviceData,arguments.feedID) )
return serviceData[arguments.feedID];
else
return ArrayNew(1);
// Get the last cache rebuild data time string from application.ptSocialMediaCache
return readCacheTimeStamp(cacheVarName=arguments.cacheVarName);
var sType = "facebook";
return getCachedFeedData(serviceType=sType,feedID=arguments.feedID,cacheVarName=arguments.cacheVarName);
var sType = "twitter";
return getCachedFeedData(serviceType=sType,feedID=arguments.feedID,cacheVarName=arguments.cacheVarName);
var sType = "wordpress";
return getCachedFeedData(serviceType=sType,feedID=arguments.feedID,cacheVarName=arguments.cacheVarName);
var sType = "youtube";
return getCachedFeedData(serviceType=sType,feedID=arguments.feedID,cacheVarName=arguments.cacheVarName);
var serviceData = getCachedServiceData(serviceType=arguments.serviceType,cacheVarName=arguments.cacheVarName);
// return the number of cached feeds (from accounts and pages)
return StructCount(serviceData);
var totalPosts = 0;
var key = "";
var serviceData = getCachedServiceData(serviceType=arguments.serviceType,cacheVarName=arguments.cacheVarName);
// return the number of cached feeds (from accounts and pages)
for ( key in serviceData ) {
if ( IsArray(serviceData[key]) )
totalPosts = totalPosts + ArrayLen(serviceData[key]);
}
return totalPosts;
var feedArray = ArrayNew(1);
var filteredFeedArray = ArrayNew(1);
var feedData = StructNew();
var postQty = arguments.maxPosts;
var d=1;
var postID = "";
// Get the feed data from the feed cache
feedArray = getFacebookFeedData(feedID=arguments.FeedID);
//feedArray = application.ptSocialMedia.socialMediaCacheDAO.getFacebookFeedData(feedID=arguments.FeedID);
if ( ArrayLen(feedArray) LT arguments.maxPosts )
postQty = ArrayLen(feedArray);
// Make sure the posts are not part of the excluded post list
for ( d=1; d LTE postQty; d++ ) {
feedData = feedArray[d];
postID = "";
if ( StructKeyExists(feedData,"CONTENT") AND StructKeyExists(feedData.CONTENT,"POSTID") )
postID = feedData.CONTENT.POSTID;
// Do not use a Feed Data for Posts that are part of the Excluded Posts List
if ( LEN(TRIM(postID)) AND ListFindNoCase(arguments.excludedPostIDs,postID) EQ 0 ) {
// Add feedData Struct to the feedArray
ArrayAppend(filteredFeedArray,feedData);
}
}
if ( arguments.showFeedDump )
application.ptSocialMedia.utils.doDUMP(filteredFeedArray,"Facebook-cachedfeeddata (#arguments.FeedID#)",0);
return filteredFeedArray;
var feedArray = ArrayNew(1);
var filteredFeedArray = ArrayNew(1);
var feedData = StructNew();
var postQty = arguments.maxPosts;
var d=1;
var postID = "";
// Get the feed data from the feed cache
feedArray = getTwitterFeedData(feedID=arguments.FeedID);
//feedArray = application.ptSocialMedia.socialMediaCacheDAO.getTwitterFeedData(feedID=arguments.FeedID);
if ( ArrayLen(feedArray) LT arguments.maxPosts )
postQty = ArrayLen(feedArray);
// Make sure the posts are not part of the excluded post list
for ( d=1; d LTE postQty; d++ ) {
feedData = feedArray[d];
postID = "";
if ( StructKeyExists(feedData,"CONTENT") AND StructKeyExists(feedData.CONTENT,"POSTID") )
postID = feedData.CONTENT.POSTID;
// Do not use a Feed Data for Posts that are part of the Excluded Posts List
if ( LEN(TRIM(postID)) AND ListFindNoCase(arguments.excludedPostIDs,postID) EQ 0 ) {
// Add feedData Struct to the feedArray
ArrayAppend(filteredFeedArray,feedData);
}
}
if ( arguments.showFeedDump )
application.ptSocialMedia.utils.doDUMP(filteredFeedArray,"Twitter-cachedfeeddata (#arguments.FeedID#)",0);
return filteredFeedArray;
var feedArray = ArrayNew(1);
var filteredFeedArray = ArrayNew(1);
var feedData = StructNew();
var postQty = arguments.maxPosts;
var d=1;
var postID = "";
// Get the feed data from the feed cache
feedArray = getWordPressFeedData(feedID=arguments.FeedID);
//feedArray = application.ptSocialMedia.socialMediaCacheDAO.getWordPressFeedData(feedID=arguments.FeedID);
if ( ArrayLen(feedArray) LT arguments.maxPosts )
postQty = ArrayLen(feedArray);
// Make sure the posts are not part of the excluded post list
for ( d=1; d LTE postQty; d++ ) {
feedData = feedArray[d];
postID = "";
if ( StructKeyExists(feedData,"CONTENT") AND StructKeyExists(feedData.CONTENT,"POSTID") )
postID = feedData.CONTENT.POSTID;
// Do not use a Feed Data for Posts that are part of the Excluded Posts List
if ( LEN(TRIM(postID)) AND ListFindNoCase(arguments.excludedPostIDs,postID) EQ 0 )
{
// Add feedData Struct to the feedArray
ArrayAppend(filteredFeedArray,feedData);
}
}
if ( arguments.showFeedDump )
application.ptSocialMedia.utils.doDUMP(filteredFeedArray,"WordPress-cachedfeeddata (#arguments.FeedID#)",0);
return filteredFeedArray;
var feedArray = ArrayNew(1);
var filteredFeedArray = ArrayNew(1);
var feedData = StructNew();
var postQty = arguments.maxPosts;
var d=1;
var postID = "";
// Get the feed data from the feed cache
feedArray = getYourTubeFeedData(feedID=arguments.FeedID);
//feedArray = application.ptSocialMedia.socialMediaCacheDAO.getYourTubeFeedData(feedID=arguments.FeedID);
if ( ArrayLen(feedArray) LT arguments.maxPosts )
postQty = ArrayLen(feedArray);
// Make sure the posts are not part of the excluded post list
for ( d=1; d LTE postQty; d++ ) {
feedData = feedArray[d];
postID = "";
if ( StructKeyExists(feedData,"CONTENT") AND StructKeyExists(feedData.CONTENT,"POSTID") )
postID = feedData.CONTENT.POSTID;
// Do not use a Feed Data for Posts that are part of the Excluded Posts List
if ( LEN(TRIM(postID)) AND ListFindNoCase(arguments.excludedPostIDs,postID) EQ 0 )
{
// Add feedData Struct to the feedArray
ArrayAppend(filteredFeedArray,feedData);
}
}
if ( arguments.showFeedDump )
application.ptSocialMedia.utils.doDUMP(filteredFeedArray,"YouTube-cachedfeeddata (#arguments.FeedID#)",0);
return filteredFeedArray;
return writeCacheServiceTypeData(
cacheVarName=arguments.cacheVarName,
cacheServiceType=arguments.serviceType,
cacheData=arguments.serviceFeedData
);
var retStr = "copy:failed";
// Get the Source Data from the Source Application variable
var sourceFeedData = readCacheFeedeData(cacheVarName=arguments.sourceVarName);
// Make sure the Source Variable Name is not the same as the Destination Variable name
if ( arguments.sourceVarName NEQ arguments.destVarName )
{
// Write the Source Data to the Destination Application scope variable
retStr = writeCacheFeedeData(
cacheVarName=arguments.destVarName,
cacheData=sourceFeedData
);
}
return retStr;
return deleteCacheData(cacheVarName=arguments.cacheVarName);
var retData = StructNew();
var lockName = TRIM("application." & arguments.cacheVarName);
var retData = StructNew();
var lockName = TRIM("application." & arguments.cacheVarName);
var retStr = "";
var lockName = TRIM("application." & arguments.cacheVarName);
var timeStampVar = variables.cacheTimeStampLabel;
// If a cacheTimeStampVarName is passed in override the default
if ( LEN(TRIM(arguments.cacheTimeStampVarName)) )
timeStampVar = arguments.cacheTimeStampVarName;
// If a cacheServiceType is provided make it the prefix for the timestamp variable
if ( LEN(TRIM(arguments.cacheServiceType)) )
timeStampVar = TRIM(arguments.cacheServiceType & timeStampVar);
var retStr = "write:success";
var lockName = TRIM("application." & arguments.cacheVarName);
var retStr = "write:success";
var dateTimeStamp = Now();
var lockName = TRIM("application." & arguments.cacheVarName);
//var timeStampVar = TRIM(arguments.cacheServiceType & "CacheBuildDateTime");
var timeStampVar = variables.cacheTimeStampLabel;
// If a cacheTimeStampVarName is provided override the default
if ( LEN(TRIM(arguments.cacheTimeStampVarName)) )
timeStampVar = TRIM(arguments.cacheTimeStampVarName);
var retStr = "write:success";
var dateTimeStamp = Now();
var lockName = TRIM("application." & arguments.cacheVarName);
//var timeStampVar = TRIM(arguments.cacheServiceType & "CacheBuildDateTime");
var timeStampVar = variables.cacheTimeStampLabel;
// If a cacheTimeStampVarName is provided override the default
if ( LEN(TRIM(arguments.cacheTimeStampVarName)) )
timeStampVar = TRIM(arguments.cacheTimeStampVarName);
// if a cacheServiceType is provided make it the prefix for the timestamp variable
if ( LEN(TRIM(arguments.cacheServiceType)) )
timeStampVar = TRIM(arguments.cacheServiceType & timeStampVar);
var retStr = "write:success";
var dateTimeStamp = Now();
var lockName = TRIM("application." & arguments.cacheVarName);
var timeStampVar = variables.cacheTimeStampLabel;
// If a cacheTimeStampVarName is provided override the default
if ( LEN(TRIM(arguments.cacheTimeStampVarName)) )
timeStampVar = TRIM(arguments.cacheTimeStampVarName);
// if a cacheServiceType is provided make it the prefix for the timestamp variable
if ( LEN(TRIM(arguments.cacheServiceType)) )
timeStampVar = TRIM(arguments.cacheServiceType & timeStampVar);
var retStr = "delete:failed";
var lockName = TRIM("application." & arguments.cacheVarName);