class DriverInjection {

    public static void setDriverProperty(TRelationshipTemplate relationshipTemplate, TDeploymentArtifact driverDeploymentArtifact) throws Exception {
        QName DAArtifactTemplateQName = driverDeploymentArtifact.getArtifactRef();
        ArtifactTemplateId artifactTemplateId = new ArtifactTemplateId(DAArtifactTemplateQName);
        TArtifactTemplate artifactTemplate = RepositoryFactory.getRepository().getElement(artifactTemplateId);

        Map<String, String> artifactProperties = ModelUtilities.getPropertiesKV(artifactTemplate);
        Map<String, String> relationshipProperties = ModelUtilities.getPropertiesKV(relationshipTemplate);

        if ((artifactProperties != null) && (relationshipProperties != null) && artifactProperties.containsKey("Driver") && relationshipProperties.containsKey("Driver")) {
            relationshipProperties.put("Driver", artifactProperties.get("Driver"));
            relationshipTemplate.getProperties().setKVProperties(relationshipProperties);
        } else {
            throw new WineryRepositoryException("No Property found to set to the driver classname");
        }
    }

}