/*
 * Copyright 2015-2016 Hewlett-Packard Development Company, L.P.
 * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
 */

package com.hp.autonomy.searchcomponents.idol.configuration;

import com.autonomy.aci.client.annotations.IdolAnnotationsProcessorFactory;
import com.autonomy.aci.client.services.AciService;
import com.hp.autonomy.frontend.configuration.ValidationResult;
import com.hp.autonomy.frontend.configuration.Validator;

public class QueryManipulationValidator implements Validator<QueryManipulation> {

    private final AciService aciService;
    private final IdolAnnotationsProcessorFactory processorFactory;

    public QueryManipulationValidator(final AciService aciService, final IdolAnnotationsProcessorFactory processorFactory) {
        this.aciService = aciService;
        this.processorFactory = processorFactory;
    }

    @Override
    public ValidationResult<?> validate(final QueryManipulation config) {
        return config.validate(aciService, processorFactory);
    }

    @Override
    public Class<QueryManipulation> getSupportedClass() {
        return QueryManipulation.class;
    }
}

@@ -493,16 +493,139 @@
 idator;%0A
+import org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.stereotype.Component;%0A%0A@Component
 %0Apublic 
@@ -810,16 +810,31 @@
 ctory;%0A%0A
+    @Autowired%0A
     publ
@@ -872,33 +872,42 @@
 inal AciService 
-a
+validatorA
 ciService, final
@@ -967,21 +967,16 @@
         
-this.
 aciServi
@@ -980,17 +980,26 @@
 rvice = 
-a
+validatorA
 ciServic

Make QueryManipulationValidator into a component