public List < Dependency > getModuleDependencies ( final String moduleName , final String moduleVersion , final Boolean fullRecursive , final Boolean corporate , final Boolean thirdParty ) throws GrapesCommunicationException { final Client client = getClient ( ) ; final WebResource resource = client . resource ( serverURL ) . path ( RequestUtils . getArtifactDependencies ( moduleName , moduleVersion ) ) ; final ClientResponse response = resource . queryParam ( ServerAPI . SCOPE_COMPILE_PARAM , "true" ) . queryParam ( ServerAPI . SCOPE_PROVIDED_PARAM , "true" ) . queryParam ( ServerAPI . SCOPE_RUNTIME_PARAM , "true" ) . queryParam ( ServerAPI . SCOPE_TEST_PARAM , "true" ) . queryParam ( ServerAPI . RECURSIVE_PARAM , fullRecursive . toString ( ) ) . queryParam ( ServerAPI . SHOW_CORPORATE_PARAM , corporate . toString ( ) ) . queryParam ( ServerAPI . SHOW_THIRPARTY_PARAM , thirdParty . toString ( ) ) . accept ( MediaType . APPLICATION_JSON ) . get ( ClientResponse . class ) ; client . destroy ( ) ; if ( ClientResponse . Status . OK . getStatusCode ( ) != response . getStatus ( ) ) { final String message = String . format ( FAILED_TO_GET_MODULE , "get module ancestors " , moduleName , moduleVersion ) ; if ( LOG . isErrorEnabled ( ) ) { LOG . error ( String . format ( HTTP_STATUS_TEMPLATE_MSG , message , response . getStatus ( ) ) ) ; } throw new GrapesCommunicationException ( message , response . getStatus ( ) ) ; } return response . getEntity ( new GenericType < List < Dependency > > ( ) { } ) ; }
Return the list of module dependencies