void validate ( ) throws ApplicationUnavailableException , AuthenticationException { V1ConnectionValidator validator = new V1ConnectionValidator ( applicationPath , username , password , proxySettings ) ; for ( String key : customHttpHeaders . keySet ( ) ) { validator . getCustomHttpHeaders ( ) . put ( key , customHttpHeaders . get ( key ) ) ; } try { validator . checkConnection ( ) ; } catch ( ConnectionException e ) { throw new ApplicationUnavailableException ( "Unable to connect to VersionOne." , e ) ; } try { validator . checkAuthentication ( ) ; } catch ( ConnectionException e ) { throw new AuthenticationException ( "Invalid username or password." , e ) ; } }
Validates server connection and authentication .