class TopologyTemplateResource {

    @GET
    @Path("availablefeatures")
    @Produces(MediaType.APPLICATION_JSON)
    public ArrayList<AvailableFeaturesApiData> getAvailableFeatures() {
        ArrayList<AvailableFeaturesApiData> apiData = new ArrayList<>();

        String deploymentTechnology = null;
        if (this.parent.getElement() instanceof HasTags && ((HasTags) this.parent.getElement()).getTags() != null) {
            for (TTag tag : ((HasTags) this.parent.getElement()).getTags().getTag()) {
                if (tag.getName().toLowerCase().contains("deploymentTechnology".toLowerCase())) {
                    deploymentTechnology = tag.getValue();
                    break;
                }
            }
        }

        EnhancementUtils.getAvailableFeaturesForTopology(this.topologyTemplate, deploymentTechnology)
            .forEach((nodeTemplateId, featuresMap) -> {
                ArrayList<AvailableFeaturesApiData.Features> features = new ArrayList<>();
                featuresMap.forEach(
                    (featureType, featureName) -> features.add(new AvailableFeaturesApiData.Features(featureType, featureName))
                );
                apiData.add(new AvailableFeaturesApiData(nodeTemplateId, features));
            });

        return apiData;
    }

    public  TopologyTemplateResource(AbstractComponentInstanceResourceContainingATopology parent, TTopologyTemplate topologyTemplate, String type);

}