Class CPAddonBaseClass
- Namespace
- Contensive.BaseClasses
- Assembly
- CPBase.dll
CP.Addon - The Addon class represents the instance of an add-on. To use this class, use its constructor and open an cpcore.addon. Use these properties to retrieve it's configuration
public abstract class CPAddonBaseClass
- Inheritance
-
CPAddonBaseClass
- Inherited Members
Properties
Admin
When true, this add-on is displayed on and can be used from the admin navigator.
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract bool Admin { get; }
Property Value
ArgumentList
A crlf delimited list of name=value pairs. These pairs create an options dialog available to administrators in advance edit mode. When the addon is executed, the values selected are available through the cp.doc.var("name") method.
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract string ArgumentList { get; }
Property Value
AsAjax
When true, this addon returns the javascript code necessary to implement this object as ajax.
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract bool AsAjax { get; }
Property Value
BlockDefaultStyles
When true, the system only uses the custom styles field when building the page. This field is not updated with add-on updates.
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract string BlockDefaultStyles { get; }
Property Value
CollectionID
The ID local to this site of the collection which installed this cpcore.addon.
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract int CollectionID { get; }
Property Value
Content
When true, this addon can be placed in the content of pages.
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract bool Content { get; }
Property Value
Copy
text copy is added to the addon content during execution.
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract string Copy { get; }
Property Value
CopyText
text copy is added to the addon content during execution.
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract string CopyText { get; }
Property Value
CustomStyles
Styles that are rendered on the page when the addon is executed. Custom styles are editable and are not modified when the add-on is updated.
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract string CustomStyles { get; }
Property Value
DefaultStyles
Styles that are included with the add-on and are updated when the add-on is updated. See BlockdefaultStyles to block these.
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract string DefaultStyles { get; }
Property Value
Description
The add-on description is displayed in the addon manager
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract string Description { get; }
Property Value
DotNetClass
When present, the system calls the execute method of an objected created from this dot net class namespace.
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract string DotNetClass { get; }
Property Value
FormXML
This is an xml stucture that the system executes to create an admin form. See the support.contensive.com site for more details.
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract string FormXML { get; }
Property Value
Help
This copy is displayed when the help icon for this addon is clicked.
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract string Help { get; }
Property Value
HelpLink
If present, this link is displayed when the addon icon is clicked.
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract string HelpLink { get; }
Property Value
ID
The id of the addon currently executing.
public abstract int ID { get; }
Property Value
IconFilename
When present, this icon will be used when the add-on is displayed in the addon manager and when edited. The height, width and sprites must also be set.
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract string IconFilename { get; }
Property Value
IconHeight
The height in pixels of the icon referenced by the iconfilename.
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract int IconHeight { get; }
Property Value
IconSprites
The number of images in the icon. There can be multiple images stacked top-to-bottom in the file. The first is the normal image. the second is the hover-over image. The third is the clicked image.
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract int IconSprites { get; }
Property Value
IconWidth
The width of the icon referenced by the iconfilename
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract int IconWidth { get; }
Property Value
InFrame
When true, this addon will be displayed in an html iframe.
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract bool InFrame { get; }
Property Value
IsInline
When true, the system will assume the addon returns html that is inline, as opposed to block. This is used to vary the edit icon behaviour.
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract bool IsInline { get; }
Property Value
JavaScriptBodyEnd
Javascript code that will be placed in the document right before the end-body tag. Do not include script tags.
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract string JavaScriptBodyEnd { get; }
Property Value
JavaScriptOnLoad
Javascript that will be executed in the documents onload event.
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract string JavaScriptOnLoad { get; }
Property Value
JavascriptInHead
Javascript code that will be placed in the head of the document. Do no include script tags.
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract string JavascriptInHead { get; }
Property Value
Link
A URL to a webserver that returns javascript. This URL will be added as the src attribute of a script tag, and placed in the content where this Add-on is inserted. This URL can be to any server-side program on any server, provided it returns javascript. For instance, if you have a script page that returns javascript,put the URL of that page here. The addon can be dropped on any page and will execute the script. Your script can be from any site. This technique is used in widgets and avoids the security issues with ajaxing from another site.
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract string Link { get; }
Property Value
MetaDescription
Text here will be added to the meta description section of the document head.
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract string MetaDescription { get; }
Property Value
MetaKeywordList
This is a comma or crlf delimited list of phrases that will be added to the document's meta keyword list
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract string MetaKeywordList { get; }
Property Value
Name
The name of the cpcore.addon.
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract string Name { get; }
Property Value
NavIconType
The type of navigator entry to be made. Choices are: Add-on,Report,Setting,Tool
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract string NavIconType { get; }
Property Value
ObjectProgramID
If present, this string will be used as an activex programid to create an object and call it's execute method.
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract string ObjectProgramID { get; }
Property Value
OnBodyEnd
If true, this addon will be execute at the end of every page and its content added to right before the end-body tag
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract bool OnBodyEnd { get; }
Property Value
OnBodyStart
If true, this addon will be execute at the start of every page and it's content added to right after the body tag
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract bool OnBodyStart { get; }
Property Value
OnContentEnd
if true, this add-on will be executed on every page and its content added right after the content box.
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract bool OnContentEnd { get; }
Property Value
OnContentStart
If true, this add-on will be executed on every page and its content added right before the content box
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract bool OnContentStart { get; }
Property Value
OtherHeadTags
All content in the field will be added directly, as-is to the document head.
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract string OtherHeadTags { get; }
Property Value
PageTitle
All content in the field will be added to the documents title tag
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract string PageTitle { get; }
Property Value
ProcessInterval
When present, this add-on will be executed stand-alone without a webpage periodically at this interval (in minutes).
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract string ProcessInterval { get; }
Property Value
ProcessNextRun
The next time this add-on is scheduled to run as a processs
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract DateTime ProcessNextRun { get; }
Property Value
ProcessRunOnce
Check true, this addon will be run once within the next minute as a stand-alone process.
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract bool ProcessRunOnce { get; }
Property Value
RemoteAssetLink
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract string RemoteAssetLink { get; }
Property Value
RemoteMethod
if true, this add-on can be executed as a remote method. The name of the addon is used as the url.
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract bool RemoteMethod { get; }
Property Value
RobotsTxt
When present, this text will be added to the robots.txt content for the site. This content is editable through the preferences page
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract string RobotsTxt { get; }
Property Value
ScriptCode
When present, the first routine of this script will be executed when the add-on is executed and its return added to the add-ons return
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract string ScriptCode { get; }
Property Value
ScriptEntryPoint
If the ScriptCode has more than one routine and you want to run one other than the first, list is here.
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract string ScriptEntryPoint { get; }
Property Value
ScriptLanguage
The script language selected for this script.
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract string ScriptLanguage { get; }
Property Value
SharedStyles
A comma delimited list of the local id values of shared style record that will display with this add-on
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract string SharedStyles { get; }
Property Value
Template
[Obsolete("Deprecated. Use cp.addon.id or cp.addon.ccguid to create a model object and use its properties", false)]
public abstract bool Template { get; }
Property Value
ccGuid
The guid of the addon currently executing.
public abstract string ccGuid { get; }
Property Value
Methods
Execute(int)
Execute an addon in the default addon environment (type=simple, etc) and returns its resulting object. Generally addons return strings.
public abstract string Execute(int addonId)
Parameters
addonIdintThe id of the addon to be executed.
Returns
Execute(int, addonExecuteContext)
Execute an addon in the default addon environment (type=simple, etc) and returns its resulting object. Generally addons return strings. Provide details for the execution environment, such as argument key value pairs.
public abstract string Execute(int addonId, CPUtilsBaseClass.addonExecuteContext executeContext)
Parameters
addonIdintThe id of the addon to be executed.
executeContextCPUtilsBaseClass.addonExecuteContextThe context where the addon is being executed (on a page, in an email, etc.). Typical is 'Simple' which blocks html comments.
Returns
Execute(int, Dictionary<string, string>)
Execute an addon in the default addon environment (type=simple, etc) and returns its resulting object. Generally addons return strings. Pass arguments to the addon that can be read with cp.doc.get() methods.
public abstract string Execute(int addonId, Dictionary<string, string> argumentKeyValuePairs)
Parameters
addonIdintThe id of the addon to be executed.
argumentKeyValuePairsDictionary<string, string>The executing addon can read these arguments with methods like cp.doc.getText("key").
Returns
Execute(string)
Execute an addon in the default addon environment (type=simple, etc) and returns its resulting object. Generally addons return strings.
public abstract string Execute(string addonGuid)
Parameters
addonGuidstring
Returns
Execute(string, addonExecuteContext)
Execute an addon in the default addon environment (type=simple, etc) and returns its resulting object. Generally addons return strings. Provide details for the execution environment, such as argument key value pairs.
public abstract string Execute(string addonGuid, CPUtilsBaseClass.addonExecuteContext executeContext)
Parameters
addonGuidstringThe guid of the addon to be executed.
executeContextCPUtilsBaseClass.addonExecuteContextThe context where the addon is being executed (on a page, in an email, etc.). Typical is 'Simple' which blocks html comments.
Returns
Execute(string, Dictionary<string, string>)
Execute an addon in the default addon environment (type=simple, etc) and returns its resulting object. Generally addons return strings. Pass arguments to the addon that can be read with cp.doc.get() methods.
public abstract string Execute(string addonGuid, Dictionary<string, string> argumentKeyValuePairs)
Parameters
addonGuidstringThe guid of the addon to be executed.
argumentKeyValuePairsDictionary<string, string>The executing addon can read these arguments with methods like cp.doc.getText("key").
Returns
ExecuteAsProcess(int)
Execute an addon in a background process with the current session environment.
public abstract void ExecuteAsProcess(int addonid)
Parameters
addonidintThe id of the addon to be executed.
ExecuteAsProcess(int, Dictionary<string, string>)
Execute an addon in a background process with the current session environment. Arguments can be passed that the addon can read with cp.doc.get methods.
public abstract void ExecuteAsProcess(int addonid, Dictionary<string, string> argumentKeyValuePairs)
Parameters
addonidintThe id of the addon to be executed.
argumentKeyValuePairsDictionary<string, string>
ExecuteAsProcess(string)
Execute an addon in a background process with the current session environment.
public abstract void ExecuteAsProcess(string addonGuid)
Parameters
addonGuidstringThe guid of the addon to be executed.
ExecuteAsProcess(string, Dictionary<string, string>)
Execute an addon in a background process with the current session environment. Arguments can be passed that the addon can read with cp.doc.get methods.
public abstract void ExecuteAsProcess(string addonGuid, Dictionary<string, string> argumentKeyValuePairs)
Parameters
addonGuidstringThe guid of the addon to be executed.
argumentKeyValuePairsDictionary<string, string>The executing addon can read these arguments with methods like cp.doc.getText("key").
ExecuteAsProcessByUniqueName(string)
Execute an addon in a background process with the current session environment.
public abstract void ExecuteAsProcessByUniqueName(string addonName)
Parameters
addonNamestringThe name of the addon to be executed.
ExecuteAsProcessByUniqueName(string, Dictionary<string, string>)
Execute an addon in a background process with the current session environment. Arguments can be passed that the addon can read with cp.doc.get methods.
public abstract void ExecuteAsProcessByUniqueName(string addonName, Dictionary<string, string> argumentKeyValuePairs)
Parameters
addonNamestringThe name of the addon to be executed.
argumentKeyValuePairsDictionary<string, string>The executing addon can read these arguments with methods like cp.doc.getText("key").
ExecuteByUniqueName(string)
Execute an addon in the default addon environment (type=simple, etc) and returns its resulting object. Generally addons return strings.
public abstract string ExecuteByUniqueName(string addonName)
Parameters
addonNamestringThe name of the addon to be executed.
Returns
ExecuteByUniqueName(string, addonExecuteContext)
Execute an addon in the default addon environment (type=simple, etc) and returns its resulting object. Generally addons return strings. Provide details for the execution environment, such as argument key value pairs.
public abstract string ExecuteByUniqueName(string addonName, CPUtilsBaseClass.addonExecuteContext executeContext)
Parameters
addonNamestringThe name of the addon to be executed.
executeContextCPUtilsBaseClass.addonExecuteContextThe executing addon can read these arguments with methods like cp.doc.getText("key").
Returns
ExecuteByUniqueName(string, Dictionary<string, string>)
Execute an addon in the default addon environment (type=simple, etc) and returns its resulting object. Generally addons return strings. Pass arguments to the addon that can be read with cp.doc.get() methods.
public abstract string ExecuteByUniqueName(string addonName, Dictionary<string, string> argumentKeyValuePairs)
Parameters
addonNamestringThe name of the addon to be executed.
argumentKeyValuePairsDictionary<string, string>The executing addon can read these arguments with methods like cp.doc.getText("key").
Returns
ExecuteDependency(string)
Add this addon as a dependency. The dependency will be executed only once during the process/doc/page. If this is the first time it is called, the addon will be executed, assets like js and css added, and the result returned. If it has been previously called, the addon is skipped.
public abstract string ExecuteDependency(string addonGuid)
Parameters
addonGuidstring
Returns
ExportCollection(int, ref string, ref string)
Package a collection into a collection zip file and return a path to the zip file in the cdnFiles store.
public abstract bool ExportCollection(int collectionId, ref string collectionZipCdnPathFilename, ref string returnUserError)
Parameters
collectionIdintThe id of the collection to be exported.
collectionZipCdnPathFilenamestringA path in the cdnFiles store. (ex myfolder\subfolder)
returnUserErrorstringIf the export is successful, this returns string.empty.
Returns
ExportCollection(string, ref string, ref string)
Package a collection into a collection zip file and return a path to the zip file in the cdnFiles store.
public abstract bool ExportCollection(string collectionGuid, ref string collectionZipCdnPathFilename, ref string returnUserError)
Parameters
collectionGuidstringThe guid of the collection to be exported.
collectionZipCdnPathFilenamestringA path in the cdnFiles store. (ex myfolder\subfolder)
returnUserErrorstringIf the export is successful, this returns string.empty.
Returns
InstallCollectionFile(string, ref string)
Install addon collection from a file in private files
public abstract bool InstallCollectionFile(string tempPathFilename, ref string returnUserError)
Parameters
tempPathFilenamestringThe path and filename in the tempFiles store. A path starts with the folder name and ends with a slash (like myfolder\subfolder)
returnUserErrorstringIf the installation is successful, this returns string.empty.
Returns
InstallCollectionFileAsync(string)
Install addon collection from a file in private files
public abstract int InstallCollectionFileAsync(string tempPathFilename)
Parameters
tempPathFilenamestringThe path and filename in the tempFiles store. A path starts with the folder name and ends with a slash (like myfolder\subfolder)
Returns
InstallCollectionFromLibrary(string, ref string)
Install addon collection by its guid from the addon collection library
public abstract bool InstallCollectionFromLibrary(string collectionGuid, ref string returnUserError)
Parameters
collectionGuidstringThe guid of the collection to be installed.
returnUserErrorstringIf the installation is successful, this returns string.empty.
Returns
InstallCollectionFromLibraryAsync(string)
Install addon collection by its guid from the addon collection library
public abstract int InstallCollectionFromLibraryAsync(string collectionGuid)
Parameters
collectionGuidstringThe guid of the collection to be installed.
Returns
InstallCollectionFromLink(string, ref string)
Install addon collection from a link. This link should download a collection zip or xml file when requested.
public abstract bool InstallCollectionFromLink(string collectionFileLink, ref string returnUserError)
Parameters
collectionFileLinkstringThis link should download a collection zip or xml file when requested.
returnUserErrorstringIf the installation is successful, this returns string.empty.
Returns
InstallCollectionFromLinkAsync(string)
Install addon collection by its guid from the addon collection library.
public abstract int InstallCollectionFromLinkAsync(string collectionFileLink)
Parameters
collectionFileLinkstringThis link should download a collection zip or xml file when requested.
Returns
InstallCollectionsFromFolder(string, bool, ref string)
Install addon collection by its guid from the addon collection library
public abstract bool InstallCollectionsFromFolder(string tempFolder, bool deleteFolderWhenDone, ref string returnUserError)
Parameters
tempFolderstringThe path and filename in the tempFiles store. A path starts with the folder name and ends with a slash (like myfolder\subfolder)
deleteFolderWhenDoneboolDelete the temp folder when it is no longer needed.
returnUserErrorstringIf the installation is successful, this returns string.empty.
Returns
InstallCollectionsFromFolderAsync(string, bool)
Install addon collection by its guid from the addon collection library
public abstract int InstallCollectionsFromFolderAsync(string tempFolder, bool deleteFolderWhenDone)
Parameters
tempFolderstringThe path and filename in the tempFiles store. A path starts with the folder name and ends with a slash (like myfolder\subfolder)
deleteFolderWhenDoneboolDelete the temp folder when it is no longer needed.
Returns
Open(int)
[Obsolete("Deprecated. Use a model object instead", false)]
public abstract bool Open(int AddonId)
Parameters
AddonIdint
Returns
Open(string)
[Obsolete("Deprecated. Use a model object instead", false)]
public abstract bool Open(string AddonNameOrGuid)
Parameters
AddonNameOrGuidstring