class MergeGroupActivationListener extends AbstractActivationListener {

    @Override
    public void handleCommit(boolean active, DataGroupInfo dgi, PhasedTaskCanceller canceller)
    {
        super.handleCommit(active, dgi, canceller);
        if (active)
        {
            Iterator<DataTypeInfo> mergedLayers = dgi.getMembers(false).iterator();
            if (mergedLayers.hasNext())
            {
                DataTypeInfo mergedLayer = mergedLayers.next();
                DataModelCategory category = DataRegistryUtils.getInstance().getMergeDataCategory(mergedLayer.getTypeKey());
                SimpleQuery<MergedDataRow> simpleQuery = new SimpleQuery<>(category, DataRegistryUtils.MERGED_PROP_DESCRIPTOR);
                myRegistry.performLocalQuery(simpleQuery);
                if (simpleQuery.getResults() != null && !simpleQuery.getResults().isEmpty())
                {
                    myTypeController.addDataElements(new MergeDataElementProvider(mergedLayer, simpleQuery.getResults()), null,
                            null, this);
                }
            }
        }
    }

    public  MergeGroupActivationListener(DataRegistry registry, DataTypeController typeController);

}