diff options
-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()); |