| 1 | |
package org.kuali.rice.core.api; |
| 2 | |
|
| 3 | |
import org.kuali.rice.core.api.datetime.DateTimeService; |
| 4 | |
import org.kuali.rice.core.api.encryption.EncryptionService; |
| 5 | |
import org.kuali.rice.core.api.impex.xml.XmlExporterService; |
| 6 | |
import org.kuali.rice.core.api.impex.xml.XmlIngesterService; |
| 7 | |
import org.kuali.rice.core.api.namespace.NamespaceService; |
| 8 | |
import org.kuali.rice.core.api.resourceloader.GlobalResourceLoader; |
| 9 | |
import org.kuali.rice.core.api.style.StyleService; |
| 10 | |
|
| 11 | 0 | public class CoreApiServiceLocator { |
| 12 | |
|
| 13 | |
public static final String NAMESPACE_SERVICE = "namespaceService"; |
| 14 | |
public static final String XML_EXPORTER_SERVICE = "xmlExporterService"; |
| 15 | |
public static final String XML_INGESTER_SERVICE = "xmlIngesterService"; |
| 16 | |
public static final String STYLE_SERVICE = "styleService"; |
| 17 | |
|
| 18 | |
static <T> T getService(String serviceName) { |
| 19 | 0 | return GlobalResourceLoader.<T>getService(serviceName); |
| 20 | |
} |
| 21 | |
|
| 22 | |
public static NamespaceService getNamespaceService() { |
| 23 | 0 | return getService(NAMESPACE_SERVICE); |
| 24 | |
} |
| 25 | |
|
| 26 | |
public static XmlExporterService getXmlExporterService() { |
| 27 | 0 | return getService(XML_EXPORTER_SERVICE); |
| 28 | |
} |
| 29 | |
|
| 30 | |
public static XmlIngesterService getXmlIngesterService() { |
| 31 | 0 | return getService(XML_INGESTER_SERVICE); |
| 32 | |
} |
| 33 | |
|
| 34 | |
public static final EncryptionService getEncryptionService() { |
| 35 | 0 | return getService(CoreConstants.Services.ENCRYPTION_SERVICE); |
| 36 | |
} |
| 37 | |
|
| 38 | |
public static StyleService getStyleService() { |
| 39 | 0 | return getService(STYLE_SERVICE); |
| 40 | |
} |
| 41 | |
|
| 42 | |
public static DateTimeService getDateTimeService() { |
| 43 | 0 | return getService(CoreConstants.Services.DATETIME_SERVICE); |
| 44 | |
} |
| 45 | |
} |