public JsonNode wbSetAliases ( String id , String site , String title , String newEntity , String language , List < String > add , List < String > remove , List < String > set , boolean bot , long baserevid , String summary ) throws IOException , MediaWikiApiErrorException { Validate . notNull ( language , "Language parameter cannot be null when setting aliases" ) ; Map < String , String > parameters = new HashMap < String , String > ( ) ; parameters . put ( "language" , language ) ; if ( set != null ) { if ( add != null || remove != null ) { throw new IllegalArgumentException ( "Cannot use parameters \"add\" or \"remove\" when using \"set\" to edit aliases" ) ; } parameters . put ( "set" , ApiConnection . implodeObjects ( set ) ) ; } if ( add != null ) { parameters . put ( "add" , ApiConnection . implodeObjects ( add ) ) ; } if ( remove != null ) { parameters . put ( "remove" , ApiConnection . implodeObjects ( remove ) ) ; } JsonNode response = performAPIAction ( "wbsetaliases" , id , site , title , newEntity , parameters , summary , baserevid , bot ) ; return response ; }
Executes the API action wbsetaliases for the given parameters .