General HandlerExtension stuff

DashboardHandlerExtension

Any extension that implements DashboardHandlerExtension will be watching all events fired from Dashboard.

Methods

methodDescription

onChange(DashboardEventConstant event)

Each time it'll be a new dashboard event the method onChange it'll be fired by OpenKM.

Sample

package com.openkm.extension.frontend.client;

import com.google.gwt.user.client.Window;
import com.openkm.frontend.client.extension.event.HasDashboardEvent.DashboardEventConstant;
import com.openkm.frontend.client.extension.event.handler.DashboardHandlerExtension;

public class HandlerTest implements DashboardHandlerExtension {

    @Override
    public void onChange(DashboardEventConstant event) {
        Window.alert("dashboard event fired");
    }

}

LanguageHandlerExtension

Any extension that implements LanguageHandlerExtension will be watching all events from change Language.

 Methods

methodDescription

onChange(LanguageEventConstant event)

Each time it'll be a new language event the method onChange it'll be fired by OpenKM.

Sample

package com.openkm.extension.frontend.client;

import com.google.gwt.user.client.Window;
import com.openkm.frontend.client.extension.event.HasLanguageEvent.LanguageEventConstant;
import com.openkm.frontend.client.extension.event.handler.LanguageHandlerExtension;

public class HandlerTest implements LanguageHandlerExtension {

    @Override
    public void onChange(LanguageEventConstant event) {
        Window.alert("language event fired");
    }

}

Any extension that implements NavigatorHandlerExtension will be watching all events fired from navigator stack panel.

Methods

methodDescription

onChange(NavigatorEventConstant event)

Each time it'll be a new stack panel event the method onChange it'll be fired by OpenKM.

Sample

package com.openkm.extension.frontend.client;

import com.google.gwt.user.client.Window;
import com.openkm.frontend.client.extension.event.HasNavigatorEvent.NavigatorEventConstant;
import com.openkm.frontend.client.extension.event.handler.NavigatorHandlerExtension;

public class HandlerTest implements NavigatorHandlerExtension {

    @Override
    public void onChange(NavigatorEventConstant event) {
        Window.alert("navigator event fired");
    }

}

PropertyGroupHandlerExtension 

Any extension that implements PropertyGroupHandlerExtension will be watching all events fired from metadata group tab.

Methods

methodDescription

onChange(PropertyGroupEventConstant event)

Each time it'll be a new property group ( metadata ) event the method onChange it'll be fired by OpenKM.

Sample

package com.openkm.extension.frontend.client;

import com.google.gwt.user.client.Window;
import com.openkm.frontend.client.extension.event.HasPropertyGroupEvent;
import com.openkm.frontend.client.extension.event.HasPropertyGroupEvent.PropertyGroupEventConstant;
import com.openkm.frontend.client.extension.event.handler.PropertyGroupHandlerExtension;

public class HandlerTest implements PropertyGroupHandlerExtension {

    @Override
    public void onChange(PropertyGroupEventConstant event) {
        if (event.equals(HasPropertyGroupEvent.PROPERTYGROUP_CHANGED)) {
            Window.alert("propertyGroup changed - " + event.getType());
        } else {
            Window.alert("other property group event - " + event.getType());
        }
    }

}

WidgetHandlerExtension

Any extension that implements WidgetHandlerExtension will be watching all events fired from widgets.

Methods

methodDescription

onChange(WidgetEventConstant event)

Each time it'll be a new widget event the method onChange it'll be fired by OpenKM .

Sample

package com.openkm.extension.frontend.client;

import com.google.gwt.user.client.Window;
import com.openkm.frontend.client.extension.event.HasWidgetEvent;
import com.openkm.frontend.client.extension.event.HasWidgetEvent.WidgetEventConstant;
import com.openkm.frontend.client.extension.event.handler.WidgetHandlerExtension;

public class HandlerTest implements WidgetHandlerExtension {

    @Override
    public void onChange(WidgetEventConstant event) {
        if (event.equals(HasWidgetEvent.FINISH_STARTUP)) {
            Window.alert("widget event fired");
        }
    }

}

WorkspaceUserPropertiesHandlerExtension 

 

Any extension that implements WorkspaceUserHandlerExtension will be watching all events fired from Workspace user.

 

Methods

methodDescription

workspaceUserLoaded()

It is called the first time workspace user properties are loaded.

Sample

package com.openkm.extension.frontend.client;

import com.google.gwt.user.client.Window;
import com.openkm.frontend.client.extension.communicator.GeneralCommunicator;
import com.openkm.frontend.client.extension.event.handler.WorkspaceUserPropertiesHandlerExtension;

public class HandlerTest implements WorkspaceUserPropertiesHandlerExtension {

    @Override
    public void workspaceUserLoaded() {
        Window.alert("workspace user properties loaded can call GeneralCommunicator to read it");
        if (GeneralCommunicator.getWorkspace() != null) {
            Window.alert("workspace loaded");
        }
    }

}