1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.module.purap.document.authorization;
17
18 import org.kuali.ole.sys.context.SpringContext;
19 import org.kuali.rice.core.api.config.property.ConfigurationService;
20 import org.kuali.rice.core.api.exception.KualiException;
21
22 import java.text.MessageFormat;
23
24 public class DocumentInitiationException extends KualiException {
25 public DocumentInitiationException(String messageKey, Object[] messageParameters) {
26 super(MessageFormat.format(getConfigurationService().getPropertyValueAsString(messageKey), messageParameters));
27 }
28
29 public DocumentInitiationException(String messageKey, Object[] messageParameters, boolean hideIncidentReport) {
30 super(MessageFormat.format(getConfigurationService().getPropertyValueAsString(messageKey), messageParameters), hideIncidentReport);
31 }
32
33 private static ConfigurationService configurationService;
34
35 private static ConfigurationService getConfigurationService() {
36 if (configurationService == null) {
37 configurationService = SpringContext.getBean(ConfigurationService.class);
38 }
39 return configurationService;
40 }
41 }