com.stellent.cis.client.command
Interface ICommandBeanContext

All Known Subinterfaces:
ICommandApplication, ICommandClient, ICommandExecutionContext

public interface ICommandBeanContext

Interface to a bean provider, allowing lookups of generic bean services


Method Summary
 boolean containsBean(java.lang.String name)
           
 java.util.Map getAllBeansOfType(java.lang.Class type)
          Retrieve all beans of a given type
 ICISTransferStream getApplicationResource(java.lang.String name)
          Load a resource from the application context.
 java.lang.Object getBean(java.lang.String name)
          Retrieve a service bean by name
 java.lang.Object getBean(java.lang.String name, java.lang.Class type)
          Retrieve a service bean by name
 java.lang.String getMessage(java.lang.String key, java.lang.Object[] args, java.util.Locale locale)
          Retrieve a localized message associated with this command application
 ICommandBeanContext getParentContext()
           
 void publishEvent(ICommandApplicationEvent applicationEvent)
          Publish the event throughout the application
 

Method Detail

getParentContext

ICommandBeanContext getParentContext()
Returns:
the parent bean context

containsBean

boolean containsBean(java.lang.String name)
Parameters:
name - the bean name to query
Returns:
true if the bean exists

getBean

java.lang.Object getBean(java.lang.String name)
Retrieve a service bean by name

Parameters:
name - the name of the bean
Returns:
the bean instance

getBean

java.lang.Object getBean(java.lang.String name,
                         java.lang.Class type)
Retrieve a service bean by name

Parameters:
name - the name of the bean
type - the type of the bean
Returns:
the bean instance

getAllBeansOfType

java.util.Map getAllBeansOfType(java.lang.Class type)
Retrieve all beans of a given type

Parameters:
type - the type
Returns:
a mapping of bean name to bean instance

getMessage

java.lang.String getMessage(java.lang.String key,
                            java.lang.Object[] args,
                            java.util.Locale locale)
Retrieve a localized message associated with this command application

Parameters:
key - the message key
args - the message arguments
locale - the locale or null for default
Returns:
the localized message

getApplicationResource

ICISTransferStream getApplicationResource(java.lang.String name)
Load a resource from the application context.

Parameters:
name - the resource name
Returns:
the resource

publishEvent

void publishEvent(ICommandApplicationEvent applicationEvent)
Publish the event throughout the application

Parameters:
applicationEvent - the application event