01: /*
02: * Copyright 2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: /*
17: * Created on Jan 19, 2005
18: *
19: */
20: package org.kuali.module.pdp.service.impl;
21:
22: import org.kuali.core.service.KualiConfigurationService;
23: import org.kuali.kfs.KFSConstants;
24: import org.springframework.transaction.annotation.Transactional;
25:
26: /**
27: * @author local-jsissom
28: */
29: @Transactional
30: public class EnvironmentServiceImpl implements
31: org.kuali.module.pdp.service.EnvironmentService {
32: private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger
33: .getLogger(EnvironmentServiceImpl.class);
34:
35: private KualiConfigurationService kualiConfigurationService;
36:
37: public void setKualiConfigurationService(
38: KualiConfigurationService kcs) {
39: kualiConfigurationService = kcs;
40: }
41:
42: public EnvironmentServiceImpl() {
43: super ();
44: }
45:
46: /*
47: * (non-Javadoc)
48: *
49: * @see edu.iu.uis.pdp.service.EnvironmentService#getEnvironment()
50: */
51: public String getEnvironment() {
52: return kualiConfigurationService.getPropertyString(
53: KFSConstants.ENVIRONMENT_KEY).toUpperCase();
54: }
55:
56: public boolean isProduction() {
57: return kualiConfigurationService.isProductionEnvironment();
58: }
59: }
|