Package com.ardoq.service
Class SimpleModelService
java.lang.Object
com.ardoq.service.SimpleModelService
public class SimpleModelService extends Object
SimpleModelService let's you retrieve Models.
-
Constructor Summary
Constructors Constructor Description SimpleModelService(ModelService modelService) -
Method Summary
Modifier and Type Method Description ModelfindOrCreateTemplate(String name, InputStream modelJson)Tries to lookup the model by name, and returns it if it's found.List<Model>getAllModels()List<Model>getAllTemplate(boolean includeCommon)ModelgetModelById(String id)ModelgetTemplateById(String id)ModelgetTemplateByName(String name)
-
Constructor Details
-
Method Details
-
getAllModels
-
getAllTemplate
-
getModelById
-
getTemplateById
-
getTemplateByName
-
findOrCreateTemplate
Tries to lookup the model by name, and returns it if it's found. If not, it is created from the provided JSON input stream.- Parameters:
name- name of templatemodelJson- stream of JSON representation of template- Returns:
- model the model
- Throws:
IOException- exception if parsing the model from the input stream fails
-