Show TOC

Registering a Channel Entry ProviderLocate this document in the navigation structure

Use

You must register the channel entry provider, using the type of the channel as the key.

The following example is part of a portal service that registers the channel entry provider on system startup.

public void afterInit() {
	/** The channel entry provider to register **/
	IChannelEntryProvider myChannelEntryProvider = new MyChannelEntryProvider();

	/** Referencing IProviderManager to register the custom channel entry provider within the feeds infrastructure **/
	IProviderManager providersManager = (IProviderManager) PortalRuntime.getRuntimeResources().getService(IProviderManager.KEY);
	try {

		/** Registering the provider, using the channel's type defined in the channel template **/
		providersManager.registerChannelEntryProvider("my_channel_type", myChannelEntryProvider);

	} 
	catch (ProviderRegistrationException e) {
		/** Error Handling **/
	}
}