STWTemplate Manager
STWTemplateManager
Public Class that manages all operations concerning My Business templates in the Application. The templates are grouped by categories.
This class offers several possible operations defined in the following list:
- Get all template categories
- Get the full template list
- Get the list of templates of defined category
- Get recent used templates
- Add/Remove template to/from favorite templates
- Get the list of favorite templates
- Get the template icon
- Register a listener to handle all update events
Functions
Link copied to clipboard
open fun addTemplateToFavorite( @NonNull context: Context, @NonNull templateUuid: String, @Nullable callback: STWOperationCallback)
Content copied to clipboard
Adds a template to the list of favorite templates.
Link copied to clipboard
open fun changeTemplateFavoriteListOrder( @NonNull context: Context, @NonNull sortedList: List<TemplateItem>, @Nullable callback: STWOperationCallback)
Content copied to clipboard
Changes the order of favorite list.
Link copied to clipboard
open fun downloadTemplatePreview(@Nullable templateUuid: String, @Nullable callback: STWOperationCallback<MyBusinessError>)
Content copied to clipboard
Downloads the template preview for the given template UUID.
Link copied to clipboard
Link copied to clipboard
open fun getFavoriteTemplateList(@NonNull context: Context): List<TemplateItem>
Content copied to clipboard
Gets the list of user favorite templates.
Link copied to clipboard
Get or create the single instance of STWTemplateManager.
Link copied to clipboard
open fun getRecentUsedTemplates(@NonNull context: Context): List<TemplateItem>
Content copied to clipboard
Gets the list of templates recently used to create processes.
Link copied to clipboard
open fun getTemplateByName(@NonNull context: Context, @NonNull templateName: String): TemplateItem
Content copied to clipboard
Gets a template having the given template name.
Link copied to clipboard
open fun getTemplateCategoryByName(@NonNull context: Context, @NonNull categoryName: String): TemplateCategoryItem
Content copied to clipboard
Gets a template category having the given categoryName.
Link copied to clipboard
open fun getTemplateCategoryByUUID(@NonNull context: Context, @NonNull categoryUUID: String): TemplateCategoryItem
Content copied to clipboard
Gets a template category having the given categoryUUID.
Link copied to clipboard
open fun getTemplateCategoryList(@NonNull context: Context): List<TemplateCategoryItem>
Content copied to clipboard
Gets the list of Template Categories sorted by name
Link copied to clipboard
open fun getTemplateList( @NonNull context: Context, @NonNull categoryUUID: String, @Nullable searchKeyword: String): List<TemplateItem>
Content copied to clipboard
Gets the list of templates that belongs to given category, and matching the keyword.
Link copied to clipboard
Link copied to clipboard
open fun registerFavoriteListListener(@NonNull listener: STWFavoriteListUpdateListener)
Content copied to clipboard
Register a listener to handle all events of favorite template list updates.
Link copied to clipboard
open fun registerTemplateListListener(@NonNull listener: STWTemplateListUpdateListener)
Content copied to clipboard
Register a listener to handle all events of template list updates.
Link copied to clipboard
open fun removeTemplateFromFavorite( @NonNull context: Context, @NonNull templateUuid: String, @Nullable callback: STWOperationCallback)
Content copied to clipboard
Removes a template from the list of favorite templates.
Link copied to clipboard
open fun unregisterFavoriteListListener(@NonNull listener: STWFavoriteListUpdateListener)
Content copied to clipboard
Unregister a previously registered listener of favorite list updates.
Link copied to clipboard
open fun unregisterTemplateListListener(@NonNull listener: STWTemplateListUpdateListener)
Content copied to clipboard
Unregister a previously registered template update listener