public String getPromotionDetailsJsonModel ( ) throws IOException { final PromotionEvaluationReport sampleReport = new PromotionEvaluationReport ( ) ; sampleReport . addMessage ( String . format ( TWO_PLACES , PromotionReportTranslator . UNPROMOTED_MSG , "com.acme.secure-smh:core-relay:1.2.0" ) , MAJOR ) ; sampleReport . addMessage ( String . format ( TWO_PLACES , PromotionReportTranslator . DO_NOT_USE_MSG , "com.google.guava:guava:20.0" ) , MAJOR ) ; sampleReport . addMessage ( String . format ( TWO_PLACES , PromotionReportTranslator . MISSING_LICENSE_MSG , "org.apache.maven.wagon:wagon-webdav-jackrabbit:2.12" ) , MINOR ) ; sampleReport . addMessage ( String . format ( TWO_PLACES , PromotionReportTranslator . UNACCEPTABLE_LICENSE_MSG , "aopaliance:aopaliance:1.0 licensed as Attribution-ShareAlike 2.5 Generic, " + "org.polyjdbc:polyjdbc0.7.1 licensed as Creative Commons Attribution-ShareAlike 3.0 Unported License" ) , MINOR ) ; sampleReport . addMessage ( PromotionReportTranslator . SNAPSHOT_VERSION_MSG , Tag . CRITICAL ) ; return JsonUtils . serialize ( sampleReport ) ; }
Returns an empty Promotion details in Json