/*
- * Copyright (C) 2001, 2002 The Mir-coders group
+ * Copyright (C) 2001-2006 The Mir-coders group
*
* This file is part of Mir.
*
*
* In addition, as a special exception, The Mir-coders gives permission to link
* the code of this program with any library licensed under the Apache Software License,
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
- * (or with modified versions of the above that use the same license as the above),
* and distribute linked combinations including the two. You must obey the
* GNU General Public License in all respects for all of the code used other than
* the above mentioned libraries. If you modify this file, you may extend this
/**
* This producer node loads a bundle
*/
-public class BundleProducerNode implements ProducerNode {
+public class BundleProducerNode extends AbstractProducerNode {
private String key;
private String bundleExpression;
private String languageExpression;
key = aKey;
}
- /** {@inheritDoc} */
+ /** {@inheritDoc} */
public void produce(Map aValueMap, String aVerb, LoggerWrapper aLogger) throws ProducerFailure {
try {
String bundle = ParameterExpander.expandExpression( aValueMap, bundleExpression );
String[] languages = new String[0];
- if (languageExpression!=null)
- languages = new String[] { ParameterExpander.expandExpression( aValueMap, languageExpression ) };
+ if (languageExpression != null) {
+ languages = new String[]{ParameterExpander.expandExpression(aValueMap, languageExpression)};
+ }
- if (MirGlobal.config().getString("Producer.BundleCompatibility", "0").equals("1") &&
+ if ("1".equals(MirGlobal.config().getString("Producer.BundleCompatibility", "0")) &&
bundle.startsWith("bundles.")) {
bundle = "etc/bundles/" + bundle.substring("bundles.".length());
}
languageExpression + " into key " + key + ": " + t.getMessage());
}
}
-
}
\ No newline at end of file