@Test public void testListPreferences() throws Exception { List<Preference> prefs = this.client.getPreferencesWsDelegate().listPreferences(); Assert.assertNotNull( prefs ); Assert.assertNotEquals( 0, prefs.size()); }
public List<Preference> listPreferences() { this.logger.finer( "Getting all the preferences." ); WebResource path = this.resource.path( UrlConstants.PREFERENCES ); List<Preference> result = this.wsClient.createBuilder( path ) .accept( MediaType.APPLICATION_JSON ) .get( new GenericType<List<Preference>> () {}); if( result != null ) this.logger.finer( result.size() + " preferences were found on the DM." ); else this.logger.finer( "No preference was found on the DM." ); return result != null ? result : new ArrayList<Preference> (); }
PreferencesWsDelegate { public List<Preference> listPreferences() { this.logger.finer( "Getting all the preferences." ); WebResource path = this.resource.path( UrlConstants.PREFERENCES ); List<Preference> result = this.wsClient.createBuilder( path ) .accept( MediaType.APPLICATION_JSON ) .get( new GenericType<List<Preference>> () {}); if( result != null ) this.logger.finer( result.size() + " preferences were found on the DM." ); else this.logger.finer( "No preference was found on the DM." ); return result != null ? result : new ArrayList<Preference> (); } }
PreferencesWsDelegate { public List<Preference> listPreferences() { this.logger.finer( "Getting all the preferences." ); WebResource path = this.resource.path( UrlConstants.PREFERENCES ); List<Preference> result = this.wsClient.createBuilder( path ) .accept( MediaType.APPLICATION_JSON ) .get( new GenericType<List<Preference>> () {}); if( result != null ) this.logger.finer( result.size() + " preferences were found on the DM." ); else this.logger.finer( "No preference was found on the DM." ); return result != null ? result : new ArrayList<Preference> (); } PreferencesWsDelegate( WebResource resource, WsClient wsClient ); }
PreferencesWsDelegate { public List<Preference> listPreferences() { this.logger.finer( "Getting all the preferences." ); WebResource path = this.resource.path( UrlConstants.PREFERENCES ); List<Preference> result = this.wsClient.createBuilder( path ) .accept( MediaType.APPLICATION_JSON ) .get( new GenericType<List<Preference>> () {}); if( result != null ) this.logger.finer( result.size() + " preferences were found on the DM." ); else this.logger.finer( "No preference was found on the DM." ); return result != null ? result : new ArrayList<Preference> (); } PreferencesWsDelegate( WebResource resource, WsClient wsClient ); List<Preference> listPreferences(); }
PreferencesWsDelegate { public List<Preference> listPreferences() { this.logger.finer( "Getting all the preferences." ); WebResource path = this.resource.path( UrlConstants.PREFERENCES ); List<Preference> result = this.wsClient.createBuilder( path ) .accept( MediaType.APPLICATION_JSON ) .get( new GenericType<List<Preference>> () {}); if( result != null ) this.logger.finer( result.size() + " preferences were found on the DM." ); else this.logger.finer( "No preference was found on the DM." ); return result != null ? result : new ArrayList<Preference> (); } PreferencesWsDelegate( WebResource resource, WsClient wsClient ); List<Preference> listPreferences();  }