diff options
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 |