code
stringlengths
73
34.1k
label
stringclasses
1 value
public static MozuUrl getRatesUrl(Boolean includeRawResponse, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/storefront/shipping/request-rates?responseFields={responseFields}"); formatter.formatUrl("includeRawResponse", includeRawResponse); formatter.formatUrl("resp...
java
public static MozuUrl deleteCustomRouteSettingsUrl() { UrlFormatter formatter = new UrlFormatter("/api/commerce/settings/general/customroutes"); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl getOrderUrl(Boolean draft, Boolean includeBin, String orderId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}?draft={draft}&includeBin={includeBin}&responseFields={responseFields}"); formatter.formatUrl("draft", draft); formatter.forma...
java
public static MozuUrl priceOrderUrl(Boolean refreshShipping, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/price?refreshShipping={refreshShipping}&responseFields={responseFields}"); formatter.formatUrl("refreshShipping", refreshShipping); formatter.formatUrl("respon...
java
public static MozuUrl deleteOrderDraftUrl(String orderId, String version) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/draft?version={version}"); formatter.formatUrl("orderId", orderId); formatter.formatUrl("version", version); return new MozuUrl(formatter.getResourceUrl(), ...
java
public WebElement find() { checkState(webDriver != null, "No WebDriver specified."); checkState(by != null, "No By instance for locating elements specified."); if (!noLogging) { log.info(toString()); } WebElement element; if (timeoutSeconds > 0L) { WebDriverWait wait = createWebDriverWait(); ele...
java
public List<WebElement> findAll() { checkState(webDriver != null, "No WebDriver specified."); checkState(by != null, "No By instance for locating elements specified."); log.info(toString()); final List<WebElement> result = newArrayList(); try { if (timeoutSeconds > 0L) { WebDriverWait wait = createW...
java
public static MozuUrl getAddressSchemaUrl(String countryCode, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/platform/reference/addressschema/{countryCode}?responseFields={responseFields}"); formatter.formatUrl("countryCode", countryCode); formatter.formatUrl("responseFields", respo...
java
public static MozuUrl getAddressSchemasUrl(String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/platform/reference/addressschemas?responseFields={responseFields}"); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.HO...
java
public static MozuUrl getBehaviorUrl(Integer behaviorId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/platform/reference/behaviors/{behaviorId}?responseFields={responseFields}"); formatter.formatUrl("behaviorId", behaviorId); formatter.formatUrl("responseFields", responseFields); ...
java
public static MozuUrl getBehaviorCategoryUrl(Integer categoryId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/platform/reference/behaviors/categories/{categoryId}?responseFields={responseFields}"); formatter.formatUrl("categoryId", categoryId); formatter.formatUrl("responseFields"...
java
public static MozuUrl getBehaviorsUrl(String responseFields, String userType) { UrlFormatter formatter = new UrlFormatter("/api/platform/reference/behaviors?userType={userType}&responseFields={responseFields}"); formatter.formatUrl("responseFields", responseFields); formatter.formatUrl("userType", userType);...
java
public static MozuUrl getUnitsOfMeasureUrl(String filter, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/platform/reference/unitsofmeasure?filter={filter}&responseFields={responseFields}"); formatter.formatUrl("filter", filter); formatter.formatUrl("responseFields", responseFields);...
java
public boolean tryClick(final By by) { LOGGER.info("Trying to click on {}", by); List<WebElement> elements = wef.timeout(2L).by(by).findAll(); if (elements.size() > 0) { WebElement element = elements.get(0); checkTopmostElement(by); new Actions(webDriver).moveToElement(element).click().perform(); LOGG...
java
public Object executeScript(final String script, final Object... args) { LOGGER.info("executeScript: {}", new ToStringBuilder(this, LoggingToStringStyle.INSTANCE).append("script", script).append("args", args)); return ((JavascriptExecutor) webDriver).executeScript(script, args); }
java
public String openNewWindow(final String url, final long timeoutSeconds) { String oldHandle = openNewWindow(timeoutSeconds); get(url); return oldHandle; }
java
public void assertTopmostElement(By by) { if (!isTopmostElementCheckApplicable(by)) { LOGGER.warn("The element identified by '{}' is not a leaf node in the " + "document tree. Thus, it cannot be checked if the element is topmost. " + "The topmost element check cannot be performed and is skipped.", by); ...
java
public Boolean isTopmostElement(By by) { if (!isTopmostElementCheckApplicable(by)) { return null; } WebElement topmostElement = findTopmostElement(by); WebElement element = findElement(by); return element.equals(topmostElement); }
java
public static MozuUrl addProductUrl(String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/products/?responseFields={responseFields}"); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD...
java
public static MozuUrl addProductInCatalogUrl(String productCode, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/products/{productCode}/ProductInCatalogs?responseFields={responseFields}"); formatter.formatUrl("productCode", productCode); formatter.formatUrl("re...
java
public static MozuUrl renameProductCodesUrl() { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/products/Actions/RenameProductCodes"); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl updateProductInCatalogUrl(Integer catalogId, String productCode, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/products/{productCode}/ProductInCatalogs/{catalogId}?responseFields={responseFields}"); formatter.formatUrl("catalogId", catalogI...
java
public static MozuUrl deleteProductInCatalogUrl(Integer catalogId, String productCode) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/products/{productCode}/ProductInCatalogs/{catalogId}"); formatter.formatUrl("catalogId", catalogId); formatter.formatUrl("productCode", productCode);...
java
protected List<ExcelFile> getExcelFiles() { if (excelFiles == null) { excelFiles = newArrayListWithCapacity(3); for (int i = 0;; ++i) { String baseKey = String.format("dataSource.%s.%d", getName(), i); String path = configuration.get(baseKey + ".path"); if (path == null) { break; ...
java
@Override protected DataSet getNextDataSetImpl(final String dataSetKey) { for (ExcelFile excelFile : getExcelFiles()) { Map<String, List<Map<String, String>>> data = excelFile.getData(); List<Map<String, String>> dataList = data.get(dataSetKey); if (dataList != null) { MutableInt counter = dataS...
java
public ConceptLattice asConceptLattice(final Graph graph) { ConceptLattice lattice = new ConceptLattice(graph, attributes.size()); Iterator it = this.asCrossTable().iterator(); while(it.hasNext()) { CrossTable.Row row = (CrossTable.Row) it.next(); lattice.insert(...
java
public static <G extends Relatable<?>> Context down(final CompleteLattice lattice) { List<Object> elements = Arrays.asList(lattice.toArray()); return new Context(elements, elements, new LessOrEqual()); }
java
public static <G extends Relatable<?>> Context downset(final CompleteLattice lattice) { List<Object> elements = Arrays.asList(lattice.toArray()); return new Context(elements, elements, new NotGreaterOrEqual()); }
java
public static <G extends PartiallyOrdered<?>> Context powerset(final List<G> set) { return new Context(set, set, new NotEqual()); }
java
public static <G extends PartiallyOrdered<?>> Context antichain(final List<G> set) { return new Context(set, set, new Equal()); }
java
public static List<Long> indexes(final MutableBitSet bits) { List<Long> indexes = new ArrayList<>((int) bits.cardinality()); for (long i = bits.nextSetBit(0); i >= 0; i = bits.nextSetBit(i + 1)) { indexes.add(i); } return indexes; }
java
public static String messageAsText(final Message message, final boolean includeHeaders) { try { StrBuilder sb = new StrBuilder(300); if (includeHeaders) { @SuppressWarnings("unchecked") Enumeration<Header> headers = message.getAllHeaders(); while (headers.hasMoreElements()) { Header header = h...
java
protected final Constraint getConstraint(final Element element) { Element constraintElement = element.getChild(XMLTags.CONSTRAINT); if (constraintElement != null) { return generator.getConstraintFactory().createModel(random, constraintElement); } constraintElement = element.getChild(XMLTags.CONSTRAINT_R...
java
protected final String getValue(final String key, final FieldCase ca) throws IdNotFoundException { ConstraintFactory f = generator.getConstraintFactory(); String value = f.getModel(key).initValues(ca); if (value == null) { return ""; } return value; }
java
public static BedRecord valueOf(final String value) { checkNotNull(value); List<String> tokens = Splitter.on("\t").trimResults().splitToList(value); if (tokens.size() < 3) { throw new IllegalArgumentException("value must have at least three fields (chrom, start, end)"); } ...
java
public static MozuUrl deletePriceListEntryUrl(String currencyCode, String priceListCode, String productCode, DateTime startDate) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/pricelists/{priceListCode}/entries/{productCode}/{currencyCode}?startDate={startDate}"); formatter.formatUrl("...
java
public static MozuUrl getEventsUrl(String filter, Integer pageSize, String responseFields, String sortBy, Integer startIndex) { UrlFormatter formatter = new UrlFormatter("/api/event/pull/?startIndex={startIndex}&pageSize={pageSize}&sortBy={sortBy}&filter={filter}&responseFields={responseFields}"); formatter.for...
java
public static MozuUrl getEventUrl(String eventId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/event/pull/{eventId}?responseFields={responseFields}"); formatter.formatUrl("eventId", eventId); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.ge...
java
public void addToSms(final Sms sms) { if (null == getSms()) { setSms(new java.util.TreeSet<Sms>()); } getSms().add(sms); }
java
public void addToApplications(final Application application) { if (null == getApplications()) { setApplications(new java.util.TreeSet<Application>()); } getApplications().add(application); }
java
public static MozuUrl setFulFillmentInfoUrl(String orderId, String responseFields, String updateMode, String version) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/fulfillmentinfo?updatemode={updateMode}&version={version}&responseFields={responseFields}"); formatter.formatUrl("orde...
java
public static MozuUrl deleteDocumentDraftsUrl(String documentLists) { UrlFormatter formatter = new UrlFormatter("/api/content/documentpublishing/draft?documentLists={documentLists}"); formatter.formatUrl("documentLists", documentLists); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENAN...
java
public static GTRPublicData read(final Reader reader) throws IOException { checkNotNull(reader); try { // todo: may want to cache some of this for performance reasons JAXBContext context = JAXBContext.newInstance(GTRPublicData.class); Unmarshaller unmarshaller = cont...
java
public static GTRPublicData read(final URL url) throws IOException { checkNotNull(url); try (BufferedReader reader = Resources.asCharSource(url, Charsets.UTF_8).openBufferedStream()) { return read(reader); } }
java
public static GTRPublicData read(final InputStream inputStream) throws IOException { checkNotNull(inputStream); try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) { return read(reader); } }
java
public static MozuUrl getShipmentUrl(String orderId, String responseFields, String shipmentId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/shipments/{shipmentId}?responseFields={responseFields}"); formatter.formatUrl("orderId", orderId); formatter.formatUrl("responseFields", r...
java
public static MozuUrl deleteShipmentUrl(String orderId, String shipmentId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/shipments/{shipmentId}"); formatter.formatUrl("orderId", orderId); formatter.formatUrl("shipmentId", shipmentId); return new MozuUrl(formatter.getResourceU...
java
public Allele doubleCrossover(final Allele right) throws IllegalSymbolException, IndexOutOfBoundsException, IllegalAlphabetException { if (this.overlaps(right)) { //System.out.println("this range" + this.toString() + " sequence = " + this.sequence.seqString() + "sequence length = " + sequence.length...
java
public Allele merge(final Allele right, final long minimumOverlap) throws IllegalSymbolException, IndexOutOfBoundsException, IllegalAlphabetException, AlleleException { Allele.Builder builder = Allele.builder(); Locus overlap = intersection(right); // System.out.println("overlap = " + ov...
java
public static MozuUrl changePasswordUrl(Integer accountId, Boolean unlockAccount, String userId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/accounts/{accountId}/Change-Password?unlockAccount={unlockAccount}&userId={userId}"); formatter.formatUrl("accountId", accountId); formatter.for...
java
public static MozuUrl setPasswordChangeRequiredUrl(Integer accountId, String userId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/accounts/{accountId}/Set-Password-Change-Required?userId={userId}"); formatter.formatUrl("accountId", accountId); formatter.formatUrl("userId", userId); ...
java
public static MozuUrl getLoginStateByEmailAddressUrl(String customerSetCode, String emailAddress, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/accounts/loginstatebyemailaddress?emailAddress={emailAddress}&responseFields={responseFields}"); formatter.formatUrl("custo...
java
public static MozuUrl getLoginStateByUserNameUrl(String customerSetCode, String responseFields, String userName) { UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/accounts/loginstatebyusername?userName={userName}&customerSetCode={customerSetCode}&responseFields={responseFields}"); formatter.fo...
java
public static MozuUrl getCustomersPurchaseOrderAccountsUrl(String accountType, Integer pageSize, String responseFields, String sortBy, Integer startIndex) { UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/accounts/purchaseOrderAccounts?startIndex={startIndex}&pageSize={pageSize}&sortBy={sortBy}&a...
java
public static MozuUrl resetPasswordUrl() { UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/accounts/Reset-Password"); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl getSoftAllocationUrl(String responseFields, Integer softAllocationId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/softallocations/{softAllocationId}?responseFields={responseFields}"); formatter.formatUrl("responseFields", responseFields); formatter.formatUrl...
java
public static MozuUrl addSoftAllocationsUrl() { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/softallocations/"); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl convertToProductReservationUrl() { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/softallocations/convert"); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl renewSoftAllocationsUrl() { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/softallocations/renew"); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl updateSoftAllocationsUrl() { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/softallocations/"); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl deleteSoftAllocationUrl(Integer softAllocationId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/softallocations/{softAllocationId}"); formatter.formatUrl("softAllocationId", softAllocationId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation....
java
public static MozuUrl getDocumentTypeUrl(String documentTypeName, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/content/documenttypes/{documentTypeName}?responseFields={responseFields}"); formatter.formatUrl("documentTypeName", documentTypeName); formatter.formatUrl("responseFields...
java
public static MozuUrl bulkDeletePriceListEntriesUrl(Boolean invalidateCache, Boolean publishEvents) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/pricelists/bulkdeleteentries?publishEvents={publishEvents}&invalidateCache={invalidateCache}"); formatter.formatUrl("invalidateCache", inva...
java
public static MozuUrl deletePriceListUrl(Boolean cascadeDeleteEntries, String priceListCode) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/pricelists/{priceListCode}?cascadeDeleteEntries={cascadeDeleteEntries}"); formatter.formatUrl("cascadeDeleteEntries", cascadeDeleteEntries); fo...
java
public static MozuUrl getEntityUrl(String entityListFullName, String id, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/platform/entitylists/{entityListFullName}/entities/{id}?responseFields={responseFields}"); formatter.formatUrl("entityListFullName", entityListFullName); formatter...
java
public static MozuUrl deleteEntityUrl(String entityListFullName, String id) { UrlFormatter formatter = new UrlFormatter("/api/platform/entitylists/{entityListFullName}/entities/{id}"); formatter.formatUrl("entityListFullName", entityListFullName); formatter.formatUrl("id", id); return new MozuUrl(formatte...
java
public static MozuUrl getB2BAccountAttributeUrl(Integer accountId, String attributeFQN, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/b2baccounts/{accountId}/attributes/{attributeFQN}?responseFields={responseFields}"); formatter.formatUrl("accountId", accountId); form...
java
public static MozuUrl getUserRolesAsyncUrl(Integer accountId, String responseFields, String userId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/b2baccounts/{accountId}/user/{userId}/roles?responseFields={responseFields}"); formatter.formatUrl("accountId", accountId); formatter.formatUrl("...
java
public static MozuUrl deleteB2BAccountAttributeUrl(Integer accountId, String attributeFQN) { UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/b2baccounts/{accountId}/attributes/{attributeFQN}"); formatter.formatUrl("accountId", accountId); formatter.formatUrl("attributeFQN", attributeFQN); ret...
java
public static MozuUrl removeUserRoleAsyncUrl(Integer accountId, Integer roleId, String userId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/b2baccounts/{accountId}/user/{userId}/roles/{roleId}"); formatter.formatUrl("accountId", accountId); formatter.formatUrl("roleId", roleId); formatte...
java
public static MozuUrl getLocationTypesUrl() { UrlFormatter formatter = new UrlFormatter("/api/commerce/admin/locationtypes/"); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl getLocationTypeUrl(String locationTypeCode, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/admin/locationtypes/{locationTypeCode}?responseFields={responseFields}"); formatter.formatUrl("locationTypeCode", locationTypeCode); formatter.formatUrl("respons...
java
public static MozuUrl deleteLocationTypeUrl(String locationTypeCode) { UrlFormatter formatter = new UrlFormatter("/api/commerce/admin/locationtypes/{locationTypeCode}"); formatter.formatUrl("locationTypeCode", locationTypeCode); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;...
java
public static MozuUrl getMasterCatalogUrl(Integer masterCatalogId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/mastercatalogs/{masterCatalogId}?responseFields={responseFields}"); formatter.formatUrl("masterCatalogId", masterCatalogId); formatter.formatUrl("...
java
public static Sequence createSequence(final org.biojava.bio.seq.Sequence sequence) { checkNotNull(sequence); Sequence s = new Sequence(); if (!DNATools.getDNA().equals(sequence.getAlphabet())) { throw new IllegalArgumentException("alphabet must be DNA"); } s.setValue...
java
public static Iterable<Sequence> createSequences(final BufferedReader reader) throws IOException { checkNotNull(reader); List<Sequence> sequences = new ArrayList<Sequence>(); for (SequenceIterator it = SeqIOTools.readFastaDNA(reader); it.hasNext(); ) { try { sequences...
java
public static Iterable<Sequence> createSequences(final File file) throws IOException { checkNotNull(file); try (BufferedReader reader = new BufferedReader(new FileReader(file))) { return createSequences(reader); } }
java
public static Iterable<Sequence> createSequences(final URL url) throws IOException { checkNotNull(url); try (BufferedReader reader = Resources.asCharSource(url, Charsets.UTF_8).openBufferedStream()) { return createSequences(reader); } }
java
public static Iterable<Sequence> createSequences(final InputStream inputStream) throws IOException { checkNotNull(inputStream); try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) { return createSequences(reader); } }
java
public static SymbolList toDnaSymbolList(final Sequence sequence) throws IllegalSymbolException { checkNotNull(sequence); return DNATools.createDNA(sequence.getValue().replaceAll("\\s+", "")); }
java
public void refreshAppAuthTicket() { StringBuilder resourceUrl = new StringBuilder(MozuConfig.getBaseUrl()).append(AuthTicketUrl.refreshAppAuthTicketUrl(null).getUrl()); try { @SuppressWarnings("unchecked") MozuClient<AuthTicket> client = (MozuClient<AuthTicket>) MozuClientFact...
java
public static MozuUrl deleteAccountContactUrl(Integer accountId, Integer contactId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/accounts/{accountId}/contacts/{contactId}"); formatter.formatUrl("accountId", accountId); formatter.formatUrl("contactId", contactId); return new MozuUrl(...
java
@Override public int getMaxLength() { int max = 0; boolean found = false; for (Constraint c : constraints) { int cM = c.getMaxLength(); if (cM != -1) { max += cM; found = true; } } return found ? max : -1; }
java
@Override public String initValues(final FieldCase ca) { boolean found = false; buffer.setLength(0); for (Constraint c : constraints) { String cV = c.initValues(ca); if (cV != null) { found = true; buffer.append(cV); } } if (found) { return buffer.toString(); } return nu...
java
private Node createNode(final Iterable<Range<C>> ranges) { Range<C> span = Iterables.getFirst(ranges, null); if (span == null) { return null; } for (Range<C> range : ranges) { checkNotNull(range, "ranges must not contain null ranges"); span = range.spa...
java
private void depthFirstSearch(final Range<C> query, final Node node, final List<Range<C>> result, final Set<Node> visited) { if (node == null || visited.contains(node) || query.isEmpty()) { return; } if (node.left() != null && Ranges.isLessThan(query, node.center())) { de...
java
public static MozuUrl updateLocationInventoryUrl(String productCode) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/products/{ProductCode}/LocationInventory"); formatter.formatUrl("productCode", productCode); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_...
java
public static MozuUrl getProductVariationLocalizedDeltaPricesUrl(String productCode, String variationKey) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/products/{productCode}/variations/{variationKey}/localizedDeltaPrice"); formatter.formatUrl("productCode", productCode); formatter...
java
public static MozuUrl addProductVariationLocalizedPriceUrl(String productCode, String responseFields, String variationKey) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/products/{productCode}/variations/{variationKey}/localizedPrice?responseFields={responseFields}"); formatter.formatU...
java
public static MozuUrl updateProductVariationLocalizedDeltaPriceUrl(String currencyCode, String productCode, String responseFields, String variationKey) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/products/{productCode}/variations/{variationKey}/localizedDeltaPrice/{currencyCode}?respon...
java
public static MozuUrl deleteProductVariationLocalizedDeltaPriceUrl(String currencyCode, String productCode, String variationKey) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/products/{productCode}/variations/{variationKey}/localizedDeltaPrice/{currencyCode}"); formatter.formatUrl("cu...
java
@Override public Set<String> getContainedIds() { Set<String> s = super.getContainedIds(); for (Constraint c : map.values()) { s.addAll(c.getContainedIds()); } return s; }
java
public static MozuUrl getShippingInclusionRuleUrl(String id, String profilecode, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/shipping/admin/profiles/{profilecode}/rules/shippinginclusions/{id}?responseFields={responseFields}"); formatter.formatUrl("id", id); formatter.fo...
java
public static MozuUrl getShippingInclusionRulesUrl(String profilecode, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/shipping/admin/profiles/{profilecode}/rules/shippinginclusions?responseFields={responseFields}"); formatter.formatUrl("profilecode", profilecode); formatter...
java
public static MozuUrl deleteShippingInclusionRuleUrl(String id, String profilecode) { UrlFormatter formatter = new UrlFormatter("/api/commerce/shipping/admin/profiles/{profilecode}/rules/shippinginclusions/{id}"); formatter.formatUrl("id", id); formatter.formatUrl("profilecode", profilecode); return new M...
java
public static void write(final HighScoringPair hsp, final PrintWriter writer) { checkNotNull(hsp); checkNotNull(writer); writer.println(hsp.toString()); }
java
public static void write(final Iterable<HighScoringPair> hsps, final PrintWriter writer) { checkNotNull(hsps); checkNotNull(writer); for (HighScoringPair hsp : hsps) { writer.println(hsp.toString()); } }
java
@Override public void setFixedValue(final String dataSetKey, final String entryKey, final String value) { Map<String, String> map = fixedValues.get(dataSetKey); if (map == null) { map = Maps.newHashMap(); fixedValues.put(dataSetKey, map); } map.put(entryKey, value); DataSet dataSet = getCurre...
java
public static MozuUrl getPriceListUrl(String priceListCode, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/storefront/pricelists/{priceListCode}?responseFields={responseFields}"); formatter.formatUrl("priceListCode", priceListCode); formatter.formatUrl("responseFiel...
java
public static MozuUrl getResolvedPriceListUrl(Integer customerAccountId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/storefront/pricelists/resolved?customerAccountId={customerAccountId}&responseFields={responseFields}"); formatter.formatUrl("customerAccountId", cust...
java