@Override protected URIBuilder createBaseUrl(WebApiAction apiAction) { StringBuilder sb = new StringBuilder(getApiProperties().getWebServiceUrl()); if(!sb.toString().endsWith("/")) sb.append("/"); //since we are in policy api, then obviously this is a policy endpoint! sb.append(apiAction.toValue()); String uri = sb.toString(); try { return new URIBuilder(uri); } catch (URISyntaxException e) { getLogger().error("Problem with URI - syntax was invalid: " + uri, e); throw new RuntimeException("Problem with URI - syntax was invalid: " + uri, e); } }
@Override protected URIBuilder createBaseUrl(WebApiAction apiAction) { StringBuilder sb = new StringBuilder(getApiProperties().getWebServiceUrl()); if(!sb.toString().endsWith("/")) sb.append("/"); //since we are in classification api, then obviously this is a classification endpoint! sb.append("classification") .append("/") .append(apiAction.toValue()); String uri = sb.toString(); try { return new URIBuilder(uri); } catch (URISyntaxException e) { getLogger().error("Problem with URI - syntax was invalid: " + uri, e); throw new RuntimeException("Problem with URI - syntax was invalid: " + uri, e); } }
@Override protected URIBuilder createBaseUrl(WebApiAction apiAction) { StringBuilder sb = new StringBuilder(getApiProperties().getWebServiceUrl()); if(!sb.toString().endsWith("/")) sb.append("/"); //since we are in policy api, then obviously this is a policy endpoint! sb.append("policy") .append("/") .append(apiAction.toValue()); String uri = sb.toString(); try { return new URIBuilder(uri); } catch (URISyntaxException e) { getLogger().error("Problem with URI - syntax was invalid: " + uri, e); throw new RuntimeException("Problem with URI - syntax was invalid: " + uri, e); } }
@Override protected URIBuilder createBaseUrl(WebApiAction apiAction) { StringBuilder sb = new StringBuilder(getApiProperties().getWebServiceUrl()); if(!sb.toString().endsWith("/")) sb.append("/"); //since we are in classification api, then obviously this is a classification endpoint! sb.append("classification") .append("/") .append(apiAction.toValue()); String uri = sb.toString(); try { return new URIBuilder(uri); } catch (URISyntaxException e) { getLogger().error("Problem with URI - syntax was invalid: " + uri, e); throw new RuntimeException("Problem with URI - syntax was invalid: " + uri, e); } }
@Override protected URIBuilder createBaseUrl(WebApiAction apiAction) { StringBuilder sb = new StringBuilder(getApiProperties().getWebServiceUrl()); if (!sb.toString().endsWith("/")) sb.append("/"); //since we are in workflow api, use the workflow api endpoint sb.append("workflow") .append("/") .append(apiAction.toValue()); String uri = sb.toString(); try { return new URIBuilder(uri); } catch (URISyntaxException e) { getLogger().error("Problem with URI - syntax was invalid: " + uri, e); throw new RuntimeException("Problem with URI - syntax was invalid: " + uri, e); } }
@Override public String toString(){ // Get a string to represent our internal property state. Multimap<String, String> entries = new CaseInsensitiveKeyMultimap<>(); entries.put("api.mode", getMode()); entries.put("api.webservice.url", getWebServiceUrl()); entries.put("api.direct.repository", getRepository()); entries.put("api.web.useget", String.valueOf(getUseHttpGet())); entries.put("api.web.httpclientbuilderclass", getHttpClientBuilderClass()); entries.put("api.streams.cache", String.valueOf(getStreamsCacheEnabled())); entries.put("api.admin.basedata", String.valueOf(getAdminBaseDataEnabled())); return StringHelper.mapToHtml(entries); }