protected void setHeaders(Invocation.Builder invocationBuilder, String token) { invocationBuilder.header(Headers.WOR_API_KEY_TOKEN, token); String clientId = Utils.getConfigValue(ConfigurationKey.URI_PREFIX); if (!StringUtils.isEmpty(clientId)) { invocationBuilder.header(Headers.API_KEY_CLIENT_ID, clientId); } }
{ // need to force-create a transaction to get the DATA_DIRECTORY config value HibernateUtil.beginTransaction(); directory = Paths.get(Utils.getConfigValue(ConfigurationKey.DATA_DIRECTORY), "rest-auth") .toFile(); HibernateUtil.commitTransaction(); }