diff options
author | 2016-09-21 09:35:08 +0800 | |
---|---|---|
committer | 2016-09-21 09:35:08 +0800 | |
commit | 0779bde642631a2a1b4b147523f9539c0725fa2f (patch) | |
tree | 4232ef4a65a87fa18122ca7ce6d42396bdb663d1 /catalog-core/catalog-mgr/src | |
parent | 280fc10f04b34f7046ec38cd7baab877a12369d2 (diff) |
Provide put method for the ModelParserFactory.
Change-Id: Ic58fdc4d4192e8e3fa2dff6af37c6bf4c8a5e032
Signed-off-by: YuanHu <yuan.hu1@zte.com.cn>
Diffstat (limited to 'catalog-core/catalog-mgr/src')
-rw-r--r-- | catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/ModelParserFactory.java | 10 |
1 files changed, 10 insertions, 0 deletions
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<EnumPackageFormat, AbstractModelParser> pkgType2ParseMap = new HashMap<EnumPackageFormat, AbstractModelParser>(); + /** + * @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()); |