-
Bug
-
Resolution: Won't Do
-
Medium
-
Dublin Release
-
None
-
None
object ResourceSourceMappingFactory { | |
private val resourceSourceMappings: MutableMap<String, String> = hashMapOf() | |
fun registerSourceMapping(sourceInstance: String, nodeTypeName: String) {| | |resourceSourceMappings[sourceInstance] = nodeTypeName| | |} | |
fun getRegisterSourceMapping(sourceInstance: String): String { | |
return resourceSourceMappings[sourceInstance] | |
?: throw BluePrintException(format("failed to get source({}) mapping", sourceInstance)) | |
} | |
fun getRegisterSourceMapping(): ResourceSourceMapping {| | |val resourceSourceMapping = ResourceSourceMapping()| | |resourceSourceMapping.resourceSourceMappings = resourceSourceMappings| | |return resourceSourceMapping| | |} | |
} |
/** | |
|
|
* | |
|
|
|
|
*/ | |
suspend fun getModelTypeByName(modelTypeName: String): ModelType { | |
log.info("Searching : $modelTypeName") | |
check(modelTypeName.isNotBlank()) { "Model Name Information is missing." } | |
val modelType = modelTypeRepository.findByModelName(modelTypeName) | |
return if (modelType != null)
{|
| |modelType|
| |}
else {| | |throw BluePrintException("couldn't get modelType($modelTypeName)")| | |} |
|
} | |
/** | |
|
|
* | |
|
|
|
|
</ModelType> */ | |
suspend fun searchModelTypes(tags: String): List<ModelType> { | |
check(tags.isNotBlank()) { "No Search Information provide" } | |
return modelTypeRepository.findByTagsContainingIgnoreCase(tags) | |
} |