class EventStoredByPreProcessor implements Processor {

    @Override
    public void process( Event event, WorkContext ctx )
    {
        final String storedBy = EventUtils.getValidUsername( event.getStoredBy(), ctx.getImportOptions() );
        event.setStoredBy( storedBy );

        Set<DataValue> dataValues = event.getDataValues();

        for ( DataValue dataValue : dataValues )
        {
            dataValue.setStoredBy( storedBy );
        }
    }

}