Examples of items()


Examples of org.elasticsearch.action.bulk.BulkResponse.items()

        assertThat(bulkResponse.items()[3].index(), equalTo(getConcreteIndexName()));
        assertThat(bulkResponse.items()[3].type(), equalTo("type1"));
        assertThat(bulkResponse.items()[3].id(), equalTo("1"));

        assertThat(bulkResponse.items()[4].isFailed(), equalTo(true));
        assertThat(bulkResponse.items()[4].opType(), equalTo("create"));
        assertThat(bulkResponse.items()[4].index(), equalTo(getConcreteIndexName()));
        assertThat(bulkResponse.items()[4].type(), equalTo("type1"));

        RefreshResponse refreshResponse = client1.admin().indices().prepareRefresh("test").execute().actionGet();
        assertThat(refreshResponse.successfulShards(), equalTo(10));
View Full Code Here

Examples of org.elasticsearch.action.bulk.BulkResponse.items()

        assertThat(bulkResponse.items()[3].type(), equalTo("type1"));
        assertThat(bulkResponse.items()[3].id(), equalTo("1"));

        assertThat(bulkResponse.items()[4].isFailed(), equalTo(true));
        assertThat(bulkResponse.items()[4].opType(), equalTo("create"));
        assertThat(bulkResponse.items()[4].index(), equalTo(getConcreteIndexName()));
        assertThat(bulkResponse.items()[4].type(), equalTo("type1"));

        RefreshResponse refreshResponse = client1.admin().indices().prepareRefresh("test").execute().actionGet();
        assertThat(refreshResponse.successfulShards(), equalTo(10));
        assertThat(refreshResponse.failedShards(), equalTo(0));
View Full Code Here

Examples of org.elasticsearch.action.bulk.BulkResponse.items()

        assertThat(bulkResponse.items()[3].id(), equalTo("1"));

        assertThat(bulkResponse.items()[4].isFailed(), equalTo(true));
        assertThat(bulkResponse.items()[4].opType(), equalTo("create"));
        assertThat(bulkResponse.items()[4].index(), equalTo(getConcreteIndexName()));
        assertThat(bulkResponse.items()[4].type(), equalTo("type1"));

        RefreshResponse refreshResponse = client1.admin().indices().prepareRefresh("test").execute().actionGet();
        assertThat(refreshResponse.successfulShards(), equalTo(10));
        assertThat(refreshResponse.failedShards(), equalTo(0));
View Full Code Here

Examples of org.elasticsearch.action.bulk.BulkResponse.items()

        client.admin().indices().prepareCreate("test").execute().actionGet();
        client.admin().cluster().prepareHealth("test").setWaitForGreenStatus().execute().actionGet();

        BulkResponse bulkResponse = client.prepareBulk().add(client.prepareIndex("test", "type", "1").setSource("field1", "value1_1")).execute().actionGet();
        assertThat(bulkResponse.hasFailures(), equalTo(false));
        assertThat(bulkResponse.items().length, equalTo(1));
        IndexResponse indexResponse = bulkResponse.items()[0].response();
        assertThat(indexResponse.version(), equalTo(1l));
    }
}
View Full Code Here

Examples of org.jitterbit.ui.selection.IndexedSelection.items()

        IndexedSelection sel = list.getSelection();
        if (sel.isEmpty()) {
            return new LdapStructureAttribute[0];
        }
        List<LdapStructureAttribute> attrs = new ArrayList<LdapStructureAttribute>();
        for (Object o : sel.items()) {
            if (o instanceof LdapStructureAttribute) {
                attrs.add((LdapStructureAttribute) o);
            }
        }
        return attrs.toArray(new LdapStructureAttribute[attrs.size()]);
View Full Code Here

Examples of org.jitterbit.ui.selection.OrderedSelection.items()

    private ExportSettingsRunner getExporter() {
        OrderedSelection selection = propertySelector.getSelection();
        ExportableProperty[] selectedProperties = new ExportableProperty[selection.size()];
        int n = 0;
        for (Object o : selection.items()) {
            selectedProperties[n++] = (ExportableProperty) o;
        }
        return new ExportSettingsRunner(selectedProperties, destinationSelector.getSelectedEntities());
    }
View Full Code Here

Examples of org.jitterbit.ui.selection.Selection.items()

        }
      Selection selection = getSelection();
      if (selection.isEmpty()) {
        return;
      }
      for (Object node : selection.items()) {
        getLayout().moveBy(node, delta);
      }
            layoutEditSender.newEdit();
    }
    }
View Full Code Here

Examples of org.ofbiz.order.shoppingcart.ShoppingCart.items()

        Locale locale = cart.getLocale();
        GenericValue payPalPaymentSetting = ProductStoreWorker.getProductStorePaymentSetting(delegator, cart.getProductStoreId(), "EXT_PAYPAL", null, true);
        String paymentGatewayConfigId = payPalPaymentSetting.getString("paymentGatewayConfigId");
        String configString = "payment.properties";

        if (cart == null || cart.items().size() <= 0) {
            return ServiceUtil.returnError(UtilProperties.getMessage("AccountingErrorUiLabels",
                    "AccountingPayPalShoppingCartIsEmpty", locale));
        }

        Map<String, String> data = FastMap.newInstance();
View Full Code Here

Examples of org.ofbiz.order.shoppingcart.ShoppingCart.items()

                                }
                            }
                        }

                        // If there are indeed items to drop ship, then create the purchase order
                        if (!UtilValidate.isEmpty(cart.items())) {
                            // set checkout options
                            cart.setDefaultCheckoutOptions(dispatcher);
                            // the shipping address is the one of the customer
                            cart.setShippingContactMechId(shipGroup.getString("contactMechId"));
                            // associate ship groups of sales and purchase orders
View Full Code Here

Examples of org.ofbiz.order.shoppingcart.ShoppingCart.items()

                    // remove former orderId from cart (would cause duplicate entry).
                    // orderId is set by order-creation services (including store-specific prefixes, e.g.)
                    cart.setOrderId(null);

                    // only keep the orderitem with the related product.
                    List<ShoppingCartItem> cartItems = cart.items();
                    Iterator<ShoppingCartItem> ci = cartItems.iterator();
                    while (ci.hasNext()) {
                        ShoppingCartItem shoppingCartItem = ci.next();
                        if (!subscription.get("productId").equals(shoppingCartItem.getProductId())) {
                            cart.removeCartItem(shoppingCartItem, dispatcher);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.