@@ -0,0 +1,1463 @@
+package dbathon.web.gvds.rest;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0Aimport javax.enterprise.context.ApplicationScoped;%0Aimport javax.inject.Inject;%0Aimport javax.persistence.EntityManager;%0Aimport javax.transaction.Transactional;%0Aimport javax.ws.rs.Consumes;%0Aimport javax.ws.rs.GET;%0Aimport javax.ws.rs.Path;%0Aimport javax.ws.rs.Produces;%0Aimport javax.ws.rs.core.MediaType;%0Aimport javax.ws.rs.core.Response;%0Aimport javax.ws.rs.core.Response.Status;%0Aimport dbathon.web.gvds.util.JpaUtil;%0A%0A@Path(%22type%22)%0A@ApplicationScoped%0A@Consumes(MediaType.APPLICATION_JSON)%0A@Produces(MediaType.APPLICATION_JSON)%0A@Transactional%0A@AuthorizationRequired%0Apublic class TypeResource %7B%0A%0A  @Inject%0A  private RestHelper restHelper;%0A%0A  @Inject%0A  private EntityManager entityManager;%0A%0A  @Inject%0A  private UserAndVersionContext userAndVersionContext;%0A%0A  static class TypeDto %7B%0A    public TypeDto() %7B%7D%0A%0A    public TypeDto(String name) %7B%0A      this.name = name;%0A    %7D%0A%0A    public String name;%0A  %7D%0A%0A  @GET%0A  public Response getTypeList() %7B%0A    final List%3CString%3E typeNames =%0A        JpaUtil.query(entityManager, String.class, %22select e.typeName from DataType e %22%0A            + %22where e.user = ?1 order by e.typeName%22, userAndVersionContext.getUser());%0A%0A    final List%3CTypeDto%3E result = new ArrayList%3C%3E(typeNames.size());%0A    for (final String typeName : typeNames) %7B%0A      result.add(new TypeDto(typeName));%0A    %7D%0A%0A    return restHelper.buildResultResponse(Status.OK, result);%0A  %7D%0A%0A%7D%0A

add TypeResource