Permalink
Browse files

Merge dspace-services into DSpace

  • Loading branch information...
2 parents 3b356ef + 83e8e9d commit 0db0fea762799b40376965e0d13d89b81b9f7bfe @mwoodiupui mwoodiupui committed Sep 18, 2012
Showing with 14,173 additions and 0 deletions.
  1. +92 −0 dspace-services/api/pom.xml
  2. +75 −0 dspace-services/api/src/main/java/org/dspace/constants/Constants.java
  3. +12 −0 dspace-services/api/src/main/java/org/dspace/constants/package-info.java
  4. +80 −0 dspace-services/api/src/main/java/org/dspace/kernel/Activator.java
  5. +42 −0 dspace-services/api/src/main/java/org/dspace/kernel/CommonLifecycle.java
  6. +45 −0 dspace-services/api/src/main/java/org/dspace/kernel/DSpaceKernel.java
  7. +195 −0 dspace-services/api/src/main/java/org/dspace/kernel/DSpaceKernelManager.java
  8. +146 −0 dspace-services/api/src/main/java/org/dspace/kernel/ServiceManager.java
  9. +31 −0 dspace-services/api/src/main/java/org/dspace/kernel/config/SpringLoader.java
  10. +61 −0 dspace-services/api/src/main/java/org/dspace/kernel/mixins/ConfigChangeListener.java
  11. +26 −0 dspace-services/api/src/main/java/org/dspace/kernel/mixins/InitializedService.java
  12. +33 −0 dspace-services/api/src/main/java/org/dspace/kernel/mixins/OrderedService.java
  13. +62 −0 dspace-services/api/src/main/java/org/dspace/kernel/mixins/ServiceChangeListener.java
  14. +35 −0 dspace-services/api/src/main/java/org/dspace/kernel/mixins/ServiceManagerReadyAware.java
  15. +26 −0 dspace-services/api/src/main/java/org/dspace/kernel/mixins/ShutdownService.java
  16. +13 −0 dspace-services/api/src/main/java/org/dspace/kernel/mixins/package-info.java
  17. +12 −0 dspace-services/api/src/main/java/org/dspace/kernel/package-info.java
  18. +65 −0 dspace-services/api/src/main/java/org/dspace/providers/CacheProvider.java
  19. +12 −0 dspace-services/api/src/main/java/org/dspace/providers/package-info.java
  20. +92 −0 dspace-services/api/src/main/java/org/dspace/services/CachingService.java
  21. +129 −0 dspace-services/api/src/main/java/org/dspace/services/ConfigurationService.java
  22. +45 −0 dspace-services/api/src/main/java/org/dspace/services/EventService.java
  23. +95 −0 dspace-services/api/src/main/java/org/dspace/services/RequestService.java
  24. +51 −0 dspace-services/api/src/main/java/org/dspace/services/SessionService.java
  25. +118 −0 dspace-services/api/src/main/java/org/dspace/services/model/Cache.java
  26. +63 −0 dspace-services/api/src/main/java/org/dspace/services/model/CacheConfig.java
  27. +202 −0 dspace-services/api/src/main/java/org/dspace/services/model/Event.java
  28. +55 −0 dspace-services/api/src/main/java/org/dspace/services/model/EventListener.java
  29. +31 −0 dspace-services/api/src/main/java/org/dspace/services/model/Request.java
  30. +82 −0 dspace-services/api/src/main/java/org/dspace/services/model/RequestInterceptor.java
  31. +99 −0 dspace-services/api/src/main/java/org/dspace/services/model/Session.java
  32. +12 −0 dspace-services/api/src/main/java/org/dspace/services/model/package-info.java
  33. +12 −0 dspace-services/api/src/main/java/org/dspace/services/package-info.java
  34. +172 −0 dspace-services/impl/pom.xml
  35. +322 −0 dspace-services/impl/src/main/java/org/dspace/servicemanager/DSpaceKernelImpl.java
  36. +63 −0 dspace-services/impl/src/main/java/org/dspace/servicemanager/DSpaceKernelInit.java
  37. +489 −0 dspace-services/impl/src/main/java/org/dspace/servicemanager/DSpaceServiceManager.java
  38. +34 −0 dspace-services/impl/src/main/java/org/dspace/servicemanager/ExternalServiceManagerSystem.java
  39. +58 −0 dspace-services/impl/src/main/java/org/dspace/servicemanager/ServiceConfig.java
  40. +39 −0 dspace-services/impl/src/main/java/org/dspace/servicemanager/ServiceManagerSystem.java
  41. +26 −0 dspace-services/impl/src/main/java/org/dspace/servicemanager/ServiceManagerUtils.java
  42. +243 −0 dspace-services/impl/src/main/java/org/dspace/servicemanager/config/DSpaceConfig.java
  43. +663 −0 dspace-services/impl/src/main/java/org/dspace/servicemanager/config/DSpaceConfigurationService.java
  44. +12 −0 dspace-services/impl/src/main/java/org/dspace/servicemanager/config/package-info.java
  45. +28 −0 dspace-services/impl/src/main/java/org/dspace/servicemanager/example/ConcreteExample.java
  46. +41 −0 dspace-services/impl/src/main/java/org/dspace/servicemanager/example/EventListenerExample.java
  47. +52 −0 dspace-services/impl/src/main/java/org/dspace/servicemanager/example/RequestInterceptorExample.java
  48. +28 −0 dspace-services/impl/src/main/java/org/dspace/servicemanager/example/ServiceExample.java
  49. +44 −0 dspace-services/impl/src/main/java/org/dspace/servicemanager/example/ServiceExampleImpl.java
  50. +12 −0 dspace-services/impl/src/main/java/org/dspace/servicemanager/example/package-info.java
  51. +12 −0 dspace-services/impl/src/main/java/org/dspace/servicemanager/package-info.java
  52. +123 −0 ...ices/impl/src/main/java/org/dspace/servicemanager/servlet/DSpaceKernelServletContextListener.java
  53. +14 −0 dspace-services/impl/src/main/java/org/dspace/servicemanager/servlet/package-info.java
  54. +54 −0 ...-services/impl/src/main/java/org/dspace/servicemanager/spring/DSpaceBeanFactoryPostProcessor.java
  55. +59 −0 dspace-services/impl/src/main/java/org/dspace/servicemanager/spring/DSpaceBeanPostProcessor.java
  56. +244 −0 dspace-services/impl/src/main/java/org/dspace/servicemanager/spring/ResourceFinder.java
  57. +316 −0 dspace-services/impl/src/main/java/org/dspace/servicemanager/spring/SpringServiceManager.java
  58. +14 −0 dspace-services/impl/src/main/java/org/dspace/servicemanager/spring/package-info.java
  59. +645 −0 dspace-services/impl/src/main/java/org/dspace/services/caching/CachingServiceImpl.java
  60. +209 −0 dspace-services/impl/src/main/java/org/dspace/services/caching/model/EhcacheCache.java
  61. +136 −0 dspace-services/impl/src/main/java/org/dspace/services/caching/model/MapCache.java
  62. +12 −0 dspace-services/impl/src/main/java/org/dspace/services/caching/model/package-info.java
  63. +12 −0 dspace-services/impl/src/main/java/org/dspace/services/caching/package-info.java
  64. +332 −0 dspace-services/impl/src/main/java/org/dspace/services/events/SystemEventService.java
  65. +12 −0 dspace-services/impl/src/main/java/org/dspace/services/events/package-info.java
  66. +310 −0 dspace-services/impl/src/main/java/org/dspace/services/sessions/SessionRequestServiceImpl.java
  67. +18 −0 dspace-services/impl/src/main/java/org/dspace/services/sessions/model/AbstractRequestImpl.java
  68. +74 −0 dspace-services/impl/src/main/java/org/dspace/services/sessions/model/HttpRequestImpl.java
  69. +198 −0 dspace-services/impl/src/main/java/org/dspace/services/sessions/model/InternalHttpSession.java
  70. +56 −0 dspace-services/impl/src/main/java/org/dspace/services/sessions/model/InternalRequestImpl.java
  71. +488 −0 dspace-services/impl/src/main/java/org/dspace/services/sessions/model/SessionImpl.java
  72. +12 −0 dspace-services/impl/src/main/java/org/dspace/services/sessions/model/package-info.java
  73. +12 −0 dspace-services/impl/src/main/java/org/dspace/services/sessions/package-info.java
  74. +529 −0 dspace-services/impl/src/main/resources/caching/ehcache-config.xml
  75. +265 −0 dspace-services/impl/src/main/resources/caching/ehcache.xsd
  76. +23 −0 dspace-services/impl/src/main/resources/config/dspace-defaults.cfg
  77. +29 −0 dspace-services/impl/src/main/resources/spring/spring-dspace-applicationContext.xml
  78. +48 −0 dspace-services/impl/src/main/resources/spring/spring-dspace-core-services.xml
  79. +101 −0 dspace-services/impl/src/test/java/org/dspace/servicemanager/DSpaceKernelImplTest.java
  80. +58 −0 dspace-services/impl/src/test/java/org/dspace/servicemanager/DSpaceKernelManagerTest.java
  81. +308 −0 dspace-services/impl/src/test/java/org/dspace/servicemanager/DSpaceServiceManagerTest.java
  82. +214 −0 dspace-services/impl/src/test/java/org/dspace/servicemanager/DSpaceTest.java
  83. +104 −0 dspace-services/impl/src/test/java/org/dspace/servicemanager/MockServiceManagerSystem.java
  84. +69 −0 dspace-services/impl/src/test/java/org/dspace/servicemanager/SampleAnnotationBean.java
  85. +292 −0 ...-services/impl/src/test/java/org/dspace/servicemanager/config/DSpaceConfigurationServiceTest.java
  86. +119 −0 dspace-services/impl/src/test/java/org/dspace/servicemanager/fakeservices/FakeService1.java
  87. +42 −0 dspace-services/impl/src/test/java/org/dspace/servicemanager/fakeservices/FakeService2.java
  88. +126 −0 .../impl/src/test/java/org/dspace/servicemanager/servlet/DSpaceKernelServletContextListenerTest.java
  89. +99 −0 dspace-services/impl/src/test/java/org/dspace/servicemanager/servlet/SampleServlet.java
  90. +59 −0 dspace-services/impl/src/test/java/org/dspace/servicemanager/spring/SpringAnnotationBean.java
  91. +219 −0 dspace-services/impl/src/test/java/org/dspace/servicemanager/spring/TestSpringServiceManager.java
  92. +232 −0 dspace-services/impl/src/test/java/org/dspace/services/caching/CachingServiceTest.java
  93. +205 −0 dspace-services/impl/src/test/java/org/dspace/services/caching/EhcacheCacheTest.java
  94. +37 −0 dspace-services/impl/src/test/java/org/dspace/services/events/EventListenerBothFilters.java
  95. +29 −0 dspace-services/impl/src/test/java/org/dspace/services/events/EventListenerNameFilter.java
  96. +53 −0 dspace-services/impl/src/test/java/org/dspace/services/events/EventListenerNoFilter.java
  97. +167 −0 dspace-services/impl/src/test/java/org/dspace/services/events/EventServiceTest.java
  98. +51 −0 dspace-services/impl/src/test/java/org/dspace/services/session/MockRequestInterceptor.java
  99. +168 −0 dspace-services/impl/src/test/java/org/dspace/services/session/SessionRequestServiceImplTest.java
  100. +55 −0 dspace-services/impl/src/test/java/org/dspace/test/DSpaceAbstractKernelTest.java
  101. +53 −0 dspace-services/impl/src/test/java/org/dspace/test/DSpaceAbstractRequestTest.java
  102. +134 −0 dspace-services/impl/src/test/java/org/dspace/test/DSpaceAbstractTest.java
  103. +33 −0 dspace-services/impl/src/test/java/org/dspace/test/TestAbstractDSpaceRequestTest.java
  104. +29 −0 dspace-services/impl/src/test/java/org/dspace/test/TestAbstractDSpaceTest.java
  105. +527 −0 dspace-services/impl/src/test/resources/ehcache-config.xml
  106. +30 −0 dspace-services/impl/src/test/resources/local.properties
  107. +7 −0 dspace-services/impl/src/test/resources/log4j.properties
  108. +32 −0 dspace-services/impl/src/test/resources/spring/spring-test-beans.xml
  109. +31 −0 dspace-services/impl/src/test/resources/spring/spring-test-services.xml
  110. +139 −0 dspace-services/pom.xml
  111. +64 −0 dspace-services/src/main/javadoc/overview.html
  112. +79 −0 dspace-services/utils/pom.xml
  113. +90 −0 dspace-services/utils/src/main/java/org/dspace/utils/DSpace.java
  114. +59 −0 dspace-services/utils/src/main/java/org/dspace/utils/StreamUtils.java
  115. +15 −0 dspace-services/utils/src/main/java/org/dspace/utils/package-info.java
  116. +26 −0 dspace-services/utils/src/main/java/org/dspace/utils/servicemanager/NotProvider.java
  117. +58 −0 dspace-services/utils/src/main/java/org/dspace/utils/servicemanager/OrderedServiceComparator.java
  118. +125 −0 dspace-services/utils/src/main/java/org/dspace/utils/servicemanager/ProviderHolder.java
  119. +27 −0 dspace-services/utils/src/main/java/org/dspace/utils/servicemanager/ProviderNotFoundException.java
  120. +320 −0 dspace-services/utils/src/main/java/org/dspace/utils/servicemanager/ProviderStack.java
  121. +41 −0 dspace-services/utils/src/main/java/org/dspace/utils/servicemanager/ProviderStackComparator.java
  122. +107 −0 dspace-services/utils/src/main/java/org/dspace/utils/servicemanager/RequestExecutor.java
  123. +12 −0 dspace-services/utils/src/main/java/org/dspace/utils/servicemanager/package-info.java
  124. +110 −0 dspace-services/utils/src/main/java/org/dspace/utils/servlet/DSpaceWebappServletFilter.java
  125. +13 −0 dspace-services/utils/src/main/java/org/dspace/utils/servlet/package-info.java
  126. +91 −0 dspace-services/utils/src/test/java/org/dspace/utils/servicemanager/ProviderHolderTest.java
  127. +383 −0 dspace-services/utils/src/test/java/org/dspace/utils/servicemanager/ProviderStackTest.java
@@ -0,0 +1,92 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.dspace</groupId>
+ <artifactId>dspace-services-api</artifactId>
+ <name>DSpace Services API</name>
+ <description>The core services API for DSpace</description>
+ <url>http://projects.dspace.org</url>
+ <inceptionYear>Monday, September 1, 2008</inceptionYear>
+ <organization>
+ <name>The DSpace Foundation</name>
+ <url>http://www.dspace.org</url>
+ </organization>
+ <packaging>jar</packaging>
+
+ <parent>
+ <artifactId>dspace-services</artifactId>
+ <groupId>org.dspace</groupId>
+ <version>2.0.5-SNAPSHOT</version>
+ </parent>
+
+ <!--
+ The Subversion repository location is used by Continuum to
+ update against when changes have occured, this spawns a new
+ build cycle and releases snapshots into the snapshot repository
+ below.
+ -->
+ <scm>
+ <connection>scm:svn:http://scm.dspace.org/svn/repo/modules/dspace-services/trunk/api</connection>
+ <developerConnection>scm:svn:https://scm.dspace.org/svn/repo/modules/dspace-services/trunk/api
+ </developerConnection>
+ <url>http://scm.dspace.org/svn/repo/modules/dspace-services/trunk/api</url>
+ </scm>
+
+ <dependencies>
+ <!-- should be an absolutely minimal set of dependencies -->
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.4</version>
+ <scope>provided</scope>
+ <type>jar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.5.6</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.4</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <resources>
+ <!-- include the readme.txt file and the java source files -->
+ <resource>
+ <directory>${basedir}/src/main/java</directory>
+ <includes>
+ <include>**/*.java</include>
+ <include>**/*.html</include>
+ <include>**/*.xml</include>
+ <include>**/*.properties</include>
+ </includes>
+ <filtering>false</filtering>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+ <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
+ </manifest>
+ </archive>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
@@ -0,0 +1,75 @@
+/**
+ * The contents of this file are subject to the license and copyright
+ * detailed in the LICENSE and NOTICE files at the root of the source
+ * tree and available online at
+ *
+ * http://www.dspace.org/license/
+ */
+package org.dspace.constants;
+
+
+/**
+ * All core DSpace Services constants.
+ *
+ * @author Aaron Zeckoski (azeckoski @ gmail.com)
+ */
+public class Constants {
+
+ /**
+ * If this is set to true then DSpace kernel is run as if it is
+ * inside a unit test. This means that nothing is persisted (things
+ * are run in-memory only) and caches and other speed optimizing
+ * parts are reduced. This should NEVER be set true in a production
+ * system.
+ */
+ public static final String DSPACE_TESTING_MODE = "dspace.testing";
+
+ /**
+ * This is the name of the timer thread for all DSpace core timers.
+ */
+ public static final String DSPACE_TIMER_NAME = "DSpaceTimer";
+
+ /**
+ * Configuration key for the name of the DBMS being used.
+ * HSQLDB, DERBY, ORACLE, MYSQL, POSTGRES, DB2, MSSQL.
+ * Note that H2 uses the HSQLDB key.
+ */
+ public static final String DATABASE_TYPE_KEY = "jdbc.database.type";
+
+ /**
+ * Class of the JDBC driver.
+ * Embedded drivers are:
+ * <ul>
+ * <li>org.h2.Driver</li>
+ * <li>org.apache.derby.jdbc.EmbeddedDriver</li>
+ * <li>org.hsqldb.jdbcDriver</li>
+ * </ul>
+ * Put your driver in the lib directory for your servlet container.
+ */
+ public static final String DATABASE_DRIVER_KEY = "jdbc.driver.class";
+
+ /**
+ * JDBC database connection URL.
+ */
+ public static final String DATABASE_CONNECTION_KEY = "jdbc.connection.url";
+
+ /**
+ * Database connection user.
+ */
+ public static final String DATABASE_USERNAME_KEY = "jdbc.username";
+
+ /**
+ * Database connection password.
+ */
+ public static final String DATABASE_PASSWORD_KEY = "jdbc.password";
+
+ /**
+ * Set this to true (the default) to enable connection pooling.
+ */
+ public static final String DATABASE_CONN_POOLING = "jdbc.dataSource.pooling";
+
+ /**
+ *
+ */
+ public static final String DEFAULT_ENCODING = "UTF-8";
+}
@@ -0,0 +1,12 @@
+/**
+ * The contents of this file are subject to the license and copyright
+ * detailed in the LICENSE and NOTICE files at the root of the source
+ * tree and available online at
+ *
+ * http://www.dspace.org/license/
+ */
+/**
+ * Manifest constants naming configuration data for core services.
+ */
+
+package org.dspace.constants;
@@ -0,0 +1,80 @@
+/**
+ * The contents of this file are subject to the license and copyright
+ * detailed in the LICENSE and NOTICE files at the root of the source
+ * tree and available online at
+ *
+ * http://www.dspace.org/license/
+ */
+package org.dspace.kernel;
+
+
+/**
+ * An activator is a special type which allows a provider to be plugged into the system by dropping a jar file
+ * in with the kernel and adding in a hook in the configuration file. Activators are started after the
+ * initial classes and the service manager have already been started. All classes which implement this
+ * must have a public empty constructor (takes no parameters) (e.g.
+ * {@code public MyClass() {}} )
+ * <p>
+ * If you want the system to execute your class then you must list it in
+ * the DSpace configuration with the fully qualified classpath
+ * (NOTE that the xxx can be anything as long as it is unique): <br/>
+ * {@code activator.xxx = org.dspace.MyClass}
+ * </p>
+ * <p>
+ * {@link #start(ServiceManager)} will be called after the class is created during kernel startup.
+ * Developers should create their providers/plugins/etc. in this method and
+ * use the registration methods in the {@link ServiceManager} to register them.
+ * {@link #stop(ServiceManager)} will be called when the kernel shuts down. Perform any cleanup/shutdown actions
+ * you like during this phase (unregistering your services here is a good idea). <br/>
+ * </p>
+ * <p>This is modeled after the OSGi {@code BundleActivator}.</p>
+ * <p>
+ * There is another type of activator used in DSpace but it is
+ * configured via the configuration service only. The class activator
+ * is configured by creating a config property like this
+ * (NOTE that the xxx can be anything as long as it is unique): <br/>
+ * {@code activator.class.xxx = org.dspace.MyClass;org.dspace.MyServiceName;constructor}<br/>
+ * Unlike the normal activators, these are started up when the kernel
+ * core services start and thus can actually be accessed from the
+ * service manager and referenced in providers and plugins.
+ * </p>
+ *
+ * @author Aaron Zeckoski (azeckoski @ gmail.com)
+ */
+public interface Activator {
+
+ /**
+ * This is called when the service manager is starting this activator.
+ * It is only called once.
+ * It will be called after the core services are started. The ClassLoader used will be the one
+ * that this class is associated with to ensure all dependencies are available.
+ * <p>
+ * This method should be used to startup and register services in most cases but it can be used
+ * to simply perform some system startup actions if desired.
+ * <p>
+ * Exceptions thrown out of this method will not cause the system startup to fail.
+ *
+ * @param serviceManager the current system service manager
+ */
+ public void start(ServiceManager serviceManager);
+
+ /**
+ * This is called when the service manager is shutting down this
+ * activator. It is only called once.
+ * It will be called before the core services are stopped. The ClassLoader used will be the one
+ * that this class is associated with to ensure all dependencies are available.
+ * <p>
+ * This method should be used to shutdown and unregister services in most cases but it can be used
+ * to simply perform some system shutdown actions if desired.
+ * <p>
+ * Exceptions thrown out of this method will not cause the system shutdown to fail.
+ * <p>
+ * WARNING: this can hang the shutdown by performing operations that
+ * take a long long time or are deadlocked. The developer is
+ * expected to ensure this does not happen.
+ *
+ * @param serviceManager the current system service manager
+ */
+ public void stop(ServiceManager serviceManager);
+
+}
@@ -0,0 +1,42 @@
+/**
+ * The contents of this file are subject to the license and copyright
+ * detailed in the LICENSE and NOTICE files at the root of the source
+ * tree and available online at
+ *
+ * http://www.dspace.org/license/
+ */
+package org.dspace.kernel;
+
+/**
+ * Beans that have a lifecycle and can be controlled via their lifecycle implement this interface.
+ * Based on the Sakai K2 lifecycle interface -AZ
+ *
+ * @param <T> the type of object managed by this lifecycle.
+ */
+public interface CommonLifecycle<T> {
+
+ /**
+ * Starts the bean. This initializes and causes the object to begin functioning.
+ * Should not happen automatically when the object is created.
+ */
+ public void start();
+
+ /**
+ * Stops the bean. This turns the object off and causes related things to be shutdown.
+ * Object should be able to be started again.
+ */
+ public void stop();
+
+ /**
+ * Gets a reference to the bean that is being managed inside this lifecycle.
+ * @return the managed object
+ */
+ public T getManagedBean();
+
+ /**
+ * Destroy the managed bean entirely. It will be stopped first if not stopped and cannot be
+ * started again afterwards.
+ */
+ public void destroy();
+
+}
@@ -0,0 +1,45 @@
+/**
+ * The contents of this file are subject to the license and copyright
+ * detailed in the LICENSE and NOTICE files at the root of the source
+ * tree and available online at
+ *
+ * http://www.dspace.org/license/
+ */
+package org.dspace.kernel;
+
+import org.dspace.services.ConfigurationService;
+
+/**
+ * This is the most core piece of the system: instantiating one will
+ * startup the dspace services framework.
+ *
+ * @author Aaron Zeckoski (azeckoski @ gmail.com)
+ */
+public interface DSpaceKernel {
+
+ public static final String KERNEL_NAME = "Kernel";
+ public static final String MBEAN_PREFIX = "org.dspace:name=";
+ public static final String MBEAN_SUFFIX = ",type=DSpaceKernel";
+ public static final String MBEAN_NAME = MBEAN_PREFIX+KERNEL_NAME+MBEAN_SUFFIX;
+
+ /**
+ * @return the unique MBean name of this DSpace Kernel
+ */
+ public String getMBeanName();
+
+ /**
+ * @return true if this Kernel is started and running
+ */
+ public boolean isRunning();
+
+ /**
+ * @return the DSpace service manager instance for this Kernel
+ */
+ public ServiceManager getServiceManager();
+
+ /**
+ * @return the DSpace configuration service for this Kernel
+ */
+ public ConfigurationService getConfigurationService();
+
+}
Oops, something went wrong.

0 comments on commit 0db0fea

Please sign in to comment.