Package com.tistory.devyongsik.crescent.data.handler

Examples of com.tistory.devyongsik.crescent.data.handler.Handler


    indexingTestData();
  }

  private void indexingTestData() {
   
    Handler handler = new JsonDataHandler();
    IndexingRequestForm indexingRequestForm = handler.handledData(bulkIndexingTestText);
    CrescentCollections crescentCollections = collectionHandler.getCrescentCollections();
    CrescentCollection collection = crescentCollections.getCrescentCollection("sample");
   
    String message = executor.indexing(collection, indexingRequestForm);
View Full Code Here


   
    String contentsType = request.getHeader("Content-type");
   
    //TODO contentsType별로 핸들러 분리
    //TODO 일단 json만..
    Handler handler = null;
    if("application/json".equals(contentsType)) {
      handler = new JsonDataHandler();
    }
   
    String collectionName = request.getParameter("collection_name");
   
    logger.info("collection name : {}", collectionName);
   
    StringBuilder text = new StringBuilder();
   
    try {
     
      BufferedReader reader = request.getReader();
      String tmp = "";
      while((tmp = reader.readLine()) != null) {
        text.append(tmp);
        //logger.info(tmp);
      }
     
      reader.close();
      IndexingRequestForm indexingRequestForm = handler.handledData(text.toString());
     
//      CrescentCollectionHandler collectionHandler
//        = SpringApplicationContext.getBean("crescentCollectionHandler", CrescentCollectionHandler.class);
     
      CrescentCollection collection = collectionHandler.getCrescentCollections().getCrescentCollection(collectionName);
View Full Code Here

    CrescentCollections crescentCollections = collectionHandler.getCrescentCollections();
    Map<String, CrescentCollection> collections = crescentCollections.getCrescentCollectionsMap();

    CrescentCollection sampleCollection = collections.get("sample");

    Handler handler = new JsonDataHandler();
    IndexingRequestForm indexingRequestForm = handler.handledData(FormattedTextBuilder.getAddDocBulkJsonForm());
   
    String returnMessage = executor.indexing(sampleCollection, indexingRequestForm);
   
    Assert.assertEquals("1건의 색인이 완료되었습니다.", returnMessage);
  }
View Full Code Here

    CrescentCollections crescentCollections = collectionHandler.getCrescentCollections();
    Map<String, CrescentCollection> collections = crescentCollections.getCrescentCollectionsMap();

    CrescentCollection sampleCollection = collections.get("sample");

    Handler handler = new JsonDataHandler();
    IndexingRequestForm indexingRequestForm = handler.handledData(FormattedTextBuilder.getDeleteDocBulkJsonForm());
   
    String returnMessage = executor.indexing(sampleCollection, indexingRequestForm);
   
    Assert.assertEquals("creuser:test에 대한 delete가 완료되었습니다.", returnMessage);
  }
View Full Code Here

    CrescentCollections crescentCollections = collectionHandler.getCrescentCollections();
    Map<String, CrescentCollection> collections = crescentCollections.getCrescentCollectionsMap();

    CrescentCollection sampleCollection = collections.get("sample");

    Handler handler = new JsonDataHandler();
    IndexingRequestForm indexingRequestForm = handler.handledData(FormattedTextBuilder.getUpdateDocBulkJsonForm());
   
    String returnMessage = executor.indexing(sampleCollection, indexingRequestForm);
   
    Assert.assertEquals("creuser:test에 대한 update가 완료되었습니다.", returnMessage);
  }
View Full Code Here

    CrescentCollections crescentCollections = collectionHandler.getCrescentCollections();
    Map<String, CrescentCollection> collections = crescentCollections.getCrescentCollectionsMap();

    CrescentCollection sampleCollection = collections.get("sample");

    Handler handler = new JsonDataHandler();
    IndexingRequestForm indexingRequestForm = handler.handledData(FormattedTextBuilder.getUpdateNewDocBulkJsonForm());
   
    String returnMessage = executor.indexing(sampleCollection, indexingRequestForm);
   
    Assert.assertEquals("creuser:testnew에 대한 update가 완료되었습니다.", returnMessage);
   
View Full Code Here

    CrescentCollections crescentCollections = collectionHandler.getCrescentCollections();
    Map<String, CrescentCollection> collections = crescentCollections.getCrescentCollectionsMap();

    CrescentCollection sampleCollection = collections.get("sample");

    Handler handler = new JsonDataHandler();
    IndexingRequestForm indexingRequestForm = handler.handledData(FormattedTextBuilder.getUpdateNewDocListBulkJsonForm());
   
    String returnMessage = executor.indexing(sampleCollection, indexingRequestForm);
   
    Assert.assertEquals("creuser:testnew에 대한 update가 완료되었습니다.", returnMessage);
   
View Full Code Here

    CrescentCollections crescentCollections = collectionHandler.getCrescentCollections();
    Map<String, CrescentCollection> collections = crescentCollections.getCrescentCollectionsMap();

    CrescentCollection sampleCollection = collections.get("sample");

    Handler handler = new JsonDataHandler();
    IndexingRequestForm indexingRequestForm = handler.handledData(FormattedTextBuilder.getUpdateByFieldValueDocBulkJsonForm());
   
    String returnMessage = executor.indexing(sampleCollection, indexingRequestForm);
   
    Assert.assertEquals("creuser:*에 대한 update가 완료되었습니다.", returnMessage);
   
View Full Code Here

    CrescentCollections crescentCollections = collectionHandler.getCrescentCollections();
    Map<String, CrescentCollection> collections = crescentCollections.getCrescentCollectionsMap();

    CrescentCollection sampleCollection = collections.get("sample");

    Handler handler = new JsonDataHandler();
    IndexingRequestForm indexingRequestForm = handler.handledData(FormattedTextBuilder.getUpdateByFieldValueNewDocListBulkJsonForm());
   
    String returnMessage = executor.indexing(sampleCollection, indexingRequestForm);
   
    Assert.assertEquals("creuser:*에 대한 update가 완료되었습니다.", returnMessage);
   
View Full Code Here

TOP

Related Classes of com.tistory.devyongsik.crescent.data.handler.Handler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.