private License getLicense ( final String licenseId ) { License result = null ; final Set < DbLicense > matchingLicenses = licenseMatcher . getMatchingLicenses ( licenseId ) ; if ( matchingLicenses . isEmpty ( ) ) { result = DataModelFactory . createLicense ( "#" + licenseId + "# (to be identified)" , NOT_IDENTIFIED_YET , NOT_IDENTIFIED_YET , NOT_IDENTIFIED_YET , NOT_IDENTIFIED_YET ) ; result . setUnknown ( true ) ; } else { if ( matchingLicenses . size ( ) > 1 && LOG . isWarnEnabled ( ) ) { LOG . warn ( String . format ( "%s matches multiple licenses %s. " + "Please run the report showing multiple matching on licenses" , licenseId , matchingLicenses . toString ( ) ) ) ; } result = mapper . getLicense ( matchingLicenses . iterator ( ) . next ( ) ) ; } return result ; }
Returns a licenses regarding its Id and a fake on if no license exist with such an Id