public function factory($originAdapterName, $destinationAdapterName, $objectType, $priority = null)
    {
        $definition = new Definition();
        $definition->setOriginAdapterName($originAdapterName);
        $definition->setDestinationAdapterName($destinationAdapterName);
        $definition->setObjectType($objectType);
        $definition->setPriority($priority);

        $this->validator->validate($definition);

        return $definition;
    }
public function factory($originAdapterName, $destinationAdapterName, $objectType, $priority = null)
    {
        $definition = new Definition();
        $definition->setOriginAdapterName($originAdapterName);
        $definition->setDestinationAdapterName($destinationAdapterName);
        $definition->setObjectType($objectType);
        $definition->setPriority($priority);

        $this->validator->validate($definition);

        return $definition;
    }
{@inheritdoc}