@GET
    @Produces(MediaType.APPLICATION_XML)
    public Response getTemplates()  {
        logger.debug("StartOf getTemplates - REQUEST for /templates");

        TemplateHelper templateRestService = getTemplateHelper();
        String serializedTemplate = null;
        try {
            serializedTemplate = templateRestService.getTemplates();
        } catch (HelperException e) {
            logger.info("getTemplates exception:"+e.getMessage());
            return buildResponse(e);
        }
        logger.debug("EndOf getTemplates");
        return buildResponse(200, serializedTemplate);
            
    }
@ GET @ Produces ( MediaType . APPLICATION_XML ) public Response getTemplates ( ) { logger . debug ( "StartOf getTemplates - REQUEST for /templates" ) ; TemplateHelper templateRestService = getTemplateHelper ( ) ; String serializedTemplate = null ; try { serializedTemplate = templateRestService . getTemplates ( ) ; } catch ( HelperException e ) { logger . info ( "getTemplates exception:" + e . getMessage ( ) ) ; return buildResponse ( e ) ; } logger . debug ( "EndOf getTemplates" ) ; return buildResponse ( 200 , serializedTemplate ) ; }
Gets a the list of available templates from where we can get metrics,
host information, etc.

<pre>
GET /templates

Request:
GET /templates HTTP/1.1

Response:

HTTP/1.1 200 Ok
{@code
<?xml version="1.0" encoding="UTF-8"?>
<collection href="/templates">
<items offset="0" total="1">
<wsag:Template>...</wsag:Template>
...
</items>
</collection>
}

</pre>

Example: <li>curl http://localhost:8080/sla-service/templates</li>

@return XML information with the different details and urls of the
templates