class WineryRepositoryClient implements IWineryRepositoryClient {

    @Override
    public void createArtifactTemplate(QName qname, QName artifactType) throws QNameAlreadyExistsException {
        WebTarget artifactTemplates = this.primaryWebTarget.path("artifacttemplates");

        // manually creating org.eclipse.winery.repository.rest.resources.apiData.QNameWithTypeApiData, because this class is not available in this context
        Map<String, String> root = new HashMap<>();
        root.put("namespace", qname.getNamespaceURI());
        root.put("localname", qname.getLocalPart());
        root.put("type", artifactType.toString());

        Response response = artifactTemplates.request(MediaType.TEXT_PLAIN)
            .post(Entity.json(root));

        if (!response.getStatusInfo().getFamily().equals(Response.Status.Family.SUCCESSFUL)) {
            // TODO: more fine grained checking for error message. Not all
            // failures are that the QName already exists
            LOGGER.debug("Error {} when creating id {} from URI {}", response.getStatus(), qname.toString(), this.primaryWebTarget.getUri().toString());
            String entity = response.readEntity(String.class);
            if (entity != null) {
                LOGGER.debug("Entity: {}", entity);
            }
            throw new QNameAlreadyExistsException();
        }
        // no further return is made
    }

    public  WineryRepositoryClient();
    public  WineryRepositoryClient(boolean useProxy);

}