|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sakaiproject.component.impl.MockCompMgr
public class MockCompMgr
This is a totally fake component manager which is just going to pretend to try to find services, maybe later this could try to use the sakai mock stuff but for now it is just here to stop the CM from firing up during unit tests
| Field Summary | |
|---|---|
ConcurrentHashMap<String,Object> |
components
Not really needed but this allows us to at least put fake ones into this CM for tests if we like |
| Fields inherited from interface org.sakaiproject.component.api.ComponentManager |
|---|
SAKAI_COMPONENTS_ROOT_SYS_PROP |
| Constructor Summary | |
|---|---|
MockCompMgr(boolean loadMocks)
Startup the CM as a mock system for unit tests |
|
| Method Summary | |
|---|---|
void |
close()
Close the component manager, shutting down any created singletons. |
boolean |
contains(Class iface)
Check if this interface Class has a registered component. |
boolean |
contains(String ifaceName)
Check if this interface Class name has a registered component. |
Object |
get(Class iface)
Find a component that is registered to provide this interface. |
Object |
get(String ifaceName)
Find a component that is registered to provide this interface. |
Properties |
getConfig()
Access the configuration properties used when configuring components. |
Set<String> |
getRegisteredInterfaces()
Get all interfaces registered in the component manager. |
boolean |
hasBeenClosed()
Check if the ComponentManager has already been or is in the processing of being closed. |
void |
loadComponent(Class iface,
Object component)
Load a singleton already created component for this interface class as a singleton. |
void |
loadComponent(String ifaceName,
Object component)
Load a singleton already created component for this interface class as a singleton. |
void |
waitTillConfigured()
Wait right here till the component manager is fully configured. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public ConcurrentHashMap<String,Object> components
| Constructor Detail |
|---|
public MockCompMgr(boolean loadMocks)
| Method Detail |
|---|
public void close()
ComponentManager
close in interface ComponentManagerpublic boolean hasBeenClosed()
ComponentManager
hasBeenClosed in interface ComponentManagerpublic boolean contains(Class iface)
ComponentManager
contains in interface ComponentManageriface - The interface Class.
public boolean contains(String ifaceName)
ComponentManager
contains in interface ComponentManagerifaceName - The fully qualified interface Class name.
public Object get(Class iface)
ComponentManager
get in interface ComponentManageriface - The interface Class.
public Object get(String ifaceName)
ComponentManager
get in interface ComponentManagerifaceName - The fully qualified interface Class name.
public Properties getConfig()
ComponentManager
getConfig in interface ComponentManagerpublic Set<String> getRegisteredInterfaces()
ComponentManager
getRegisteredInterfaces in interface ComponentManager
public void loadComponent(Class iface,
Object component)
ComponentManager
loadComponent in interface ComponentManageriface - The interface class.component - The alread created component.
public void loadComponent(String ifaceName,
Object component)
ComponentManager
loadComponent in interface ComponentManagerifaceName - The fully qualified interface Class name.component - The alread created component.public void waitTillConfigured()
ComponentManager
waitTillConfigured in interface ComponentManager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||