This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io.sphere.sdk.client.*; | |
import java.util.UUID; | |
import java.util.concurrent.CompletionStage; | |
public class CorrelationIdSphereClient extends SphereClientDecorator { | |
public CorrelationIdSphereClient(SphereClient delegate) { | |
super(delegate); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
├── A | |
│ ├── A-1 | |
│ │ ├── A-1-1 | |
│ │ ├── A-1-2 | |
│ │ └── A-1-3 | |
│ ├── A-2 | |
│ │ ├── A-2-1 | |
│ │ ├── A-2-2 | |
│ │ └── A-2-3 | |
│ └── A-3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ProductQueryImpl{predicate=[Predicate[masterData(current(masterVariant(sku in ("1000", "2000", "3000", "4000")) or variants(sku in ("1000", "2000", "3000", "4000"))))]], sort=[], expand=[], additionalQueryParameters=[], limit=null, offset=null, endpoint='/products', resultMapper=io.sphere.sdk.queries.MetaModelQueryDslBuilder$$Lambda$126/1732589709@c72f2b8, readablePath=/products?where=masterData(current(masterVariant(sku in ("1000", "2000", "3000", "4000")) or variants(sku in ("1000", "2000", "3000", "4000")))), request=HttpRequestIntent[httpMethod=GET,path=/products?where=masterData%28current%28masterVariant%28sku+in+%28%221000%22%2C+%222000%22%2C+%223000%22%2C+%224000%22%29%29+or+variants%28sku+in+%28%221000%22%2C+%222000%22%2C+%223000%22%2C+%224000%22%29%29%29%29,headers={},body=<null>], withTotal=null} | |
sphere readable predicate | |
masterData(current(masterVariant(sku in ("1000", "2000", "3000", "4000")) or variants(sku in ("1000", "2000", "3000", "4000")))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final List<String> skus = Arrays.asList("1000", "2000", "3000", "4000"); | |
final ProductQuery productQuery = ProductQuery.of() | |
.withPredicates(m -> m.masterData().current().allVariants() | |
.where(variant -> variant.sku().isIn(skus))); | |
System.err.println(productQuery); | |
System.err.println("sphere readable predicate"); | |
System.err.println(productQuery.predicates().get(0).toSphereQuery()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": "8665d91a-eab0-45a8-a378-e6603d66d084", | |
"version": 4, | |
"productType": { | |
"typeId": "product-type", | |
"id": "c6af7304-4e35-48d6-8687-66ca2dab5dbb" | |
}, | |
"name": { | |
"en": "GIRLS HARTBREAK CREW" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"offset": 0, | |
"count": 5, | |
"total": 5, | |
"results": [ | |
{ | |
"id": "8665d91a-eab0-45a8-a378-e6603d66d084", | |
"version": 4, | |
"productType": { | |
"typeId": "product-type", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resolvers += "Typesafe Repo" at "http://repo.typesafe.com/typesafe/releases/" | |
libraryDependencies ++= Seq( | |
"com.typesafe.akka" %% "akka-cluster" % "2.2.3", | |
"com.typesafe.akka" %% "akka-slf4j" % "2.2.3", | |
"com.typesafe.akka" %% "akka-testkit" % "2.2.3", | |
"ch.qos.logback" % "logback-classic" % "1.0.13", | |
"com.typesafe.play" %% "play-json" % "2.2.2", | |
"junit" % "junit" % "4.11" % "test", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Answer for https://groups.google.com/forum/?fromgroups=#!topic/play-framework/MF_cQ743vv4 | |
*/ | |
package controllers; | |
import com.typesafe.config.ConfigFactory; | |
import play.*; | |
import play.libs.Crypto; | |
import play.mvc.*; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package controllers; | |
import play.api.libs.ws.Response; | |
import play.api.libs.ws.WS$; | |
import play.libs.F; | |
import play.libs.WS; | |
import play.mvc.*; | |
public class Application extends Controller { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sbt._ | |
import Keys._ | |
import PlayProject._ | |
object ApplicationBuild extends Build { | |
val appName = "so13921168" | |
val appVersion = "1.0-SNAPSHOT" | |
val appDependencies = Seq( |
NewerOlder