import org.lsst.ccs.description.groovy.CCSBuilder;
import org.lsst.ccs.localdb.statusdb.StatusPersisterSubsystem;
import org.lsst.ccs.localdb.statusdb.QueryMonitor;
import org.lsst.ccs.localdb.statusdb.StatusPersister;
import org.lsst.ccs.localdb.statusdb.StatDataPersister;
import org.lsst.ccs.localdb.statusdb.StatDataAccumulator;
import org.lsst.ccs.localdb.statusdb.MetaDataPersister;
import org.lsst.ccs.localdb.statusdb.StatusDataPersister;
import org.lsst.ccs.bus.data.AgentCategory;
import org.lsst.ccs.bus.data.AgentInfo.AgentType;
import org.lsst.ccs.bus.data.AgentPropertyPredicate;

CCSBuilder builder = []

builder.
    localdb(StatusPersisterSubsystem) {
        
    "queryMonitor"(QueryMonitor)
    
    "status-persister"(StatusPersister)
    
    "data-persister"(StatusDataPersister)

    "statdata-accumulator" (StatDataAccumulator)        
    
    //StatDataPersister for a specific agent type
/*
    "statdata-persister-FOCAL_PLANE" (StatDataPersister, predicate:new AgentPropertyPredicate("[agentCategory:FOCAL_PLANE]"))        
    "statdata-persister-POWER" (StatDataPersister, predicate:new AgentPropertyPredicate("[agentCategory:POWER]"))        
    "statdata-persister-IMAGE_HANDLER" (StatDataPersister, predicate:new AgentPropertyPredicate("[agentCategory:IMAGE_HANDLER]"))        
    "statdata-persister-SERVICES" (StatDataPersister, predicate:new AgentPropertyPredicate("[agentType:SERVICE]"))        
    */
    //Default StatDataPersister (catch all)
    "statdata-persister" (StatDataPersister)        
    
    //MetaDataPersister for a specific agent type
    /*
    "metadata-persister-FOCAL_PLANE" (MetaDataPersister, predicate:new AgentPropertyPredicate("[agentCategory:FOCAL_PLANE]"))        
    "metadata-persister-POWER" (MetaDataPersister, predicate:new AgentPropertyPredicate("[agentCategory:POWER]"))        
    "metadata-persister-IMAGE_HANDLER" (MetaDataPersister, predicate:new AgentPropertyPredicate("[agentCategory:IMAGE_HANDLER]"))        
    "metadata-persister-SERVICES" (MetaDataPersister, predicate:new AgentPropertyPredicate("[agentType:SERVICE]"))        
    */
    //Default MetaDataPersister (catch all)
    "metadata-persister" (MetaDataPersister)

}
