private LineagePublisherDefinition getDefinition ( String name ) { String defConfig = LineagePublisherConstants . configDef ( name ) ; String publisherDefinition = configuration . get ( defConfig , null ) ; if ( StringUtils . isEmpty ( publisherDefinition ) ) { throw new IllegalArgumentException ( Utils . format ( "Missing definition '{}'" , defConfig ) ) ; } String [ ] lineagePluginDefs = publisherDefinition . split ( "::" ) ; if ( lineagePluginDefs . length != 2 ) { throw new IllegalStateException ( Utils . format ( "Invalid definition '{}', expected $libraryName::$publisherName" , publisherDefinition ) ) ; } LineagePublisherDefinition def = stageLibraryTask . getLineagePublisherDefinition ( lineagePluginDefs [ 0 ] , // Library lineagePluginDefs [ 1 ] // Plugin name ) ; if ( def == null ) { throw new IllegalStateException ( Utils . format ( "Can't find publisher '{}'" , publisherDefinition ) ) ; } return def ; }
Parse given configuration declaration of lineage plugin and return appropriate definition .