Writing extensions
IColorPalette
Namespace: Lisa.Core.Domain.Pages
The IColorPalette interface allows you do define your own color palettes which can be used in all color pickers throughout the system.
IPageSettings
Namespace: Lisa.Core.Domain.Pages
The IPageSettings interface allows you to define properties/settings which can be defined for each page on the website. Simply create a class which implements this interface and then add public properties to it, which the user can then define via the page editor in Veva, on the first tab in the right panel, called "Page settings". The ShouldDisplay() method allows you do conditionally hide/show the settings based on the page. You could for example check if the page the user is editing is the front page of the website and if so, return false. That would prevent users from being able to modify the defined settings on the frontpage, but not other pages. If IsOptional is true, the settings need to be toggled on by the user before being set. The DisplayName is the caption which will be shown to the user above the settings.
IEmailSenderService
Namespace: Lisa.Core.Domain.Services
The IEmailSenderService handles all e-mails which are sent out in Veva. There are two standard implementations available, one uses standard SMTP and is a part of the Lisa.Core.Infrastructure.MailKitMailer module. The other one uses SendGrid and is contained in the Lisa.Modules.Mail.SendGrid module.
If you like to use a different method to send e-mails, you can implement your own e-mail service by implementing the IEmailSenderService interface. There can be multiple implementations registered, but only one is used at a time. You can configure which e-mail service to use in the global settings dialog in Veva, which will show you a list of all registered implementations. Just select the one you want to use, configure it and hit save.
IStartupTask
Namespace: Lisa.Core.Domain.Tasks
Startup tasks are tasks which Veva runs every time the Veva instance is started.
ITask
Namespace: Lisa.Core.Domain.Tasks
The ITask interface allows you to implement a background task which can then be registered in the Task Daemon system in Veva. Instead of implementing the ITask interface directly, we recommend that you inherit from the BaseTask class which is a part of the Task Daemon module, and then you simply need to override the Run method with your own implementation. The BaseTask class gives you access to the Log() method to log information to the Task log.
ITextProcessor
Namespace: Lisa.Core.Domain.TextProcessing
Certain standard content components in Veva, such as the heading and paragraph components, can be extended with "text processors". The Markdown support is provided with a text processor which converts markdown syntax to HTML, for example. You can extend this functionality by implementing your own text processor. A text processor needs to implement the Process() method which receives a TextProcessorContext class and the raw content to process. It needs to return a list of ITextTokens. There are two types of text tokens available, MarkupTextToken and PlainTextToken. If the processor returns HTML markup which needs to be rendered out to the page as markup, then it should return MarkupTextTokens, otherwise it should just return PlainTextTokens. If you try to return an HTML string as a PlainTextToken, it will be escaped to HTML entities and just printed out on the page as is, i.e not rendered as HTML.
IDataSource
Namespace: Lisa.Modules.DataSources.Domain.Services
The IDataSource interface is used by the DataSource list component to retrieve data from external services. The DataSource module inludes an implementation which can read data v ia HTTP. If you need to read data from other types of resources and display it on a page, you can write your own implementation of the IDataSource interface.
IDataSourceParser
Namespace: Lisa.Modules.DataSources.Domain.Services
The IDataSource parser interface is used by some implementations of the IDataSource interface, such as the HTTPDataSource. It allows users to specify how they want the data to be handled. The HTTPDataSource is a generic HTTP datasource, which then uses the selected IDataSourceParser implementation to parse that data and return it according to the selected IDataSourceParser. Veva includes some IDataSourceParser implemententations, such as the HTMLParser which can be used for generic Web scraping, the XMLParser which is used to read data from XML based HTTP datasources, the RSSParser which reads items from standard RSS XML feeds via HTTP and then there are two JSON parsers available as well.
An example of a IDataSourceParser implementation could be a parser which reads data from a REST service via HTTP and performs some data manipulation/calculations and then generates a DataSourceItemsResult object with the calculated data, for display.
IDocumentAddedHandler
Namespace: Lisa.Modules.Documents.Domain.DocumentHandlers
The IDocumentAddedHandler is used in conjunction with the IDocumentHandler interface, to further specify that the handler should be executed before and after documents are added.
IDocumentDeletedHandler
Namespace: Lisa.Modules.Documents.Domain.DocumentHandlers
The IDocumentDeletedHandler is used in conjunction with the IDocumentHandler interface, to further specify that the handler should be executed before and after documents are deleted.