FileCenter interceptor

This page explains how to intercept actions in the FileCenter.

Configuration

A properties configuration file must be placed in “custom/configuration” to call the interceptor:

com.axemble.filecenter.interceptors=com.visiativ.process.filecenter.interceptor.MyFileInterceptor

Implémentation

The interceptor given in the configuration must now be implemented, here are the methods it can implement:

import com.axemble.webdrive.interceptors.AbstractInterceptor;
import com.axemble.webdrive.om.Node;

import static com.axemble.vdoc.sdk.Modules.getWorkflowModule;

public class MyFileInterceptor extends AbstractInterceptor {

	private IWorkflowModule iWorkflowModule;

	@Override
	public void onBeforeCreate( Node o ) {
		// TODO
		super.onAfterCreate(o);
	}

	@Override
	public void onAfterCreate( Node o ) {
		// TODO
		super.onAfterCreate(o);
	}

	@Override
	public void onBeforeUpdate( Node o ) {
		// TODO
		super.onAfterUpdate(o);
	}

	@Override
	public void onAfterUpdate( Node o ) {
		// TODO
		super.onAfterUpdate(o);
	}

	@Override
	public void onBeforeDelete( Node o ) {
		// TODO
		super.onAfterUpdate(o);
	}

	@Override
	public void onAfterDelete( Node o ) {
		// TODO
		super.onAfterUpdate(o);
	}
}

The Nodeparameter will be an instance of DocumentNode, FolderNode or CategoryNode (you can retrieve the associated FileCenter object with a libraryModule and the node id).

Note

The delete action will only be called when a document is finally deleted (the “Send to trash” action calls the “update” action).