idx
int64
0
41.2k
question
stringlengths
83
4.15k
target
stringlengths
5
715
18,700
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 ( "currencyCode" , currencyCode ) ; formatter . formatUrl ( "productCode" , productCode ) ; formatter . formatUrl ( "variationKey" , variationKey ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for DeleteProductVariationLocalizedDeltaPrice
18,701
public Set < String > getContainedIds ( ) { Set < String > s = super . getContainedIds ( ) ; for ( Constraint c : map . values ( ) ) { s . addAll ( c . getContainedIds ( ) ) ; } return s ; }
Returns the set union of all id set of the contained constraints plus its own .
18,702
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 . formatUrl ( "profilecode" , profilecode ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetShippingInclusionRule
18,703
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 . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetShippingInclusionRules
18,704
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 MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for DeleteShippingInclusionRule
18,705
public static void write ( final HighScoringPair hsp , final PrintWriter writer ) { checkNotNull ( hsp ) ; checkNotNull ( writer ) ; writer . println ( hsp . toString ( ) ) ; }
Write the specified high - scoring segment pair with the specified print writer .
18,706
public static void write ( final Iterable < HighScoringPair > hsps , final PrintWriter writer ) { checkNotNull ( hsps ) ; checkNotNull ( writer ) ; for ( HighScoringPair hsp : hsps ) { writer . println ( hsp . toString ( ) ) ; } }
Write zero or more high - scoring segment pairs with the specified print writer .
18,707
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 = getCurrentDataSet ( dataSetKey ) ; if ( dataSet != null ) { dataSet . setFixedValue ( entryKey , value ) ; } }
Sets a fixed value .
18,708
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 ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetPriceList
18,709
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" , customerAccountId ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetResolvedPriceList
18,710
protected String providePerfLoadVersion ( ) { ClassLoader loader = Thread . currentThread ( ) . getContextClassLoader ( ) ; InputStream is = loader . getResourceAsStream ( "com/mgmtp/jfunk/common/version.txt" ) ; try { return IOUtils . toString ( is , "UTF-8" ) ; } catch ( IOException ex ) { throw new IllegalStateException ( "Could not read jFunk version." , ex ) ; } finally { IOUtils . closeQuietly ( is ) ; } }
Provides the version of perfLoad as specified in the Maven pom .
18,711
public static PairwiseAlignment create ( final int threads , final SubstitutionMatrix substitutionMatrix ) { return new ParallelBiojavaPairwiseAlignment ( Executors . newFixedThreadPool ( threads ) , substitutionMatrix ) ; }
Create and return a new pairwise alignment implementation configured with a fixed thread pool and the specified substitution matrix .
18,712
public static MozuUrl getStatesUrl ( String profileCode ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/shipping/admin/profiles/{profilecode}/shippingstates" ) ; formatter . formatUrl ( "profileCode" , profileCode ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetStates
18,713
public static MozuUrl updateStatesUrl ( String profilecode ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/shipping/admin/profiles/{profilecode}/shippingstates" ) ; formatter . formatUrl ( "profilecode" , profilecode ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for UpdateStates
18,714
public static MozuUrl getPackageLabelUrl ( String packageId , Boolean returnAsBase64Png , String returnId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/returns/{returnId}/packages/{packageId}/label?returnAsBase64Png={returnAsBase64Png}" ) ; formatter . formatUrl ( "packageId" , packageId ) ; formatter . formatUrl ( "returnAsBase64Png" , returnAsBase64Png ) ; formatter . formatUrl ( "returnId" , returnId ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetPackageLabel
18,715
public static Iterable < HighScoringPair > read ( final Readable readable ) throws IOException { checkNotNull ( readable ) ; Collect collect = new Collect ( ) ; stream ( readable , collect ) ; return collect . hsps ( ) ; }
Read zero or more high - scoring segment pairs from the specified readable .
18,716
public static void stream ( final Readable readable , final HspListener listener ) throws IOException { checkNotNull ( readable ) ; checkNotNull ( listener ) ; HspLineProcessor lineProcessor = new HspLineProcessor ( listener ) ; CharStreams . readLines ( readable , lineProcessor ) ; }
Stream zero or more high - scoring segment pairs from the specified readable .
18,717
public static MozuUrl getTreeDocumentUrl ( String documentListName , String documentName , Boolean includeInactive , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/content/documentlists/{documentListName}/documentTree/{documentName}?includeInactive={includeInactive}&responseFields={responseFields}" ) ; formatter . formatUrl ( "documentListName" , documentListName ) ; formatter . formatUrl ( "documentName" , documentName ) ; formatter . formatUrl ( "includeInactive" , includeInactive ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetTreeDocument
18,718
public static MozuUrl updateTreeDocumentContentUrl ( String documentListName , String documentName ) { UrlFormatter formatter = new UrlFormatter ( "/api/content/documentlists/{documentListName}/documentTree/{documentName}/content?folderPath={folderPath}&folderId={folderId}" ) ; formatter . formatUrl ( "documentListName" , documentListName ) ; formatter . formatUrl ( "documentName" , documentName ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for UpdateTreeDocumentContent
18,719
public void manageAck ( final Acknowledgment acknowledgment ) { final int smid = acknowledgment . getSmsId ( ) ; final SmsStatus smsStatus = acknowledgment . getSmsStatus ( ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Manage ack with : " + " - smid : " + smid + " - ack status : " + smsStatus ) ; } final Sms sms = daoService . getSms ( smid ) ; if ( sms != null ) { manageAck ( sms , smsStatus ) ; } else { logger . error ( "unable to find in db sms with : " + " - sms_id : " + smid + "In order to update is state in DB" + smid ) ; } }
Business layer to mange ack .
18,720
private void putPhoneNumberInBlackList ( final String phoneNumber , final Application application ) { if ( daoService . isPhoneNumberInBlackList ( phoneNumber ) ) return ; logger . debug ( "Adding to black list : \n" + " - Phone number : " + phoneNumber + "\n" + " - Application id : " + application . getId ( ) + "\n" ) ; final Date currentDate = new Date ( System . currentTimeMillis ( ) ) ; daoService . addBlacklist ( new Blacklist ( application , currentDate , phoneNumber ) ) ; }
Put a number in black list .
18,721
public boolean jsonElementShouldMatch ( String source , String jsonPath , Object value , String method , String data , String contentType ) throws Exception { boolean match = false ; if ( value == null ) { throw new IllegalArgumentException ( "Given value was null" ) ; } String found = String . valueOf ( findJsonElement ( source , jsonPath , method , data , contentType ) ) ; if ( found . equals ( value ) ) { System . out . println ( "*DEBUG* The values '" + found + "' and '" + value + "' did match" ) ; match = true ; } else { System . out . println ( "*ERROR* The values '" + found + "' and '" + value + "' did not match" ) ; throw new JsonNotEqualException ( "The found value did not match, found '" + found + "', expected '" + value + "'" ) ; } return match ; }
Checks if the given value matches the one found by the jsonPath from the source .
18,722
public boolean jsonShouldBeEqual ( String from , String to ) throws Exception { return jsonShouldBeEqual ( from , to , false ) ; }
Checks if the given JSON contents are equal . See Json Should Be Equal for more details
18,723
public boolean jsonShouldBeEqual ( String from , String to , boolean useExactMatch , String method , String data , String contentType ) throws Exception { System . out . println ( "*DEBUG* Comparing JSON sources" ) ; boolean equal = false ; String fromJson = requestUtil . readSource ( from , method , data , contentType ) ; String toJson = requestUtil . readSource ( to , method , data , contentType ) ; if ( StringUtils . isNotBlank ( fromJson ) && StringUtils . isNotBlank ( toJson ) ) { if ( useExactMatch ) { if ( fromJson . equals ( toJson ) ) { System . out . println ( "*DEBUG* JSON strings are equal by exact compare" ) ; equal = true ; } else { System . out . println ( "*ERROR* JSON strings are NOT equal by exact compare" ) ; equal = false ; throw new JsonNotEqualException ( "JSON strings are NOT equal by exact compare" ) ; } } else { equal = diff . compare ( fromJson , toJson ) ; if ( ! equal ) { throw new JsonNotEqualException ( "JSON strings are NOT equal by compare" ) ; } } } else { System . out . println ( "*ERROR* Either from or to JSON was empty" ) ; throw new JsonNotValidException ( "One of the JSON strings is empty" ) ; } return equal ; }
Checks if the given JSON contents are equal . The third parameter specifies whether exact string match should be used or diffing by the JSON objects ie . the order of the attributes does not matter .
18,724
public Object findJsonElement ( String source , String jsonPath , String method , String data , String contentType ) throws Exception { System . out . println ( "*DEBUG* Reading jsonPath: " + jsonPath ) ; String json = requestUtil . readSource ( source , method , data , contentType ) ; Object value ; try { value = JsonPath . read ( json , jsonPath ) ; } catch ( PathNotFoundException e ) { throw new JsonElementNotFoundException ( "Path '" + jsonPath + "' was not found in JSON" ) ; } return value ; }
Find JSON element by jsonPath from the source and return its value if found .
18,725
@ SuppressWarnings ( "unchecked" ) public boolean jsonShouldHaveElementCount ( String source , String jsonPath , Integer count , String method , String data , String contentType ) throws Exception { boolean match = false ; System . out . println ( "*DEBUG* Reading jsonPath: " + jsonPath ) ; String json = requestUtil . readSource ( source , method , data , contentType ) ; List < Object > elements = null ; Object object = null ; try { object = JsonPath . read ( json , jsonPath ) ; } catch ( PathNotFoundException e ) { throw new JsonElementNotFoundException ( "Path '" + jsonPath + "' was not found in JSON" ) ; } if ( object != null ) { if ( object instanceof List < ? > ) { elements = ( List < Object > ) object ; if ( CollectionUtils . isNotEmpty ( elements ) ) { match = ( elements . size ( ) == count ) ; if ( ! match ) { System . out . println ( "*ERROR* Element counts did not match. Expected '" + count + "', got '" + elements . size ( ) + "'" ) ; throw new JsonNotEqualException ( "Element counts did not match. Expected '" + count + "', got '" + elements . size ( ) + "'" ) ; } } else { System . out . println ( "*ERROR* Could not find elements from '" + jsonPath + "'" ) ; throw new JsonElementNotFoundException ( "Could not find elements from '" + jsonPath + "'" ) ; } } else if ( count == 1 ) { System . out . println ( "*DEBUG* Found 1 item as expected from '" + jsonPath + "'" ) ; match = true ; } else { System . out . println ( "*ERROR* Found 1 item, but expected '" + count + "'" ) ; throw new JsonElementNotFoundException ( "Found 1 item, but expected '" + count + "'" ) ; } } else { System . out . println ( "*ERROR* Could not find elements from '" + jsonPath + "'" ) ; throw new JsonElementNotFoundException ( "Could not find elements from '" + jsonPath + "'" ) ; } return match ; }
Find JSON element by jsonPath from the source and check if the amount of found elements matches the given count .
18,726
public static MozuUrl getFileUrl ( String applicationKey , String fileName ) { UrlFormatter formatter = new UrlFormatter ( "/api/platform/appdev/filebasedpackage/packages/{applicationKey}?fileName={fileName}" ) ; formatter . formatUrl ( "applicationKey" , applicationKey ) ; formatter . formatUrl ( "fileName" , fileName ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . HOME_POD ) ; }
Get Resource Url for GetFile
18,727
public static MozuUrl executeUrl ( String cardType , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/payments/tokens/{cardType}/execute?responseFields={responseFields}" ) ; formatter . formatUrl ( "cardType" , cardType ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for Execute
18,728
public static MozuUrl getPublishSetUrl ( String publishSetCode , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/publishing/publishsets/{publishSetCode}?responseFields={responseFields}" ) ; formatter . formatUrl ( "publishSetCode" , publishSetCode ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetPublishSet
18,729
public static MozuUrl discardDraftsUrl ( ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/publishing/discarddrafts" ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for DiscardDrafts
18,730
public static MozuUrl publishDraftsUrl ( ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/publishing/publishdrafts" ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for PublishDrafts
18,731
public static MozuUrl getOrderItemViaLineIdUrl ( Boolean draft , Integer lineId , String orderId , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/orders/{orderId}/items/{lineId}?draft={draft}&responseFields={responseFields}" ) ; formatter . formatUrl ( "draft" , draft ) ; formatter . formatUrl ( "lineId" , lineId ) ; formatter . formatUrl ( "orderId" , orderId ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetOrderItemViaLineId
18,732
public static MozuUrl createOrderItemUrl ( String orderId , String responseFields , Boolean skipInventoryCheck , String updateMode , String version ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/orders/{orderId}/items?updatemode={updateMode}&version={version}&skipInventoryCheck={skipInventoryCheck}&responseFields={responseFields}" ) ; formatter . formatUrl ( "orderId" , orderId ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; formatter . formatUrl ( "skipInventoryCheck" , skipInventoryCheck ) ; formatter . formatUrl ( "updateMode" , updateMode ) ; formatter . formatUrl ( "version" , version ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for CreateOrderItem
18,733
public static MozuUrl updateOrderItemDiscountUrl ( Integer discountId , String orderId , String orderItemId , String responseFields , String updateMode , String version ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/orders/{orderId}/items/{orderItemId}/discounts/{discountId}?updatemode={updateMode}&version={version}&responseFields={responseFields}" ) ; formatter . formatUrl ( "discountId" , discountId ) ; formatter . formatUrl ( "orderId" , orderId ) ; formatter . formatUrl ( "orderItemId" , orderItemId ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; formatter . formatUrl ( "updateMode" , updateMode ) ; formatter . formatUrl ( "version" , version ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for UpdateOrderItemDiscount
18,734
public static MozuUrl updateItemProductPriceUrl ( String orderId , String orderItemId , Double price , String responseFields , String updateMode , String version ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/orders/{orderId}/items/{orderItemId}/price/{price}?updatemode={updateMode}&version={version}&responseFields={responseFields}" ) ; formatter . formatUrl ( "orderId" , orderId ) ; formatter . formatUrl ( "orderItemId" , orderItemId ) ; formatter . formatUrl ( "price" , price ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; formatter . formatUrl ( "updateMode" , updateMode ) ; formatter . formatUrl ( "version" , version ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for UpdateItemProductPrice
18,735
public static MozuUrl updateItemQuantityUrl ( String orderId , String orderItemId , Integer quantity , String responseFields , String updateMode , String version ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/orders/{orderId}/items/{orderItemId}/quantity/{quantity}?updatemode={updateMode}&version={version}&responseFields={responseFields}" ) ; formatter . formatUrl ( "orderId" , orderId ) ; formatter . formatUrl ( "orderItemId" , orderItemId ) ; formatter . formatUrl ( "quantity" , quantity ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; formatter . formatUrl ( "updateMode" , updateMode ) ; formatter . formatUrl ( "version" , version ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for UpdateItemQuantity
18,736
public static void write ( final BedRecord record , final PrintWriter writer ) { checkNotNull ( record ) ; checkNotNull ( writer ) ; writer . println ( record . toString ( ) ) ; }
Write the specified BED record with the specified print writer .
18,737
public static void write ( final Iterable < BedRecord > records , final PrintWriter writer ) { checkNotNull ( records ) ; checkNotNull ( writer ) ; for ( BedRecord record : records ) { writer . println ( record . toString ( ) ) ; } }
Write zero or more BED records with the specified print writer .
18,738
public static MozuUrl updateAccountCardUrl ( Integer accountId , String cardId , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/customer/accounts/{accountId}/cards/{cardId}?responseFields={responseFields}" ) ; formatter . formatUrl ( "accountId" , accountId ) ; formatter . formatUrl ( "cardId" , cardId ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for UpdateAccountCard
18,739
public static MozuUrl deleteAccountCardUrl ( Integer accountId , String cardId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/customer/accounts/{accountId}/cards/{cardId}" ) ; formatter . formatUrl ( "accountId" , accountId ) ; formatter . formatUrl ( "cardId" , cardId ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for DeleteAccountCard
18,740
public < T > T get ( final Object key ) { @ SuppressWarnings ( "unchecked" ) T value = ( T ) additionalData . get ( key ) ; return value ; }
Returns the value stored under the specified key in the internal map of additional meta data . For convenience the value is internally cast to the generic type . It is the caller s responsibility to make sure the cast is safe .
18,741
public static MozuUrl getReturnNoteUrl ( String noteId , String responseFields , String returnId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/returns/{returnId}/notes/{noteId}?responseFields={responseFields}" ) ; formatter . formatUrl ( "noteId" , noteId ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; formatter . formatUrl ( "returnId" , returnId ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetReturnNote
18,742
public static MozuUrl deleteReturnNoteUrl ( String noteId , String returnId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/returns/{returnId}/notes/{noteId}" ) ; formatter . formatUrl ( "noteId" , noteId ) ; formatter . formatUrl ( "returnId" , returnId ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for DeleteReturnNote
18,743
public static MozuUrl getAssignedDiscountsUrl ( String couponSetCode ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/couponsets/{couponSetCode}/assigneddiscounts" ) ; formatter . formatUrl ( "couponSetCode" , couponSetCode ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetAssignedDiscounts
18,744
public static MozuUrl unAssignDiscountUrl ( String couponSetCode , Integer discountId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/couponsets/{couponSetCode}/assigneddiscounts/{discountId}" ) ; formatter . formatUrl ( "couponSetCode" , couponSetCode ) ; formatter . formatUrl ( "discountId" , discountId ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for UnAssignDiscount
18,745
public static MozuUrl getDiscountContentUrl ( Integer discountId , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/discounts/{discountId}/content?responseFields={responseFields}" ) ; formatter . formatUrl ( "discountId" , discountId ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetDiscountContent
18,746
public static MozuUrl deleteDiscountUrl ( Integer discountId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/discounts/{discountId}" ) ; formatter . formatUrl ( "discountId" , discountId ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for DeleteDiscount
18,747
public long initMathRandom ( final Long seed ) { if ( seed == null ) { mathRandom = new MathRandom ( ) ; } else { mathRandom = new MathRandom ( seed ) ; } return mathRandom . getSeed ( ) ; }
Intializes the MathRandom instance .
18,748
protected String initValuesImpl ( final FieldCase c ) { double d = 0.0 ; String v = source . initValues ( c ) ; if ( v != null && v . length ( ) > 0 ) { d = 0.0 ; try { Number n = format . parse ( v ) ; d = n . doubleValue ( ) ; } catch ( ParseException e ) { log . debug ( "Could not parse string " + v + " to a number; setting value 0.0" ) ; } } d *= factor ; return format . format ( d ) ; }
Initializes the source constraint first . Then the source constraint s value is parsed with the format object of this constraint to a double number and this value is subsequently multiplied with the configurable factor . The multiplied value is finally formatted to a string using the the format object again and stored as a value .
18,749
public static MozuUrl getDocumentListTypeUrl ( String documentListTypeFQN , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/content/documentlistTypes/{documentListTypeFQN}?responseFields={responseFields}" ) ; formatter . formatUrl ( "documentListTypeFQN" , documentListTypeFQN ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetDocumentListType
18,750
public static void write ( final VcfHeader header , final List < VcfSample > samples , final List < VcfRecord > records , final PrintWriter writer ) { writeHeader ( header , writer ) ; writeColumnHeader ( samples , writer ) ; writeRecords ( samples , records , writer ) ; }
Write VCF with the specified print writer .
18,751
public static void writeHeader ( final VcfHeader header , final PrintWriter writer ) { checkNotNull ( header ) ; checkNotNull ( writer ) ; for ( String meta : header . getMeta ( ) ) { writer . println ( meta ) ; } }
Write VCF header with the specified print writer .
18,752
public static void writeColumnHeader ( final List < VcfSample > samples , final PrintWriter writer ) { checkNotNull ( samples ) ; checkNotNull ( writer ) ; StringBuilder sb = new StringBuilder ( "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO" ) ; if ( ! samples . isEmpty ( ) ) { sb . append ( "\tFORMAT" ) ; } for ( VcfSample sample : samples ) { sb . append ( "\t" ) ; sb . append ( sample . getId ( ) ) ; } writer . println ( sb . toString ( ) ) ; }
Write VCF column header with the specified print writer .
18,753
public static void writeRecords ( final List < VcfSample > samples , final List < VcfRecord > records , final PrintWriter writer ) { checkNotNull ( samples ) ; checkNotNull ( records ) ; checkNotNull ( writer ) ; for ( VcfRecord record : records ) { writeRecord ( samples , record , writer ) ; } }
Write VCF records with the specified print writer .
18,754
public static void writeRecord ( final List < VcfSample > samples , final VcfRecord record , final PrintWriter writer ) { checkNotNull ( samples ) ; checkNotNull ( record ) ; checkNotNull ( writer ) ; StringBuilder sb = new StringBuilder ( ) ; sb . append ( record . getChrom ( ) ) ; sb . append ( "\t" ) ; sb . append ( record . getPos ( ) ) ; sb . append ( "\t" ) ; if ( record . getId ( ) . length == 0 ) { sb . append ( "." ) ; } else { sb . append ( Joiner . on ( ";" ) . join ( record . getId ( ) ) ) ; } sb . append ( "\t" ) ; sb . append ( record . getRef ( ) ) ; sb . append ( "\t" ) ; sb . append ( Joiner . on ( "," ) . join ( record . getAlt ( ) ) ) ; sb . append ( "\t" ) ; if ( Double . isNaN ( record . getQual ( ) ) ) { sb . append ( "." ) ; } else { sb . append ( ( int ) record . getQual ( ) ) ; } sb . append ( "\t" ) ; sb . append ( Joiner . on ( ";" ) . join ( record . getFilter ( ) ) ) ; sb . append ( "\t" ) ; if ( record . getInfo ( ) . isEmpty ( ) ) { sb . append ( "." ) ; } else { sb . append ( Joiner . on ( ";" ) . withKeyValueSeparator ( "=" ) . join ( record . getInfo ( ) . asMap ( ) ) ) ; } if ( ! samples . isEmpty ( ) ) { sb . append ( "\t" ) ; sb . append ( Joiner . on ( ":" ) . join ( record . getFormat ( ) ) ) ; for ( VcfSample sample : samples ) { sb . append ( "\t" ) ; List < String > values = new ArrayList < String > ( ) ; for ( String formatId : record . getFormat ( ) ) { List < String > fieldValues = record . getGenotypes ( ) . get ( sample . getId ( ) ) . getFields ( ) . get ( formatId ) ; values . add ( fieldValues . isEmpty ( ) ? "." : Joiner . on ( "," ) . join ( fieldValues ) ) ; } sb . append ( Joiner . on ( ":" ) . join ( values ) ) ; } } writer . println ( sb . toString ( ) ) ; }
Write VCF record with the specified print writer .
18,755
public CharacterSet getInverse ( ) { CharacterSet n = new CharacterSet ( ) ; n . forbiddenCharacters = characters ; n . characters = forbiddenCharacters ; return n ; }
Returns a CharacterSet instance whose allowed and forbidden characters are exactly inverse to this instance .
18,756
public char getCharacter ( final int index ) { if ( index > characters . length ) { throw new IndexOutOfBoundsException ( index + "@" + characters . length + " does not fit" ) ; } return characters [ index ] ; }
Return the character at index position
18,757
public static CharacterSet createCharacterSet ( final String encoding , final String goodExpression , final String badExpression , final String characterSetId ) throws UnsupportedEncodingException { if ( characterSets . get ( ) . containsKey ( characterSetId ) ) { LOG . info ( "CharacterSet with id=" + characterSetId + " already created" ) ; return characterSets . get ( ) . get ( characterSetId ) ; } CharacterSet cs = new CharacterSet ( encoding , goodExpression , badExpression , characterSetId ) ; characterSets . get ( ) . put ( characterSetId , cs ) ; LOG . info ( "Added " + cs ) ; return cs ; }
Creates a new CharacterSet . If there is already a CharacterSet with the given ID this will be returned .
18,758
public static MozuUrl getOptionsUrl ( Integer productTypeId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/attributedefinition/producttypes/{productTypeId}/Options" ) ; formatter . formatUrl ( "productTypeId" , productTypeId ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetOptions
18,759
public static MozuUrl getOptionUrl ( String attributeFQN , Integer productTypeId , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/attributedefinition/producttypes/{productTypeId}/Options/{attributeFQN}?responseFields={responseFields}" ) ; formatter . formatUrl ( "attributeFQN" , attributeFQN ) ; formatter . formatUrl ( "productTypeId" , productTypeId ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetOption
18,760
public static MozuUrl addOptionUrl ( Integer productTypeId , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/attributedefinition/producttypes/{productTypeId}/Options?responseFields={responseFields}" ) ; formatter . formatUrl ( "productTypeId" , productTypeId ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for AddOption
18,761
public static MozuUrl deleteOptionUrl ( String attributeFQN , Integer productTypeId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/attributedefinition/producttypes/{productTypeId}/Options/{attributeFQN}" ) ; formatter . formatUrl ( "attributeFQN" , attributeFQN ) ; formatter . formatUrl ( "productTypeId" , productTypeId ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for DeleteOption
18,762
public void addToBlacklists ( final Blacklist blacklist ) { if ( null == getBlacklists ( ) ) { setBlacklists ( new java . util . TreeSet < Blacklist > ( ) ) ; } getBlacklists ( ) . add ( blacklist ) ; }
add a blacklist item to the collection of blacklist associated to the application .
18,763
public String get ( final Object key , final boolean process ) { String value = propsMap . get ( key ) ; if ( process ) { value = processPropertyValue ( value ) ; } return value == null && defaults != null ? defaults . get ( key ) : value ; }
Looks up a property . Recursively checks the defaults if necessary . If the property is found as a system property this value will be used .
18,764
public String put ( final String key , final String value ) { return propsMap . put ( key , value ) ; }
Sets the property with the specified key .
18,765
public Set < Entry < String , String > > entrySet ( ) { if ( entrySet == null ) { entrySet = new EntrySet ( ) ; } return entrySet ; }
Returns a set of Entries representing property key - value pairs . The returned set is a view to the internal data structures and reflects changes to this instance . Potential defaults are included in the returned set .
18,766
public String remove ( final Object key ) { String result = propsMap . remove ( key ) ; if ( defaults != null ) { String s = defaults . remove ( key ) ; if ( result == null ) { result = s ; } } return result ; }
Removes the property with the specified key . Defaults are considered .
18,767
public void load ( final InputStream is , final String encoding ) throws IOException { load ( new InputStreamReader ( is , encoding ) ) ; }
Loads properties from the specified stream . The caller of this method is responsible for closing the stream .
18,768
public void store ( final OutputStream os , final String comments , final boolean sorted , final boolean process ) throws IOException { store ( new OutputStreamWriter ( os ) , comments , sorted , process ) ; }
Writes the properties to the specified stream using the default encoding including defaults .
18,769
public void store ( final Writer writer , final String comments , final boolean sorted , final boolean process ) throws IOException { BufferedWriter bw = writer instanceof BufferedWriter ? ( BufferedWriter ) writer : new BufferedWriter ( writer ) ; if ( comments != null ) { for ( Scanner scanner = new Scanner ( comments ) ; scanner . hasNextLine ( ) ; ) { bw . write ( "#" ) ; bw . write ( scanner . nextLine ( ) ) ; bw . newLine ( ) ; } } bw . write ( "#" + new Date ( ) ) ; bw . newLine ( ) ; Set < String > keys = keySet ( ) ; if ( sorted ) { keys = Sets . newTreeSet ( keys ) ; } for ( String key : keys ) { bw . write ( saveConvert ( key , true ) + "=" + saveConvert ( get ( key , process ) , false ) ) ; bw . newLine ( ) ; } bw . flush ( ) ; }
Writes the properties to the specified writer including defaults .
18,770
public static MozuUrl getExtraValueLocalizedDeltaPriceUrl ( String attributeFQN , String currencyCode , String productCode , String responseFields , String value ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/products/{productCode}/Extras/{attributeFQN}/Values/{value}/localizedDeltaPrice/{currencyCode}?responseFields={responseFields}" ) ; formatter . formatUrl ( "attributeFQN" , attributeFQN ) ; formatter . formatUrl ( "currencyCode" , currencyCode ) ; formatter . formatUrl ( "productCode" , productCode ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; formatter . formatUrl ( "value" , value ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetExtraValueLocalizedDeltaPrice
18,771
public static MozuUrl getExtraUrl ( String attributeFQN , String productCode , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/products/{productCode}/Extras/{attributeFQN}?responseFields={responseFields}" ) ; formatter . formatUrl ( "attributeFQN" , attributeFQN ) ; formatter . formatUrl ( "productCode" , productCode ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetExtra
18,772
public static MozuUrl getCouponSetsUrl ( String filter , Boolean includeCounts , Integer pageSize , String responseFields , String sortBy , Integer startIndex ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/couponsets/?startIndex={startIndex}&pageSize={pageSize}&sortBy={sortBy}&filter={filter}&includeCounts={includeCounts}&responseFields={responseFields}" ) ; formatter . formatUrl ( "filter" , filter ) ; formatter . formatUrl ( "includeCounts" , includeCounts ) ; formatter . formatUrl ( "pageSize" , pageSize ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; formatter . formatUrl ( "sortBy" , sortBy ) ; formatter . formatUrl ( "startIndex" , startIndex ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetCouponSets
18,773
public static MozuUrl getCouponSetUrl ( String couponSetCode , Boolean includeCounts , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/couponsets/{couponSetCode}?includeCounts={includeCounts}&responseFields={responseFields}" ) ; formatter . formatUrl ( "couponSetCode" , couponSetCode ) ; formatter . formatUrl ( "includeCounts" , includeCounts ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetCouponSet
18,774
public static MozuUrl updateCouponSetUrl ( String couponSetCode , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/couponsets/{couponSetCode}?responseFields={responseFields}" ) ; formatter . formatUrl ( "couponSetCode" , couponSetCode ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for UpdateCouponSet
18,775
public static MozuUrl updateDocumentListUrl ( String documentListName , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/content/documentlists/{documentListName}?responseFields={responseFields}" ) ; formatter . formatUrl ( "documentListName" , documentListName ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for UpdateDocumentList
18,776
public static MozuUrl deleteDocumentListUrl ( String documentListName ) { UrlFormatter formatter = new UrlFormatter ( "/api/content/documentlists/{documentListName}" ) ; formatter . formatUrl ( "documentListName" , documentListName ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for DeleteDocumentList
18,777
private int s2i ( final byte [ ] bytes ) { int num = 0 ; for ( int i = 0 ; i < 4 ; i ++ ) { num += ( bytes [ i ] & 0xff ) << ( ( 3 - i ) * 8 ) ; } return num ; }
Read four bytes off the provided byte string and return the value as a big endian 32 bit unsigned integer .
18,778
public FormEntry getFormEntry ( final String entryKey ) { FormEntry entry = entries . get ( entryKey ) ; if ( entry == null ) { entry = addFormEntry ( entryKey , null ) ; } return entry ; }
Returns the FormEntry for the given key . If no FormEntry exists yet for the given key then a new one will be generated if generate == true
18,779
private void resetValues ( final Constraint constraintContainer ) { log . info ( "Reset " + key + " form data" ) ; for ( FormEntry e : entries . values ( ) ) { e . resetValue ( ) ; } constraintContainer . resetValues ( ) ; }
Calls the reset - method on all FormEntry - objects and the constraint - container . This resets all FormEntry - values to the standard value if there is one and prepares the generator for a new initialization .
18,780
public static MozuUrl deleteEntityListUrl ( String entityListFullName ) { UrlFormatter formatter = new UrlFormatter ( "/api/platform/entitylists/{entityListFullName}" ) ; formatter . formatUrl ( "entityListFullName" , entityListFullName ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for DeleteEntityList
18,781
public static VcfHeader header ( final File file ) throws IOException { checkNotNull ( file ) ; try ( BufferedReader reader = new BufferedReader ( new FileReader ( file ) ) ) { return header ( reader ) ; } }
Read the VCF header from the specified file .
18,782
public static VcfHeader header ( final URL url ) throws IOException { checkNotNull ( url ) ; try ( BufferedReader reader = Resources . asCharSource ( url , Charsets . UTF_8 ) . openBufferedStream ( ) ) { return header ( reader ) ; } }
Read the VCF header from the specified URL .
18,783
public static VcfHeader header ( final InputStream inputStream ) throws IOException { checkNotNull ( inputStream ) ; try ( BufferedReader reader = new BufferedReader ( new InputStreamReader ( inputStream ) ) ) { return header ( reader ) ; } }
Read the VCF header from the specified input stream .
18,784
public static Iterable < VcfSample > samples ( final File file ) throws IOException { checkNotNull ( file ) ; try ( BufferedReader reader = new BufferedReader ( new FileReader ( file ) ) ) { return samples ( reader ) ; } }
Read zero or more VCF samples from the specified file .
18,785
public static Iterable < VcfSample > samples ( final URL url ) throws IOException { checkNotNull ( url ) ; try ( BufferedReader reader = Resources . asCharSource ( url , Charsets . UTF_8 ) . openBufferedStream ( ) ) { return samples ( reader ) ; } }
Read zero or more VCF samples from the specified URL .
18,786
public static Iterable < VcfSample > samples ( final InputStream inputStream ) throws IOException { checkNotNull ( inputStream ) ; try ( BufferedReader reader = new BufferedReader ( new InputStreamReader ( inputStream ) ) ) { return samples ( reader ) ; } }
Read zero or more VCF samples from the specified input stream .
18,787
public static Iterable < VcfRecord > records ( final File file ) throws IOException { checkNotNull ( file ) ; try ( BufferedReader reader = new BufferedReader ( new FileReader ( file ) ) ) { return records ( reader ) ; } }
Read zero or more VCF records from the specified file .
18,788
public static Iterable < VcfRecord > records ( final URL url ) throws IOException { checkNotNull ( url ) ; try ( BufferedReader reader = Resources . asCharSource ( url , Charsets . UTF_8 ) . openBufferedStream ( ) ) { return records ( reader ) ; } }
Read zero or more VCF records from the specified URL .
18,789
public static Iterable < VcfRecord > records ( final InputStream inputStream ) throws IOException { checkNotNull ( inputStream ) ; try ( BufferedReader reader = new BufferedReader ( new InputStreamReader ( inputStream ) ) ) { return records ( reader ) ; } }
Read zero or more VCF records from the specified input stream .
18,790
private void cleanUp ( final DataSet ds ) { Set < String > indexedKeys = Sets . newHashSet ( ) ; for ( String key : ds . getDataView ( ) . keySet ( ) ) { if ( key . contains ( "#" ) ) { indexedKeys . add ( key . substring ( 0 , key . indexOf ( "#" ) ) ) ; } } for ( String indexedKey : indexedKeys ) { ds . removeValue ( indexedKey ) ; } }
Check DataSet for indexed entries and remove all keys without index if indexed entries with the same name exist .
18,791
public static MozuUrl getChildCategoriesUrl ( Integer categoryId , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/categories/{categoryId}/children?responseFields={responseFields}" ) ; formatter . formatUrl ( "categoryId" , categoryId ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetChildCategories
18,792
public static MozuUrl addCategoryUrl ( Boolean incrementSequence , String responseFields , Boolean useProvidedId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/categories/?incrementSequence={incrementSequence}&useProvidedId={useProvidedId}&responseFields={responseFields}" ) ; formatter . formatUrl ( "incrementSequence" , incrementSequence ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; formatter . formatUrl ( "useProvidedId" , useProvidedId ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for AddCategory
18,793
public static MozuUrl addProductsToCategoryUrl ( Integer categoryId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/categories/{categoryId}/add-products" ) ; formatter . formatUrl ( "categoryId" , categoryId ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for AddProductsToCategory
18,794
public static MozuUrl updateCategoryUrl ( Boolean cascadeVisibility , Integer categoryId , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/categories/{categoryId}?cascadeVisibility={cascadeVisibility}&responseFields={responseFields}" ) ; formatter . formatUrl ( "cascadeVisibility" , cascadeVisibility ) ; formatter . formatUrl ( "categoryId" , categoryId ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for UpdateCategory
18,795
public static MozuUrl deleteCategoryByIdUrl ( Boolean cascadeDelete , Integer categoryId , Boolean forceDelete , Boolean reassignToParent ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/categories/{categoryId}/?cascadeDelete={cascadeDelete}&forceDelete={forceDelete}&reassignToParent={reassignToParent}" ) ; formatter . formatUrl ( "cascadeDelete" , cascadeDelete ) ; formatter . formatUrl ( "categoryId" , categoryId ) ; formatter . formatUrl ( "forceDelete" , forceDelete ) ; formatter . formatUrl ( "reassignToParent" , reassignToParent ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for DeleteCategoryById
18,796
public static MozuUrl getDeliveryAttemptSummaryUrl ( Integer processId , String responseFields , String subscriptionId ) { UrlFormatter formatter = new UrlFormatter ( "/api/event/push/subscriptions/{subscriptionId}/deliveryattempts/{id}?responseFields={responseFields}" ) ; formatter . formatUrl ( "processId" , processId ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; formatter . formatUrl ( "subscriptionId" , subscriptionId ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetDeliveryAttemptSummary
18,797
public static void write ( final Hml data , final Writer writer ) throws IOException { checkNotNull ( data ) ; checkNotNull ( writer ) ; try { JAXBContext context = JAXBContext . newInstance ( Hml . class ) ; Marshaller marshaller = context . createMarshaller ( ) ; SchemaFactory schemaFactory = SchemaFactory . newInstance ( XMLConstants . W3C_XML_SCHEMA_NS_URI ) ; URL schemaURL = HmlReader . class . getResource ( "/org/nmdp/ngs/hml/xsd/hml-1.0.1.xsd" ) ; Schema schema = schemaFactory . newSchema ( schemaURL ) ; marshaller . setSchema ( schema ) ; marshaller . setProperty ( Marshaller . JAXB_FORMATTED_OUTPUT , true ) ; marshaller . marshal ( data , writer ) ; } catch ( JAXBException | SAXException e ) { e . printStackTrace ( ) ; throw new IOException ( "could not marshal HML" , e ) ; } }
Write the specified HML to the specified writer .
18,798
public static void write ( final Hml data , final File file ) throws IOException { checkNotNull ( data ) ; checkNotNull ( file ) ; try ( BufferedWriter writer = new BufferedWriter ( new FileWriter ( file ) ) ) { write ( data , writer ) ; } }
Write the specified HML to the specified file .
18,799
public static void write ( final Hml data , final OutputStream outputStream ) throws IOException { checkNotNull ( data ) ; checkNotNull ( outputStream ) ; try ( BufferedWriter writer = new BufferedWriter ( new OutputStreamWriter ( outputStream ) ) ) { write ( data , writer ) ; } }
Write the specified HML to the specified output stream .