Extending frontend UI

To extend frontend you need to get the source code and compile the changes into.

The OpenKM plugin extensions makes it easy to extend the OpenKM end user interface by encapsulating plugin code and making it reusable between OpenKM versions.

The OpenKM plugin extension architecture is based on:

  • Extensions
  • Events
  • Handlers
  • Communicators

Extensions are available widget definitions that allows the developer to make extensible panels and widgets ( for example adding new tab panel on tab document )

Events are a collection of events that OpenKM UI triggers  each time any changes occur ( for example when a new keyword is added in the tab document the triggered event HasDocumentEvent.KEYWORD_ADDED)

Handlers are a collection of methods called internally by OpenKM. Handlers must be implemented into your extensions in order to collect OpenKM triggered events. Each extension you make can have one or several handlers, that are automatically registered by OpenKM on the loading process. OpenKM internally triggers events to each declared handler.

Comunicators are a collection of methods available as OpenKM Comunitators API to access transparently some internal UI values. There are several Communicators, for example with GeneralComunicator you can access some general actions like refreshing UI as GeneralComunicator.refreshUI(). OpenKM Communicators API has read and write methods to interact with internal OpenKM UI objects.

Creating OpenKM plugin extensions is easy but you need some java knowledge and pay special attention to the Google Web ToolKit API that's used to build OpenKM UI. http://code.google.com/webtoolkit/

Enable sample extensions

OpenKM comes with some frontend UI sample extensions not enabled by default. To enable them go to Administration > Utilies > Database query and execute the SQL queries:

ExtensionSQL sentence

ToolBarButtonExample

INSERT INTO OKM_EXTENSION (EXT_UUID,EXT_NAME) VALUES('9f84b330-d096-11df-bd3b-0800200c9a66','Toolbar button example');

TabWorkspaceExample

INSERT INTO OKM_EXTENSION (EXT_UUID,EXT_NAME) VALUES('44f94470-d097-11df-bd3b-0800200c9a66','Tab workspace example');

TabFolderExample

INSERT INTO OKM_EXTENSION (EXT_UUID,EXT_NAME) VALUES('d95e01a0-d097-11df-bd3b-0800200c9a66','Tab folder example');

TabFolderExample

INSERT INTO OKM_EXTENSION (EXT_UUID,EXT_NAME) VALUES('d9dab640-d098-11df-bd3b-0800200c9a66','Hello world example');

After registering a sample extension, you also need to enable the from Administration > Profiles.