ChannelService

public interface ChannelService

Manages CRUD operations for a Channel.

Methods

addOrUpdate

void addOrUpdate(Channel channel)

Saves the given channel. If the channel exists it will be updated.

Parameters:
  • channel – the channel to be added, not null

channelExists

boolean channelExists(String moduleName)

Checks whether the given module provides a task channel.

Parameters:
  • moduleName – the name of the module
Returns:

true if the module provides the task channel, false otherwise

delete

void delete(String moduleName)

Deletes the given module.

Parameters:
  • moduleName – the channel to be deleted

getAllChannels

List<Channel> getAllChannels()

Returns the list of all registered channels.

Returns:the list of channels

getChannel

Channel getChannel(String moduleName)

Returns the channel for the module with the given name.

Parameters:
  • moduleName – the name of the module, null returns null
Returns:

the channel for the module

registerChannel

void registerChannel(ChannelRequest channelRequest)

Registers the given channel with the task module.

Parameters:
  • channelRequest – the channel request, not null

registerChannel

void registerChannel(InputStream stream, String moduleName, String moduleVersion)

Registers channel from the given stream for the given module. The input stream should contain the JSON definition of the channel.

Parameters:
  • stream – the channel JSON definition as a stream, not null
  • moduleName – the name of the module
  • moduleVersion – the version of the module

unregisterChannel

void unregisterChannel(String moduleName)

Unregisters the given channel with the task module.

Parameters:
  • moduleName – , not null