@Test(expected = IllegalArgumentException.class) public void testInvalidResUrlThrows() { SW360ClientConfig.createConfig("this is not a valid URL?!", AUTH_URL, USER, PASSWORD, CLIENT_ID, CLIENT_PASS, USER_TOKEN, httpClient, mapper); }
public static SW360ClientConfig createConfig(String restURL, String authURL, String user, String password, String clientId, String clientPassword, String token, HttpClient httpClient, ObjectMapper mapper) { if(!StringUtils.isEmpty(token)){ return new SW360ClientConfig( URI.create(stripTrailingSeparator(Validate.notEmpty(restURL, "Undefined REST URL"))), stripTrailingSeparator(Validate.notEmpty(authURL, "Undefined authentication URL")), user, password, Validate.notEmpty(clientId, "Undefined client ID"), Validate.notEmpty(clientPassword, "Undefined client password"), Validate.notEmpty(token, "Undefined token"), Validate.notNull(httpClient), Validate.notNull(mapper)); } return new SW360ClientConfig( URI.create(stripTrailingSeparator(Validate.notEmpty(restURL, "Undefined REST URL"))), stripTrailingSeparator(Validate.notEmpty(authURL, "Undefined authentication URL")), Validate.notEmpty(user, "Undefined user"), Validate.notEmpty(password, "Undefined password"), Validate.notEmpty(clientId, "Undefined client ID"), Validate.notEmpty(clientPassword, "Undefined client password"), token, Validate.notNull(httpClient), Validate.notNull(mapper)); }
SW360ClientConfig { public static SW360ClientConfig createConfig(String restURL, String authURL, String user, String password, String clientId, String clientPassword, String token, HttpClient httpClient, ObjectMapper mapper) { if(!StringUtils.isEmpty(token)){ return new SW360ClientConfig( URI.create(stripTrailingSeparator(Validate.notEmpty(restURL, "Undefined REST URL"))), stripTrailingSeparator(Validate.notEmpty(authURL, "Undefined authentication URL")), user, password, Validate.notEmpty(clientId, "Undefined client ID"), Validate.notEmpty(clientPassword, "Undefined client password"), Validate.notEmpty(token, "Undefined token"), Validate.notNull(httpClient), Validate.notNull(mapper)); } return new SW360ClientConfig( URI.create(stripTrailingSeparator(Validate.notEmpty(restURL, "Undefined REST URL"))), stripTrailingSeparator(Validate.notEmpty(authURL, "Undefined authentication URL")), Validate.notEmpty(user, "Undefined user"), Validate.notEmpty(password, "Undefined password"), Validate.notEmpty(clientId, "Undefined client ID"), Validate.notEmpty(clientPassword, "Undefined client password"), token, Validate.notNull(httpClient), Validate.notNull(mapper)); } }
SW360ClientConfig { public static SW360ClientConfig createConfig(String restURL, String authURL, String user, String password, String clientId, String clientPassword, String token, HttpClient httpClient, ObjectMapper mapper) { if(!StringUtils.isEmpty(token)){ return new SW360ClientConfig( URI.create(stripTrailingSeparator(Validate.notEmpty(restURL, "Undefined REST URL"))), stripTrailingSeparator(Validate.notEmpty(authURL, "Undefined authentication URL")), user, password, Validate.notEmpty(clientId, "Undefined client ID"), Validate.notEmpty(clientPassword, "Undefined client password"), Validate.notEmpty(token, "Undefined token"), Validate.notNull(httpClient), Validate.notNull(mapper)); } return new SW360ClientConfig( URI.create(stripTrailingSeparator(Validate.notEmpty(restURL, "Undefined REST URL"))), stripTrailingSeparator(Validate.notEmpty(authURL, "Undefined authentication URL")), Validate.notEmpty(user, "Undefined user"), Validate.notEmpty(password, "Undefined password"), Validate.notEmpty(clientId, "Undefined client ID"), Validate.notEmpty(clientPassword, "Undefined client password"), token, Validate.notNull(httpClient), Validate.notNull(mapper)); } private  SW360ClientConfig(URI baseURI, String authURL, String user, String password, String clientId,
                              String clientPassword, String token, HttpClient httpClient, ObjectMapper objectMapper); }
SW360ClientConfig { public static SW360ClientConfig createConfig(String restURL, String authURL, String user, String password, String clientId, String clientPassword, String token, HttpClient httpClient, ObjectMapper mapper) { if(!StringUtils.isEmpty(token)){ return new SW360ClientConfig( URI.create(stripTrailingSeparator(Validate.notEmpty(restURL, "Undefined REST URL"))), stripTrailingSeparator(Validate.notEmpty(authURL, "Undefined authentication URL")), user, password, Validate.notEmpty(clientId, "Undefined client ID"), Validate.notEmpty(clientPassword, "Undefined client password"), Validate.notEmpty(token, "Undefined token"), Validate.notNull(httpClient), Validate.notNull(mapper)); } return new SW360ClientConfig( URI.create(stripTrailingSeparator(Validate.notEmpty(restURL, "Undefined REST URL"))), stripTrailingSeparator(Validate.notEmpty(authURL, "Undefined authentication URL")), Validate.notEmpty(user, "Undefined user"), Validate.notEmpty(password, "Undefined password"), Validate.notEmpty(clientId, "Undefined client ID"), Validate.notEmpty(clientPassword, "Undefined client password"), token, Validate.notNull(httpClient), Validate.notNull(mapper)); } private  SW360ClientConfig(URI baseURI, String authURL, String user, String password, String clientId,
                              String clientPassword, String token, HttpClient httpClient, ObjectMapper objectMapper); static SW360ClientConfig createConfig(String restURL, String authURL, String user,
                                                 String password, String clientId, String clientPassword,
                                                 String token, HttpClient httpClient, ObjectMapper mapper); String getRestURL(); URI getBaseURI(); String getAuthURL(); String getUser(); String getPassword(); String getClientId(); String getClientPassword(); String getToken(); HttpClient getHttpClient(); ObjectMapper getObjectMapper(); @Override boolean equals(Object o); @Override int hashCode(); }
SW360ClientConfig { public static SW360ClientConfig createConfig(String restURL, String authURL, String user, String password, String clientId, String clientPassword, String token, HttpClient httpClient, ObjectMapper mapper) { if(!StringUtils.isEmpty(token)){ return new SW360ClientConfig( URI.create(stripTrailingSeparator(Validate.notEmpty(restURL, "Undefined REST URL"))), stripTrailingSeparator(Validate.notEmpty(authURL, "Undefined authentication URL")), user, password, Validate.notEmpty(clientId, "Undefined client ID"), Validate.notEmpty(clientPassword, "Undefined client password"), Validate.notEmpty(token, "Undefined token"), Validate.notNull(httpClient), Validate.notNull(mapper)); } return new SW360ClientConfig( URI.create(stripTrailingSeparator(Validate.notEmpty(restURL, "Undefined REST URL"))), stripTrailingSeparator(Validate.notEmpty(authURL, "Undefined authentication URL")), Validate.notEmpty(user, "Undefined user"), Validate.notEmpty(password, "Undefined password"), Validate.notEmpty(clientId, "Undefined client ID"), Validate.notEmpty(clientPassword, "Undefined client password"), token, Validate.notNull(httpClient), Validate.notNull(mapper)); } private  SW360ClientConfig(URI baseURI, String authURL, String user, String password, String clientId,
                              String clientPassword, String token, HttpClient httpClient, ObjectMapper objectMapper); static SW360ClientConfig createConfig(String restURL, String authURL, String user,
                                                 String password, String clientId, String clientPassword,
                                                 String token, HttpClient httpClient, ObjectMapper mapper); String getRestURL(); URI getBaseURI(); String getAuthURL(); String getUser(); String getPassword(); String getClientId(); String getClientPassword(); String getToken(); HttpClient getHttpClient(); ObjectMapper getObjectMapper(); @Override boolean equals(Object o); @Override int hashCode();  }