From 0779bde642631a2a1b4b147523f9539c0725fa2f Mon Sep 17 00:00:00 2001 From: YuanHu Date: Wed, 21 Sep 2016 09:35:08 +0800 Subject: Provide put method for the ModelParserFactory. Change-Id: Ic58fdc4d4192e8e3fa2dff6af37c6bf4c8a5e032 Signed-off-by: YuanHu --- .../commontosca/catalog/model/parser/ModelParserFactory.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/ModelParserFactory.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/ModelParserFactory.java index 32442b9f..ec08966c 100644 --- a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/ModelParserFactory.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/ModelParserFactory.java @@ -35,6 +35,16 @@ public class ModelParserFactory { private Map pkgType2ParseMap = new HashMap(); + /** + * @param format + * @param parse + */ + public void put(EnumPackageFormat format, AbstractModelParser parse) { + if (parse != null) { + pkgType2ParseMap.put(format, parse); + } + } + private ModelParserFactory() { // PackageParseMap.put(EnumPackageFormat.TOSCA_XML, new // ToscaXmlModelParser()); -- cgit 1.2.3-korg