Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/**
* Copyright (c) 2013 Sveriges Kommuner och Landsting (SKL).
*
* This file is part of SKLTP.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package se.skltp.ei.intsvc.dynamicFlows;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.TreeMap;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.soitoolkit.commons.mule.util.RecursiveResourceBundle;
@SuppressWarnings({ "unchecked", "rawtypes" })
public class PropertyUtil {
// Pattern for a multiple PARTNER parameter: PARTNER(n)_(name)
public static final String PARTNER_LIST_NAME = "AGMTS"; // The map-key for agreements, does not exist in the property-file
public static final String PARTNER_PREFIX = "AGMT";
public static final int PARTNER_PREFIX_LENGTH = 4; // todo: PARTNER_PREFIX.length(); gives 0 ???
public static final String PARTNER_INBOUND_MANAGE_STOPFILE = "INBOUND_MANAGE_STOPFILE";
public static final String PARTNER_INBOUND_FOLDER = "INBOUND_FOLDER";
public static final String ID = "ID";
public static final char SEPARATOR = '_';
public static final String SUPERVISE_FILES_LIST_NAME = "SUPERVISE_FILES"; // The map-key for files to supervise, does not exist in the property-file
public static final String SUPERVISE_FILES_PREFIX = "SUPERVISE_FILES_";
public static final int SUPERVISE_FILES_PREFIX_LENGTH = 16; // todo: SUPERVISE_FILES_PREFIX.length(); gives 0 ???
public static final String SUPERVISE_FILES_FOLDERS = "FOLDERS";
public static final String SUPERVISE_FILES_MAXAGE = "MAXAGE_MINUTES";
public static final String SUPERVISE_FILES_FILTER = "FILE_FILTER";
public static final String SUPERVISE_FILES_STARTTIME = "STARTTIME";
public static final String SUPERVISE_FILES_STOPTIME = "STOPTIME";
public static final String SUPERVISE_ACTIVEMQ_LIST_NAME = "SUPERVISE_AMQ_BROKERS"; // The map-key for amq brokers to supervise, does not exist in the property-file
public static final String SUPERVISE_ACTIVEMQ_PREFIX = "SUPERVISE_ACTIVEMQ_";
public static final int SUPERVISE_ACTIVEMQ_PREFIX_LENGTH = 19; // todo: SUPERVISE_ACTIVEMQ_PREFIX.length(); gives 0 ???
public static final String SUPERVISE_ACTIVEMQ_URL = "URL";
public static final String SUPERVISE_ACTIVEMQ_QUEUE_DEPTH_AGE = "QUEUE_DEPTH_AGE";
public static final String STOPFILE_NAME = "eRcptRtr.fel";
private static final Logger log = LoggerFactory.getLogger(PropertyUtil.class);
private static Map resovledProperties = null;
private static Map agreementsMap = null;
static public Map getResovledProperties() {
if (resovledProperties == null) {
// FIXME. Inject the name of the property file!
resovledProperties = new PropertyUtil().getResovledProperties("ei-config","ei-config-override");
}
return resovledProperties;
}
static public Map getAgreementsMap() {
if (agreementsMap == null) {
agreementsMap = new HashMap();
List