public LdapSchemaTemplateListResponse get(Context context, Request request, Response response, Variant variant)
throws ResourceException
{
List<LdapSchemaTemplate> templates = this.templateManager.getSchemaTemplates();
LdapSchemaTemplateListResponse templateResponse = new LdapSchemaTemplateListResponse();
templateResponse.setData(new ArrayList<LdapSchemaTemplateDTO>());
for (LdapSchemaTemplate ldapSchemaTemplate : templates) {
LdapSchemaTemplateDTO dto = new LdapSchemaTemplateDTO();
dto.setName(ldapSchemaTemplate.getName());
dto.setUserAndGroupConfig(this.toDto(ldapSchemaTemplate.getUserAndGroupAuthConfig()));
templateResponse.getData().add(dto);
}
return templateResponse;
}