protected void loadServices() throws ApsSystemException { try { if (null == this.getMasterResources()) { this.loadResources(); } List<ApiMethod> apiGETMethods = new ArrayList<ApiMethod>(); List<ApiResource> resourceList = new ArrayList<ApiResource>(this.getMasterResources().values()); for (int i = 0; i < resourceList.size(); i++) { ApiResource apiResource = resourceList.get(i); if (null != apiResource.getGetMethod()) { apiGETMethods.add(apiResource.getGetMethod()); } } this.setMasterServices(this.getApiCatalogDAO().loadServices(apiGETMethods)); } catch (Throwable t) { this.setMasterServices(new HashMap<String, ApiService>()); ApsSystemUtils.logThrowable(t, this, "loadServices", "Error loading Services definitions"); throw new ApsSystemException("Error loading Services definitions", t); } }