001package org.kuali.ole.docstore.engine.client; 002 003import org.kuali.ole.docstore.common.client.DocstoreClient; 004import org.kuali.ole.docstore.common.document.*; 005import org.kuali.ole.docstore.common.document.config.DocumentSearchConfig; 006import org.kuali.ole.docstore.common.document.content.bib.marc.BibMarcRecords; 007import org.kuali.ole.docstore.common.search.BrowseParams; 008import org.kuali.ole.docstore.common.search.SearchParams; 009import org.kuali.ole.docstore.common.search.SearchResponse; 010import org.kuali.ole.docstore.common.service.DocstoreService; 011import org.kuali.ole.docstore.service.BeanLocator; 012 013import java.util.HashMap; 014import java.util.List; 015import java.util.Map; 016 017/** 018 * Created with IntelliJ IDEA. 019 * User: Venkatasrinath 020 * Date: 12/16/13 021 * Time: 7:32 PM 022 * To change this template use File | Settings | File Templates. 023 */ 024public class DocstoreLocalClient implements DocstoreClient { 025 026 private static DocstoreService ds = BeanLocator.getDocstoreService(); 027 028 @Override 029 public void createBib(Bib bib) { 030 ds.createBib(bib); 031 } 032 033 @Override 034 public void createHoldings(Holdings holdings) { 035 ds.createHoldings(holdings); 036 } 037 038 @Override 039 public void createItem(Item item) { 040 ds.createItem(item); 041 } 042 043 @Override 044 public void createHoldingsTree(HoldingsTree holdingsTree) { 045 ds.createHoldingsTree(holdingsTree); 046 } 047 048 049 050 @Override 051 public void createBibTree(BibTree bibTree) { 052 ds.createBibTree(bibTree); 053 } 054 055 @Override 056 public Bib retrieveBib(String bibId) { 057 return ds.retrieveBib(bibId); 058 } 059 060 @Override 061 public Holdings retrieveHoldings(String holdingsId) { 062 return ds.retrieveHoldings(holdingsId); 063 } 064 065 @Override 066 public Item retrieveItem(String itemId) { 067 return ds.retrieveItem(itemId); 068 } 069 070 @Override 071 public HoldingsTree retrieveHoldingsTree(String retrieveHoldingsTree) { 072 return ds.retrieveHoldingsTree(retrieveHoldingsTree); 073 } 074 075 @Override 076 public BibTree retrieveBibTree(String bibId) { 077 return ds.retrieveBibTree(bibId); 078 } 079 080 @Override 081 public BibTrees retrieveBibTrees(List<String> bibIds) { 082 return ds.retrieveBibTrees(bibIds); 083 } 084 085 @Override 086 public Bib updateBib(Bib bib) { 087 ds.updateBib(bib); 088 return bib; 089 } 090 091 092 @Override 093 public Holdings updateHoldings(Holdings holdings) { 094 ds.updateHoldings(holdings); 095 return holdings; 096 } 097 098 099 @Override 100 public Item updateItem(Item item) { 101 ds.updateItem(item); 102 return item; 103 } 104 105 106 @Override 107 public void deleteBib(String bibId) { 108 ds.deleteBib(bibId); 109 } 110 111 @Override 112 public void deleteHoldings(String holdingsId) { 113 ds.deleteHoldings(holdingsId); 114 } 115 116 @Override 117 public void deleteItem(String itemId) { 118 ds.deleteItem(itemId); 119 } 120 121 @Override 122 public void deleteItems(List<String> itemIds) { 123 //To change body of implemented methods use File | Settings | File Templates. 124 } 125 126 @Override 127 public SearchResponse search(SearchParams searchParams) { 128 return ds.search(searchParams); 129 } 130 131 @Override 132 public Bib findBib(Map<String, String> map) { 133 return ds.findBib(map); 134 } 135 136 @Override 137 public BibTree findBibTree(Map<String, String> map) { 138 return ds.findBibTree(map); 139 } 140 141 @Override 142 public Holdings findHoldings(Map<String, String> map) { 143 return ds.findHoldings(map); 144 } 145 146 @Override 147 public HoldingsTree findHoldingsTree(Map<String, String> map) { 148 return ds.findHoldingsTree(map); 149 } 150 151 @Override 152 public Item findItem(Map<String, String> map) { 153 return ds.findItem(map); 154 } 155 156 @Override 157 public SearchResponse browseItems(BrowseParams browseParams) { 158 return ds.browseItems(browseParams); 159 } 160 161 @Override 162 public SearchResponse browseHoldings(BrowseParams browseParams) { 163 return ds.browseHoldings(browseParams); 164 } 165 166 @Override 167 public void boundWithBibs(String holdingsId, List<String> bibIds) { 168 ds.boundHoldingsWithBibs(holdingsId, bibIds); 169 } 170 171 @Override 172 public void transferHoldings(List<String> holdingsIds, String bibId) { 173 ds.transferHoldings(holdingsIds, bibId); 174 } 175 176 @Override 177 public void transferItems(List<String> itemIds, String bibId) { 178 ds.transferItems(itemIds, bibId); 179 } 180 181 @Override 182 public void deleteBibs(List<String> bibIds) { 183 ds.deleteBibs(bibIds); 184 } 185 186 187 188 @Override 189 public List<Bib> retrieveBibs(List<String> bibIds) { 190 return ds.retrieveBibs(bibIds); 191 } 192 193 @Override 194 public List<Item> retrieveItems(List<String> itemIds) { 195 return ds.retrieveItems(itemIds); 196 } 197 198 @Override 199 public HashMap<String, Item> retrieveItemMap(List<String> itemIds) { 200 return ds.retrieveItemMap(itemIds); 201 } 202 203 @Override 204 public void createLicenses(Licenses licenses) { 205 //To change body of implemented methods use File | Settings | File Templates. 206 } 207 208 @Override 209 public License retrieveLicense(String id) { 210 return null; //To change body of implemented methods use File | Settings | File Templates. 211 } 212 213 @Override 214 public Licenses retrieveLicenses(List<String> ids) { 215 return null; //To change body of implemented methods use File | Settings | File Templates. 216 } 217 218 @Override 219 public void updateLicense(License license) { 220 //To change body of implemented methods use File | Settings | File Templates. 221 } 222 223 @Override 224 public void updateLicenses(Licenses licenses) { 225 //To change body of implemented methods use File | Settings | File Templates. 226 } 227 228 @Override 229 public void deleteLicense(String id) { 230 //To change body of implemented methods use File | Settings | File Templates. 231 } 232 233 @Override 234 public void createAnalyticsRelation(String seriesHoldingsId, List<String> itemIds) { 235 ds.createAnalyticsRelation(seriesHoldingsId, itemIds); 236 } 237 238 @Override 239 public void breakAnalyticsRelation(String seriesHoldingsId, List<String> itemIds) { 240 ds.breakAnalyticsRelation(seriesHoldingsId, itemIds); 241 } 242 243 @Override 244 public void bulkUpdateHoldings(Holdings holdings, List<String> holdingIds,String canUpdateStaffOnlyFlag) { 245 ds.bulkUpdateHoldings(holdings,holdingIds,canUpdateStaffOnlyFlag); 246 } 247 248 @Override 249 public void bulkUpdateItem(Item item, List<String> itemIds,String canUpdateStaffOnlyFlag) { 250 ds.bulkUpdateItem(item, itemIds,canUpdateStaffOnlyFlag); 251 } 252 253 @Override 254 public BibMarcRecords retrieveBibContent(List<String> bibIds) { 255 return null; //To change body of implemented methods use File | Settings | File Templates. 256 } 257 258 @Override 259 public String patchItem(String requestBody) { 260 return null; //To change body of implemented methods use File | Settings | File Templates. 261 } 262 263 @Override 264 public String updateItemByBarcode(String barcode, String requestBody) { 265 return null; //To change body of implemented methods use File | Settings | File Templates. 266 } 267 268 @Override 269 public HoldingsTrees retrieveHoldingsTrees(List<String> bibIds) { 270 return null; //To change body of implemented methods use File | Settings | File Templates. 271 } 272 273 @Override 274 public HoldingsTrees retrieveHoldingsDocTrees(List<String> bibIds) { 275 return null; 276 } 277 278 @Override 279 public Item retrieveItemByBarcode(String barcode) { 280 return ds.retrieveItemByBarcode(barcode); 281 } 282 283 @Override 284 public void reloadConfiguration() { 285 DocumentSearchConfig.reloadDocumentConfig(); 286 } 287 288 @Override 289 public BibTrees processBibTrees(BibTrees bibTrees) { 290 return ds.processBibTrees(bibTrees); 291 } 292 293 @Override 294 public List<Bib> acquisitionSearchRetrieveBibs(List<String> bibIds) { 295 return ds.retrieveBibs(bibIds); 296 } 297}