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
class Widget { | |
void doStuff() { println 'doing stuff' } | |
String sayStuff(String name) { return "Hello $name" } | |
void fail() { throw new RuntimeException("Boom") } | |
} | |
class WidgetService { | |
// our service now has all the methods, Widget has | |
@Delegate Widget widget = new Widget() | |
// adding other stuff is fine too |
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
/* groovy */ | |
import groovy.transform.CompileStatic | |
@CompileStatic | |
@Singleton | |
class RegularSingleton { | |
void foo() { println 'foo' } | |
} |
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 com.vaadin.ui.Component | |
import com.vaadin.ui.CustomField | |
import com.vaadin.ui.TextArea | |
class MultiLineField extends CustomField<List<String>> { | |
private TextArea textArea = new TextArea() | |
MultiLineField() { | |
super() |
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
curl -s -XDELETE localhost:9200/so_delete_parent >/dev/null | |
curl -s -XPUT localhost:9200/so_delete_parent/ -d '{ "settings": { "index": { "number_of_shards" : 2 } } }' >/dev/null | |
curl -s -XPUT localhosT:9200/so_delete_parent/childs/_mapping -d '{ "_parent": { "type": "parents" } }' >/dev/null | |
curl -s -XPUT localhost:9200/so_delete_parent/childs/A\?parent=1 -d '{ "doc": "parent 1" }' | |
curl -s -XPUT localhost:9200/so_delete_parent/childs/A\?parent=2 -d '{ "doc": "parent 2" }' | |
curl -s localhost:9200/so_delete_parent/childs/A\?parent=1 | json_pp | |
curl -s localhost:9200/so_delete_parent/childs/A\?parent=2 | json_pp | |
curl -s localhost:9200/so_delete_parent/childs/A\?parent=666 | json_pp | |
curl -s localhost:9200/so_delete_parent/childs/A | json_pp # fails with ES 1.0 |
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 com.vaadin.sass.internal.ScssStylesheet | |
eventCreateWarStart = { name, stagingDir -> | |
new File("${stagingDir}/VAADIN/themes/").eachDir { | |
def scssName = "${it}/styles.scss" | |
if (new File(scssName).exists()) { | |
ScssStylesheet scss = ScssStylesheet.get(scssName) | |
scss.compile() | |
def outFile = new File("$it/styles.css") | |
outFile.write(scss.toString()) |
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
includeTargets << grailsScript("_GrailsInit") | |
includeTargets << grailsScript("_GrailsClasspath") | |
includeTargets << grailsScript("_GrailsRun") | |
target(widgetset_init: "init") { | |
vaadinConfig = new ConfigSlurper(grails.util.Environment.current.name).parse(new File("${basedir}/grails-app/conf/VaadinConfig.groovy").text) | |
ant.property(name: "widgetset", value: vaadinConfig.vaadin.widgetset) | |
ant.property(name: "workers", value: "4") | |
ant.property(name: "widgetset-path", value: "") | |
ant.property(name: "client-side-destination", value: "web-app/VAADIN/widgetsets") |
NewerOlder