@@ -53,7 +53,7 @@ public final T findOne(final long id, final Pair<String, String> credentials) {
5353 }
5454
5555 try {
56- final ResponseEntity <T > response = restTemplate .exchange (getURI () + WebConstants .PATH_SEP + id , HttpMethod .GET , findRequestEntity (), clazz );
56+ final ResponseEntity <T > response = restTemplate .exchange (getUri () + WebConstants .PATH_SEP + id , HttpMethod .GET , findRequestEntity (), clazz );
5757 return response .getBody ();
5858 } catch (final HttpClientErrorException clientEx ) {
5959 return null ;
@@ -63,7 +63,7 @@ public final T findOne(final long id, final Pair<String, String> credentials) {
6363 @ Override
6464 public final T findOne (final long id ) {
6565 try {
66- final ResponseEntity <T > response = restTemplate .exchange (getURI () + WebConstants .PATH_SEP + id , HttpMethod .GET , findRequestEntity (), clazz );
66+ final ResponseEntity <T > response = restTemplate .exchange (getUri () + WebConstants .PATH_SEP + id , HttpMethod .GET , findRequestEntity (), clazz );
6767 return response .getBody ();
6868 } catch (final HttpClientErrorException clientEx ) {
6969 return null ;
@@ -81,15 +81,15 @@ public final T findOneByUri(final String uri, final Pair<String, String> credent
8181 @ Override
8282 public final T findByName (final String name ) {
8383 // return findOneByAttributes(SearchField.name.name(), name); // TODO: fix
84- return findOneByUri (getURI () + "?name=" + name , null );
84+ return findOneByUri (getUri () + "?name=" + name , null );
8585 }
8686
8787 // find - all
8888
8989 @ Override
9090 public final List <T > findAll () {
9191 beforeReadOperation ();
92- final ResponseEntity <String > findAllResponse = restTemplate .exchange (getURI (), HttpMethod .GET , findRequestEntity (), String .class );
92+ final ResponseEntity <String > findAllResponse = restTemplate .exchange (getUri (), HttpMethod .GET , findRequestEntity (), String .class );
9393 final String body = findAllResponse .getBody ();
9494 if (body == null ) {
9595 return Lists .newArrayList ();
@@ -100,7 +100,7 @@ public final List<T> findAll() {
100100 @ Override
101101 public final List <T > findAllSorted (final String sortBy , final String sortOrder ) {
102102 beforeReadOperation ();
103- final String uri = getURI () + QueryConstants .Q_SORT_BY + sortBy + QueryConstants .S_ORDER + sortOrder ;
103+ final String uri = getUri () + QueryConstants .Q_SORT_BY + sortBy + QueryConstants .S_ORDER + sortOrder ;
104104 final ResponseEntity <String > findAllResponse = restTemplate .exchange (uri , HttpMethod .GET , findRequestEntity (), String .class );
105105 final String body = findAllResponse .getBody ();
106106 if (body == null ) {
@@ -112,7 +112,7 @@ public final List<T> findAllSorted(final String sortBy, final String sortOrder)
112112 @ Override
113113 public final List <T > findAllPaginated (final int page , final int size ) {
114114 beforeReadOperation ();
115- final StringBuilder uri = new StringBuilder (getURI ());
115+ final StringBuilder uri = new StringBuilder (getUri ());
116116 uri .append (QueryConstants .QUESTIONMARK );
117117 uri .append ("page=" );
118118 uri .append (page );
@@ -151,7 +151,7 @@ public final List<T> findAllByUri(final String uri, final Pair<String, String> c
151151
152152 final ResponseEntity <String > findAllPaginatedAndSortedAsResponse (final int page , final int size , final String sortBy , final String sortOrder ) {
153153 beforeReadOperation ();
154- final StringBuilder uri = new StringBuilder (getURI ());
154+ final StringBuilder uri = new StringBuilder (getUri ());
155155 uri .append (QueryConstants .QUESTIONMARK );
156156 uri .append ("page=" );
157157 uri .append (page );
@@ -200,7 +200,7 @@ public final String createAsUri(final T resource, final Pair<String, String> cre
200200 } else {
201201 givenAuthenticated (null , null );
202202 }
203- final ResponseEntity <Void > responseEntity = restTemplate .exchange (getURI (), HttpMethod .POST , new HttpEntity <T >(resource , writeHeaders ()), Void .class );
203+ final ResponseEntity <Void > responseEntity = restTemplate .exchange (getUri (), HttpMethod .POST , new HttpEntity <T >(resource , writeHeaders ()), Void .class );
204204
205205 final String locationOfCreatedResource = responseEntity .getHeaders ().getLocation ().toString ();
206206 Preconditions .checkNotNull (locationOfCreatedResource );
@@ -213,15 +213,15 @@ public final String createAsUri(final T resource, final Pair<String, String> cre
213213 @ Override
214214 public final void update (final T resource ) {
215215 givenAuthenticated (null , null );
216- final ResponseEntity <T > responseEntity = restTemplate .exchange (getURI (), HttpMethod .PUT , new HttpEntity <T >(resource , writeHeaders ()), clazz );
216+ final ResponseEntity <T > responseEntity = restTemplate .exchange (getUri (), HttpMethod .PUT , new HttpEntity <T >(resource , writeHeaders ()), clazz );
217217 Preconditions .checkState (responseEntity .getStatusCode ().value () == 200 );
218218 }
219219
220220 // delete
221221
222222 @ Override
223223 public final void delete (final long id ) {
224- final ResponseEntity <Object > deleteResourceResponse = restTemplate .exchange (getURI () + WebConstants .PATH_SEP + id , HttpMethod .DELETE , new HttpEntity <T >(writeHeaders ()), null );
224+ final ResponseEntity <Object > deleteResourceResponse = restTemplate .exchange (getUri () + WebConstants .PATH_SEP + id , HttpMethod .DELETE , new HttpEntity <T >(writeHeaders ()), null );
225225
226226 Preconditions .checkState (deleteResourceResponse .getStatusCode ().value () == 204 );
227227 }
@@ -239,7 +239,7 @@ public final List<T> searchAll(final Triple<String, ClientOperation, String>...
239239 for (final Triple <String , ClientOperation , String > constraint : constraints ) {
240240 builder .consume (constraint );
241241 }
242- final String queryURI = getURI () + QueryConstants .QUERY_PREFIX + builder .build ();
242+ final String queryURI = getUri () + QueryConstants .QUERY_PREFIX + builder .build ();
243243
244244 final ResponseEntity <List > asResponse = findAllAsResponse (queryURI );
245245 Preconditions .checkState (asResponse .getStatusCode ().value () == 200 );
@@ -295,7 +295,7 @@ protected final void digestAuth(final String username, final String password) {
295295 }
296296
297297 /**
298- * - this is a hook that executes before read operations, in order to allow custom security work to happen for read operations; similar to: AbstractRESTTemplate .findRequest
298+ * - this is a hook that executes before read operations, in order to allow custom security work to happen for read operations; similar to: AbstractRestTemplate .findRequest
299299 */
300300 protected void beforeReadOperation () {
301301 //
0 commit comments