Creating Custom Folder Behavior

Last Updated: 12/09/2015 Introduced in Verision: 2.0
New folder behaviors can be created to modify the default folder behavior. Many aspects of a folder’s behavior can be modified. All the overridable methods for a folder’s default behavior are listed at the end of this document. The most common overrides will be covered in detail.
ShowInTreeView: Overriding allows us to control whether or not this folder type will show up in the folder tree. By default it will be shown. Here is an example showing how to cause to be hidden from the tree.
Using this override will cause the folder only to show up in the folder view of the parent folder as shown below. Even though New Folder is a child of My Root Folder it is not show in the folder tree, but is shown as part of the Folder Data when My Root Folder is selected.
GetFolderActions: Overriding allows us to control which actions are shown on a folder. In the example below, in addition to the default action that are supplied for a folder, we have added an action to open the URL


With this override, the action would show up looking like the following 

GetViewPages: Overriding allows us to control which pages are available to this folder. In the example below the Default Auditing Page (a page that is included in all installs of Decisions) is added as an available page for this folder. Any page, including ones created by users, can be added using this method.

 With this override, the page would show up on this folder as shown below:

CanBeSetByUser: Overriding allows us to control whether or not this folder type is allowed to be added by users via the actions menu. By default, this value is set to false. Below is example code showing how to override to equal true.

Setting to true causes the folder type to show up in the actions menu as shown below: 

CanAddEntity: Overriding allows us to control what entity types are allowed to be added to this folder type. For example, you may want to create a folder type that is only allowed to contain Designer Project folders. To do this, you would write an override as follows:
CanBeRootFolder: Overriding allows us to control whether or not this folder is allowed to be a root folder. By default any folder type other than DefaultFolderBehavior are NOT allowed to be root folders. Setting this override to true will allow the folder to be a root folder. The following sample demonstrates this:
List of All Properties that Can be Overridden


Additional Resources