protected ContainerModel toContainerModel ( Container containerAnnotation , KnowledgeNamespace knowledgeNamespace ) { if ( containerAnnotation == null ) { return null ; } ContainerModel containerModel = new V1ContainerModel ( knowledgeNamespace . uri ( ) ) ; String baseName = containerAnnotation . baseName ( ) ; if ( ! UNDEFINED . equals ( baseName ) ) { containerModel . setBaseName ( baseName ) ; } String releaseId = containerAnnotation . releaseId ( ) ; if ( ! UNDEFINED . equals ( releaseId ) ) { containerModel . setReleaseId ( releaseId ) ; } boolean scan = containerAnnotation . scan ( ) ; if ( scan ) { containerModel . setScan ( scan ) ; } long scanInterval = containerAnnotation . scanInterval ( ) ; if ( scanInterval > 0 ) { containerModel . setScanInterval ( Long . valueOf ( scanInterval ) ) ; } String sessionName = containerAnnotation . sessionName ( ) ; if ( ! UNDEFINED . equals ( sessionName ) ) { containerModel . setSessionName ( sessionName ) ; } return containerModel ; }
Converts container annotation to container model