blob: 970fcfc898ab29d7f34114ca746245f3d0349d7c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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>
|