code: @Path("setCompany")
      @GET
      @Produces({ MediaType.APPLICATION_JSON, MediaType.TEXT_PLAIN })
      @SuppressWarnings("checkstyle:illegalcatch")
      public Response setCompany(@QueryParam("company") final String _companyStr)
      {
          try {
              final Company company;
              if (UUIDUtil.isUUID(_companyStr)) {
                  company = Company.get(UUID.fromString(_companyStr));
              } else if (StringUtils.isNumeric(_companyStr)) {
                  company = Company.get(Long.parseLong(_companyStr));
              } else {
                  company = Company.get(_companyStr);
              }
              if (company != null && company.hasChildPerson(Context.getThreadContext().getPerson())) {
                  Context.getThreadContext().setUserAttribute(Context.CURRENTCOMPANY, String.valueOf(company.getId()));
                  Context.getThreadContext().getUserAttributes().storeInDb();
                  Context.getThreadContext().setCompany(company);
              }
          } catch (final NumberFormatException | EFapsException e) {
              RestContext.LOG.error("Catched error", e);
          }
          return confirm();
      }
docs: Sets the company.
  
  @param _companyStr the _company str
  @return the response