org.kuali.rice.kcb.service.impl
Class MessageDelivererRegistryServiceImpl

java.lang.Object
  extended by org.kuali.rice.kcb.service.impl.MessageDelivererRegistryServiceImpl
All Implemented Interfaces:
MessageDelivererRegistryAPI, MessageDelivererRegistryService

public class MessageDelivererRegistryServiceImpl
extends Object
implements MessageDelivererRegistryService

MessageDelivererRegistryService implementation - for now we use a HashMap to do this registration, in the future we'll use resource loading.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Constructor Summary
MessageDelivererRegistryServiceImpl()
          Constructs an instance of the MessageDelivererRegistryServiceImpl class and sets up the registered MessageDeliverers in the system.
 
Method Summary
 Collection<MessageDeliverer> getAllDeliverers()
          Implements by constructing instances of each registered class and adding to an ArrayList that gets passed back to the calling method.
 Collection<String> getAllDelivererTypes()
          This service method is responsible for retrieving all MessageDeliverer Types names.
 MessageDeliverer getDeliverer(MessageDelivery messageDelivery)
          Implements by calling getDelivererByName for the delivery type name within the messageDelivery object.
 MessageDeliverer getDelivererByName(String messageDelivererName)
          Implements by doing a key lookup in the hashmap that acts as the deliverer plugin registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageDelivererRegistryServiceImpl

public MessageDelivererRegistryServiceImpl()
Constructs an instance of the MessageDelivererRegistryServiceImpl class and sets up the registered MessageDeliverers in the system. These are the hardcoded message deliverers that we support out of the box. TODO: we'll need to implement a plugin registry discovery mechanism long term.

Method Detail

getAllDelivererTypes

public Collection<String> getAllDelivererTypes()
Description copied from interface: MessageDelivererRegistryService
This service method is responsible for retrieving all MessageDeliverer Types names.

Specified by:
getAllDelivererTypes in interface MessageDelivererRegistryAPI
Specified by:
getAllDelivererTypes in interface MessageDelivererRegistryService
Returns:
Collection of deliverer type names
See Also:
MessageDelivererRegistryService.getAllDelivererTypes()

getAllDeliverers

public Collection<MessageDeliverer> getAllDeliverers()
Implements by constructing instances of each registered class and adding to an ArrayList that gets passed back to the calling method.

Specified by:
getAllDeliverers in interface MessageDelivererRegistryService
Returns:
Collection of MessageDeliverer objects
See Also:
MessageDelivererRegistryService.getAllDelivererTypes()

getDeliverer

public MessageDeliverer getDeliverer(MessageDelivery messageDelivery)
Implements by calling getDelivererByName for the delivery type name within the messageDelivery object.

Specified by:
getDeliverer in interface MessageDelivererRegistryService
Returns:
MessageDeliverer or null if not found
See Also:
MessageDelivererRegistryService.getDeliverer(MessageDelivery)

getDelivererByName

public MessageDeliverer getDelivererByName(String messageDelivererName)
Implements by doing a key lookup in the hashmap that acts as the deliverer plugin registry. The deliverer name is the key in the hashmap for all registered deliverers.

Specified by:
getDelivererByName in interface MessageDelivererRegistryService
Returns:
MessageDeliverer or null if not found
See Also:
MessageDelivererRegistryService.getDelivererByName(String)


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.