2 * Copyright (c) 2017 ZTE Corporation.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the Apache License, Version 2.0
5 * and the Eclipse Public License v1.0 which both accompany this distribution,
6 * and are available at http://www.eclipse.org/legal/epl-v10.html
7 * and http://www.apache.org/licenses/LICENSE-2.0
10 * ZTE - initial API and implementation and/or initial documentation
12 package org.onap.sdc.workflowdesigner.config;
14 import java.io.FileNotFoundException;
15 import java.io.IOException;
16 import java.io.InputStream;
17 import java.util.Properties;
19 import org.slf4j.Logger;
20 import org.slf4j.LoggerFactory;
23 private static Logger log = LoggerFactory.getLogger(Config.class);
24 private static String configFilePath = "bpmn.config.properties";
25 public final static String HANDLER_ClASS = "handlerClass";
26 public final static String TEMPLATE_PATH = "templatePath";
28 public final static Properties PROPERTIES = load();
30 public static Properties load() {
31 Properties properties = new Properties();
32 InputStream in = null;
34 in = Config.class.getClassLoader().getResourceAsStream(configFilePath);
36 } catch (FileNotFoundException e) {
37 log.error(configFilePath, e);
38 } catch (IOException e) {
39 log.error(configFilePath, e);
40 } catch (Exception e) {
41 log.error(configFilePath, e);
46 } catch (IOException e) {
47 log.error(configFilePath, e);