Package org.dspace.utils
Class DSpace
- java.lang.Object
-
- org.dspace.utils.DSpace
-
public final class DSpace extends Object
This is the DSpace helper services access object. It allows access to all core DSpace services for those who cannot or will not use the injection service to get services.Note that this may not include every core service but should include all the services that are useful to UI developers at least.
This should be initialized using the constructor and then can be used as long as the kernel is not shutdown. Making multiple copies of this is cheap and can be done without worry about the cost.
- Author:
- Aaron Zeckoski (azeckoski @ gmail.com)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigurationService
getConfigurationService()
EventService
getEventService()
DSpaceKernel
getKernel()
RequestService
getRequestService()
ServiceManager
getServiceManager()
<T> T
getSingletonService(Class<T> type)
-
-
-
Constructor Detail
-
DSpace
public DSpace()
Construct a DSpace helper object which uses the default kernel.- Throws:
IllegalStateException
- if the kernel is not already running
-
DSpace
public DSpace(String kernelName)
Construct a DSpace helper object which uses the a specific named instance of the kernel.- Parameters:
kernelName
- the name of the kernel to use (null to use the default kernel)- Throws:
IllegalStateException
- if the kernel is not already running or no kernel exists with this name
-
-
Method Detail
-
getKernel
public DSpaceKernel getKernel()
-
getServiceManager
public ServiceManager getServiceManager()
-
getConfigurationService
public ConfigurationService getConfigurationService()
-
getEventService
public EventService getEventService()
-
getRequestService
public RequestService getRequestService()
-
getSingletonService
public <T> T getSingletonService(Class<T> type)
-
-