diff options
author | 2016-08-31 16:47:33 +0800 | |
---|---|---|
committer | 2016-08-31 16:47:33 +0800 | |
commit | fa49e78cc199526a9e33b59c5194f8e3bf0f0952 (patch) | |
tree | 3478e867a8f304266dbceca6e992cceca410ede4 /winery/eclipse-config/java_editor_templates.xml | |
parent | 159d40f0011559c8f82338b29dca1bffd700f2c8 (diff) |
Add winery source code
Change-Id: I1c5088121d79b71098c3cba1996c6f784737532e
Issue-id: TOSCA-49
Signed-off-by: huangjian <huang.jian12@zte.com.cn>
Diffstat (limited to 'winery/eclipse-config/java_editor_templates.xml')
-rw-r--r-- | winery/eclipse-config/java_editor_templates.xml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/winery/eclipse-config/java_editor_templates.xml b/winery/eclipse-config/java_editor_templates.xml new file mode 100644 index 0000000..970fcfc --- /dev/null +++ b/winery/eclipse-config/java_editor_templates.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?><templates><template autoinsert="true" context="java" deleted="false" description="JAX RS: one getter and setter for a property" enabled="true" name="JAXRSgettersetter">@GET +@Path("${name}") +public String get${name}() { + return this.configuration.getString(Property.${name}); +} + +@PUT +@Path("${name}") +public Response put${name}(@FormParam(value="${name}") String ${name}) { + return BackendUtils.setProperty(this.configuration, Property.${name}, ${name}); +} +</template><template autoinsert="true" context="java" deleted="false" description="Method for returning a subresource" enabled="true" name="JAXRSsubresource"> @Path("{id}/") + public ${thing}Resource get${thing}Resource(@PathParam("id") String id) { + XMLid xmlId = new XMLid(id, true); + ${thing}Id resId = new ${thing}Id((${thing}sId) this.id, xmlId); + return new ${thing}Resource(resId); + } +</template><template autoinsert="true" context="java" deleted="false" description="SLF4Jlogger" enabled="true" name="logger"> private static final Logger logger = LoggerFactory.getLogger(${enclosing_type}.class); +</template><template autoinsert="true" context="java" deleted="false" description="SLF4Jlogger" enabled="true" name="logger"> private static final Logger logger = LoggerFactory.getLogger(${enclosing_type}.class); +</template></templates>
\ No newline at end of file |