This file contains 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
/** | |
* Method with a Map as parameter | |
* | |
* @param properties Map for the parameters of the method. Supported key: <br/> | |
* - param1: String, mandatory<br/> | |
* - param2: boolean. Optional(default= true)<br/> | |
* - param3: String (any value), Optional(default="Def param3")<br/> | |
* @return | |
*/ | |
def maMethod(Map properties) { |
This file contains 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
// Illustration of a side effect when using string variable/constant for map's key | |
def PROP_NAME = "property name" | |
def myMap = [PROP_NAME: "a Value"] | |
//assert myMap.keySet().iterator().next() == "property name" | |
// fails at runtime but it compiles. | |
// I was expecting the value of the variable to be the key, but it is in fact a String with the name of the variable |
This file contains 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 groovy.util.logging.Slf4j | |
/** | |
* Created by User: ngandriau - Date: 7/6/13 - Time: 5:52 PM | |
*/ | |
@Slf4j(value = "LOG") | |
class TestLogASTAnnotation { | |
static TestLogASTAnnotation staticInstanceOfMyClass = new TestLogASTAnnotation() |
This file contains 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 com.hybris.activity | |
import groovyx.net.http.ContentType | |
import groovyx.net.http.RESTClient | |
/** | |
* Created by User: ngandriau - Date: 9/25/13 - Time: 12:07 PM | |
* | |
* this works: curl --basic --user kermit:kermit http://localhost:8080/activiti-rest/service/process-engine | |
*/ |